--- linux/drivers/scsi/aic7xxx/aic79xx_core.c.orig 2002-12-02 14:15:51.000000000 -0500 +++ linux/drivers/scsi/aic7xxx/aic79xx_core.c 2002-12-02 14:18:06.000000000 -0500 @@ -782,7 +782,10 @@ struct scb *scb; u_int scbindex = ahd_get_scbptr(ahd); u_int lastphase = ahd_inb(ahd, LASTPHASE); + u_int flg = ahd_inb(ahd, SEQ_FLAGS); + char channel; + channel = SCB_GET_CHANNEL(ahd, scb); scb = ahd_lookup_scb(ahd, scbindex); ahd_print_path(ahd, scb); printf("data overrun detected %s." @@ -791,7 +794,7 @@ SCB_GET_TAG(scb)); ahd_print_path(ahd, scb); printf("%s seen Data Phase. Length = %ld. NumSGs = %d.\n", - ahd_inb(ahd, SEQ_FLAGS) & DPHASE ? "Have" : "Haven't", + flg & DPHASE ? "Have" : "Haven't", ahd_get_transfer_length(scb), scb->sg_count); ahd_dump_sglist(scb); @@ -802,6 +805,18 @@ ahd_freeze_devq(ahd, scb); ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR); ahd_freeze_scb(scb); + + if (lastphase == P_DATAIN && (flg & DPHASE)) { /*ARC*/ + int found; + /* Gets here if SAF-TE hot-insertion occurs. + * Would reset later anyway after multiple timeouts. + */ + found = ahd_reset_channel(ahd, channel, + /*initiate reset*/TRUE); + printf(KERN_ERR "%s: Issued Channel %c Bus Reset. " + "%d SCBs aborted\n", ahd_name(ahd), channel, + found); + } break; } case MKMSG_FAILED: