lkml.org 
[lkml]   [2012]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 02/13] libata: bind the Linux device tree to the ACPI device tree
> +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


\
 
 \ /
  Last update: 2012-05-28 12:21    [W:0.198 / U:2.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site