ESP driver
PATCH 1/1 ESP driver
Hello,
I think I have found a bug in esp_scsi.c. Without this patch, my
SS20/SMP was not able to rebuild its internal raid1 volume due to esp0 DMA errors. With the following patch, same workstation is building a kernel, doing a rsync (between two local directories) and rebuilding a 26 GB raid1 volume without any trouble.
Index: linux/drivers/scsi/esp_scsi.c
=================================--- linux/drivers/scsi/esp_scsi.c.orig 2008-02-18 16:50:14.000000000 +0100
+++ linux/drivers/scsi/esp_scsi.c 2008-02-18 16:52:17.000000000 +0100
@@ -961,6 +961,7 @@
switch (esp->rev) {
case ESP100:
case ESP100A:
+ case FAS100A:
/* The interrupt pending bit of the status register cannot
* be trusted on these revisions.
*/
Regards,
JKBFrom: BERTRAND_Joël <[email protected]>
Date: Mon, 18 Feb 2008 22:34:25 +0100
Quoted 7 lines
I think I have found a bug in
esp_scsi.c. Without this patch, my
SS20/SMP was not able to rebuild its internal raid1 volume due to esp0 DMA errors. With the following patch, same workstation is building a kernel, doing a rsync (between two local directories) and rebuilding a 26 GB raid1 volume without any trouble.Signed-off-by BERTRAND Joel <[email protected]>
It may correct your problem for some reason, but this change is not correct (and your email client or your editor used spaces instead of tab characters in your change). The FAS100A implements the ESP_STAT_INTR bit correctly.
If the FAS100A needed this change, you would get spurious IRQs or other state machine errors, not DMA errors.
I think your change merely changes timings, making the DMA problem harder to trigger.
I'm sorry I don't have more desirable feedback for your patch, but it's the best I can do :-)
Quoted 16 lines · David Miller
From: BERTRAND_Joël <[email protected]>
Date: Mon, 18 Feb 2008 22:34:25 +0100Quoted 7 lines
I think I have found a bug in
esp_scsi.c. Without this patch, my
SS20/SMP was not able to rebuild its internal raid1 volume due to esp0 DMA errors. With the following patch, same workstation is building a kernel, doing a rsync (between two local directories) and rebuilding a 26 GB raid1 volume without any trouble.Signed-off-by BERTRAND Joel <[email protected]>It may correct your problem for some reason, but this change is not correct (and your email client or your editor used spaces instead of tab characters in your change). The FAS100A implements the
ESP_STAT_INTRbit correctly.
Quoted 8 lines
If the FAS100A needed this change, you would get spurious IRQs or other state machine errors, not DMA errors.
I think your change merely changes timings, making the DMA problem harder to trigger.
I'm sorry I don't have more desirable feedback for your patch, but it's the best I can do :-)
David,
Only one question. For you, where can I find this bug ? In arch/sparc,
in shared code or in ESP driver itself ?
I have seen that DMA errors were allways followed by some ESP resets (I
think because I can see an AUTOSENSE command on console) but this ESP reset command aborts or does not avoid ESP_STAT_INTR flag in esp->sreg. Why not reset command does not clear this flag ? I'm not sure that it's a mistake, but I don't understand why this flag remains set.
You said that my patch makes problem harder to trigger. Maybe, but I'm
pretty sure than this bug is close from this ESP_STAT_INTR flag that is not cleared for some reasons on SS20. I have tested my quick and dirty patch all night with 6 disks (two internal, four external and a CDROM reader). Configuration :
/dev/sda1 + /dev/sdb1 => /boot/dev/sda2 + /dev/sdb2 => swap/dev/sda4 + /dev/sdb4 => //dev/sda8 + /dev/sdb8 => /opt/dev/sdc1 + /dev/sdd1 + /dev/sde1 + /dev/sdf1 => /export/home (raid5)
and I have stressed ESP chip without any trouble.
Regards,
JKB
From: BERTRAND_Joël <[email protected]>
Date: Tue, 19 Feb 2008 10:20:10 +0100
Quoted 2 lines
Only one question. For you, where can I find this bug ? In
arch/sparc, in shared code or in ESP driver itself ?
I have to be terse and frank with you, I do not have the time necessary to sit down and teach someone how to debug these problems.
Besides, you will learn much more about the system if you try to explore it yourself.