Skip to content

Commit 34a2ce8

Browse files
mrangankarmartinkpetersen
authored andcommitted
scsi: qedi: Add ep_state for login completion on un-reachable targets
When the driver finds invalid destination MAC for the first un-reachable target, and before completes the PATH_REQ operation, set new ep_state to OFFLDCONN_NONE so that as part of driver ep_poll mechanism, the upper open-iscsi layer is notified to complete the login process on the first un-reachable target and thus proceed login to other reachable targets. Signed-off-by: Manish Rangankar <mrangankar@marvell.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent ce9e7bc commit 34a2ce8

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/scsi/qedi/qedi_iscsi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,7 @@ static int qedi_ep_poll(struct iscsi_endpoint *ep, int timeout_ms)
953953

954954
qedi_ep = ep->dd_data;
955955
if (qedi_ep->state == EP_STATE_IDLE ||
956+
qedi_ep->state == EP_STATE_OFLDCONN_NONE ||
956957
qedi_ep->state == EP_STATE_OFLDCONN_FAILED)
957958
return -1;
958959

@@ -1035,6 +1036,7 @@ static void qedi_ep_disconnect(struct iscsi_endpoint *ep)
10351036

10361037
switch (qedi_ep->state) {
10371038
case EP_STATE_OFLDCONN_START:
1039+
case EP_STATE_OFLDCONN_NONE:
10381040
goto ep_release_conn;
10391041
case EP_STATE_OFLDCONN_FAILED:
10401042
break;
@@ -1225,6 +1227,7 @@ static int qedi_set_path(struct Scsi_Host *shost, struct iscsi_path *path_data)
12251227

12261228
if (!is_valid_ether_addr(&path_data->mac_addr[0])) {
12271229
QEDI_NOTICE(&qedi->dbg_ctx, "dst mac NOT VALID\n");
1230+
qedi_ep->state = EP_STATE_OFLDCONN_NONE;
12281231
ret = -EIO;
12291232
goto set_path_exit;
12301233
}

drivers/scsi/qedi/qedi_iscsi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ enum {
5959
EP_STATE_OFLDCONN_FAILED = 0x2000,
6060
EP_STATE_CONNECT_FAILED = 0x4000,
6161
EP_STATE_DISCONN_TIMEDOUT = 0x8000,
62+
EP_STATE_OFLDCONN_NONE = 0x10000,
6263
};
6364

6465
struct qedi_conn;

0 commit comments

Comments
 (0)