Re: constant bus resets with aic7xxx and 2.4.0-test1-ac7

From: Stephen J. Gowdy (SGowdy@lbl.gov)
Date: Mon Jun 05 2000 - 18:08:13 EST


Martin Maciaszek wrote:
>
> During the bootup process the 2.4.0-test1-ac7 kernel starts to
> reset the scsi bus constantly and won't detect the devices
> attached on the scsi bus. Of course it won't boot further. It
> worked fine with -ac4 (which is the last I tried before)

I've attached a patch I got from the linux-scsi mailing list to work
around this. It worked for me.

-- 
 /------------------------------+-=-=-=-=-+-------------------------\
|Stephen J. Gowdy               |A4000/040| Mail Stop 50A-2160, LBL, |
|http://www.ph.ed.ac.uk/~gowdy/ | 1GB   HD| 1 Cyclotron Rd, Berkeley,|
|                               |20MB  RAM| CA 94720, USA            |
|InterNet: SGowdy@lbl.gov       |3.4xCDROM| Tel: +1 510 495 2796     |
 \------------------------------+-=-=-=-=-+-------------------------/

--- /opt/kernel/linux-2.4.0-test1-ac6/drivers/scsi/scsi_scan.c Wed May 31 00:14:25 2000 +++ drivers/scsi/scsi_scan.c Wed May 31 00:14:18 2000 @@ -483,7 +483,38 @@ SDpnt->expecting_cc_ua = 0; SDpnt->starved = 0; + scsi_cmd[0] = TEST_UNIT_READY; + scsi_cmd[1] = lun << 5; + scsi_cmd[2] = scsi_cmd[3] = scsi_cmd[4] = scsi_cmd[5] = 0; + SRpnt = scsi_allocate_request(SDpnt); + + SRpnt->sr_data_direction = SCSI_DATA_NONE; + scsi_wait_req (SRpnt, (void *) scsi_cmd, + (void *) NULL, + 0, SCSI_TIMEOUT + 4 * HZ, 5); + + SCSI_LOG_SCAN_BUS(3, printk("scsi: scan_scsis_single id %d lun %d. Return code 0x%08x\n", + dev, lun, SRpnt->sr_result)); + SCSI_LOG_SCAN_BUS(3, print_driverbyte(SRpnt->sr_result)); + SCSI_LOG_SCAN_BUS(3, print_hostbyte(SRpnt->sr_result)); + SCSI_LOG_SCAN_BUS(3, printk("\n")); + + if (SRpnt->sr_result) { + if (((driver_byte(SRpnt->sr_result) & DRIVER_SENSE) || + (status_byte(SRpnt->sr_result) & CHECK_CONDITION)) && + ((SRpnt->sr_sense_buffer[0] & 0x70) >> 4) == 7) { + if (((SRpnt->sr_sense_buffer[2] & 0xf) != NOT_READY) && + ((SRpnt->sr_sense_buffer[2] & 0xf) != UNIT_ATTENTION) && + ((SRpnt->sr_sense_buffer[2] & 0xf) != ILLEGAL_REQUEST || lun > 0)) { + scsi_release_request(SRpnt); + return 1; + } + } else { + scsi_release_request(SRpnt); + return 0; + } + } /* * We used to do a TEST_UNIT_READY before the INQUIRY but that was

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:23 EST