lkml.org 
[lkml]   [2003]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] 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.

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 --- [unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.048 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site