Skip to contentSkip to conversation

siimage.c: two problems in init_hwif_siimage()

PATCH In review Hugo Mills 2 participants 2 messages Jun 15, 2003 – Jun 20, 2003 libata

lore
Share & tools
lore

Hugo Mills

author
#0 lore raw

PATCH 1/1 siimage.c: two problems in init_hwif_siimage()

Alan -

Two issues with the init_hwif_siimage function in
drivers/ide/pci/siimage.c:

1) is_sata returns 0 or 1, not a PCI_DEVICE_ID_.

2) In the same function, there is:

        if (hwif->pci_dev->device != PCI_DEVICE_ID_SII_3112)
                hwif->atapi_dma = 1;

This doesn't initialise the 1210SA in the same way as the 3112. I
think the line should read:

	if(!is_sata(hwif))
                hwif->atapi_dma = 1;

Patches below fix both separately.

Hugo.

drivers/ide/pci/siimage.c +1 -1
diff -ru --exclude-from patch-help/ignore linux-2.4.21-ac1/drivers/ide/pci/siimage.c linux-test/drivers/ide/pci/siimage.c
@@ -1114,7 +1114,7 @@
 	hwif->reset_poll = &siimage_reset_poll;
 	hwif->pre_reset = &siimage_pre_reset;
 
-	if(is_sata(hwif) == PCI_DEVICE_ID_SII_3112)
+	if(is_sata(hwif))
 		hwif->busproc   = &siimage_busproc;
 
 	if (!hwif->dma_base) {
drivers/ide/pci/siimage.c +1 -1
diff -ru --exclude-from patch-help/ignore linux-2.4.21-ac1/drivers/ide/pci/siimage.c linux-test/drivers/ide/pci/siimage.c
@@ -1127,7 +1127,7 @@
 	hwif->mwdma_mask = 0x07;
 	hwif->swdma_mask = 0x07;
 
-	if (hwif->pci_dev->device != PCI_DEVICE_ID_SII_3112)
+	if (!is_sata(hwif))
 		hwif->atapi_dma = 1;
 
 	hwif->ide_dma_check = &siimage_config_drive_for_dma;
Signature · 3 lines
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
        --- Great oxymorons of the world, no. 2: Common Sense ---