From: Bernhard Walle <bwalle@suse.de>
To: linux-scsi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Use unchecked_isa_dma in sd_revalidate_disk()
Date: Thu, 22 Mar 2007 18:17:03 +0100 [thread overview]
Message-ID: <20070322171703.GA22470@strauss.suse.de> (raw)
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");
reply other threads:[~2007-03-22 17:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070322171703.GA22470@strauss.suse.de \
--to=bwalle@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®