[PATCH] siimage.c: two problems in init_hwif_siimage()

From: Hugo Mills (hugo-lkml@carfax.org.uk)
Date: Sun Jun 15 2003 - 10:13:26 EST


   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.

diff -ru --exclude-from patch-help/ignore linux-2.4.21-ac1/drivers/ide/pci/siimage.c linux-test/drivers/ide/pci/siimage.c
--- linux-2.4.21-ac1/drivers/ide/pci/siimage.c 2003-06-15 13:08:58.000000000 +0100
+++ linux-test/drivers/ide/pci/siimage.c 2003-06-15 13:29:10.000000000 +0100
@@ -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) {

diff -ru --exclude-from patch-help/ignore linux-2.4.21-ac1/drivers/ide/pci/siimage.c linux-test/drivers/ide/pci/siimage.c
--- linux-2.4.21-ac1/drivers/ide/pci/siimage.c 2003-06-15 13:08:58.000000000 +0100
+++ linux-test/drivers/ide/pci/siimage.c 2003-06-15 13:52:41.000000000 +0100
@@ -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;

-- 
=== 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 ---        


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



This archive was generated by hypermail 2b29 : Sun Jun 15 2003 - 22:00:42 EST