lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120528105131.67d74d45@pyramind.ukuu.org.uk>
Date:	Mon, 28 May 2012 10:51:31 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Lin Ming <ming.m.lin@...el.com>
Cc:	Jeff Garzik <jgarzik@...ox.com>,
	David Woodhouse <David.Woodhouse@...el.com>,
	Aaron Lu <aaron.lu@....com>, Holger Macht <holger@...ac.de>,
	Matthew Garrett <mjg@...hat.com>, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, linux-scsi@...r.kernel.org,
	linux-ide@...r.kernel.org, linux-acpi@...r.kernel.org
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ