@@ -1102,6 +1102,18 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)
1102
1102
1103
1103
iscsit_inc_conn_usage_count (conn );
1104
1104
1105
+ /*
1106
+ * If the command was aborted, for instance following a LUN RESET,
1107
+ * a dataout timeout might be normal.
1108
+ */
1109
+ if (target_cmd_interrupted (& cmd -> se_cmd )) {
1110
+ pr_debug ("DataOut timeout on interrupted cmd with"
1111
+ " ITT[0x%08llx]\n" , cmd -> se_cmd .tag );
1112
+ cmd -> dataout_timer_flags &= ~ISCSI_TF_RUNNING ;
1113
+ iscsit_dec_conn_usage_count (conn );
1114
+ return ;
1115
+ }
1116
+
1105
1117
spin_lock_bh (& cmd -> dataout_timeout_lock );
1106
1118
if (cmd -> dataout_timer_flags & ISCSI_TF_STOP ) {
1107
1119
spin_unlock_bh (& cmd -> dataout_timeout_lock );
@@ -1115,19 +1127,22 @@ void iscsit_handle_dataout_timeout(struct timer_list *t)
1115
1127
if (!sess -> sess_ops -> ErrorRecoveryLevel ) {
1116
1128
pr_err ("Unable to recover from DataOut timeout while"
1117
1129
" in ERL=0, closing iSCSI connection for I_T Nexus"
1118
- " %s,i,0x%6phN,%s,t,0x%02x\n" ,
1130
+ " %s,i,0x%6phN,%s,t,0x%02x, cmd ITT[0x%08llx] \n" ,
1119
1131
sess -> sess_ops -> InitiatorName , sess -> isid ,
1120
- sess -> tpg -> tpg_tiqn -> tiqn , (u32 )sess -> tpg -> tpgt );
1132
+ sess -> tpg -> tpg_tiqn -> tiqn , (u32 )sess -> tpg -> tpgt ,
1133
+ cmd -> se_cmd .tag );
1121
1134
goto failure ;
1122
1135
}
1123
1136
1124
1137
if (++ cmd -> dataout_timeout_retries == na -> dataout_timeout_retries ) {
1125
1138
pr_err ("Command ITT: 0x%08x exceeded max retries"
1126
1139
" for DataOUT timeout %u, closing iSCSI connection for"
1127
- " I_T Nexus %s,i,0x%6phN,%s,t,0x%02x\n" ,
1140
+ " I_T Nexus %s,i,0x%6phN,%s,t,0x%02x,"
1141
+ " cmd ITT[0x%08llx]\n" ,
1128
1142
cmd -> init_task_tag , na -> dataout_timeout_retries ,
1129
1143
sess -> sess_ops -> InitiatorName , sess -> isid ,
1130
- sess -> tpg -> tpg_tiqn -> tiqn , (u32 )sess -> tpg -> tpgt );
1144
+ sess -> tpg -> tpg_tiqn -> tiqn , (u32 )sess -> tpg -> tpgt ,
1145
+ cmd -> se_cmd .tag );
1131
1146
goto failure ;
1132
1147
}
1133
1148
0 commit comments