2002-09-21 12:06:31

by Andries E. Brouwer

[permalink] [raw]
Subject: 2.5.37 oopses at boot in ide_toggle_bounce

2.5.37 oopses at boot in ide_toggle_bounce().
With

--- linux-2.5.37/linux/drivers/ide/ide-lib.c Sat Sep 21 11:39:48 2002
+++ linux-2.5.37a/linux/drivers/ide/ide-lib.c Sat Sep 21 14:06:45 2002
@@ -394,7 +394,7 @@
if (on && drive->media == ide_disk) {
if (!PCI_DMA_BUS_IS_PHYS)
addr = BLK_BOUNCE_ANY;
- else
+ else if (HWIF(drive)->pci_dev)
addr = HWIF(drive)->pci_dev->dma_mask;
}

it boots for me. I have not investigated a proper fix.

Andries


2002-09-22 19:48:28

by Thunder from the hill

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

Hi,

On Sat, 21 Sep 2002 [email protected] wrote:
> + else if (HWIF(drive)->pci_dev)
> addr = HWIF(drive)->pci_dev->dma_mask;

Maybe

else if (HWIF(drive) && HWIF(drive)->pci_dev)

You never know ;-)

If drive->hwif is NULL for some insane reason, we'll suck as we did with
->pci_dev.

Thunder
--
assert(typeof((fool)->next) == typeof(fool)); /* wrong */

2002-09-23 07:36:43

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Sat, Sep 21 2002, [email protected] wrote:
> 2.5.37 oopses at boot in ide_toggle_bounce().
> With
>
> --- linux-2.5.37/linux/drivers/ide/ide-lib.c Sat Sep 21 11:39:48 2002
> +++ linux-2.5.37a/linux/drivers/ide/ide-lib.c Sat Sep 21 14:06:45 2002
> @@ -394,7 +394,7 @@
> if (on && drive->media == ide_disk) {
> if (!PCI_DMA_BUS_IS_PHYS)
> addr = BLK_BOUNCE_ANY;
> - else
> + else if (HWIF(drive)->pci_dev)
> addr = HWIF(drive)->pci_dev->dma_mask;
> }
>
> it boots for me. I have not investigated a proper fix.

Patch is fine, thanks Andries.

--
Jens Axboe

2002-09-23 09:57:23

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Mon, Sep 23 2002, Andries Brouwer wrote:
> On Mon, Sep 23, 2002 at 09:41:42AM +0200, Jens Axboe wrote:
>
> > Patch is fine, thanks Andries.
>
> Yes, that patch allows the kernel to boot.
> The booted system has two main problems that 2.5.33 does not have:
> (i) It no longer sees my disks on an HPT366,
> (ii) pgrp handling changed, so that some programs hang.

I'm assuming we are talking about 2.5.38? Can you send me the kernel
boot log, thanks.

--
Jens Axboe

2002-09-23 09:59:25

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Mon, Sep 23 2002, Jens Axboe wrote:
> On Mon, Sep 23 2002, Andries Brouwer wrote:
> > On Mon, Sep 23, 2002 at 09:41:42AM +0200, Jens Axboe wrote:
> >
> > > Patch is fine, thanks Andries.
> >
> > Yes, that patch allows the kernel to boot.
> > The booted system has two main problems that 2.5.33 does not have:
> > (i) It no longer sees my disks on an HPT366,
> > (ii) pgrp handling changed, so that some programs hang.
>
> I'm assuming we are talking about 2.5.38? Can you send me the kernel
> boot log, thanks.

Ah hang on, please boot with this patch from Ivan. That should make it
work again.

--- linux/drivers/ide/setup-pci.c.bk Sat Sep 21 12:58:45 2002
+++ linux/drivers/ide/setup-pci.c Sat Sep 21 12:59:59 2002
@@ -421,20 +421,17 @@ static ide_hwif_t *ide_hwif_configure(st
{
unsigned long ctl = 0, base = 0;
ide_hwif_t *hwif;
-
- if ((dev->class >> 8) != PCI_CLASS_STORAGE_IDE)
- {
- /* Possibly we should fail if these checks report true */
- ide_pci_check_iomem(dev, d, 2*port);
- ide_pci_check_iomem(dev, d, 2*port+1);
-
- ctl = pci_resource_start(dev, 2*port+1);
- base = pci_resource_start(dev, 2*port);
- if ((ctl && !base) || (base && !ctl)) {
- printk(KERN_ERR "%s: inconsistent baseregs (BIOS) "
- "for port %d, skipping\n", d->name, port);
- return NULL;
- }
+
+ /* Possibly we should fail if these checks report true */
+ ide_pci_check_iomem(dev, d, 2*port);
+ ide_pci_check_iomem(dev, d, 2*port+1);
+
+ ctl = pci_resource_start(dev, 2*port+1);
+ base = pci_resource_start(dev, 2*port);
+ if ((ctl && !base) || (base && !ctl)) {
+ printk(KERN_ERR "%s: inconsistent baseregs (BIOS) "
+ "for port %d, skipping\n", d->name, port);
+ return NULL;
}
if (!ctl)
{


--
Jens Axboe

2002-09-23 09:56:25

by Andries Brouwer

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Mon, Sep 23, 2002 at 09:41:42AM +0200, Jens Axboe wrote:

> Patch is fine, thanks Andries.

Yes, that patch allows the kernel to boot.
The booted system has two main problems that 2.5.33 does not have:
(i) It no longer sees my disks on an HPT366,
(ii) pgrp handling changed, so that some programs hang.

Andries

2002-09-30 01:54:27

by Andries Brouwer

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Mon, Sep 23, 2002 at 12:04:24PM +0200, Jens Axboe wrote:
> > On Mon, Sep 23 2002, Andries Brouwer wrote:

> > > It no longer sees my disks on an HPT366,

> > Can you send me the kernel boot log
>
> Ah hang on, please boot with this patch from Ivan.

Patch makes no difference.

Situation:
no special kernel boot parameters concerning these disks,
no hdparm used
no CONFIG_BLK_DEV_HPT366

For 2.5.33:

HPT366: IDE controller on PCI bus 00 dev 48
HPT366: detected chipset, but driver not compiled in!
HPT366: chipset revision 1
HPT366: not 100%% native mode: will probe irqs later
ide2: BM-DMA at 0x9c00-0x9c07, BIOS settings: hde:pio, hdf:pio
HPT366: IDE controller on PCI bus 00 dev 49
HPT366: chipset revision 1
HPT366: not 100%% native mode: will probe irqs later
ide3: BM-DMA at 0xa800-0xa807, BIOS settings: hdg:pio, hdh:pio

For 2.5.38:
The string HPT does not occur in the boot log.

For 2.5.38 with CONFIG_BLK_DEV_HPT366:
all OK at first sight, the disks mount, have not tried to stress them
warnings in boot.log:

HPT366: chipset revision 1
HPT366: not 100%% native mode: will probe irqs later
ide2: BM-DMA at 0x9c00-0x9c07, BIOS settings: hde:DMA, hdf:DMA
hde: Maxtor 93652U8, ATA DISK drive
hdf: Maxtor 96147H6, ATA DISK drive
hde: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hde: set_drive_speed_status: error=0x04 { DriveStatusError }
hdf: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
hdf: set_drive_speed_status: error=0x04 { DriveStatusError }

Funny that 2.5.33 reports "BIOS settings: hde:pio, hdf:pio"
while 2.5.38 says "BIOS settings: hde:DMA, hdf:DMA".

Long ago I would get (sporadic) disk errors and fs corruption with
CONFIG_BLK_DEV_HPT366, while all worked without. Today
CONFIG_BLK_DEV_HPT366 is required, but apart from the messages quoted
I have not seen any error messages or problems. Everything works.

Precisely the same holds for 2.5.39.

Andries

2002-09-30 13:58:26

by Jens Axboe

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

On Mon, Sep 30 2002, Andries Brouwer wrote:
> On Mon, Sep 23, 2002 at 12:04:24PM +0200, Jens Axboe wrote:
> > > On Mon, Sep 23 2002, Andries Brouwer wrote:
>
> > > > It no longer sees my disks on an HPT366,
>
> > > Can you send me the kernel boot log
> >
> > Ah hang on, please boot with this patch from Ivan.
>
> Patch makes no difference.
>
> Situation:
> no special kernel boot parameters concerning these disks,
> no hdparm used
> no CONFIG_BLK_DEV_HPT366
>
> For 2.5.33:
>
> HPT366: IDE controller on PCI bus 00 dev 48
> HPT366: detected chipset, but driver not compiled in!
> HPT366: chipset revision 1
> HPT366: not 100%% native mode: will probe irqs later
> ide2: BM-DMA at 0x9c00-0x9c07, BIOS settings: hde:pio, hdf:pio
> HPT366: IDE controller on PCI bus 00 dev 49
> HPT366: chipset revision 1
> HPT366: not 100%% native mode: will probe irqs later
> ide3: BM-DMA at 0xa800-0xa807, BIOS settings: hdg:pio, hdh:pio
>
> For 2.5.38:
> The string HPT does not occur in the boot log.
>
> For 2.5.38 with CONFIG_BLK_DEV_HPT366:
> all OK at first sight, the disks mount, have not tried to stress them
> warnings in boot.log:
>
> HPT366: chipset revision 1
> HPT366: not 100%% native mode: will probe irqs later
> ide2: BM-DMA at 0x9c00-0x9c07, BIOS settings: hde:DMA, hdf:DMA
> hde: Maxtor 93652U8, ATA DISK drive
> hdf: Maxtor 96147H6, ATA DISK drive
> hde: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
> hde: set_drive_speed_status: error=0x04 { DriveStatusError }
> hdf: set_drive_speed_status: status=0x51 { DriveReady SeekComplete Error }
> hdf: set_drive_speed_status: error=0x04 { DriveStatusError }
>
> Funny that 2.5.33 reports "BIOS settings: hde:pio, hdf:pio"
> while 2.5.38 says "BIOS settings: hde:DMA, hdf:DMA".
>
> Long ago I would get (sporadic) disk errors and fs corruption with
> CONFIG_BLK_DEV_HPT366, while all worked without. Today
> CONFIG_BLK_DEV_HPT366 is required, but apart from the messages quoted
> I have not seen any error messages or problems. Everything works.
>
> Precisely the same holds for 2.5.39.

Does it work in 2.4.20-pre-ac?

--
Jens Axboe

2002-09-30 18:25:24

by Andries E. Brouwer

[permalink] [raw]
Subject: Re: 2.5.37 oopses at boot in ide_toggle_bounce

> Does it work in 2.4.20-pre-ac?


In 2.4.20-pre8 and in 2.5.33 the disks on a HPT366 are
detected without CONFIG_BLK_DEV_HPT366 being present.
Look at 2.4.20-pre8 in ide-pci.c and find an explicit list
ide_pci_chipsets that is walked by ide_scan_pcidev().

In 2.4.20-pre8ac2 and in 2.5.38 this HPT366 is not seen
without CONFIG_BLK_DEV_HPT366. The routine ide_scan_pcidev()
in setup-pci.c walks a list ide_pci_drivers that is
initially empty. HPT366 will only add itself when hpt366.c
is present and its hpt366_ide_init() invokes
ide_pci_register_driver().


So, all is well in both worlds, but one has to add
CONFIG_BLK_DEV_HPT366=y to .config now.
Long ago that would cause corruption, but so far
I have not seen any bad effects with recent kernels.

All the best - Andries