public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: linux1394-devel@lists.sourceforge.net
Cc: David Moore <dcm@MIT.EDU>, linux-scsi@vger.kernel.org
Subject: Re: [PATCH] ieee1394: sbp2: enforce 32bit DMA mapping
Date: Sun, 4 Feb 2007 20:25:43 +0100 (CET)	[thread overview]
Message-ID: <tkrat.90c5934ce8c089ca@s5r6.in-berlin.de> (raw)
In-Reply-To: <1170605197.26464.16.camel@PISCES.MIT.EDU>

David Moore wrote:
> Yes, I think you should use GFP_DMA32 instead of GFP_DMA.  GFP_DMA
> refers to just the first 16MB of memory.

Yes, I forgot that GFP_DMA is for ISA DMA. However since GFP_DMA32 is
nowhere enforced except in allocations for coherent PCI DMA and in some
AGP code I think now I'll just drop that hunk.


From: Stefan Richter <stefanr@s5r6.in-berlin.de>
Subject: ieee1394: sbp2: enforce 32bit DMA mapping

In order to use OHCI-1394 physical DMA, all s/g elements, s/g tables,
ORBs, and response buffers have to reside within the first 4 GB of the
FireWire controller's physical address space.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Index: linux-2.6.20-rc5/drivers/ieee1394/sbp2.c
===================================================================
--- linux-2.6.20-rc5.orig/drivers/ieee1394/sbp2.c
+++ linux-2.6.20-rc5/drivers/ieee1394/sbp2.c
@@ -757,6 +757,11 @@ static struct sbp2_lu *sbp2_alloc_device
 			SBP2_ERR("failed to register lower 4GB address range");
 			goto failed_alloc;
 		}
+#else
+		if (dma_set_mask(hi->host->device.parent, DMA_32BIT_MASK)) {
+			SBP2_ERR("failed to set 4GB DMA mask");
+			goto failed_alloc;
+		}
 #endif
 	}
 

-- 
Stefan Richter
-=====-=-=== --=- --=--
http://arcgraph.de/sr/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

      reply	other threads:[~2007-02-04 19:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-14 18:45 [PATCH] ieee1394: sbp2: lower block queue alignment requirement Stefan Richter
2007-01-14 19:19 ` James Bottomley
2007-01-14 20:14   ` Stefan Richter
2007-01-15 19:39     ` Kristian Høgsberg
2007-01-15 19:50       ` Mike Christie
2007-01-15 20:02       ` Stefan Richter
2007-01-15 21:24         ` James Bottomley
2007-01-25 21:35   ` Stefan Richter
2007-02-04 12:04     ` [PATCH] ieee1394: sbp2: remove unnecessary alignments of struct members Stefan Richter
2007-02-04 12:05       ` [PATCH] ieee1394: sbp2: enforce 32bit DMA mapping Stefan Richter
2007-02-04 16:06         ` David Moore
2007-02-04 19:25           ` Stefan Richter [this message]

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=tkrat.90c5934ce8c089ca@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=dcm@MIT.EDU \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    /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