diff options
Diffstat (limited to 'drivers/scsi/iscsi_tcp.c')
-rw-r--r-- | drivers/scsi/iscsi_tcp.c | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/drivers/scsi/iscsi_tcp.c b/drivers/scsi/iscsi_tcp.c index c66faee07ca5..2abda804a924 100644 --- a/drivers/scsi/iscsi_tcp.c +++ b/drivers/scsi/iscsi_tcp.c | |||
@@ -1955,30 +1955,28 @@ iscsi_tcp_conn_bind(struct iscsi_cls_session *cls_session, | |||
1955 | if (err) | 1955 | if (err) |
1956 | return err; | 1956 | return err; |
1957 | 1957 | ||
1958 | if (conn->stop_stage != STOP_CONN_SUSPEND) { | 1958 | /* bind iSCSI connection and socket */ |
1959 | /* bind iSCSI connection and socket */ | 1959 | tcp_conn->sock = sock; |
1960 | tcp_conn->sock = sock; | ||
1961 | 1960 | ||
1962 | /* setup Socket parameters */ | 1961 | /* setup Socket parameters */ |
1963 | sk = sock->sk; | 1962 | sk = sock->sk; |
1964 | sk->sk_reuse = 1; | 1963 | sk->sk_reuse = 1; |
1965 | sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ | 1964 | sk->sk_sndtimeo = 15 * HZ; /* FIXME: make it configurable */ |
1966 | sk->sk_allocation = GFP_ATOMIC; | 1965 | sk->sk_allocation = GFP_ATOMIC; |
1967 | 1966 | ||
1968 | /* FIXME: disable Nagle's algorithm */ | 1967 | /* FIXME: disable Nagle's algorithm */ |
1969 | 1968 | ||
1970 | /* | 1969 | /* |
1971 | * Intercept TCP callbacks for sendfile like receive | 1970 | * Intercept TCP callbacks for sendfile like receive |
1972 | * processing. | 1971 | * processing. |
1973 | */ | 1972 | */ |
1974 | conn->recv_lock = &sk->sk_callback_lock; | 1973 | conn->recv_lock = &sk->sk_callback_lock; |
1975 | iscsi_conn_set_callbacks(conn); | 1974 | iscsi_conn_set_callbacks(conn); |
1976 | tcp_conn->sendpage = tcp_conn->sock->ops->sendpage; | 1975 | tcp_conn->sendpage = tcp_conn->sock->ops->sendpage; |
1977 | /* | 1976 | /* |
1978 | * set receive state machine into initial state | 1977 | * set receive state machine into initial state |
1979 | */ | 1978 | */ |
1980 | tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; | 1979 | tcp_conn->in_progress = IN_PROGRESS_WAIT_HEADER; |
1981 | } | ||
1982 | 1980 | ||
1983 | return 0; | 1981 | return 0; |
1984 | } | 1982 | } |