Re: [RFC][PATCH v2]Add pm8001 SAS/SATA HBA driver

James Bottomley
2009-09-24T21:04:16Z

On Wed, 2009-09-16 at 11:27 +0800, jack wang wrote:
> Here is an update of our driver patch that incorporates the latest review
> inputs from Eike.

I'm afraid this driver has a slightly more serious issue: it uses
virt_to_bus() and therefore won't compile on a lot of non-x86 systems:

pm8001_hwi.c: phys_addr = cpu_to_le64(virt_to_bus((void *)(ccb->buf_pr
pm8001_hwi.c: phys_addr = cpu_to_le64(virt_to_bus((void *)(ccb->buf_pr

It' looks like MEM_CCB already has the physical address of this region,
so you don't need to use virt_to_bus, you can just compute the offset
from the MEM_CCB virt address and add the phys address.

James