diff options
-rw-r--r-- | drivers/infiniband/ulp/iser/iscsi_iser.c | 16 | ||||
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 19 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 15 | ||||
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 7 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_iscsi.c | 24 | ||||
-rw-r--r-- | include/scsi/libiscsi.h | 8 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 9 |
7 files changed, 40 insertions, 58 deletions
diff --git a/drivers/infiniband/ulp/iser/iscsi_iser.c b/drivers/infiniband/ulp/iser/iscsi_iser.c index 62e35e503e49..9b34946eb00d 100644 --- a/drivers/infiniband/ulp/iser/iscsi_iser.c +++ b/drivers/infiniband/ulp/iser/iscsi_iser.c | |||
@@ -279,7 +279,7 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
279 | struct iscsi_cls_conn *cls_conn; | 279 | struct iscsi_cls_conn *cls_conn; |
280 | struct iscsi_iser_conn *iser_conn; | 280 | struct iscsi_iser_conn *iser_conn; |
281 | 281 | ||
282 | cls_conn = iscsi_conn_setup(cls_session, conn_idx); | 282 | cls_conn = iscsi_conn_setup(cls_session, sizeof(*iser_conn), conn_idx); |
283 | if (!cls_conn) | 283 | if (!cls_conn) |
284 | return NULL; | 284 | return NULL; |
285 | conn = cls_conn->dd_data; | 285 | conn = cls_conn->dd_data; |
@@ -290,10 +290,7 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
290 | */ | 290 | */ |
291 | conn->max_recv_dlength = 128; | 291 | conn->max_recv_dlength = 128; |
292 | 292 | ||
293 | iser_conn = kzalloc(sizeof(*iser_conn), GFP_KERNEL); | 293 | iser_conn = conn->dd_data; |
294 | if (!iser_conn) | ||
295 | goto conn_alloc_fail; | ||
296 | |||
297 | /* currently this is the only field which need to be initiated */ | 294 | /* currently this is the only field which need to be initiated */ |
298 | rwlock_init(&iser_conn->lock); | 295 | rwlock_init(&iser_conn->lock); |
299 | 296 | ||
@@ -301,10 +298,6 @@ iscsi_iser_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
301 | iser_conn->iscsi_conn = conn; | 298 | iser_conn->iscsi_conn = conn; |
302 | 299 | ||
303 | return cls_conn; | 300 | return cls_conn; |
304 | |||
305 | conn_alloc_fail: | ||
306 | iscsi_conn_teardown(cls_conn); | ||
307 | return NULL; | ||
308 | } | 301 | } |
309 | 302 | ||
310 | static void | 303 | static void |
@@ -313,10 +306,9 @@ iscsi_iser_conn_destroy(struct iscsi_cls_conn *cls_conn) | |||
313 | struct iscsi_conn *conn = cls_conn->dd_data; | 306 | struct iscsi_conn *conn = cls_conn->dd_data; |
314 | struct iscsi_iser_conn *iser_conn = conn->dd_data; | 307 | struct iscsi_iser_conn *iser_conn = conn->dd_data; |
315 | 308 | ||
316 | iscsi_conn_teardown(cls_conn); | ||
317 | if (iser_conn->ib_conn) | 309 | if (iser_conn->ib_conn) |
318 | iser_conn->ib_conn->iser_conn = NULL; | 310 | iser_conn->ib_conn->iser_conn = NULL; |
319 | kfree(iser_conn); | 311 | iscsi_conn_teardown(cls_conn); |
320 | } | 312 | } |
321 | 313 | ||
322 | static int | 314 | static int |
@@ -619,8 +611,6 @@ static struct iscsi_transport iscsi_iser_transport = { | |||
619 | .host_param_mask = ISCSI_HOST_HWADDRESS | | 611 | .host_param_mask = ISCSI_HOST_HWADDRESS | |
620 | ISCSI_HOST_NETDEV_NAME | | 612 | ISCSI_HOST_NETDEV_NAME | |
621 | ISCSI_HOST_INITIATOR_NAME, | 613 | ISCSI_HOST_INITIATOR_NAME, |
622 | .conndata_size = sizeof(struct iscsi_conn), | ||
623 | .sessiondata_size = sizeof(struct iscsi_session), | ||
624 | /* session management */ | 614 | /* session management */ |
625 | .create_session = iscsi_iser_session_create, | 615 | .create_session = iscsi_iser_session_create, |
626 | .destroy_session = iscsi_iser_session_destroy, | 616 | .destroy_session = iscsi_iser_session_destroy, |
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index e19d92f2d753..dfaf9fa57340 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -1490,7 +1490,7 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1490 | struct iscsi_cls_conn *cls_conn; | 1490 | struct iscsi_cls_conn *cls_conn; |
1491 | struct iscsi_tcp_conn *tcp_conn; | 1491 | struct iscsi_tcp_conn *tcp_conn; |
1492 | 1492 | ||
1493 | cls_conn = iscsi_conn_setup(cls_session, conn_idx); | 1493 | cls_conn = iscsi_conn_setup(cls_session, sizeof(*tcp_conn), conn_idx); |
1494 | if (!cls_conn) | 1494 | if (!cls_conn) |
1495 | return NULL; | 1495 | return NULL; |
1496 | conn = cls_conn->dd_data; | 1496 | conn = cls_conn->dd_data; |
@@ -1500,18 +1500,14 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1500 | */ | 1500 | */ |
1501 | conn->max_recv_dlength = ISCSI_DEF_MAX_RECV_SEG_LEN; | 1501 | conn->max_recv_dlength = ISCSI_DEF_MAX_RECV_SEG_LEN; |
1502 | 1502 | ||
1503 | tcp_conn = kzalloc(sizeof(*tcp_conn), GFP_KERNEL); | 1503 | tcp_conn = conn->dd_data; |
1504 | if (!tcp_conn) | ||
1505 | goto tcp_conn_alloc_fail; | ||
1506 | |||
1507 | conn->dd_data = tcp_conn; | ||
1508 | tcp_conn->iscsi_conn = conn; | 1504 | tcp_conn->iscsi_conn = conn; |
1509 | 1505 | ||
1510 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1506 | tcp_conn->tx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1511 | CRYPTO_ALG_ASYNC); | 1507 | CRYPTO_ALG_ASYNC); |
1512 | tcp_conn->tx_hash.flags = 0; | 1508 | tcp_conn->tx_hash.flags = 0; |
1513 | if (IS_ERR(tcp_conn->tx_hash.tfm)) | 1509 | if (IS_ERR(tcp_conn->tx_hash.tfm)) |
1514 | goto free_tcp_conn; | 1510 | goto free_conn; |
1515 | 1511 | ||
1516 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, | 1512 | tcp_conn->rx_hash.tfm = crypto_alloc_hash("crc32c", 0, |
1517 | CRYPTO_ALG_ASYNC); | 1513 | CRYPTO_ALG_ASYNC); |
@@ -1523,14 +1519,12 @@ iscsi_tcp_conn_create(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | |||
1523 | 1519 | ||
1524 | free_tx_tfm: | 1520 | free_tx_tfm: |
1525 | crypto_free_hash(tcp_conn->tx_hash.tfm); | 1521 | crypto_free_hash(tcp_conn->tx_hash.tfm); |
1526 | free_tcp_conn: | 1522 | free_conn: |
1527 | iscsi_conn_printk(KERN_ERR, conn, | 1523 | iscsi_conn_printk(KERN_ERR, conn, |
1528 | "Could not create connection due to crc32c " | 1524 | "Could not create connection due to crc32c " |
1529 | "loading error. Make sure the crc32c " | 1525 | "loading error. Make sure the crc32c " |
1530 | "module is built as a module or into the " | 1526 | "module is built as a module or into the " |
1531 | "kernel\n"); | 1527 | "kernel\n"); |
1532 | kfree(tcp_conn); | ||
1533 | tcp_conn_alloc_fail: | ||
1534 | iscsi_conn_teardown(cls_conn); | 1528 | iscsi_conn_teardown(cls_conn); |
1535 | return NULL; | 1529 | return NULL; |
1536 | } | 1530 | } |
@@ -1563,14 +1557,13 @@ iscsi_tcp_conn_destroy(struct iscsi_cls_conn *cls_conn) | |||
1563 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | 1557 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; |
1564 | 1558 | ||
1565 | iscsi_tcp_release_conn(conn); | 1559 | iscsi_tcp_release_conn(conn); |
1566 | iscsi_conn_teardown(cls_conn); | ||
1567 | 1560 | ||
1568 | if (tcp_conn->tx_hash.tfm) | 1561 | if (tcp_conn->tx_hash.tfm) |
1569 | crypto_free_hash(tcp_conn->tx_hash.tfm); | 1562 | crypto_free_hash(tcp_conn->tx_hash.tfm); |
1570 | if (tcp_conn->rx_hash.tfm) | 1563 | if (tcp_conn->rx_hash.tfm) |
1571 | crypto_free_hash(tcp_conn->rx_hash.tfm); | 1564 | crypto_free_hash(tcp_conn->rx_hash.tfm); |
1572 | 1565 | ||
1573 | kfree(tcp_conn); | 1566 | iscsi_conn_teardown(cls_conn); |
1574 | } | 1567 | } |
1575 | 1568 | ||
1576 | static void | 1569 | static void |
@@ -1983,8 +1976,6 @@ static struct iscsi_transport iscsi_tcp_transport = { | |||
1983 | .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | | 1976 | .host_param_mask = ISCSI_HOST_HWADDRESS | ISCSI_HOST_IPADDRESS | |
1984 | ISCSI_HOST_INITIATOR_NAME | | 1977 | ISCSI_HOST_INITIATOR_NAME | |
1985 | ISCSI_HOST_NETDEV_NAME, | 1978 | ISCSI_HOST_NETDEV_NAME, |
1986 | .conndata_size = sizeof(struct iscsi_conn), | ||
1987 | .sessiondata_size = sizeof(struct iscsi_session), | ||
1988 | /* session management */ | 1979 | /* session management */ |
1989 | .create_session = iscsi_tcp_session_create, | 1980 | .create_session = iscsi_tcp_session_create, |
1990 | .destroy_session = iscsi_tcp_session_destroy, | 1981 | .destroy_session = iscsi_tcp_session_destroy, |
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 73c37c04ca66..784a935fad4a 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -1867,7 +1867,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, | |||
1867 | cmds_max = ISCSI_DEF_XMIT_CMDS_MAX; | 1867 | cmds_max = ISCSI_DEF_XMIT_CMDS_MAX; |
1868 | } | 1868 | } |
1869 | 1869 | ||
1870 | cls_session = iscsi_alloc_session(shost, iscsit); | 1870 | cls_session = iscsi_alloc_session(shost, iscsit, |
1871 | sizeof(struct iscsi_session)); | ||
1871 | if (!cls_session) | 1872 | if (!cls_session) |
1872 | return NULL; | 1873 | return NULL; |
1873 | session = cls_session->dd_data; | 1874 | session = cls_session->dd_data; |
@@ -1968,22 +1969,26 @@ EXPORT_SYMBOL_GPL(iscsi_session_teardown); | |||
1968 | /** | 1969 | /** |
1969 | * iscsi_conn_setup - create iscsi_cls_conn and iscsi_conn | 1970 | * iscsi_conn_setup - create iscsi_cls_conn and iscsi_conn |
1970 | * @cls_session: iscsi_cls_session | 1971 | * @cls_session: iscsi_cls_session |
1972 | * @dd_size: private driver data size | ||
1971 | * @conn_idx: cid | 1973 | * @conn_idx: cid |
1972 | **/ | 1974 | */ |
1973 | struct iscsi_cls_conn * | 1975 | struct iscsi_cls_conn * |
1974 | iscsi_conn_setup(struct iscsi_cls_session *cls_session, uint32_t conn_idx) | 1976 | iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size, |
1977 | uint32_t conn_idx) | ||
1975 | { | 1978 | { |
1976 | struct iscsi_session *session = cls_session->dd_data; | 1979 | struct iscsi_session *session = cls_session->dd_data; |
1977 | struct iscsi_conn *conn; | 1980 | struct iscsi_conn *conn; |
1978 | struct iscsi_cls_conn *cls_conn; | 1981 | struct iscsi_cls_conn *cls_conn; |
1979 | char *data; | 1982 | char *data; |
1980 | 1983 | ||
1981 | cls_conn = iscsi_create_conn(cls_session, conn_idx); | 1984 | cls_conn = iscsi_create_conn(cls_session, sizeof(*conn) + dd_size, |
1985 | conn_idx); | ||
1982 | if (!cls_conn) | 1986 | if (!cls_conn) |
1983 | return NULL; | 1987 | return NULL; |
1984 | conn = cls_conn->dd_data; | 1988 | conn = cls_conn->dd_data; |
1985 | memset(conn, 0, sizeof(*conn)); | 1989 | memset(conn, 0, sizeof(*conn) + dd_size); |
1986 | 1990 | ||
1991 | conn->dd_data = cls_conn->dd_data + sizeof(*conn); | ||
1987 | conn->session = session; | 1992 | conn->session = session; |
1988 | conn->cls_conn = cls_conn; | 1993 | conn->cls_conn = cls_conn; |
1989 | conn->c_stage = ISCSI_CONN_INITIAL_STAGE; | 1994 | conn->c_stage = ISCSI_CONN_INITIAL_STAGE; |
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index 6c6ee0f34995..5822dd595826 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -113,8 +113,6 @@ static struct iscsi_transport qla4xxx_iscsi_transport = { | |||
113 | .host_param_mask = ISCSI_HOST_HWADDRESS | | 113 | .host_param_mask = ISCSI_HOST_HWADDRESS | |
114 | ISCSI_HOST_IPADDRESS | | 114 | ISCSI_HOST_IPADDRESS | |
115 | ISCSI_HOST_INITIATOR_NAME, | 115 | ISCSI_HOST_INITIATOR_NAME, |
116 | .sessiondata_size = sizeof(struct ddb_entry), | ||
117 | |||
118 | .tgt_dscvr = qla4xxx_tgt_dscvr, | 116 | .tgt_dscvr = qla4xxx_tgt_dscvr, |
119 | .get_conn_param = qla4xxx_conn_get_param, | 117 | .get_conn_param = qla4xxx_conn_get_param, |
120 | .get_session_param = qla4xxx_sess_get_param, | 118 | .get_session_param = qla4xxx_sess_get_param, |
@@ -274,7 +272,7 @@ int qla4xxx_add_sess(struct ddb_entry *ddb_entry) | |||
274 | return err; | 272 | return err; |
275 | } | 273 | } |
276 | 274 | ||
277 | ddb_entry->conn = iscsi_create_conn(ddb_entry->sess, 0); | 275 | ddb_entry->conn = iscsi_create_conn(ddb_entry->sess, 0, 0); |
278 | if (!ddb_entry->conn) { | 276 | if (!ddb_entry->conn) { |
279 | iscsi_remove_session(ddb_entry->sess); | 277 | iscsi_remove_session(ddb_entry->sess); |
280 | DEBUG2(printk(KERN_ERR "Could not add connection.\n")); | 278 | DEBUG2(printk(KERN_ERR "Could not add connection.\n")); |
@@ -291,7 +289,8 @@ struct ddb_entry *qla4xxx_alloc_sess(struct scsi_qla_host *ha) | |||
291 | struct ddb_entry *ddb_entry; | 289 | struct ddb_entry *ddb_entry; |
292 | struct iscsi_cls_session *sess; | 290 | struct iscsi_cls_session *sess; |
293 | 291 | ||
294 | sess = iscsi_alloc_session(ha->host, &qla4xxx_iscsi_transport); | 292 | sess = iscsi_alloc_session(ha->host, &qla4xxx_iscsi_transport, |
293 | sizeof(struct ddb_entry)); | ||
295 | if (!sess) | 294 | if (!sess) |
296 | return NULL; | 295 | return NULL; |
297 | 296 | ||
diff --git a/drivers/scsi/scsi_transport_iscsi.c b/drivers/scsi/scsi_transport_iscsi.c index 6fdaa2ee6632..6b8516a0970b 100644 --- a/drivers/scsi/scsi_transport_iscsi.c +++ b/drivers/scsi/scsi_transport_iscsi.c | |||
@@ -483,12 +483,12 @@ static int iscsi_unbind_session(struct iscsi_cls_session *session) | |||
483 | } | 483 | } |
484 | 484 | ||
485 | struct iscsi_cls_session * | 485 | struct iscsi_cls_session * |
486 | iscsi_alloc_session(struct Scsi_Host *shost, | 486 | iscsi_alloc_session(struct Scsi_Host *shost, struct iscsi_transport *transport, |
487 | struct iscsi_transport *transport) | 487 | int dd_size) |
488 | { | 488 | { |
489 | struct iscsi_cls_session *session; | 489 | struct iscsi_cls_session *session; |
490 | 490 | ||
491 | session = kzalloc(sizeof(*session) + transport->sessiondata_size, | 491 | session = kzalloc(sizeof(*session) + dd_size, |
492 | GFP_KERNEL); | 492 | GFP_KERNEL); |
493 | if (!session) | 493 | if (!session) |
494 | return NULL; | 494 | return NULL; |
@@ -510,7 +510,7 @@ iscsi_alloc_session(struct Scsi_Host *shost, | |||
510 | session->dev.parent = &shost->shost_gendev; | 510 | session->dev.parent = &shost->shost_gendev; |
511 | session->dev.release = iscsi_session_release; | 511 | session->dev.release = iscsi_session_release; |
512 | device_initialize(&session->dev); | 512 | device_initialize(&session->dev); |
513 | if (transport->sessiondata_size) | 513 | if (dd_size) |
514 | session->dd_data = &session[1]; | 514 | session->dd_data = &session[1]; |
515 | return session; | 515 | return session; |
516 | } | 516 | } |
@@ -558,18 +558,18 @@ EXPORT_SYMBOL_GPL(iscsi_add_session); | |||
558 | * iscsi_create_session - create iscsi class session | 558 | * iscsi_create_session - create iscsi class session |
559 | * @shost: scsi host | 559 | * @shost: scsi host |
560 | * @transport: iscsi transport | 560 | * @transport: iscsi transport |
561 | * @dd_size: private driver data size | ||
561 | * @target_id: which target | 562 | * @target_id: which target |
562 | * | 563 | * |
563 | * This can be called from a LLD or iscsi_transport. | 564 | * This can be called from a LLD or iscsi_transport. |
564 | */ | 565 | */ |
565 | struct iscsi_cls_session * | 566 | struct iscsi_cls_session * |
566 | iscsi_create_session(struct Scsi_Host *shost, | 567 | iscsi_create_session(struct Scsi_Host *shost, struct iscsi_transport *transport, |
567 | struct iscsi_transport *transport, | 568 | int dd_size, unsigned int target_id) |
568 | unsigned int target_id) | ||
569 | { | 569 | { |
570 | struct iscsi_cls_session *session; | 570 | struct iscsi_cls_session *session; |
571 | 571 | ||
572 | session = iscsi_alloc_session(shost, transport); | 572 | session = iscsi_alloc_session(shost, transport, dd_size); |
573 | if (!session) | 573 | if (!session) |
574 | return NULL; | 574 | return NULL; |
575 | 575 | ||
@@ -671,6 +671,7 @@ EXPORT_SYMBOL_GPL(iscsi_destroy_session); | |||
671 | /** | 671 | /** |
672 | * iscsi_create_conn - create iscsi class connection | 672 | * iscsi_create_conn - create iscsi class connection |
673 | * @session: iscsi cls session | 673 | * @session: iscsi cls session |
674 | * @dd_size: private driver data size | ||
674 | * @cid: connection id | 675 | * @cid: connection id |
675 | * | 676 | * |
676 | * This can be called from a LLD or iscsi_transport. The connection | 677 | * This can be called from a LLD or iscsi_transport. The connection |
@@ -683,18 +684,17 @@ EXPORT_SYMBOL_GPL(iscsi_destroy_session); | |||
683 | * non-zero. | 684 | * non-zero. |
684 | */ | 685 | */ |
685 | struct iscsi_cls_conn * | 686 | struct iscsi_cls_conn * |
686 | iscsi_create_conn(struct iscsi_cls_session *session, uint32_t cid) | 687 | iscsi_create_conn(struct iscsi_cls_session *session, int dd_size, uint32_t cid) |
687 | { | 688 | { |
688 | struct iscsi_transport *transport = session->transport; | 689 | struct iscsi_transport *transport = session->transport; |
689 | struct iscsi_cls_conn *conn; | 690 | struct iscsi_cls_conn *conn; |
690 | unsigned long flags; | 691 | unsigned long flags; |
691 | int err; | 692 | int err; |
692 | 693 | ||
693 | conn = kzalloc(sizeof(*conn) + transport->conndata_size, GFP_KERNEL); | 694 | conn = kzalloc(sizeof(*conn) + dd_size, GFP_KERNEL); |
694 | if (!conn) | 695 | if (!conn) |
695 | return NULL; | 696 | return NULL; |
696 | 697 | if (dd_size) | |
697 | if (transport->conndata_size) | ||
698 | conn->dd_data = &conn[1]; | 698 | conn->dd_data = &conn[1]; |
699 | 699 | ||
700 | INIT_LIST_HEAD(&conn->conn_list); | 700 | INIT_LIST_HEAD(&conn->conn_list); |
diff --git a/include/scsi/libiscsi.h b/include/scsi/libiscsi.h index 9a26d715a953..4e1c14f20ddd 100644 --- a/include/scsi/libiscsi.h +++ b/include/scsi/libiscsi.h | |||
@@ -313,8 +313,6 @@ struct iscsi_host { | |||
313 | char local_address[ISCSI_ADDRESS_BUF_LEN]; | 313 | char local_address[ISCSI_ADDRESS_BUF_LEN]; |
314 | }; | 314 | }; |
315 | 315 | ||
316 | #define iscsi_host_priv(_shost) \ | ||
317 | (shost_priv(_shost) + sizeof(struct iscsi_host)) | ||
318 | /* | 316 | /* |
319 | * scsi host template | 317 | * scsi host template |
320 | */ | 318 | */ |
@@ -325,10 +323,12 @@ extern int iscsi_eh_device_reset(struct scsi_cmnd *sc); | |||
325 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, | 323 | extern int iscsi_queuecommand(struct scsi_cmnd *sc, |
326 | void (*done)(struct scsi_cmnd *)); | 324 | void (*done)(struct scsi_cmnd *)); |
327 | 325 | ||
328 | |||
329 | /* | 326 | /* |
330 | * iSCSI host helpers. | 327 | * iSCSI host helpers. |
331 | */ | 328 | */ |
329 | #define iscsi_host_priv(_shost) \ | ||
330 | (shost_priv(_shost) + sizeof(struct iscsi_host)) | ||
331 | |||
332 | extern int iscsi_host_set_param(struct Scsi_Host *shost, | 332 | extern int iscsi_host_set_param(struct Scsi_Host *shost, |
333 | enum iscsi_host_param param, char *buf, | 333 | enum iscsi_host_param param, char *buf, |
334 | int buflen); | 334 | int buflen); |
@@ -360,7 +360,7 @@ extern int iscsi_session_get_param(struct iscsi_cls_session *cls_session, | |||
360 | * connection management | 360 | * connection management |
361 | */ | 361 | */ |
362 | extern struct iscsi_cls_conn *iscsi_conn_setup(struct iscsi_cls_session *, | 362 | extern struct iscsi_cls_conn *iscsi_conn_setup(struct iscsi_cls_session *, |
363 | uint32_t); | 363 | int, uint32_t); |
364 | extern void iscsi_conn_teardown(struct iscsi_cls_conn *); | 364 | extern void iscsi_conn_teardown(struct iscsi_cls_conn *); |
365 | extern int iscsi_conn_start(struct iscsi_cls_conn *); | 365 | extern int iscsi_conn_start(struct iscsi_cls_conn *); |
366 | extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); | 366 | extern void iscsi_conn_stop(struct iscsi_cls_conn *, int); |
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 761f62da7cc8..4028f121d548 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -83,10 +83,6 @@ struct iscsi_transport { | |||
83 | /* LLD sets this to indicate what values it can export to sysfs */ | 83 | /* LLD sets this to indicate what values it can export to sysfs */ |
84 | uint64_t param_mask; | 84 | uint64_t param_mask; |
85 | uint64_t host_param_mask; | 85 | uint64_t host_param_mask; |
86 | /* LLD connection data size */ | ||
87 | int conndata_size; | ||
88 | /* LLD session data size */ | ||
89 | int sessiondata_size; | ||
90 | struct iscsi_cls_session *(*create_session) (struct Scsi_Host *shost, | 86 | struct iscsi_cls_session *(*create_session) (struct Scsi_Host *shost, |
91 | uint16_t cmds_max, uint16_t qdepth, | 87 | uint16_t cmds_max, uint16_t qdepth, |
92 | uint32_t sn, uint32_t *hn); | 88 | uint32_t sn, uint32_t *hn); |
@@ -222,19 +218,20 @@ extern void iscsi_host_for_each_session(struct Scsi_Host *shost, | |||
222 | 218 | ||
223 | extern int iscsi_session_chkready(struct iscsi_cls_session *session); | 219 | extern int iscsi_session_chkready(struct iscsi_cls_session *session); |
224 | extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, | 220 | extern struct iscsi_cls_session *iscsi_alloc_session(struct Scsi_Host *shost, |
225 | struct iscsi_transport *transport); | 221 | struct iscsi_transport *transport, int dd_size); |
226 | extern int iscsi_add_session(struct iscsi_cls_session *session, | 222 | extern int iscsi_add_session(struct iscsi_cls_session *session, |
227 | unsigned int target_id); | 223 | unsigned int target_id); |
228 | extern int iscsi_session_event(struct iscsi_cls_session *session, | 224 | extern int iscsi_session_event(struct iscsi_cls_session *session, |
229 | enum iscsi_uevent_e event); | 225 | enum iscsi_uevent_e event); |
230 | extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, | 226 | extern struct iscsi_cls_session *iscsi_create_session(struct Scsi_Host *shost, |
231 | struct iscsi_transport *t, | 227 | struct iscsi_transport *t, |
228 | int dd_size, | ||
232 | unsigned int target_id); | 229 | unsigned int target_id); |
233 | extern void iscsi_remove_session(struct iscsi_cls_session *session); | 230 | extern void iscsi_remove_session(struct iscsi_cls_session *session); |
234 | extern void iscsi_free_session(struct iscsi_cls_session *session); | 231 | extern void iscsi_free_session(struct iscsi_cls_session *session); |
235 | extern int iscsi_destroy_session(struct iscsi_cls_session *session); | 232 | extern int iscsi_destroy_session(struct iscsi_cls_session *session); |
236 | extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, | 233 | extern struct iscsi_cls_conn *iscsi_create_conn(struct iscsi_cls_session *sess, |
237 | uint32_t cid); | 234 | int dd_size, uint32_t cid); |
238 | extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); | 235 | extern int iscsi_destroy_conn(struct iscsi_cls_conn *conn); |
239 | extern void iscsi_unblock_session(struct iscsi_cls_session *session); | 236 | extern void iscsi_unblock_session(struct iscsi_cls_session *session); |
240 | extern void iscsi_block_session(struct iscsi_cls_session *session); | 237 | extern void iscsi_block_session(struct iscsi_cls_session *session); |