Re: [PATCH] Removing PCI dependency of ahci and making it amba bus compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sagar Borikar wrote:
Thanks Jeff! Much appreciated all your comments.
Shall send the modified patch soon.

On Mon, Mar 30, 2009 at 4:16 AM, Jeff Garzik <jgarzik@xxxxxxxxx> wrote:
Comments:

* I am concerned at the unmodified duplication of so much code.  Given that
so little core AHCI modification was done, I would be interested in
exploring alternatives to wholesale code duplication.

So do you want to have a new file for ahci amba changes?

Well, two alternatives come to mind:

* add amba changes to ahci.c. Plenty of drivers are multi-bus, and AHCI need not be any different. sata_mv works on PCI and SoC embedded, for example.

* create libahci.c containing most of the code, and let ahci.c and ahci-amba.c contain only bus-specific code.

I would lean towards the first solution.


* ahci_configure_dma_masks() is wrong.  You must call generic DMA mapping
API or amba bus DMA mapping API (if exists), since you cannot call PCI DMA
mapping API.

amba doesn't have dma mapping. So that's why I explicitly set the dma
mapping stuff for platform specific although I haven't done that port
specific.

All Linux architectures must support the generic DMA mapping interface, even if it is a no-op implementation like i386.

If you peek "under the hood", the PCI DMA mapping interface is really just a wrapper for the generic DMA interface.

The right thing to do is convert AHCI's DMA mask setup code from PCI DMA mapping to generic DMA mapping API, and then make sure that amba fully implements the generic DMA mapping API.

Regards,

	Jeff



--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux