linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] siimage.c: two problems in init_hwif_siimage()
@ 2003-06-15 15:13 Hugo Mills
  2003-06-20 17:47 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Hugo Mills @ 2003-06-15 15:13 UTC (permalink / raw)
  To: Alan Cox, linux-kernel, linux-ide

[-- Attachment #1: Type: text/plain, Size: 1750 bytes --]

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

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] siimage.c: two problems in init_hwif_siimage()
  2003-06-15 15:13 [PATCH] siimage.c: two problems in init_hwif_siimage() Hugo Mills
@ 2003-06-20 17:47 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2003-06-20 17:47 UTC (permalink / raw)
  To: Hugo Mills; +Cc: Alan Cox, linux-kernel, linux-ide

Thanks

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-20 17:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-15 15:13 [PATCH] siimage.c: two problems in init_hwif_siimage() Hugo Mills
2003-06-20 17:47 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).