On Fri, 22 Feb 2008 09:48:28 +0000
Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:
Signed-off-by: Crane Cai <crane.cai@xxxxxxx>Vomitted-upon-by: Alan Cox <alan@xxxxxxxxxx>
Acked-by: Jeff Garzik <jeff@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
- if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {CLASS_DEVICE is cached in pdev->class so why not simply do:
- u8 tmp;
+ /* set sb600/sb700/sb800 sata to ahci mode */
+ u8 tmp;
+ pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
+ if (tmp == 0x01) {
if (pdev->class & (1 << 8))
or better yet
((pdev->class & 0xFF00) == 0x0100)