View previous topic :: View next topic |
Author |
Message |
Cocobo-1 Apprentice
Joined: 18 Dec 2003 Posts: 166 Location: Sweden
|
Posted: Thu Dec 16, 2004 9:09 pm Post subject: 2.6.9 detects disks slow |
|
|
I upgraded to 2.6.9 kernel and now it boot alot slower that before. Here is a part of dmesg:
Code: | Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 0000:00:04.1
VP_IDE: chipset revision 16
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt82c686a (rev 22) IDE UDMA66 controller on pci0000:00:04.1
ide0: BM-DMA at 0xd800-0xd807, BIOS settings: hda:pio, hdb:pio
ide1: BM-DMA at 0xd808-0xd80f, BIOS settings: hdc:DMA, hdd:DMA
Probing IDE interface ide0...
Probing IDE interface ide1...
hdc: HITACHI DVD-ROM GD-7500, ATAPI CD/DVD-ROM drive
hdd: E295X, ATAPI CD/DVD-ROM drive
ide1 at 0x170-0x177,0x376 on irq 15
PDC20265: IDE controller at PCI slot 0000:00:11.0
ACPI: PCI interrupt 0000:00:11.0[A] -> GSI 10 (level, low) -> IRQ 10
PDC20265: chipset revision 2
PDC20265: 100% native mode on irq 10
PDC20265: (U)DMA Burst Bit ENABLED Primary PCI Mode Secondary PCI Mode.
ide2: BM-DMA at 0x8000-0x8007, BIOS settings: hde:DMA, hdf:DMA
ide3: BM-DMA at 0x8008-0x800f, BIOS settings: hdg:DMA, hdh:pio
Probing IDE interface ide2...
hde: IC35L120AVVA07-0, ATA DISK drive
hdf: IBM-DTLA-307060, ATA DISK drive
ide2 at 0x9400-0x9407,0x9002 on irq 10
Probing IDE interface ide3...
hdg: IC35L120AVV207-0, ATA DISK drive
ide3 at 0x8800-0x8807,0x8402 on irq 10
It stops here for ~30 sec
Probing IDE interface ide0...
ide0: Wait for ready failed before probe !
Probing IDE interface ide4...
ide4: Wait for ready failed before probe !
Probing IDE interface ide5...
ide5: Wait for ready failed before probe !
hde: max request size: 128KiB
hde: 241254720 sectors (123522 MB) w/1863KiB Cache, CHS=65535/16/63, UDMA(100)
hde: cache flushes supported
/dev/ide/host2/bus0/target0/lun0: p1 p2 < p5 p6 >
hdf: max request size: 128KiB
hdf: 120103200 sectors (61492 MB) w/1916KiB Cache, CHS=65535/16/63, UDMA(100)
hdf: cache flushes not supported
/dev/ide/host2/bus0/target1/lun0: p1 p2 < p5 p6 p7 >
hdg: max request size: 128KiB
hdg: 241254720 sectors (123522 MB) w/1821KiB Cache, CHS=16383/255/63, UDMA(100)
hdg: cache flushes supported
/dev/ide/host2/bus1/target0/lun0: p1 < p5 p6 >
hdc: ATAPI 40X DVD-ROM drive, 512kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
hdd: ATAPI 16X CD-ROM drive, 240kB Cache, DMA
ide-floppy driver 0.99.newide |
I have not changed my disks. This happend from 2.6.8 to 2.6.9
I have never seen this line before: Wait for ready failed before probe ! _________________ Professor: "Good news, everyone. Several years ago I tried to log onto AOL, and
it just went through. Whee! We're online." |
|
Back to top |
|
|
Cocobo-1 Apprentice
Joined: 18 Dec 2003 Posts: 166 Location: Sweden
|
Posted: Thu Dec 16, 2004 9:59 pm Post subject: |
|
|
Did some digging and found this:
Quote: | Hi Alan !
I've needed this patch (well, this is a cleaned up version of what I
used actually) for some time on PPC and on some embedded platforms. The
issue that typically happens is when the kernel is booted with an IDE
device still doing it's POST sequence (or just beeing reset, that is
with no firmware or a firmware that doesn't wait for the device to be
ready before booting the kernel).
The patch just waits up to 35 seconds (30 seconds per spec, plus a small
margin to deal with a couple of bogus drives I saw that took 31 seconds)
for the BUSY bit to go away on an HWIF.
It's mandatory in the IDE spec to pull-down D7 to ground on an inteface,
so that an interface with no driver connected should return a value with
bit BUSY 0x80 cleared, thus will not trigger this wait loop. I did a
sanity check against 0xff anyway to deal with a couple of bogus
interfaces I encountered though.
I don't expect this patch to break any existing working configuration,
so please send to Linus for 2.5. If you accept it, I'll then send a 2.4
version to Marcelo as well. This have been around for some time and,
imho, should really get in now.
Regards,
Ben. |
and a patch for the code that do the extra check. This was added in 2.5.? and have been #ifdef CONFIG_PPC until 2.6.9. I found the patch that removed the #ifdef too but no explanation why. I'll just add the ifdef to my 2.6.9 and run like I used to. _________________ Professor: "Good news, everyone. Several years ago I tried to log onto AOL, and
it just went through. Whee! We're online." |
|
Back to top |
|
|
Legoguy Apprentice
Joined: 22 Dec 2003 Posts: 166 Location: Edmonton, Alberta, Canada
|
Posted: Fri Dec 17, 2004 7:26 pm Post subject: |
|
|
Thanks for pointing this out... what file/line number and such was it supposed to be on? I want to patch my system as well - seeing same problem. |
|
Back to top |
|
|
Cocobo-1 Apprentice
Joined: 18 Dec 2003 Posts: 166 Location: Sweden
|
Posted: Sat Dec 18, 2004 12:16 am Post subject: |
|
|
The file is: /usr/src/linux/drivers/ide/ide-probe.c
Look for this and just add the ifdef like I have.
Code: | #ifdef CONFIG_PPC
/* This is needed on some PPCs and a bunch of BIOS-less embedded
* platforms. Typical cases are:
*
* - The firmware hard reset the disk before booting the kernel,
* the drive is still doing it's poweron-reset sequence, that
* can take up to 30 seconds
* - The firmware does nothing (or no firmware), the device is
* still in POST state (same as above actually).
* - Some CD/DVD/Writer combo drives tend to drive the bus during
* their reset sequence even when they are non-selected slave
* devices, thus preventing discovery of the main HD
*
* Doing this wait-for-busy should not harm any existing configuration
* (at least things won't be worse than what current code does, that
* is blindly go & talk to the drive) and fix some issues like the
* above.
*
* BenH.
*/
if (wait_hwif_ready(hwif))
printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
#endif
|
I also added ifdef here to get rid of some warnings.
Code: |
#ifdef CONFIG_PPC
static int wait_hwif_ready(ide_hwif_t *hwif)
{
int rc;
printk(KERN_DEBUG "Probing IDE interface %s...\n", hwif->name);
/* Let HW settle down a bit from whatever init state we
* come from */
mdelay(2);
/* Wait for BSY bit to go away, spec timeout is 30 seconds,
* I know of at least one disk who takes 31 seconds, I use 35
* here to be safe
*/
rc = ide_wait_not_busy(hwif, 35000);
if (rc)
return rc;
/* Now make sure both master & slave are ready */
SELECT_DRIVE(&hwif->drives[0]);
hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
mdelay(2);
rc = ide_wait_not_busy(hwif, 10000);
if (rc)
return rc;
SELECT_DRIVE(&hwif->drives[1]);
hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]);
mdelay(2);
rc = ide_wait_not_busy(hwif, 10000);
/* Exit function with master reselected (let's be sane) */
SELECT_DRIVE(&hwif->drives[0]);
return rc;
}
#endif
|
_________________ Professor: "Good news, everyone. Several years ago I tried to log onto AOL, and
it just went through. Whee! We're online." |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|