aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/bnx2fc/Kconfig3
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc.h4
-rw-r--r--drivers/scsi/bnx2fc/bnx2fc_fcoe.c6
-rw-r--r--drivers/scsi/bnx2i/Kconfig3
-rw-r--r--drivers/scsi/bnx2i/bnx2i.h2
-rw-r--r--drivers/scsi/cxgbi/cxgb3i/Kbuild2
-rw-r--r--drivers/scsi/cxgbi/cxgb3i/Kconfig3
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/Kbuild2
-rw-r--r--drivers/scsi/cxgbi/cxgb4i/Kconfig3
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.c22
-rw-r--r--drivers/scsi/cxgbi/libcxgbi.h2
-rw-r--r--drivers/scsi/fcoe/fcoe.c6
-rw-r--r--drivers/scsi/fcoe/fcoe_transport.c7
13 files changed, 38 insertions, 27 deletions
diff --git a/drivers/scsi/bnx2fc/Kconfig b/drivers/scsi/bnx2fc/Kconfig
index 6a38080e35ed..cfcad8bde7cf 100644
--- a/drivers/scsi/bnx2fc/Kconfig
+++ b/drivers/scsi/bnx2fc/Kconfig
@@ -2,7 +2,8 @@ config SCSI_BNX2X_FCOE
2 tristate "Broadcom NetXtreme II FCoE support" 2 tristate "Broadcom NetXtreme II FCoE support"
3 depends on PCI 3 depends on PCI
4 select NETDEVICES 4 select NETDEVICES
5 select NETDEV_1000 5 select ETHERNET
6 select NET_VENDOR_BROADCOM
6 select LIBFC 7 select LIBFC
7 select LIBFCOE 8 select LIBFCOE
8 select CNIC 9 select CNIC
diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h
index 42228ca5a9d2..dd335a2a797b 100644
--- a/drivers/scsi/bnx2fc/bnx2fc.h
+++ b/drivers/scsi/bnx2fc/bnx2fc.h
@@ -58,7 +58,7 @@
58 58
59#include "57xx_hsi_bnx2fc.h" 59#include "57xx_hsi_bnx2fc.h"
60#include "bnx2fc_debug.h" 60#include "bnx2fc_debug.h"
61#include "../../net/cnic_if.h" 61#include "../../net/ethernet/broadcom/cnic_if.h"
62#include "bnx2fc_constants.h" 62#include "bnx2fc_constants.h"
63 63
64#define BNX2FC_NAME "bnx2fc" 64#define BNX2FC_NAME "bnx2fc"
@@ -81,7 +81,7 @@
81#define BNX2FC_RQ_WQES_MAX 16 81#define BNX2FC_RQ_WQES_MAX 16
82#define BNX2FC_CQ_WQES_MAX (BNX2FC_SQ_WQES_MAX + BNX2FC_RQ_WQES_MAX) 82#define BNX2FC_CQ_WQES_MAX (BNX2FC_SQ_WQES_MAX + BNX2FC_RQ_WQES_MAX)
83 83
84#define BNX2FC_NUM_MAX_SESS 128 84#define BNX2FC_NUM_MAX_SESS 1024
85#define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS)) 85#define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS))
86 86
87#define BNX2FC_MAX_OUTSTANDING_CMNDS 2048 87#define BNX2FC_MAX_OUTSTANDING_CMNDS 2048
diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
index 7cb2cd48b17b..820a1840c3f7 100644
--- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
+++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
@@ -302,7 +302,7 @@ static int bnx2fc_xmit(struct fc_lport *lport, struct fc_frame *fp)
302 return -ENOMEM; 302 return -ENOMEM;
303 } 303 }
304 frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; 304 frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1];
305 cp = kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ) 305 cp = kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ)
306 + frag->page_offset; 306 + frag->page_offset;
307 } else { 307 } else {
308 cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); 308 cp = (struct fcoe_crc_eof *)skb_put(skb, tlen);
@@ -673,7 +673,7 @@ static void bnx2fc_link_speed_update(struct fc_lport *lport)
673 struct net_device *netdev = interface->netdev; 673 struct net_device *netdev = interface->netdev;
674 struct ethtool_cmd ecmd; 674 struct ethtool_cmd ecmd;
675 675
676 if (!dev_ethtool_get_settings(netdev, &ecmd)) { 676 if (!__ethtool_get_settings(netdev, &ecmd)) {
677 lport->link_supported_speeds &= 677 lport->link_supported_speeds &=
678 ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); 678 ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT);
679 if (ecmd.supported & (SUPPORTED_1000baseT_Half | 679 if (ecmd.supported & (SUPPORTED_1000baseT_Half |
@@ -1001,9 +1001,11 @@ static int bnx2fc_vport_create(struct fc_vport *vport, bool disabled)
1001 "this interface\n"); 1001 "this interface\n");
1002 return -EIO; 1002 return -EIO;
1003 } 1003 }
1004 rtnl_lock();
1004 mutex_lock(&bnx2fc_dev_lock); 1005 mutex_lock(&bnx2fc_dev_lock);
1005 vn_port = bnx2fc_if_create(interface, &vport->dev, 1); 1006 vn_port = bnx2fc_if_create(interface, &vport->dev, 1);
1006 mutex_unlock(&bnx2fc_dev_lock); 1007 mutex_unlock(&bnx2fc_dev_lock);
1008 rtnl_unlock();
1007 1009
1008 if (IS_ERR(vn_port)) { 1010 if (IS_ERR(vn_port)) {
1009 printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n", 1011 printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n",
diff --git a/drivers/scsi/bnx2i/Kconfig b/drivers/scsi/bnx2i/Kconfig
index 45a6154ce972..01cff1894b6d 100644
--- a/drivers/scsi/bnx2i/Kconfig
+++ b/drivers/scsi/bnx2i/Kconfig
@@ -4,7 +4,8 @@ config SCSI_BNX2_ISCSI
4 depends on PCI 4 depends on PCI
5 select SCSI_ISCSI_ATTRS 5 select SCSI_ISCSI_ATTRS
6 select NETDEVICES 6 select NETDEVICES
7 select NETDEV_1000 7 select ETHERNET
8 select NET_VENDOR_BROADCOM
8 select CNIC 9 select CNIC
9 ---help--- 10 ---help---
10 This driver supports iSCSI offload for the Broadcom NetXtreme II 11 This driver supports iSCSI offload for the Broadcom NetXtreme II
diff --git a/drivers/scsi/bnx2i/bnx2i.h b/drivers/scsi/bnx2i/bnx2i.h
index dc5700765db4..0bd70e80efe4 100644
--- a/drivers/scsi/bnx2i/bnx2i.h
+++ b/drivers/scsi/bnx2i/bnx2i.h
@@ -40,7 +40,7 @@
40#include <scsi/libiscsi.h> 40#include <scsi/libiscsi.h>
41#include <scsi/scsi_transport_iscsi.h> 41#include <scsi/scsi_transport_iscsi.h>
42 42
43#include "../../net/cnic_if.h" 43#include "../../net/ethernet/broadcom/cnic_if.h"
44#include "57xx_iscsi_hsi.h" 44#include "57xx_iscsi_hsi.h"
45#include "57xx_iscsi_constants.h" 45#include "57xx_iscsi_constants.h"
46 46
diff --git a/drivers/scsi/cxgbi/cxgb3i/Kbuild b/drivers/scsi/cxgbi/cxgb3i/Kbuild
index 09dbf9efc8ea..6f095e28a974 100644
--- a/drivers/scsi/cxgbi/cxgb3i/Kbuild
+++ b/drivers/scsi/cxgbi/cxgb3i/Kbuild
@@ -1,3 +1,3 @@
1EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb3 1EXTRA_CFLAGS += -I$(srctree)/drivers/net/ethernet/chelsio/cxgb3
2 2
3obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o 3obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o
diff --git a/drivers/scsi/cxgbi/cxgb3i/Kconfig b/drivers/scsi/cxgbi/cxgb3i/Kconfig
index 11dff23f7838..6bbc36fbd6ec 100644
--- a/drivers/scsi/cxgbi/cxgb3i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb3i/Kconfig
@@ -2,7 +2,8 @@ config SCSI_CXGB3_ISCSI
2 tristate "Chelsio T3 iSCSI support" 2 tristate "Chelsio T3 iSCSI support"
3 depends on PCI && INET 3 depends on PCI && INET
4 select NETDEVICES 4 select NETDEVICES
5 select NETDEV_10000 5 select ETHERNET
6 select NET_VENDOR_CHELSIO
6 select CHELSIO_T3 7 select CHELSIO_T3
7 select SCSI_ISCSI_ATTRS 8 select SCSI_ISCSI_ATTRS
8 ---help--- 9 ---help---
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kbuild b/drivers/scsi/cxgbi/cxgb4i/Kbuild
index b9f4af7454b7..8290cdaa4652 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kbuild
+++ b/drivers/scsi/cxgbi/cxgb4i/Kbuild
@@ -1,3 +1,3 @@
1EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb4 1EXTRA_CFLAGS += -I$(srctree)/drivers/net/ethernet/chelsio/cxgb4
2 2
3obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o 3obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o
diff --git a/drivers/scsi/cxgbi/cxgb4i/Kconfig b/drivers/scsi/cxgbi/cxgb4i/Kconfig
index d5302c27f377..16b2c7d26617 100644
--- a/drivers/scsi/cxgbi/cxgb4i/Kconfig
+++ b/drivers/scsi/cxgbi/cxgb4i/Kconfig
@@ -2,7 +2,8 @@ config SCSI_CXGB4_ISCSI
2 tristate "Chelsio T4 iSCSI support" 2 tristate "Chelsio T4 iSCSI support"
3 depends on PCI && INET 3 depends on PCI && INET
4 select NETDEVICES 4 select NETDEVICES
5 select NETDEV_10000 5 select ETHERNET
6 select NET_VENDOR_CHELSIO
6 select CHELSIO_T4 7 select CHELSIO_T4
7 select SCSI_ISCSI_ATTRS 8 select SCSI_ISCSI_ATTRS
8 ---help--- 9 ---help---
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 77ac217ad5ce..1c1329bc77c7 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -1787,7 +1787,7 @@ static int sgl_seek_offset(struct scatterlist *sgl, unsigned int sgcnt,
1787} 1787}
1788 1788
1789static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, 1789static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset,
1790 unsigned int dlen, skb_frag_t *frags, 1790 unsigned int dlen, struct page_frag *frags,
1791 int frag_max) 1791 int frag_max)
1792{ 1792{
1793 unsigned int datalen = dlen; 1793 unsigned int datalen = dlen;
@@ -1814,7 +1814,7 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset,
1814 copy = min(datalen, sglen); 1814 copy = min(datalen, sglen);
1815 if (i && page == frags[i - 1].page && 1815 if (i && page == frags[i - 1].page &&
1816 sgoffset + sg->offset == 1816 sgoffset + sg->offset ==
1817 frags[i - 1].page_offset + frags[i - 1].size) { 1817 frags[i - 1].offset + frags[i - 1].size) {
1818 frags[i - 1].size += copy; 1818 frags[i - 1].size += copy;
1819 } else { 1819 } else {
1820 if (i >= frag_max) { 1820 if (i >= frag_max) {
@@ -1824,7 +1824,7 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset,
1824 } 1824 }
1825 1825
1826 frags[i].page = page; 1826 frags[i].page = page;
1827 frags[i].page_offset = sg->offset + sgoffset; 1827 frags[i].offset = sg->offset + sgoffset;
1828 frags[i].size = copy; 1828 frags[i].size = copy;
1829 i++; 1829 i++;
1830 } 1830 }
@@ -1944,14 +1944,14 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
1944 if (tdata->nr_frags > MAX_SKB_FRAGS || 1944 if (tdata->nr_frags > MAX_SKB_FRAGS ||
1945 (padlen && tdata->nr_frags == MAX_SKB_FRAGS)) { 1945 (padlen && tdata->nr_frags == MAX_SKB_FRAGS)) {
1946 char *dst = skb->data + task->hdr_len; 1946 char *dst = skb->data + task->hdr_len;
1947 skb_frag_t *frag = tdata->frags; 1947 struct page_frag *frag = tdata->frags;
1948 1948
1949 /* data fits in the skb's headroom */ 1949 /* data fits in the skb's headroom */
1950 for (i = 0; i < tdata->nr_frags; i++, frag++) { 1950 for (i = 0; i < tdata->nr_frags; i++, frag++) {
1951 char *src = kmap_atomic(frag->page, 1951 char *src = kmap_atomic(frag->page,
1952 KM_SOFTIRQ0); 1952 KM_SOFTIRQ0);
1953 1953
1954 memcpy(dst, src+frag->page_offset, frag->size); 1954 memcpy(dst, src+frag->offset, frag->size);
1955 dst += frag->size; 1955 dst += frag->size;
1956 kunmap_atomic(src, KM_SOFTIRQ0); 1956 kunmap_atomic(src, KM_SOFTIRQ0);
1957 } 1957 }
@@ -1962,11 +1962,13 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset,
1962 skb_put(skb, count + padlen); 1962 skb_put(skb, count + padlen);
1963 } else { 1963 } else {
1964 /* data fit into frag_list */ 1964 /* data fit into frag_list */
1965 for (i = 0; i < tdata->nr_frags; i++) 1965 for (i = 0; i < tdata->nr_frags; i++) {
1966 get_page(tdata->frags[i].page); 1966 __skb_fill_page_desc(skb, i,
1967 1967 tdata->frags[i].page,
1968 memcpy(skb_shinfo(skb)->frags, tdata->frags, 1968 tdata->frags[i].offset,
1969 sizeof(skb_frag_t) * tdata->nr_frags); 1969 tdata->frags[i].size);
1970 skb_frag_ref(skb, i);
1971 }
1970 skb_shinfo(skb)->nr_frags = tdata->nr_frags; 1972 skb_shinfo(skb)->nr_frags = tdata->nr_frags;
1971 skb->len += count; 1973 skb->len += count;
1972 skb->data_len += count; 1974 skb->data_len += count;
diff --git a/drivers/scsi/cxgbi/libcxgbi.h b/drivers/scsi/cxgbi/libcxgbi.h
index 9267844519c9..3a25b1187c10 100644
--- a/drivers/scsi/cxgbi/libcxgbi.h
+++ b/drivers/scsi/cxgbi/libcxgbi.h
@@ -574,7 +574,7 @@ struct cxgbi_endpoint {
574#define MAX_PDU_FRAGS ((ULP2_MAX_PDU_PAYLOAD + 512 - 1) / 512) 574#define MAX_PDU_FRAGS ((ULP2_MAX_PDU_PAYLOAD + 512 - 1) / 512)
575struct cxgbi_task_data { 575struct cxgbi_task_data {
576 unsigned short nr_frags; 576 unsigned short nr_frags;
577 skb_frag_t frags[MAX_PDU_FRAGS]; 577 struct page_frag frags[MAX_PDU_FRAGS];
578 struct sk_buff *skb; 578 struct sk_buff *skb;
579 unsigned int offset; 579 unsigned int offset;
580 unsigned int count; 580 unsigned int count;
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c
index 34c8d82b7423..a1c0ddd53aa9 100644
--- a/drivers/scsi/fcoe/fcoe.c
+++ b/drivers/scsi/fcoe/fcoe.c
@@ -1517,7 +1517,7 @@ int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp)
1517 return -ENOMEM; 1517 return -ENOMEM;
1518 } 1518 }
1519 frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; 1519 frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1];
1520 cp = kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ) 1520 cp = kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ)
1521 + frag->page_offset; 1521 + frag->page_offset;
1522 } else { 1522 } else {
1523 cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); 1523 cp = (struct fcoe_crc_eof *)skb_put(skb, tlen);
@@ -2045,7 +2045,7 @@ int fcoe_link_speed_update(struct fc_lport *lport)
2045 struct net_device *netdev = fcoe_netdev(lport); 2045 struct net_device *netdev = fcoe_netdev(lport);
2046 struct ethtool_cmd ecmd; 2046 struct ethtool_cmd ecmd;
2047 2047
2048 if (!dev_ethtool_get_settings(netdev, &ecmd)) { 2048 if (!__ethtool_get_settings(netdev, &ecmd)) {
2049 lport->link_supported_speeds &= 2049 lport->link_supported_speeds &=
2050 ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); 2050 ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT);
2051 if (ecmd.supported & (SUPPORTED_1000baseT_Half | 2051 if (ecmd.supported & (SUPPORTED_1000baseT_Half |
@@ -2454,7 +2454,9 @@ static int fcoe_vport_create(struct fc_vport *vport, bool disabled)
2454 } 2454 }
2455 2455
2456 mutex_lock(&fcoe_config_mutex); 2456 mutex_lock(&fcoe_config_mutex);
2457 rtnl_lock();
2457 vn_port = fcoe_if_create(fcoe, &vport->dev, 1); 2458 vn_port = fcoe_if_create(fcoe, &vport->dev, 1);
2459 rtnl_unlock();
2458 mutex_unlock(&fcoe_config_mutex); 2460 mutex_unlock(&fcoe_config_mutex);
2459 2461
2460 if (IS_ERR(vn_port)) { 2462 if (IS_ERR(vn_port)) {
diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c
index 41068e8748e7..dac8e39a5188 100644
--- a/drivers/scsi/fcoe/fcoe_transport.c
+++ b/drivers/scsi/fcoe/fcoe_transport.c
@@ -105,11 +105,12 @@ u32 fcoe_fc_crc(struct fc_frame *fp)
105 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { 105 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
106 frag = &skb_shinfo(skb)->frags[i]; 106 frag = &skb_shinfo(skb)->frags[i];
107 off = frag->page_offset; 107 off = frag->page_offset;
108 len = frag->size; 108 len = skb_frag_size(frag);
109 while (len > 0) { 109 while (len > 0) {
110 clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); 110 clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK));
111 data = kmap_atomic(frag->page + (off >> PAGE_SHIFT), 111 data = kmap_atomic(
112 KM_SKB_DATA_SOFTIRQ); 112 skb_frag_page(frag) + (off >> PAGE_SHIFT),
113 KM_SKB_DATA_SOFTIRQ);
113 crc = crc32(crc, data + (off & ~PAGE_MASK), clen); 114 crc = crc32(crc, data + (off & ~PAGE_MASK), clen);
114 kunmap_atomic(data, KM_SKB_DATA_SOFTIRQ); 115 kunmap_atomic(data, KM_SKB_DATA_SOFTIRQ);
115 off += clen; 116 off += clen;