Messages in this thread | | | Date | Wed, 13 Aug 2008 11:38:22 +0200 | From | Stefan Richter <> | Subject | Re: [PATCH] firewire: fw-sbp2: enforce s/g segment size limit |
| |
Grant Grundler wrote: > On Sat, Aug 9, 2008 at 11:21 AM, Stefan Richter >> - orb->page_table[j].low = cpu_to_be32(sg_addr); >> - orb->page_table[j].high = cpu_to_be32(l << 16); > > I didn't check the rest of the driver - but it would be good if it > explicitly called dma_set_mask() or pci_dma_set_mask() with a 32-bit > mask value. Most drivers assume 32-bit and that's why I point this > out.
I thought about this and currently think that I should not do this. There is the API to set the mask, but there is no API to _decrease_ the mask only. The SBP-2 protocol driver should not set DMA_32BIT_MASK if any other driver already set for example DMA_31BIT_MASK for whatever reason.
For now, this is no issue. FireWire low-level drivers exist only for controllers with 32 bit local bus addressing capability. I am sure that somebody will remember to modify the SBP-2 driver(s) if there will ever be a controller type and a driver for it which can address more than 4 GB.
On the other hand, we also currently have no reason to set a smaller mask. We recently discovered a chip bug which requires DMA_31BIT_MASK for a special mode of data reception (only for cache-coherent DMA though), but we now work around this chip bug by simply falling back to an alternative mode. -- Stefan Richter -=====-==--- =--- -==-= http://arcgraph.de/sr/
| |