GAK!!!! Re: PCI: AMD SATA IDE mode quirk

From: Alan Cox
Date: Fri Feb 22 2008 - 04:58:36 EST


> Signed-off-by: Crane Cai <crane.cai@xxxxxxx>
> Acked-by: Jeff Garzik <jeff@xxxxxxxxxx>
> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

Vomitted-upon-by: Alan Cox <alan@xxxxxxxxxx>

> - if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
> - u8 tmp;
> + /* set sb600/sb700/sb800 sata to ahci mode */
> + u8 tmp;
>
> + pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
> + if (tmp == 0x01) {

CLASS_DEVICE is cached in pdev->class so why not simply do:

if (pdev->class & (1 << 8))


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/