RE: [patch 3/6] scsi, fnic: require DMA support for Cisco FNIC
From: Abhijeet Joglekar (abjoglek)
Date: Wed May 25 2011 - 19:35:20 EST
> -----Original Message-----
> From: roland@xxxxxxxxxxxxxxx [mailto:roland@xxxxxxxxxxxxxxx] On Behalf
> Of Roland Dreier
> Sent: Wednesday, May 25, 2011 12:29 PM
> To: Christoph Hellwig
> Cc: David Rientjes; James E.J. Bottomley; Pekka Enberg; Christoph
> Lameter; linux-scsi@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> Abhijeet Joglekar (abjoglek); Joe Eykholt
> Subject: Re: [patch 3/6] scsi, fnic: require DMA support for Cisco FNIC
>
> On Wed, May 25, 2011 at 1:04 AM, Christoph Hellwig <hch@xxxxxxxxxxxxx>
> wrote:
> >> The Cisco FNIC driver requires creating a SLAB_CACHE_DMA cache,
> which is
> >> not possible if CONFIG_ZONE_DMA is disasbled. Avoid compiling it
> without
> >> DMA support.
> >
> > And you're sure it actually needs it and isn't some sort of typo? It
> > might help to Cc the maintainer to figure that out.
>
> Yes, almost certainly it is due to a misunderstanding of what
> SLAB_CACHE_DMA means.
> (fnic is a modern PCIe device that doesn't have 24-bit DMA restrictions
> ;)
>
> So the correct fix would likely be to delete the SLAB_CACHE_DMA from
> the driver.
>
> In any case cc'ing Cisco people as hch suggested...
>
> - R.
You are right, fnic hardware does not have any 24-bit DMA restrictions. When I coded it up, I misunderstood the flag as something that is required for allocating memory that hardware DMAs in/out of.
As Roland indicated, the correct fix would be to remove the SLAB_CACHE_DMA flag from the call to kmem_cache, and the GFP_DMA from the call to the mempool allocation routine.
I can create a patch (attributing the fix to David and Roland) and send out for review. Or if David wants, he can modify the patch he submitted to include this fix. David, please let me know how you want to proceed.
Thanks
-- abhijeet
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/