@@ -1053,12 +1053,10 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
10531053 * If a target takes us into the command phase
10541054 * assume that it has been externally reset and
10551055 * has thus lost our previous packetized negotiation
1056- * agreement. Since we have not sent an identify
1057- * message and may not have fully qualified the
1058- * connection, we change our command to TUR, assert
1059- * ATN and ABORT the task when we go to message in
1060- * phase. The OSM will see the REQUEUE_REQUEST
1061- * status and retry the command.
1056+ * agreement.
1057+ * Revert to async/narrow transfers until we
1058+ * can renegotiate with the device and notify
1059+ * the OSM about the reset.
10621060 */
10631061 scbid = ahd_get_scbptr (ahd );
10641062 scb = ahd_lookup_scb (ahd , scbid );
@@ -1085,31 +1083,15 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
10851083 ahd_set_syncrate (ahd , & devinfo , /*period*/ 0 ,
10861084 /*offset*/ 0 , /*ppr_options*/ 0 ,
10871085 AHD_TRANS_ACTIVE , /*paused*/ TRUE);
1088- ahd_outb (ahd , SCB_CDB_STORE , 0 );
1089- ahd_outb (ahd , SCB_CDB_STORE + 1 , 0 );
1090- ahd_outb (ahd , SCB_CDB_STORE + 2 , 0 );
1091- ahd_outb (ahd , SCB_CDB_STORE + 3 , 0 );
1092- ahd_outb (ahd , SCB_CDB_STORE + 4 , 0 );
1093- ahd_outb (ahd , SCB_CDB_STORE + 5 , 0 );
1094- ahd_outb (ahd , SCB_CDB_LEN , 6 );
1095- scb -> hscb -> control &= ~(TAG_ENB |SCB_TAG_TYPE );
1096- scb -> hscb -> control |= MK_MESSAGE ;
1097- ahd_outb (ahd , SCB_CONTROL , scb -> hscb -> control );
1098- ahd_outb (ahd , MSG_OUT , HOST_MSG );
1099- ahd_outb (ahd , SAVED_SCSIID , scb -> hscb -> scsiid );
1100- /*
1101- * The lun is 0, regardless of the SCB's lun
1102- * as we have not sent an identify message.
1103- */
1104- ahd_outb (ahd , SAVED_LUN , 0 );
1105- ahd_outb (ahd , SEQ_FLAGS , 0 );
1106- ahd_assert_atn (ahd );
1107- scb -> flags &= ~SCB_PACKETIZED ;
1108- scb -> flags |= SCB_ABORT |SCB_CMDPHASE_ABORT ;
1086+ scb -> flags |= SCB_EXTERNAL_RESET ;
11091087 ahd_freeze_devq (ahd , scb );
11101088 ahd_set_transaction_status (scb , CAM_REQUEUE_REQ );
11111089 ahd_freeze_scb (scb );
11121090
1091+ /* Notify XPT */
1092+ ahd_send_async (ahd , devinfo .channel , devinfo .target ,
1093+ CAM_LUN_WILDCARD , AC_SENT_BDR , NULL );
1094+
11131095 /*
11141096 * Allow the sequencer to continue with
11151097 * non-pack processing.
@@ -2218,22 +2200,6 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
22182200 if (sent_msg == MSG_ABORT_TAG )
22192201 tag = SCB_GET_TAG (scb );
22202202
2221- if ((scb -> flags & SCB_CMDPHASE_ABORT ) != 0 ) {
2222- /*
2223- * This abort is in response to an
2224- * unexpected switch to command phase
2225- * for a packetized connection. Since
2226- * the identify message was never sent,
2227- * "saved lun" is 0. We really want to
2228- * abort only the SCB that encountered
2229- * this error, which could have a different
2230- * lun. The SCB will be retried so the OS
2231- * will see the UA after renegotiating to
2232- * packetized.
2233- */
2234- tag = SCB_GET_TAG (scb );
2235- saved_lun = scb -> hscb -> lun ;
2236- }
22372203 found = ahd_abort_scbs (ahd , target , 'A' , saved_lun ,
22382204 tag , ROLE_INITIATOR ,
22392205 CAM_REQ_ABORTED );
0 commit comments