49 conn->
conn_ops->MaxRecvDataSegmentLength) <
50 conn->
sess->sess_ops->MaxBurstLength) {
52 conn->
conn_ops->MaxRecvDataSegmentLength;
54 conn->
conn_ops->MaxRecvDataSegmentLength;
57 (conn->
sess->sess_ops->MaxBurstLength -
68 u32 write_data_done = 0;
75 if ((write_data_done + conn->
sess->sess_ops->MaxBurstLength) <=
77 write_data_done += conn->
sess->sess_ops->MaxBurstLength;
85 static int iscsit_attach_active_connection_recovery_entry(
96 static int iscsit_attach_inactive_connection_recovery_entry(
104 pr_debug(
"Incremented connection recovery count to %u for"
119 if (cr->
cid == cid) {
187 pr_debug(
"Decremented connection recovery count to %u for"
196 static void iscsit_remove_inactive_connection_recovery_entry(
215 pr_err(
"struct iscsi_conn_recovery pointer for ITT: 0x%08x"
229 u32 dropped_count = 0;
239 (cmd->
stat_sn >= exp_statsn)) {
244 pr_debug(
"Dropping Acknowledged ITT: 0x%08x, StatSN:"
256 pr_debug(
"Dropped %u total acknowledged commands on"
257 " CID: %hu less than old ExpStatSN: 0x%08x\n",
258 dropped_count, cr->
cid, exp_statsn);
261 pr_debug(
"No commands to be reassigned for failed"
262 " connection CID: %hu on SID: %u\n",
264 iscsit_remove_inactive_connection_recovery_entry(cr, sess);
265 iscsit_attach_active_connection_recovery_entry(sess, cr);
266 pr_debug(
"iSCSI connection recovery successful for CID:"
267 " %hu on SID: %u\n", cr->
cid, sess->
sid);
270 iscsit_remove_inactive_connection_recovery_entry(cr, sess);
271 iscsit_attach_active_connection_recovery_entry(sess, cr);
277 u32 dropped_count = 0;
286 if (ooo_cmdsn->
cid != conn->
cid)
290 pr_debug(
"Dropping unacknowledged CmdSN:"
291 " 0x%08x during connection recovery on CID: %hu\n",
310 pr_debug(
"Dropped %u total unacknowledged commands on CID:"
311 " %hu for ExpCmdSN: 0x%08x.\n", dropped_count, conn->
cid,
330 pr_err(
"Unable to allocate memory for"
331 " struct iscsi_conn_recovery.\n");
351 pr_debug(
"Not performing realligence on"
352 " Opcode: 0x%02x, ITT: 0x%08x, CmdSN: 0x%08x,"
384 pr_debug(
"Preparing Opcode: 0x%02x, ITT: 0x%08x,"
385 " CmdSN: 0x%08x, StatSN: 0x%08x, CID: %hu for"
425 iscsit_attach_inactive_connection_recovery_entry(conn->
sess, cr);