Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: qla2xxx: edif: Fix slow session teardown

User experience slow recovery when target device went through a stop/start
of the authentication application (app_stop/app_start).

Between the period of app_stop and app_start on the target device, target
device choose to send ELS Reject for any receive AUTH ELS command. At this
time, authentication application does not do ELS reject if it encounters
error.

Therefore, AUTH ELS reject signify authentication application is not
running. If driver passes up the AUTH ELS Reject to the authentication
application, then it would result in authentication application
retrying/resending the same AUTH ELS command again + delay.

As a work around, driver should trigger a session tear down where it tells
the local authentication application to also tear down. At the next
relogin, both sides are then synchronized.

Link: https://lore.kernel.org/r/20220608115849.16693-10-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Quinn Tran and committed by
Martin K. Petersen
bcf53607 37be3f9d

+20 -14
+20 -14
drivers/scsi/qla2xxx/qla_isr.c
··· 2245 2245 res = DID_ERROR << 16; 2246 2246 } 2247 2247 2248 - if (logit) { 2249 - if (sp->remap.remapped && 2250 - ((u8 *)sp->remap.rsp.buf)[0] == ELS_LS_RJT) { 2248 + if (sp->remap.remapped && 2249 + ((u8 *)sp->remap.rsp.buf)[0] == ELS_LS_RJT) { 2250 + if (logit) { 2251 2251 ql_dbg(ql_dbg_user, vha, 0x503f, 2252 2252 "%s IOCB Done LS_RJT hdl=%x comp_status=0x%x\n", 2253 2253 type, sp->handle, comp_status); ··· 2259 2259 pkt)->total_byte_count), 2260 2260 e->s_id[0], e->s_id[2], e->s_id[1], 2261 2261 e->d_id[2], e->d_id[1], e->d_id[0]); 2262 - } else { 2263 - ql_log(ql_log_info, vha, 0x503f, 2264 - "%s IOCB Done hdl=%x comp_status=0x%x\n", 2265 - type, sp->handle, comp_status); 2266 - ql_log(ql_log_info, vha, 0x503f, 2267 - "subcode 1=0x%x subcode 2=0x%x bytes=0x%x %02x%02x%02x -> %02x%02x%02x\n", 2268 - fw_status[1], fw_status[2], 2269 - le32_to_cpu(((struct els_sts_entry_24xx *) 2270 - pkt)->total_byte_count), 2271 - e->s_id[0], e->s_id[2], e->s_id[1], 2272 - e->d_id[2], e->d_id[1], e->d_id[0]); 2273 2262 } 2263 + if (sp->fcport && sp->fcport->flags & FCF_FCSP_DEVICE && 2264 + sp->type == SRB_ELS_CMD_HST_NOLOGIN) { 2265 + ql_dbg(ql_dbg_edif, vha, 0x911e, 2266 + "%s rcv reject. Sched delete\n", __func__); 2267 + qlt_schedule_sess_for_deletion(sp->fcport); 2268 + } 2269 + } else if (logit) { 2270 + ql_log(ql_log_info, vha, 0x503f, 2271 + "%s IOCB Done hdl=%x comp_status=0x%x\n", 2272 + type, sp->handle, comp_status); 2273 + ql_log(ql_log_info, vha, 0x503f, 2274 + "subcode 1=0x%x subcode 2=0x%x bytes=0x%x %02x%02x%02x -> %02x%02x%02x\n", 2275 + fw_status[1], fw_status[2], 2276 + le32_to_cpu(((struct els_sts_entry_24xx *) 2277 + pkt)->total_byte_count), 2278 + e->s_id[0], e->s_id[2], e->s_id[1], 2279 + e->d_id[2], e->d_id[1], e->d_id[0]); 2274 2280 } 2275 2281 } 2276 2282 goto els_ct_done;