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