summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorVarun Prakash <varun@chelsio.com>2016-04-19 20:30:12 +0200
committerNicholas Bellinger <nab@linux-iscsi.org>2016-05-10 08:12:08 +0200
commit42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9 (patch)
treef8866f9683073031554ec3e7ff1f28741734c14f /drivers
parentiscsi-target: split iscsi_target_rx_thread() (diff)
downloadlinux-42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9.tar.xz
linux-42bc3e57877f2357ccbbc3ad6e6c7d9be44579f9.zip
iscsi-target: add int (*iscsit_validate_params)()
Add int (*iscsit_validate_params)() to struct iscsit_transport, iscsi-target uses this callback for validating conn operational parameters. cxgbit.ko needs this callback to check and update the value of MAXXMITDATASEGMENTLENGTH. Signed-off-by: Varun Prakash <varun@chelsio.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/target/iscsi/iscsi_target_login.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_login.c b/drivers/target/iscsi/iscsi_target_login.c
index 8436d56c5f0c..83574eea0be7 100644
--- a/drivers/target/iscsi/iscsi_target_login.c
+++ b/drivers/target/iscsi/iscsi_target_login.c
@@ -1387,6 +1387,16 @@ static int __iscsi_target_login_thread(struct iscsi_np *np)
goto old_sess_out;
}
+ if (conn->conn_transport->iscsit_validate_params) {
+ ret = conn->conn_transport->iscsit_validate_params(conn);
+ if (ret < 0) {
+ if (zero_tsih)
+ goto new_sess_out;
+ else
+ goto old_sess_out;
+ }
+ }
+
ret = iscsi_target_start_negotiation(login, conn);
if (ret < 0)
goto new_sess_out;