- To: Lin Ming <ming.m.lin@xxxxxxxxx>, Fuzhou Chen <fuzhouch@xxxxxxxxxxxxx>
- Subject: Re: [PATCH v4 0/13] SATA ZPODD support
- From: Aaron Lu <aaron.lu@xxxxxxx>
- Date: Wed, 30 May 2012 13:43:10 +0800
- Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>, Jeff Garzik <jgarzik@xxxxxxxxx>, David Woodhouse <David.Woodhouse@xxxxxxxxx>, Holger Macht <holger@xxxxxxxx>, Matthew Garrett <mjg@xxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-pm@xxxxxxxxxxxxxxx>, <linux-scsi@xxxxxxxxxxxxxxx>, <linux-ide@xxxxxxxxxxxxxxx>, <linux-acpi@xxxxxxxxxxxxxxx>
- In-reply-to: <CAF1ivSaYo8bcYAJ0i1b44HTarz11gndUU_pG109sGPOaupDi3w@mail.gmail.com>
- User-agent: Mutt/1.5.20 (2009-12-10)
On Tue, May 29, 2012 at 08:32:49PM +0800, Lin Ming wrote:
> On Mon, May 28, 2012 at 5:54 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> >> Have you fixed the fact that Matthews patches broke things like pata_acpi
> >> last time ? Until that is fixed properly I don't see that these patches
> >> can make any progress.
> >
> > https://lkml.org/lkml/2012/2/24/2
>
> Aaron has a fix.
> We'll do more test.
Here is the patch, apply on top of the ZPODD patch set.
Hi Fuzhou,
Can you please give it a test? Thanks.
I tested on my system with a ATI IDE controller and it could work with
pata_acpi module.
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c
index 6de8f32..c53266a 100644
--- a/drivers/ata/libata-acpi.c
+++ b/drivers/ata/libata-acpi.c
@@ -59,7 +59,18 @@ acpi_handle ata_ap_acpi_handle(struct ata_port *ap)
{
if (ap->flags & ATA_FLAG_ACPI_SATA)
return NULL;
- return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev);
+
+ /*
+ * If acpi bind operation has already happened, we can get the handle
+ * for the port by checking the corresponding scsi_host device's
+ * firmware node, otherwise we will need to find out the handle from
+ * its parent's acpi node.
+ */
+ if (ap->scsi_host)
+ return DEVICE_ACPI_HANDLE(&ap->scsi_host->shost_gendev);
+ else
+ return acpi_get_child(DEVICE_ACPI_HANDLE(ap->host->dev),
+ ap->port_no);
}
EXPORT_SYMBOL(ata_ap_acpi_handle);
-Aaron
>
> Thanks for the info.
> Lin Ming
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI Target Devel]
[Linux SCSI Target Infrastructure]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]