aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi_tcp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libiscsi_tcp.c')
-rw-r--r--drivers/scsi/libiscsi_tcp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c
index 5715a3d0a3d3..c4996b081999 100644
--- a/drivers/scsi/libiscsi_tcp.c
+++ b/drivers/scsi/libiscsi_tcp.c
@@ -1170,6 +1170,24 @@ void iscsi_tcp_r2tpool_free(struct iscsi_session *session)
1170} 1170}
1171EXPORT_SYMBOL_GPL(iscsi_tcp_r2tpool_free); 1171EXPORT_SYMBOL_GPL(iscsi_tcp_r2tpool_free);
1172 1172
1173int iscsi_tcp_set_max_r2t(struct iscsi_conn *conn, char *buf)
1174{
1175 struct iscsi_session *session = conn->session;
1176 unsigned short r2ts = 0;
1177
1178 sscanf(buf, "%hu", &r2ts);
1179 if (session->max_r2t == r2ts)
1180 return 0;
1181
1182 if (!r2ts || !is_power_of_2(r2ts))
1183 return -EINVAL;
1184
1185 session->max_r2t = r2ts;
1186 iscsi_tcp_r2tpool_free(session);
1187 return iscsi_tcp_r2tpool_alloc(session);
1188}
1189EXPORT_SYMBOL_GPL(iscsi_tcp_set_max_r2t);
1190
1173void iscsi_tcp_conn_get_stats(struct iscsi_cls_conn *cls_conn, 1191void iscsi_tcp_conn_get_stats(struct iscsi_cls_conn *cls_conn,
1174 struct iscsi_stats *stats) 1192 struct iscsi_stats *stats)
1175{ 1193{