242
242
kfree(ib_conn->rx_descs);
246
* iser_conn_set_full_featured_mode - (iSER API)
248
int iser_conn_set_full_featured_mode(struct iscsi_conn *conn)
245
static int iser_post_rx_bufs(struct iscsi_conn *conn, struct iscsi_hdr *req)
250
247
struct iscsi_iser_conn *iser_conn = conn->dd_data;
249
iser_dbg("req op %x flags %x\n", req->opcode, req->flags);
250
/* check if this is the last login - going to full feature phase */
251
if ((req->flags & ISCSI_FULL_FEATURE_PHASE) != ISCSI_FULL_FEATURE_PHASE)
255
* Check that there is one posted recv buffer (for the last login
256
* response) and no posted send buffers left - they must have been
257
* consumed during previous login phases.
259
WARN_ON(iser_conn->ib_conn->post_recv_buf_count != 1);
260
WARN_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0);
252
262
iser_dbg("Initially post: %d\n", ISER_MIN_POSTED_RX);
254
/* Check that there is no posted recv or send buffers left - */
255
/* they must be consumed during the login phase */
256
BUG_ON(iser_conn->ib_conn->post_recv_buf_count != 0);
257
BUG_ON(atomic_read(&iser_conn->ib_conn->post_send_buf_count) != 0);
259
if (iser_alloc_rx_descriptors(iser_conn->ib_conn))
262
263
/* Initial post receive buffers */
263
264
if (iser_post_recvm(iser_conn->ib_conn, ISER_MIN_POSTED_RX))