]> Pileus Git - ~andy/linux/blobdiff - drivers/scsi/cxgbi/libcxgbi.c
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
[~andy/linux] / drivers / scsi / cxgbi / libcxgbi.c
index c5360ffb4bed35ae9bd06fa1a0195f2517b82778..d9253db1d0e2c68b41ce7f4012b4b1644d968938 100644 (file)
@@ -1868,8 +1868,9 @@ int cxgbi_conn_alloc_pdu(struct iscsi_task *task, u8 opcode)
 
        tdata->skb = alloc_skb(cdev->skb_tx_rsvd + headroom, GFP_ATOMIC);
        if (!tdata->skb) {
-               pr_warn("alloc skb %u+%u, opcode 0x%x failed.\n",
-                       cdev->skb_tx_rsvd, headroom, opcode);
+               struct cxgbi_sock *csk = cconn->cep->csk;
+               struct net_device *ndev = cdev->ports[csk->port_id];
+               ndev->stats.tx_dropped++;
                return -ENOMEM;
        }
 
@@ -1955,12 +1956,11 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
 
                        /* data fits in the skb's headroom */
                        for (i = 0; i < tdata->nr_frags; i++, frag++) {
-                               char *src = kmap_atomic(frag->page,
-                                                       KM_SOFTIRQ0);
+                               char *src = kmap_atomic(frag->page);
 
                                memcpy(dst, src+frag->offset, frag->size);
                                dst += frag->size;
-                               kunmap_atomic(src, KM_SOFTIRQ0);
+                               kunmap_atomic(src);
                        }
                        if (padlen) {
                                memset(dst, 0, padlen);
@@ -2147,11 +2147,10 @@ int cxgbi_set_conn_param(struct iscsi_cls_conn *cls_conn,
                        enum iscsi_param param, char *buf, int buflen)
 {
        struct iscsi_conn *conn = cls_conn->dd_data;
-       struct iscsi_session *session = conn->session;
        struct iscsi_tcp_conn *tcp_conn = conn->dd_data;
        struct cxgbi_conn *cconn = tcp_conn->dd_data;
        struct cxgbi_sock *csk = cconn->cep->csk;
-       int value, err = 0;
+       int err;
 
        log_debug(1 << CXGBI_DBG_ISCSI,
                "cls_conn 0x%p, param %d, buf(%d) %s.\n",
@@ -2173,15 +2172,7 @@ int cxgbi_set_conn_param(struct iscsi_cls_conn *cls_conn,
                                                        conn->datadgst_en, 0);
                break;
        case ISCSI_PARAM_MAX_R2T:
-               sscanf(buf, "%d", &value);
-               if (value <= 0 || !is_power_of_2(value))
-                       return -EINVAL;
-               if (session->max_r2t == value)
-                       break;
-               iscsi_tcp_r2tpool_free(session);
-               err = iscsi_set_param(cls_conn, param, buf, buflen);
-               if (!err && iscsi_tcp_r2tpool_alloc(session))
-                       return -ENOMEM;
+               return iscsi_tcp_set_max_r2t(conn, buf);
        case ISCSI_PARAM_MAX_RECV_DLENGTH:
                err = iscsi_set_param(cls_conn, param, buf, buflen);
                if (!err)