Linux 2.4.21-rc3 : IDE pb on Alpha
Quoted 9 lines
the system could boot without DMA. It displayed lots of messages, but it seems to work :
So it seems as the IDE problem is in the ALI 1543 / DMA code. I have an old K6/2 notebook somewhere with the same IDE controller, so I may retry on it.
I'm interested in any suggestion, of course ;-)
I have the same system and run into the same problems here. The HD is a Fujitsu MPD3108AT (10GB ATA33/66 drive, what the machine shipped with) on hda. Even with the 2.4.21-rc4 kernel, the machine will not boot beyond the "attached ide-disk driver" message if IDE DMA is compiled in.
Whatever's going wrong doesn't require an older drive to show up.
Let me know how I can help,
jasonp
Quoted 6 lines · Jason Papadopoulos
I have the same system and run into the same problems here. The HD is a Fujitsu MPD3108AT (10GB ATA33/66 drive, what the machine shipped with) on hda. Even with the 2.4.21-rc4 kernel, the machine will not boot beyond the "attached ide-disk driver" message if IDE DMA is compiled in.
Whatever's going wrong doesn't require an older drive to show up.
I could finally enable DMA, only if I do it at run time :
- enable "Generic PCI bus master DMA support"
- disable "Use PCI DMA by default when available"
- hdparm -d 1 /dev/every_disk
I realized that a "idex=nodma" option is really lacking here. Shouldn't we disable IDE by default on Alpha at the moment, so that it at least boots ? The adventurous could always use hdparm to enable it again (it survived my 39 GB save/restore).
Regards,
Willy
Quoted 2 lines · Willy Tarreau
I realized that a "idex=nodma" option is really lacking here. Shouldn't we disable IDE by default on Alpha at the moment, so that it at least boots ?
According to your .config and dmesg output, you didn't have the chipset driver compiled in (CONFIG_BLK_DEV_ALI15X3). Naturally, you would have troubles with DMA.
Ivan.
Quoted 7 lines · Ivan Kokshaysky
Quoted 2 lines · Willy Tarreau
I realized that a "idex=nodma" option is really lacking here. Shouldn't we disable IDE by default on Alpha at the moment, so that it at least boots ?
According to your .config and dmesg output, you didn't have the chipset driver compiled in (
CONFIG_BLK_DEV_ALI15X3). Naturally, you would have troubles with DMA.
Sorry, I pasted the .config that I used just after, and which allowed me to boot. Later I set CONFIG_BLK_DEV_ALI15X3 again and CONFIG_BLK_DEV_IDEDMA_PCI, but I left CONFIG_IDEDMA_PCI_AUTO disabled. I now can boot and enable DMA later. That's weird, but it works.
Regards,
Willy
Quoted 4 lines · Willy Tarreau
Sorry, I pasted the .config that I used just after, and which allowed me to boot. Later I set
CONFIG_BLK_DEV_ALI15X3again andCONFIG_BLK_DEV_IDEDMA_PCI, but I leftCONFIG_IDEDMA_PCI_AUTOdisabled. I now can boot and enable DMA later. That's weird, but it works.
Perhaps not that weird. From my experience, ALi DMA is sensitive to some of "PIO timings". That is, if SRM hasn't initialized the chipset properly (on Nautilus it has, BTW), DMA won't work. When you boot with DMA disabled, driver has to set right PIO mode, so you can safely enable DMA later.
Can you (and Jason) try this patch with CONFIG_IDEDMA_PCI_AUTO=y?
Ivan.
drivers/ide/pci/alim15x3.c renamed from drivers/ide/pci/alim15x3.c.orig +6 -4
@@ -525,10 +525,14 @@ static int ali15x3_config_drive_for_dma( drive->init_speed =0 ; +/* Set reasonable PIO timings first - some of them are needed +for DMA as well. */ + hwif->tuneproc (drive,255 ); +if ((id->capability &1 ) !=0 && drive->autodma) {/* Consult the list of known "bad" drives */ if (hwif->ide_dma_bad_drive (drive)) - goto ata_pio; + goto no_dma_set;if ((id->field_valid &4 ) && (m5229_revision >=0xC2 )) {if (id->dma_ultra & hwif->ultra_mask) {/* Force if Capable UltraDMA */
@@ -550,11 +554,9 @@ try_dma_modes:if (!config_chipset_for_dma (drive)) goto no_dma_set; }else { - goto ata_pio; + goto no_dma_set; } }else { -ata_pio: - hwif->tuneproc (drive,255 ); no_dma_set:return hwif->ide_dma_off_quietly (drive); }
Quoted 6 lines · Ivan Kokshaysky
Quoted 4 lines · Willy Tarreau
Sorry, I pasted the .config that I used just after, and which allowed me to boot. Later I set
CONFIG_BLK_DEV_ALI15X3again andCONFIG_BLK_DEV_IDEDMA_PCI, but I leftCONFIG_IDEDMA_PCI_AUTOdisabled. I now can boot and enable DMA later. That's weird, but it works.
Quoted 7 lines
Perhaps not that weird. From my experience, ALi DMA is sensitive to some of "PIO timings". That is, if SRM hasn't initialized the chipset properly (on Nautilus it has, BTW), DMA won't work. When you boot with DMA disabled, driver has to set right PIO mode, so you can safely enable DMA later.
Can you (and Jason) try this patch with
CONFIG_IDEDMA_PCI_AUTO=y?
Compilation in progress, but it will wait for me to get in touch with the machine to reboot it (probably this evening).
Cheers,
Willy
Hi !
Quoted 1 line · Ivan Kokshaysky
Can you (and Jason) try this patch with
CONFIG_IDEDMA_PCI_AUTO=y?
Well, I tried to reboot (blindly, only with a keyboard attached) on the new kernel, but it behave the same way : "boot -fl 1" (1 is the new kernel) does a few disk accesses to load the kernel, then hangs, while "0" boots correctly, so I'm sure my keyboard is correctly plugged and I don't mistype.
Sorry Ivan for such a miserable report, but I couldn't plug either a VT or a VGA display. I will retry -rc5 (or -rc6) ASAP, but for now I'm going to bed.
Marcelo, the AHA29160 on this system (alpha) spurts lots of debug messages "blk: queue 0xffff..." at boot with the version in -rc3. Justin pointed me to drivers/block/ll_rw_blk.c:268 which is responsible for the message. It's marked as debug, but no KERN_XXX prefix is used. So I think that either KERN_DEBUG should be added, or the message should simply disappear, since it sends garbage on the screen which makes SCSI detection a bit hard to read.
Here are two quickly written, completely untested patch proposals. Please note that this code has not changed since 2.4.20 (which I never tested on this machine).
Regards,
Willy
######## the most correct one ? ########
tmp/ll_rw_blk.c-debug renamed from drivers/block/ll_rw_blk.c +1 -1
@@ -265,7 +265,7 @@ */ if (dma_addr != BLK_BOUNCE_HIGH && q != old_q) { old_q = q; - printk("blk: queue %p, ", q); + printk(KERN_DEBUG "blk: queue %p, ", q); if (dma_addr == BLK_BOUNCE_ANY) printk("no I/O memory limit\n"); else
##### this one hides the message. Note that it may lead to a warning ##### with mb defined but not used !
tmp/ll_rw_blk.c-nomsg renamed from drivers/block/ll_rw_blk.c +2 -0
@@ -265,12 +265,14 @@ */ if (dma_addr != BLK_BOUNCE_HIGH && q != old_q) { old_q = q; +#ifdef BLK_QUEUE_DEBUG printk("blk: queue %p, ", q); if (dma_addr == BLK_BOUNCE_ANY) printk("no I/O memory limit\n"); else printk("I/O limit %luMb (mask 0x%Lx)\n", mb, (long long) dma_addr); +#endif } q->bounce_pfn = bounce_pfn;
Quoted 8 lines · you
Perhaps not that weird. From my experience, ALi DMA is sensitive to some of "PIO timings". That is, if SRM hasn't initialized the chipset properly (on Nautilus it has, BTW), DMA won't work. When you boot with DMA disabled, driver has to set right PIO mode, so you can safely enable DMA later.
Can you (and Jason) try this patch with
CONFIG_IDEDMA_PCI_AUTO=y?
Sorry, no change. I do get behavior that matches Willy's though: use hdparm and you can get DMA turned on. Another clue is that the ALI controller is capable of udma2 (and older kernels achieve that) but even with hdparm the best I can get seems to be mode mdma2.
Also, I've found that lately I have to attempt to boot from the hard drive (dqa0) about three times before the kernel finally gets pulled off of disk. SRM reports a bootstrap failure each time, but otherwise the system seems to work fine. Has anyone seen this behavior?
Anything else I can do?
jasonp
Quoted 4 lines · Jason Papadopoulos
Sorry, no change. I do get behavior that matches Willy's though: use hdparm and you can get DMA turned on. Another clue is that the ALI controller is capable of udma2 (and older kernels achieve that) but even with hdparm the best I can get seems to be mode mdma2.
FWIW, udma2 is the best you can do without accurate cable detection and an 80-conductor cable.
Jeff
Quoted 4 lines · Jeff Garzik
FWIW, udma2 is the best you can do without accurate cable detection and an 80-conductor cable.
Well, even with a drive capable of ATA66, an 80-pin cable, and a kernel configured to force assumption of higher UDMA modes, the best I've ever done with this stupid ALI controller is udma2. I think it's deliberately crippled.
jasonp
Quoted 10 lines · Jason Papadopoulos
Quoted 4 lines · Jeff Garzik
FWIW, udma2 is the best you can do without accurate cable detection and an 80-conductor cable.
Well, even with a drive capable of ATA66, an 80-pin cable, and a kernel configured to force assumption of higher UDMA modes, the best I've ever done with this stupid ALI controller is udma2. I think it's deliberately crippled.
"configured to force the assumption" does no good if the host controller driver isn't detecting the cable correctly, or is not programming 80c cable info into the host controller correctly. That's a code change not a configuration thing.
Jeff
Quoted 4 lines · Jason Papadopoulos
Also, I've found that lately I have to attempt to boot from the hard drive (dqa0) about three times before the kernel finally gets pulled off of disk. SRM reports a bootstrap failure each time, but otherwise the system seems to work fine. Has anyone seen this behavior?
Yes, it's known problem. Recent 2.4 kernels shutdown the IDE disks on halt/poweroff, which is extremely annoying on alpha when you return to SRM prompt to boot another kernel. You'll have to wait until the disk spins up again.
Quoted 1 line
Anything else I can do?
Send me please "lspci -vxxx -s 0:d" outputs for
- old (working) kernel;
- new kernel before and after "hdparm -d1".
Ivan.
Quoted 6 lines · Ivan Kokshaysky
Quoted 4 lines · Willy Tarreau
Sorry, I pasted the .config that I used just after, and which allowed me to boot. Later I set
CONFIG_BLK_DEV_ALI15X3again andCONFIG_BLK_DEV_IDEDMA_PCI, but I leftCONFIG_IDEDMA_PCI_AUTOdisabled. I now can boot and enable DMA later. That's weird, but it works.
Quoted 7 lines
Perhaps not that weird. From my experience, ALi DMA is sensitive to some of "PIO timings". That is, if SRM hasn't initialized the chipset properly (on Nautilus it has, BTW), DMA won't work. When you boot with DMA disabled, driver has to set right PIO mode, so you can safely enable DMA later.
Can you (and Jason) try this patch with
CONFIG_IDEDMA_PCI_AUTO=y?
Dave Miller asked me to try this patch. On sparc64, we've had a never ending battle with ALi 5229 on Sun Blade 100's. After some time, files would start to get corrupted (in memory, not on disk, unless the corruption was saved somehow inadvertently). It exposed itself as two null bytes at the start of a file.
I just tried this patch, and for the first time in a long time, I've been able to boot with UDMA(66) enabled and not get the corruption. Usually I can expose the corruption with kernel compiles within 10-60 minutes. I've been running your patch for almost 2 days now, and so far have not been able get corruption. I even left a looping 2.5.69 compile going (make clean; make) for over 10 hours.
Signature · 4 lines
Debian - http://www.debian.org/ Linux 1394 - http://www.linux1394.org/ Subversion - http://subversion.tigris.org/ Deqo - http://www.deqo.com/
Quoted 2 lines · Ben Collins
I just tried this patch, and for the first time in a long time, I've been able to boot with UDMA(66) enabled and not get the corruption.
Excellent, thanks for the report. :-)
Ivan.