public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo-lkml@carfax.org.uk>
To: Alan Cox <alan@redhat.com>,
	linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: [PATCH] siimage.c: two problems in init_hwif_siimage()
Date: Sun, 15 Jun 2003 16:13:26 +0100	[thread overview]
Message-ID: <20030615151326.GI32730@carfax.org.uk> (raw)

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

             reply	other threads:[~2003-06-15 14:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-15 15:13 Hugo Mills [this message]
2003-06-20 17:47 ` [PATCH] siimage.c: two problems in init_hwif_siimage() Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030615151326.GI32730@carfax.org.uk \
    --to=hugo-lkml@carfax.org.uk \
    --cc=alan@redhat.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox