* updated maddy (0.7.1 -> 0.8.1), untested
[t2sde.git] / package / kernel / linux / hotfix-qla2xxx-sun-blade.patch
blob7446dcb3b885ad7e530c57d4aec43e2d7811358e
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/linux/hotfix-qla2xxx-sun-blade.patch
3 # Copyright (C) 2023 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 fix:
15 qla2xxx [0001:00:04.0]-5030:1: Error entry - invalid handle/queue (0001).
16 qla2xxx [0001:00:04.0]-5032:1: ERROR-IOCB: Invalid completion handle (0) -- timed-out.
18 and:
19 qla2xxx [0001:00:04.0]-5046:1: Async-logout failed - hdl=2 portid=0000e8 status=30 mb0=4006 mb1=1 mb2=0 mb6=0 mb7
21 diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
22 index 3f3417a3e891..c4dda4f8a8df 100644
23 --- a/drivers/scsi/qla2xxx/qla_init.c
24 +++ b/drivers/scsi/qla2xxx/qla_init.c
25 @@ -2248,7 +2248,12 @@ qla24xx_handle_plogi_done_event(struct scsi_qla_host *vha, struct event_arg *ea)
26 ql_dbg(ql_dbg_disc, vha, 0x20eb, "%s %d %8phC cmd error %x\n",
27 __func__, __LINE__, ea->fcport->port_name, ea->data[1]);
29 - qlt_schedule_sess_for_deletion(ea->fcport);
30 + ea->fcport->flags &= ~FCF_ASYNC_SENT;
31 + qla2x00_set_fcport_disc_state(ea->fcport, DSC_LOGIN_FAILED);
32 + if (ea->data[1] & QLA_LOGIO_LOGIN_RETRIED)
33 + set_bit(RELOGIN_NEEDED, &vha->dpc_flags);
34 + else
35 + qla2x00_mark_device_lost(vha, ea->fcport, 1);
36 break;
37 case MBS_LOOP_ID_USED:
38 /* data[1] = IO PARAM 1 = nport ID */
39 diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
40 index 9a3f832c49ef..643fa0052f5a 100644
41 --- a/drivers/scsi/qla2xxx/qla_mbx.c
42 +++ b/drivers/scsi/qla2xxx/qla_mbx.c
43 @@ -238,8 +238,6 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp)
44 ql_dbg(ql_dbg_mbx, vha, 0x1112,
45 "mbox[%d]<-0x%04x\n", cnt, *iptr);
46 wrt_reg_word(optr, *iptr);
47 - } else {
48 - wrt_reg_word(optr, 0);
51 mboxes >>= 1;