LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] Use unchecked_isa_dma in sd_revalidate_disk()
@ 2007-03-22 17:17 Bernhard Walle
0 siblings, 0 replies; only message in thread
From: Bernhard Walle @ 2007-03-22 17:17 UTC (permalink / raw)
To: linux-scsi; +Cc: linux-kernel
In sd_revalidate_disk(), the SCSI Disk driver needs a few bytes DMA memory,
allocated by kmalloc() and __GFP_DMA. This patch uses __GFP_DMA only if
the corresponding host structure has unchecked_isa_dma set.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
drivers/scsi/sd.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Index: linux-2.6.21-rc4/drivers/scsi/sd.c
===================================================================
--- linux-2.6.21-rc4.orig/drivers/scsi/sd.c
+++ linux-2.6.21-rc4/drivers/scsi/sd.c
@@ -1553,7 +1553,8 @@ static int sd_revalidate_disk(struct gen
if (!scsi_device_online(sdp))
goto out;
- buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL | __GFP_DMA);
+ buffer = kmalloc(SD_BUF_SIZE, GFP_KERNEL |
+ (sdp->host->unchecked_isa_dma ? __GFP_DMA : 0));
if (!buffer) {
printk(KERN_WARNING "(sd_revalidate_disk:) Memory allocation "
"failure.\n");
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-22 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-22 17:17 [PATCH] Use unchecked_isa_dma in sd_revalidate_disk() Bernhard Walle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).