public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* hpt366.c: wrong timings used since 2.6.8
@ 2004-08-26 22:36 Folke Ashberg
  2004-08-29 13:18 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Folke Ashberg @ 2004-08-26 22:36 UTC (permalink / raw)
  To: linux-kernel

Hi there,

i have an HPT372A (rev 02) (PCI_DEVICE_ID_TTI_HPT372) and since 2.6.8
i've got an Ooooops.

I saw that hpt366.c got support for HPT372_N_ and its special timings, but
that timings have been used for my HPT372_A_ and caused the Oops.

I did the following and now it works:
-------------------------------------------
diff -pur linux-2.6.9rc1-orig/drivers/ide/pci/hpt366.c linux-2.6.9rc1/drivers/ide/pci/hpt366.c
--- linux-2.6.9rc1-orig/drivers/ide/pci/hpt366.c        2004-08-26 19:42:16.000000000 +0200
+++ linux-2.6.9rc1/drivers/ide/pci/hpt366.c     2004-08-26 23:22:56.000000000 +0200
@@ -881,7 +881,7 @@ static int __devinit init_hpt37x(struct
        /* interrupt force enable */
        pci_write_config_byte(dev, 0x5a, (reg5ah & ~0x10));

-       if(dmabase)
+       if(dev->device == PCI_DEVICE_ID_TTI_HPT372N && dmabase)
        {
                did = inb(dmabase + 0x22);
                rid = inb(dmabase + 0x28);
@@ -1132,7 +1132,7 @@ static void __devinit init_hwif_hpt366(i
        unsigned long dmabase           = hwif->dma_base;
        int is_372n = 0;

-       if(dmabase)
+       if(dev->device == PCI_DEVICE_ID_TTI_HPT372N && dmabase)
        {
                did = inb(dmabase + 0x22);
                rid = inb(dmabase + 0x28);
-------------------------------------------

Not to also check dev->device for the N-Version at that two places
(which are used also for other versions) seems to be wrong.


Kind Regards

Folke Ashberg

-- 
Folke Ashberg
folke@ashberg.de
www.ashberg.de

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

* Re: hpt366.c: wrong timings used since 2.6.8
  2004-08-26 22:36 hpt366.c: wrong timings used since 2.6.8 Folke Ashberg
@ 2004-08-29 13:18 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2004-08-29 13:18 UTC (permalink / raw)
  To: Folke Ashberg; +Cc: Linux Kernel Mailing List

On Iau, 2004-08-26 at 23:36, Folke Ashberg wrote:
> I saw that hpt366.c got support for HPT372_N_ and its special timings, but
> that timings have been used for my HPT372_A_ and caused the Oops.

The change you suggest is definitely wrong and will cause disk
corruption on the 372N

> I did the following and now it works:

Please post the actual oops data and if you can the rid/did.  The 372N
is identified by two things - PCI ID _or_ RID/DID. Not all 372N cards
have the unique PCI ID.


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

end of thread, other threads:[~2004-08-29 14:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-26 22:36 hpt366.c: wrong timings used since 2.6.8 Folke Ashberg
2004-08-29 13:18 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox