- To: Lin Ming <ming.m.lin@xxxxxxxxx>
- Subject: Re: [PATCH v4 02/13] libata: bind the Linux device tree to the ACPI device tree
- From: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 28 May 2012 10:51:31 +0100
- 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: <1338181720-4149-3-git-send-email-ming.m.lin@intel.com>
> +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.
Alan
--
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]