diff options
author | Mike Christie <michaelc@cs.wisc.edu> | 2008-12-02 01:32:10 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-12-29 12:24:21 -0500 |
commit | 30b4915015c112547e930cadf734d875aec8438d (patch) | |
tree | 6559b99f62e3d7381e0b732abbd94767663a350a /drivers/scsi/iscsi_tcp.c | |
parent | cfeb2cf957ca5b4e557b53fb91ccc52f442f6dbe (diff) |
[SCSI] iscsi_tcp: add iscsi_tcp prefix to iscsi_tcp functions
Add iscsi_tcp prefix to most functions. Some are not changed
becuase they are going to move in the next patch.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index e6ae4e648343..97f3f68aeb64 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -516,12 +516,11 @@ static void iscsi_tcp_cleanup_task(struct iscsi_task *task) | |||
516 | } | 516 | } |
517 | 517 | ||
518 | /** | 518 | /** |
519 | * iscsi_data_in - SCSI Data-In Response processing | 519 | * iscsi_tcp_data_in - SCSI Data-In Response processing |
520 | * @conn: iscsi connection | 520 | * @conn: iscsi connection |
521 | * @task: scsi command task | 521 | * @task: scsi command task |
522 | **/ | 522 | */ |
523 | static int | 523 | static int iscsi_tcp_data_in(struct iscsi_conn *conn, struct iscsi_task *task) |
524 | iscsi_data_in(struct iscsi_conn *conn, struct iscsi_task *task) | ||
525 | { | 524 | { |
526 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | 525 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; |
527 | struct iscsi_tcp_task *tcp_task = task->dd_data; | 526 | struct iscsi_tcp_task *tcp_task = task->dd_data; |
@@ -554,12 +553,11 @@ iscsi_data_in(struct iscsi_conn *conn, struct iscsi_task *task) | |||
554 | } | 553 | } |
555 | 554 | ||
556 | /** | 555 | /** |
557 | * iscsi_r2t_rsp - iSCSI R2T Response processing | 556 | * iscsi_tcp_r2t_rsp - iSCSI R2T Response processing |
558 | * @conn: iscsi connection | 557 | * @conn: iscsi connection |
559 | * @task: scsi command task | 558 | * @task: scsi command task |
560 | **/ | 559 | */ |
561 | static int | 560 | static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) |
562 | iscsi_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) | ||
563 | { | 561 | { |
564 | struct iscsi_session *session = conn->session; | 562 | struct iscsi_session *session = conn->session; |
565 | struct iscsi_tcp_task *tcp_task = task->dd_data; | 563 | struct iscsi_tcp_task *tcp_task = task->dd_data; |
@@ -710,7 +708,7 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn *conn, struct iscsi_hdr *hdr) | |||
710 | if (!task) | 708 | if (!task) |
711 | rc = ISCSI_ERR_BAD_ITT; | 709 | rc = ISCSI_ERR_BAD_ITT; |
712 | else | 710 | else |
713 | rc = iscsi_data_in(conn, task); | 711 | rc = iscsi_tcp_data_in(conn, task); |
714 | if (rc) { | 712 | if (rc) { |
715 | spin_unlock(&conn->session->lock); | 713 | spin_unlock(&conn->session->lock); |
716 | break; | 714 | break; |
@@ -765,7 +763,7 @@ iscsi_tcp_hdr_dissect(struct iscsi_conn *conn, struct iscsi_hdr *hdr) | |||
765 | else if (ahslen) | 763 | else if (ahslen) |
766 | rc = ISCSI_ERR_AHSLEN; | 764 | rc = ISCSI_ERR_AHSLEN; |
767 | else if (task->sc->sc_data_direction == DMA_TO_DEVICE) | 765 | else if (task->sc->sc_data_direction == DMA_TO_DEVICE) |
768 | rc = iscsi_r2t_rsp(conn, task); | 766 | rc = iscsi_tcp_r2t_rsp(conn, task); |
769 | else | 767 | else |
770 | rc = ISCSI_ERR_PROTO; | 768 | rc = ISCSI_ERR_PROTO; |
771 | spin_unlock(&conn->session->lock); | 769 | spin_unlock(&conn->session->lock); |
@@ -1053,8 +1051,7 @@ iscsi_tcp_state_change(struct sock *sk) | |||
1053 | * iscsi_write_space - Called when more output buffer space is available | 1051 | * iscsi_write_space - Called when more output buffer space is available |
1054 | * @sk: socket space is available for | 1052 | * @sk: socket space is available for |
1055 | **/ | 1053 | **/ |
1056 | static void | 1054 | static void iscsi_tcp_write_space(struct sock *sk) |
1057 | iscsi_write_space(struct sock *sk) | ||
1058 | { | 1055 | { |
1059 | struct iscsi_conn *conn = (struct iscsi_conn*)sk->sk_user_data; | 1056 | struct iscsi_conn *conn = (struct iscsi_conn*)sk->sk_user_data; |
1060 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | 1057 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; |
@@ -1064,8 +1061,7 @@ iscsi_write_space(struct sock *sk) | |||
1064 | scsi_queue_work(conn->session->host, &conn->xmitwork); | 1061 | scsi_queue_work(conn->session->host, &conn->xmitwork); |
1065 | } | 1062 | } |
1066 | 1063 | ||
1067 | static void | 1064 | static void iscsi_tcp_conn_set_callbacks(struct iscsi_conn *conn) |
1068 | iscsi_conn_set_callbacks(struct iscsi_conn *conn) | ||
1069 | { | 1065 | { |
1070 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | 1066 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; |
1071 | struct sock *sk = tcp_conn->sock->sk; | 1067 | struct sock *sk = tcp_conn->sock->sk; |
@@ -1078,12 +1074,11 @@ iscsi_conn_set_callbacks(struct iscsi_conn *conn) | |||
1078 | tcp_conn->old_write_space = sk->sk_write_space; | 1074 | tcp_conn->old_write_space = sk->sk_write_space; |
1079 | sk->sk_data_ready = iscsi_tcp_data_ready; | 1075 | sk->sk_data_ready = iscsi_tcp_data_ready; |
1080 | sk->sk_state_change = iscsi_tcp_state_change; | 1076 | sk->sk_state_change = iscsi_tcp_state_change; |
1081 | sk->sk_write_space = iscsi_write_space; | 1077 | sk->sk_write_space = iscsi_tcp_write_space; |
1082 | write_unlock_bh(&sk->sk_callback_lock); | 1078 | write_unlock_bh(&sk->sk_callback_lock); |
1083 | } | 1079 | } |
1084 | 1080 | ||
1085 | static void | 1081 | static void iscsi_conn_restore_callbacks(struct iscsi_tcp_conn *tcp_conn) |
1086 | iscsi_conn_restore_callbacks(struct iscsi_tcp_conn *tcp_conn) | ||
1087 | { | 1082 | { |
1088 | struct sock *sk = tcp_conn->sock->sk; | 1083 | struct sock *sk = tcp_conn->sock->sk; |
1089 | 1084 | ||
@@ -1098,10 +1093,9 @@ iscsi_conn_restore_callbacks(struct iscsi_tcp_conn *tcp_conn) | |||
1098 | } | 1093 | } |
1099 | 1094 | ||
1100 | /** | 1095 | /** |
1101 | * iscsi_xmit - TCP transmit | 1096 | * iscsi_tcp_xmit - TCP transmit |
1102 | **/ | 1097 | **/ |
1103 | static int | 1098 | static int iscsi_tcp_xmit(struct iscsi_conn *conn) |
1104 | iscsi_xmit(struct iscsi_conn *conn) | ||
1105 | { | 1099 | { |
1106 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; | 1100 | struct iscsi_tcp_conn *tcp_conn = conn->dd_data; |
1107 | struct iscsi_segment *segment = &tcp_conn->out.segment; | 1101 | struct iscsi_segment *segment = &tcp_conn->out.segment; |
@@ -1159,7 +1153,7 @@ static int iscsi_tcp_flush(struct iscsi_task *task) | |||
1159 | int rc; | 1153 | int rc; |
1160 | 1154 | ||
1161 | while (iscsi_tcp_xmit_qlen(conn)) { | 1155 | while (iscsi_tcp_xmit_qlen(conn)) { |
1162 | rc = iscsi_xmit(conn); | 1156 | rc = iscsi_tcp_xmit(conn); |
1163 | if (rc == 0) | 1157 | if (rc == 0) |
1164 | return -EAGAIN; | 1158 | return -EAGAIN; |
1165 | if (rc < 0) | 1159 | if (rc < 0) |
@@ -1625,7 +1619,7 @@ iscsi_tcp_conn_bind(struct iscsi_cls_session *cls_session, | |||
1625 | sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ | 1619 | sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ |
1626 | sk->sk_allocation = GFP_ATOMIC; | 1620 | sk->sk_allocation = GFP_ATOMIC; |
1627 | 1621 | ||
1628 | iscsi_conn_set_callbacks(conn); | 1622 | iscsi_tcp_conn_set_callbacks(conn); |
1629 | tcp_conn->sendpage = tcp_conn->sock->ops->sendpage; | 1623 | tcp_conn->sendpage = tcp_conn->sock->ops->sendpage; |
1630 | /* | 1624 | /* |
1631 | * set receive state machine into initial state | 1625 | * set receive state machine into initial state |