~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise-proposed

« back to all changes in this revision

Viewing changes to drivers/infiniband/ulp/iser/iser_initiator.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Luke Yelavich, Upstream Kernel Changes
  • Date: 2012-04-04 18:49:36 UTC
  • Revision ID: package-import@ubuntu.com-20120404184936-tqu735914muv4wpg
Tags: 3.2.0-22.30
[ Luke Yelavich ]

* [Config] Update configs after rebase against Ubuntu-3.2.0-22.35

[ Upstream Kernel Changes ]

* Low-latency: Rebase against Ubuntu-3.2.0-22.35

Show diffs side-by-side

added added

removed removed

Lines of Context:
170
170
}
171
171
 
172
172
 
173
 
static int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
 
173
int iser_alloc_rx_descriptors(struct iser_conn *ib_conn)
174
174
{
175
175
        int i, j;
176
176
        u64 dma_addr;
242
242
        kfree(ib_conn->rx_descs);
243
243
}
244
244
 
245
 
/**
246
 
 *  iser_conn_set_full_featured_mode - (iSER API)
247
 
 */
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)
249
246
{
250
247
        struct iscsi_iser_conn *iser_conn = conn->dd_data;
251
248
 
 
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)
 
252
                return 0;
 
253
 
 
254
        /*
 
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.
 
258
         */
 
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);
 
261
 
252
262
        iser_dbg("Initially post: %d\n", ISER_MIN_POSTED_RX);
253
 
 
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);
258
 
 
259
 
        if (iser_alloc_rx_descriptors(iser_conn->ib_conn))
260
 
                return -ENOMEM;
261
 
 
262
263
        /* Initial post receive buffers */
263
264
        if (iser_post_recvm(iser_conn->ib_conn, ISER_MIN_POSTED_RX))
264
265
                return -ENOMEM;
438
439
                err = iser_post_recvl(iser_conn->ib_conn);
439
440
                if (err)
440
441
                        goto send_control_error;
 
442
                err = iser_post_rx_bufs(conn, task->hdr);
 
443
                if (err)
 
444
                        goto send_control_error;
441
445
        }
442
446
 
443
447
        err = iser_post_send(iser_conn->ib_conn, mdesc);