From adfc5217e9db68d3f0cec8dd847c1a6d3ab549ee Mon Sep 17 00:00:00 2001 From: Jeff Kirsher Date: Thu, 7 Apr 2011 06:03:04 -0700 Subject: broadcom: Move the Broadcom drivers Moves the drivers for Broadcom devices into drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile changes. CC: Eilon Greenstein CC: Michael Chan CC: Matt Carlson CC: Gary Zambrano CC: "Maciej W. Rozycki" Signed-off-by: Jeff Kirsher --- drivers/scsi/bnx2fc/bnx2fc.h | 2 +- drivers/scsi/bnx2i/bnx2i.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index 42228ca5a9d2..5613e8afffb0 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -58,7 +58,7 @@ #include "57xx_hsi_bnx2fc.h" #include "bnx2fc_debug.h" -#include "../../net/cnic_if.h" +#include "../../net/ethernet/broadcom/cnic_if.h" #include "bnx2fc_constants.h" #define BNX2FC_NAME "bnx2fc" 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 @@ #include #include -#include "../../net/cnic_if.h" +#include "../../net/ethernet/broadcom/cnic_if.h" #include "57xx_iscsi_hsi.h" #include "57xx_iscsi_constants.h" -- cgit v1.2.3 From f7917c009c28c941ba151ee66f04dc7f6a2e1e0b Mon Sep 17 00:00:00 2001 From: Jeff Kirsher Date: Thu, 7 Apr 2011 06:57:17 -0700 Subject: chelsio: Move the Chelsio drivers Moves the drivers for the Chelsio chipsets into drivers/net/ethernet/chelsio/ and the necessary Kconfig and Makefile changes. CC: Divy Le Ray CC: Dimitris Michailidis CC: Casey Leedom Signed-off-by: Jeff Kirsher --- drivers/scsi/cxgbi/cxgb3i/Kbuild | 2 +- drivers/scsi/cxgbi/cxgb4i/Kbuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') 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 @@ -EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb3 +EXTRA_CFLAGS += -I$(srctree)/drivers/net/ethernet/chelsio/cxgb3 obj-$(CONFIG_SCSI_CXGB3_ISCSI) += cxgb3i.o 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 @@ -EXTRA_CFLAGS += -I$(srctree)/drivers/net/cxgb4 +EXTRA_CFLAGS += -I$(srctree)/drivers/net/ethernet/chelsio/cxgb4 obj-$(CONFIG_SCSI_CXGB4_ISCSI) += cxgb4i.o -- cgit v1.2.3 From f08e6c0a87db74397ddbcca7cb189d50310d8ddf Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 11 Aug 2011 22:59:31 -0700 Subject: cxgbi: Fix scsi Kconfig dependencies. Reported-by: Stephen Rothwell Signed-off-by: David S. Miller --- drivers/scsi/cxgbi/cxgb3i/Kconfig | 3 ++- drivers/scsi/cxgbi/cxgb4i/Kconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') 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 tristate "Chelsio T3 iSCSI support" depends on PCI && INET select NETDEVICES - select NETDEV_10000 + select ETHERNET + select NET_VENDOR_CHELSIO select CHELSIO_T3 select SCSI_ISCSI_ATTRS ---help--- 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 tristate "Chelsio T4 iSCSI support" depends on PCI && INET select NETDEVICES - select NETDEV_10000 + select ETHERNET + select NET_VENDOR_CHELSIO select CHELSIO_T4 select SCSI_ISCSI_ATTRS ---help--- -- cgit v1.2.3 From 4c78893b3d107e2a053c8f51c526510857c09858 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Fri, 12 Aug 2011 03:00:47 -0700 Subject: cnic: Fix select dependencies in bnx2fc/bnx2i Kconfig. Reported-by: Stephen Rothwell Signed-off-by: David S. Miller --- drivers/scsi/bnx2fc/Kconfig | 3 ++- drivers/scsi/bnx2i/Kconfig | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') 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 tristate "Broadcom NetXtreme II FCoE support" depends on PCI select NETDEVICES - select NETDEV_1000 + select ETHERNET + select NET_VENDOR_BROADCOM select LIBFC select LIBFCOE select CNIC 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 depends on PCI select SCSI_ISCSI_ATTRS select NETDEVICES - select NETDEV_1000 + select ETHERNET + select NET_VENDOR_BROADCOM select CNIC ---help--- This driver supports iSCSI offload for the Broadcom NetXtreme II -- cgit v1.2.3 From 94b06fdbfce46f3126810e30698bdf010617179b Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 24 Aug 2011 22:28:14 +0000 Subject: bnx2fc: convert to SKB paged frag API. Signed-off-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Cc: Bhanu Prakash Gollapudi Cc: "James E.J. Bottomley" Cc: linux-scsi@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 7cb2cd48b17b..2c780a78fcbd 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) return -ENOMEM; } frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; - cp = kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ) + cp = kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ) + frag->page_offset; } else { cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); -- cgit v1.2.3 From 165c68d5a291537eaf2d3821a19335c9ec100ba6 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 24 Aug 2011 22:28:15 +0000 Subject: fcoe: convert to SKB paged frag API. Signed-off-by: Ian Campbell Reviewed-by: Konrad Rzeszutek Wilk Cc: Robert Love Cc: "James E.J. Bottomley" Cc: devel@open-fcoe.org Cc: linux-scsi@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fcoe/fcoe_transport.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index ba710e350ac5..3416ab673814 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1514,7 +1514,7 @@ int fcoe_xmit(struct fc_lport *lport, struct fc_frame *fp) return -ENOMEM; } frag = &skb_shinfo(skb)->frags[skb_shinfo(skb)->nr_frags - 1]; - cp = kmap_atomic(frag->page, KM_SKB_DATA_SOFTIRQ) + cp = kmap_atomic(skb_frag_page(frag), KM_SKB_DATA_SOFTIRQ) + frag->page_offset; } else { cp = (struct fcoe_crc_eof *)skb_put(skb, tlen); diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index 41068e8748e7..f6613f9f1bdb 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -108,8 +108,9 @@ u32 fcoe_fc_crc(struct fc_frame *fp) len = frag->size; while (len > 0) { clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); - data = kmap_atomic(frag->page + (off >> PAGE_SHIFT), - KM_SKB_DATA_SOFTIRQ); + data = kmap_atomic( + skb_frag_page(frag) + (off >> PAGE_SHIFT), + KM_SKB_DATA_SOFTIRQ); crc = crc32(crc, data + (off & ~PAGE_MASK), clen); kunmap_atomic(data, KM_SKB_DATA_SOFTIRQ); off += clen; -- cgit v1.2.3 From dc219a2e4812eecdc5438d2a0e2434b03d3efbf2 Mon Sep 17 00:00:00 2001 From: Michael Chan Date: Fri, 26 Aug 2011 09:45:39 +0000 Subject: cnic, bnx2fc: Increase maximum FCoE sessions. Increase it to NVRAM configured limit or 1024 whichever is less. Signed-off-by: Michael Chan Signed-off-by: Bhanu Prakash Gollapudi Signed-off-by: David S. Miller --- drivers/scsi/bnx2fc/bnx2fc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/bnx2fc/bnx2fc.h b/drivers/scsi/bnx2fc/bnx2fc.h index 5613e8afffb0..dd335a2a797b 100644 --- a/drivers/scsi/bnx2fc/bnx2fc.h +++ b/drivers/scsi/bnx2fc/bnx2fc.h @@ -81,7 +81,7 @@ #define BNX2FC_RQ_WQES_MAX 16 #define BNX2FC_CQ_WQES_MAX (BNX2FC_SQ_WQES_MAX + BNX2FC_RQ_WQES_MAX) -#define BNX2FC_NUM_MAX_SESS 128 +#define BNX2FC_NUM_MAX_SESS 1024 #define BNX2FC_NUM_MAX_SESS_LOG (ilog2(BNX2FC_NUM_MAX_SESS)) #define BNX2FC_MAX_OUTSTANDING_CMNDS 2048 -- cgit v1.2.3 From 4bc71cb983fd2844e603bf633df2bb53385182d2 Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Sat, 3 Sep 2011 03:34:30 +0000 Subject: net: consolidate and fix ethtool_ops->get_settings calling This patch does several things: - introduces __ethtool_get_settings which is called from ethtool code and from drivers as well. Put ASSERT_RTNL there. - dev_ethtool_get_settings() is replaced by __ethtool_get_settings() - changes calling in drivers so rtnl locking is respected. In iboe_get_rate was previously ->get_settings() called unlocked. This fixes it. Also prb_calc_retire_blk_tmo() in af_packet.c had the same problem. Also fixed by calling __dev_get_by_index() instead of dev_get_by_index() and holding rtnl_lock for both calls. - introduces rtnl_lock in bnx2fc_vport_create() and fcoe_vport_create() so bnx2fc_if_create() and fcoe_if_create() are called locked as they are from other places. - use __ethtool_get_settings() in bonding code Signed-off-by: Jiri Pirko v2->v3: -removed dev_ethtool_get_settings() -added ASSERT_RTNL into __ethtool_get_settings() -prb_calc_retire_blk_tmo - use __dev_get_by_index() and lock around it and __ethtool_get_settings() call v1->v2: add missing export_symbol Reviewed-by: Ben Hutchings [except FCoE bits] Acked-by: Ralf Baechle Signed-off-by: David S. Miller --- drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 4 +++- drivers/scsi/fcoe/fcoe.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c index 2c780a78fcbd..820a1840c3f7 100644 --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c @@ -673,7 +673,7 @@ static void bnx2fc_link_speed_update(struct fc_lport *lport) struct net_device *netdev = interface->netdev; struct ethtool_cmd ecmd; - if (!dev_ethtool_get_settings(netdev, &ecmd)) { + if (!__ethtool_get_settings(netdev, &ecmd)) { lport->link_supported_speeds &= ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); if (ecmd.supported & (SUPPORTED_1000baseT_Half | @@ -1001,9 +1001,11 @@ static int bnx2fc_vport_create(struct fc_vport *vport, bool disabled) "this interface\n"); return -EIO; } + rtnl_lock(); mutex_lock(&bnx2fc_dev_lock); vn_port = bnx2fc_if_create(interface, &vport->dev, 1); mutex_unlock(&bnx2fc_dev_lock); + rtnl_unlock(); if (IS_ERR(vn_port)) { printk(KERN_ERR PFX "bnx2fc_vport_create (%s) failed\n", diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 3416ab673814..83aa3ac52c40 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -2043,7 +2043,7 @@ int fcoe_link_speed_update(struct fc_lport *lport) struct net_device *netdev = fcoe_netdev(lport); struct ethtool_cmd ecmd; - if (!dev_ethtool_get_settings(netdev, &ecmd)) { + if (!__ethtool_get_settings(netdev, &ecmd)) { lport->link_supported_speeds &= ~(FC_PORTSPEED_1GBIT | FC_PORTSPEED_10GBIT); if (ecmd.supported & (SUPPORTED_1000baseT_Half | @@ -2452,7 +2452,9 @@ static int fcoe_vport_create(struct fc_vport *vport, bool disabled) } mutex_lock(&fcoe_config_mutex); + rtnl_lock(); vn_port = fcoe_if_create(fcoe, &vport->dev, 1); + rtnl_unlock(); mutex_unlock(&fcoe_config_mutex); if (IS_ERR(vn_port)) { -- cgit v1.2.3 From 9e903e085262ffbf1fc44a17ac06058aca03524a Mon Sep 17 00:00:00 2001 From: Eric Dumazet Date: Tue, 18 Oct 2011 21:00:24 +0000 Subject: net: add skb frag size accessors To ease skb->truesize sanitization, its better to be able to localize all references to skb frags size. Define accessors : skb_frag_size() to fetch frag size, and skb_frag_size_{set|add|sub}() to manipulate it. Signed-off-by: Eric Dumazet Signed-off-by: David S. Miller --- drivers/scsi/cxgbi/libcxgbi.c | 10 +++++----- drivers/scsi/fcoe/fcoe_transport.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index 77ac217ad5ce..be69da38ccaa 100644 --- a/drivers/scsi/cxgbi/libcxgbi.c +++ b/drivers/scsi/cxgbi/libcxgbi.c @@ -1814,8 +1814,8 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, copy = min(datalen, sglen); if (i && page == frags[i - 1].page && sgoffset + sg->offset == - frags[i - 1].page_offset + frags[i - 1].size) { - frags[i - 1].size += copy; + frags[i - 1].page_offset + skb_frag_size(&frags[i - 1])) { + skb_frag_size_add(&frags[i - 1], copy); } else { if (i >= frag_max) { pr_warn("too many pages %u, dlen %u.\n", @@ -1825,7 +1825,7 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, frags[i].page = page; frags[i].page_offset = sg->offset + sgoffset; - frags[i].size = copy; + skb_frag_size_set(&frags[i], copy); i++; } datalen -= copy; @@ -1951,8 +1951,8 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, char *src = kmap_atomic(frag->page, KM_SOFTIRQ0); - memcpy(dst, src+frag->page_offset, frag->size); - dst += frag->size; + memcpy(dst, src+frag->page_offset, skb_frag_size(frag)); + dst += skb_frag_size(frag); kunmap_atomic(src, KM_SOFTIRQ0); } if (padlen) { diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index f6613f9f1bdb..dac8e39a5188 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -105,7 +105,7 @@ u32 fcoe_fc_crc(struct fc_frame *fp) for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { frag = &skb_shinfo(skb)->frags[i]; off = frag->page_offset; - len = frag->size; + len = skb_frag_size(frag); while (len > 0) { clen = min(len, PAGE_SIZE - (off & ~PAGE_MASK)); data = kmap_atomic( -- cgit v1.2.3 From 6a39a16a5ac07a156de91cfb9422bde574e59fa6 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Wed, 19 Oct 2011 23:01:48 +0000 Subject: cxgbi: convert to SKB paged frag API. Signed-off-by: Ian Campbell Cc: "James E.J. Bottomley" Cc: "David S. Miller" Cc: Mike Christie Cc: James Bottomley Cc: Karen Xie Cc: linux-scsi@vger.kernel.org Cc: netdev@vger.kernel.org Signed-off-by: David S. Miller --- drivers/scsi/cxgbi/libcxgbi.c | 28 +++++++++++++++------------- drivers/scsi/cxgbi/libcxgbi.h | 2 +- 2 files changed, 16 insertions(+), 14 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c index be69da38ccaa..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, } static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, - unsigned int dlen, skb_frag_t *frags, + unsigned int dlen, struct page_frag *frags, int frag_max) { unsigned int datalen = dlen; @@ -1814,8 +1814,8 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, copy = min(datalen, sglen); if (i && page == frags[i - 1].page && sgoffset + sg->offset == - frags[i - 1].page_offset + skb_frag_size(&frags[i - 1])) { - skb_frag_size_add(&frags[i - 1], copy); + frags[i - 1].offset + frags[i - 1].size) { + frags[i - 1].size += copy; } else { if (i >= frag_max) { pr_warn("too many pages %u, dlen %u.\n", @@ -1824,8 +1824,8 @@ static int sgl_read_to_frags(struct scatterlist *sg, unsigned int sgoffset, } frags[i].page = page; - frags[i].page_offset = sg->offset + sgoffset; - skb_frag_size_set(&frags[i], copy); + frags[i].offset = sg->offset + sgoffset; + frags[i].size = copy; i++; } datalen -= copy; @@ -1944,15 +1944,15 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, if (tdata->nr_frags > MAX_SKB_FRAGS || (padlen && tdata->nr_frags == MAX_SKB_FRAGS)) { char *dst = skb->data + task->hdr_len; - skb_frag_t *frag = tdata->frags; + struct page_frag *frag = tdata->frags; /* data fits in the skb's headroom */ for (i = 0; i < tdata->nr_frags; i++, frag++) { char *src = kmap_atomic(frag->page, KM_SOFTIRQ0); - memcpy(dst, src+frag->page_offset, skb_frag_size(frag)); - dst += skb_frag_size(frag); + memcpy(dst, src+frag->offset, frag->size); + dst += frag->size; kunmap_atomic(src, KM_SOFTIRQ0); } if (padlen) { @@ -1962,11 +1962,13 @@ int cxgbi_conn_init_pdu(struct iscsi_task *task, unsigned int offset, skb_put(skb, count + padlen); } else { /* data fit into frag_list */ - for (i = 0; i < tdata->nr_frags; i++) - get_page(tdata->frags[i].page); - - memcpy(skb_shinfo(skb)->frags, tdata->frags, - sizeof(skb_frag_t) * tdata->nr_frags); + for (i = 0; i < tdata->nr_frags; i++) { + __skb_fill_page_desc(skb, i, + tdata->frags[i].page, + tdata->frags[i].offset, + tdata->frags[i].size); + skb_frag_ref(skb, i); + } skb_shinfo(skb)->nr_frags = tdata->nr_frags; skb->len += count; 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 { #define MAX_PDU_FRAGS ((ULP2_MAX_PDU_PAYLOAD + 512 - 1) / 512) struct cxgbi_task_data { unsigned short nr_frags; - skb_frag_t frags[MAX_PDU_FRAGS]; + struct page_frag frags[MAX_PDU_FRAGS]; struct sk_buff *skb; unsigned int offset; unsigned int count; -- cgit v1.2.3