]>
Commit | Line | Data |
---|---|---|
df1bfe5f GKH |
1 | From ec322937a7f152d68755dc8316523bf6f831b48f Mon Sep 17 00:00:00 2001 |
2 | From: Himanshu Madhani <hmadhani@marvell.com> | |
3 | Date: Fri, 15 Feb 2019 14:37:12 -0800 | |
4 | Subject: scsi: qla2xxx: Fix LUN discovery if loop id is not assigned yet by firmware | |
5 | ||
6 | From: Himanshu Madhani <hmadhani@marvell.com> | |
7 | ||
8 | commit ec322937a7f152d68755dc8316523bf6f831b48f upstream. | |
9 | ||
10 | This patch fixes LUN discovery when loop ID is not yet assigned by the | |
11 | firmware during driver load/sg_reset operations. Driver will now search for | |
12 | new loop id before retrying login. | |
13 | ||
14 | Fixes: 48acad099074 ("scsi: qla2xxx: Fix N2N link re-connect") | |
15 | Cc: stable@vger.kernel.org #4.19 | |
16 | Signed-off-by: Himanshu Madhani <hmadhani@marvell.com> | |
17 | Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/scsi/qla2xxx/qla_init.c | 13 ++++++++----- | |
22 | 1 file changed, 8 insertions(+), 5 deletions(-) | |
23 | ||
24 | --- a/drivers/scsi/qla2xxx/qla_init.c | |
25 | +++ b/drivers/scsi/qla2xxx/qla_init.c | |
26 | @@ -643,11 +643,14 @@ static void qla24xx_handle_gnl_done_even | |
27 | break; | |
28 | case DSC_LS_PORT_UNAVAIL: | |
29 | default: | |
30 | - if (fcport->loop_id != FC_NO_LOOP_ID) | |
31 | - qla2x00_clear_loop_id(fcport); | |
32 | - | |
33 | - fcport->loop_id = loop_id; | |
34 | - fcport->fw_login_state = DSC_LS_PORT_UNAVAIL; | |
35 | + if (fcport->loop_id == FC_NO_LOOP_ID) { | |
36 | + qla2x00_find_new_loop_id(vha, fcport); | |
37 | + fcport->fw_login_state = | |
38 | + DSC_LS_PORT_UNAVAIL; | |
39 | + } | |
40 | + ql_dbg(ql_dbg_disc, vha, 0x20e5, | |
41 | + "%s %d %8phC\n", __func__, __LINE__, | |
42 | + fcport->port_name); | |
43 | qla24xx_fcport_handle_login(vha, fcport); | |
44 | break; | |
45 | } |