- To: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH v4 02/13] libata: bind the Linux device tree to the ACPI device tree
- From: Lin Ming <ming.m.lin@xxxxxxxxx>
- Date: Thu, 14 Jun 2012 15:43:57 +0800
- Cc: Jeff Garzik <jgarzik@xxxxxxxxx>, David Woodhouse <David.Woodhouse@xxxxxxxxx>, Aaron Lu <aaron.lu@xxxxxxx>, 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: <20120613120050.164c3f29@pyramind.ukuu.org.uk>
- List-id: <linux-ide.vger.kernel.org>
On Wed, Jun 13, 2012 at 7:00 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, 13 Jun 2012 16:03:23 +0800
> Lin Ming <ming.m.lin@xxxxxxxxx> wrote:
>
>> On Mon, May 28, 2012 at 5:51 PM, Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
>> >> +static int is_pci_ata(struct device *dev)
>> >> +{
>> >> + struct pci_dev *pdev;
>> >> +
>> >> + if (!is_pci_dev(dev))
>> >> + return 0;
>> >> +
>> >> + pdev = to_pci_dev(dev);
>> >> +
>> >> + if ((pdev->class >> 8) != PCI_CLASS_STORAGE_SATA &&
>> >> + (pdev->class >> 8) != PCI_CLASS_STORAGE_IDE)
>> >> + return 0;
>> >
>> > This needs a better name. It doesn't check if a device is PCI ATA or
>> > anything of the sort, it checks if its probably a device in compatibility
>> > mode. A lot of controllers will in fact report RAID class or similar in
>> > native mode.
>>
>> How about compat_pci_ata?
>
> Sounds reasonable. I'm not btw sure the test is entirely right, but I'm
> not sure quite what you are trying to figure out from it and how ACPI
> expects this mapping to work.
It's used to figure out if the dev passed in from scsi layer is a ata device.
scsi_sysfs_add_sdev
device_add
acpi_platform_notify
ata_acpi_find_device
is_pci_ata
Thanks,
Lin Ming
>
> Alan
--
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
[Linux Filesystems]
[Linux SCSI]
[Linux RAID]
[Git]
[Kernel Newbies]
[Linux Newbie]
[Share Photos]
[Security]
[Netfilter]
[Bugtraq]
[Photo]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]