scsi.c patch to allow resets at boot time.

Dario_Ballabio@milano.europe.dg.com
Tue, 22 Oct 1996 15:51:09 +0200


Here enclosed a small but important patch to scsi.c. The aim of this
patch is to allow a scsi reset also near boot time (i.e. before
MIN_RESET_PERIOD seconds from the boot). As a matter of fact some buggy
drives (like SEAGATE ST1480) report a target_status BUSY until the
scsi bus is reset, causing a READ CAPACITY failed error at drive
detection.
This patch allow the mid level scsi code to perform the reset while
doing a MAYREDO, after 2 retires.
Cheers,
--- scsi.c.2.1.5 Tue Oct 22 14:58:47 1996
+++ scsi.c Tue Oct 22 15:08:34 1996
@@ -1795,7 +1795,8 @@
if ((++SCpnt->retries) < SCpnt->allowed)
{
if ((SCpnt->retries >= (SCpnt->allowed >> 1))
- && !(jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD)
+ && !(SCpnt->host->last_reset &&
+ (jiffies < SCpnt->host->last_reset + MIN_RESET_PERIOD))
&& !(SCpnt->flags & WAS_RESET))
{
printk("scsi%d channel %d : resetting for second half of retries.\n",