aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/8390/ax88796.c2
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c7
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c7
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c5
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c1
-rw-r--r--drivers/net/ethernet/intel/e100.c36
-rw-r--r--drivers/net/ethernet/intel/igb/igb.h8
-rw-r--r--drivers/net/ethernet/intel/igb/igb_main.c110
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c6
-rw-r--r--drivers/net/ethernet/marvell/Kconfig2
-rw-r--r--drivers/net/ethernet/marvell/mvneta.c18
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c15
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c3
-rw-r--r--drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c4
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge.h2
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c2
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c36
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/mmc_core.c1
-rw-r--r--drivers/net/ethernet/ti/cpsw.c2
19 files changed, 107 insertions, 160 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index cab306a9888e..e1d26433d619 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -828,7 +828,7 @@ static int ax_probe(struct platform_device *pdev)
828 struct ei_device *ei_local; 828 struct ei_device *ei_local;
829 struct ax_device *ax; 829 struct ax_device *ax;
830 struct resource *irq, *mem, *mem2; 830 struct resource *irq, *mem, *mem2;
831 resource_size_t mem_size, mem2_size = 0; 831 unsigned long mem_size, mem2_size = 0;
832 int ret = 0; 832 int ret = 0;
833 833
834 dev = ax__alloc_ei_netdev(sizeof(struct ax_device)); 834 dev = ax__alloc_ei_netdev(sizeof(struct ax_device));
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 6b50443d3456..d72bd8c40aa1 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -2615,6 +2615,9 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode)
2615 } 2615 }
2616 } 2616 }
2617 2617
2618 /* initialize FW coalescing state machines in RAM */
2619 bnx2x_update_coalesce(bp);
2620
2618 /* setup the leading queue */ 2621 /* setup the leading queue */
2619 rc = bnx2x_setup_leading(bp); 2622 rc = bnx2x_setup_leading(bp);
2620 if (rc) { 2623 if (rc) {
@@ -4737,11 +4740,11 @@ static void storm_memset_hc_disable(struct bnx2x *bp, u8 port,
4737 u32 enable_flag = disable ? 0 : (1 << HC_INDEX_DATA_HC_ENABLED_SHIFT); 4740 u32 enable_flag = disable ? 0 : (1 << HC_INDEX_DATA_HC_ENABLED_SHIFT);
4738 u32 addr = BAR_CSTRORM_INTMEM + 4741 u32 addr = BAR_CSTRORM_INTMEM +
4739 CSTORM_STATUS_BLOCK_DATA_FLAGS_OFFSET(fw_sb_id, sb_index); 4742 CSTORM_STATUS_BLOCK_DATA_FLAGS_OFFSET(fw_sb_id, sb_index);
4740 u16 flags = REG_RD16(bp, addr); 4743 u8 flags = REG_RD8(bp, addr);
4741 /* clear and set */ 4744 /* clear and set */
4742 flags &= ~HC_INDEX_DATA_HC_ENABLED; 4745 flags &= ~HC_INDEX_DATA_HC_ENABLED;
4743 flags |= enable_flag; 4746 flags |= enable_flag;
4744 REG_WR16(bp, addr, flags); 4747 REG_WR8(bp, addr, flags);
4745 DP(NETIF_MSG_IFUP, 4748 DP(NETIF_MSG_IFUP,
4746 "port %x fw_sb_id %d sb_index %d disable %d\n", 4749 "port %x fw_sb_id %d sb_index %d disable %d\n",
4747 port, fw_sb_id, sb_index, disable); 4750 port, fw_sb_id, sb_index, disable);
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 1e60c5d139d1..86d13870399e 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -4959,7 +4959,7 @@ static void bnx2x_after_function_update(struct bnx2x *bp)
4959 q); 4959 q);
4960 } 4960 }
4961 4961
4962 if (!NO_FCOE(bp)) { 4962 if (!NO_FCOE(bp) && CNIC_ENABLED(bp)) {
4963 fp = &bp->fp[FCOE_IDX(bp)]; 4963 fp = &bp->fp[FCOE_IDX(bp)];
4964 queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj; 4964 queue_params.q_obj = &bnx2x_sp_obj(bp, fp).q_obj;
4965 4965
@@ -9946,6 +9946,10 @@ static int bnx2x_prev_unload_common(struct bnx2x *bp)
9946 REG_RD(bp, NIG_REG_NIG_INT_STS_CLR_0); 9946 REG_RD(bp, NIG_REG_NIG_INT_STS_CLR_0);
9947 } 9947 }
9948 } 9948 }
9949 if (!CHIP_IS_E1x(bp))
9950 /* block FW from writing to host */
9951 REG_WR(bp, PGLUE_B_REG_INTERNAL_PFID_ENABLE_MASTER, 0);
9952
9949 /* wait until BRB is empty */ 9953 /* wait until BRB is empty */
9950 tmp_reg = REG_RD(bp, BRB1_REG_NUM_OF_FULL_BLOCKS); 9954 tmp_reg = REG_RD(bp, BRB1_REG_NUM_OF_FULL_BLOCKS);
9951 while (timer_count) { 9955 while (timer_count) {
@@ -13450,6 +13454,7 @@ static int bnx2x_unregister_cnic(struct net_device *dev)
13450 RCU_INIT_POINTER(bp->cnic_ops, NULL); 13454 RCU_INIT_POINTER(bp->cnic_ops, NULL);
13451 mutex_unlock(&bp->cnic_mutex); 13455 mutex_unlock(&bp->cnic_mutex);
13452 synchronize_rcu(); 13456 synchronize_rcu();
13457 bp->cnic_enabled = false;
13453 kfree(bp->cnic_kwq); 13458 kfree(bp->cnic_kwq);
13454 bp->cnic_kwq = NULL; 13459 bp->cnic_kwq = NULL;
13455 13460
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index 21808680b91f..654e7820daa0 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -772,8 +772,9 @@ static struct sk_buff *be_insert_vlan_in_pkt(struct be_adapter *adapter,
772 772
773 if (vlan_tx_tag_present(skb)) { 773 if (vlan_tx_tag_present(skb)) {
774 vlan_tag = be_get_tx_vlan_tag(adapter, skb); 774 vlan_tag = be_get_tx_vlan_tag(adapter, skb);
775 __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag); 775 skb = __vlan_put_tag(skb, htons(ETH_P_8021Q), vlan_tag);
776 skb->vlan_tci = 0; 776 if (skb)
777 skb->vlan_tci = 0;
777 } 778 }
778 779
779 return skb; 780 return skb;
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 20890874ead7..2451ab1b5a83 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -997,6 +997,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
997 } else { 997 } else {
998 if (fep->link) { 998 if (fep->link) {
999 fec_stop(ndev); 999 fec_stop(ndev);
1000 fep->link = phy_dev->link;
1000 status_change = 1; 1001 status_change = 1;
1001 } 1002 }
1002 } 1003 }
diff --git a/drivers/net/ethernet/intel/e100.c b/drivers/net/ethernet/intel/e100.c
index ec800b093e7e..d2bea3f07c73 100644
--- a/drivers/net/ethernet/intel/e100.c
+++ b/drivers/net/ethernet/intel/e100.c
@@ -870,7 +870,7 @@ err_unlock:
870} 870}
871 871
872static int e100_exec_cb(struct nic *nic, struct sk_buff *skb, 872static int e100_exec_cb(struct nic *nic, struct sk_buff *skb,
873 void (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *)) 873 int (*cb_prepare)(struct nic *, struct cb *, struct sk_buff *))
874{ 874{
875 struct cb *cb; 875 struct cb *cb;
876 unsigned long flags; 876 unsigned long flags;
@@ -888,10 +888,13 @@ static int e100_exec_cb(struct nic *nic, struct sk_buff *skb,
888 nic->cbs_avail--; 888 nic->cbs_avail--;
889 cb->skb = skb; 889 cb->skb = skb;
890 890
891 err = cb_prepare(nic, cb, skb);
892 if (err)
893 goto err_unlock;
894
891 if (unlikely(!nic->cbs_avail)) 895 if (unlikely(!nic->cbs_avail))
892 err = -ENOSPC; 896 err = -ENOSPC;
893 897
894 cb_prepare(nic, cb, skb);
895 898
896 /* Order is important otherwise we'll be in a race with h/w: 899 /* Order is important otherwise we'll be in a race with h/w:
897 * set S-bit in current first, then clear S-bit in previous. */ 900 * set S-bit in current first, then clear S-bit in previous. */
@@ -1091,7 +1094,7 @@ static void e100_get_defaults(struct nic *nic)
1091 nic->mii.mdio_write = mdio_write; 1094 nic->mii.mdio_write = mdio_write;
1092} 1095}
1093 1096
1094static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb) 1097static int e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1095{ 1098{
1096 struct config *config = &cb->u.config; 1099 struct config *config = &cb->u.config;
1097 u8 *c = (u8 *)config; 1100 u8 *c = (u8 *)config;
@@ -1181,6 +1184,7 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1181 netif_printk(nic, hw, KERN_DEBUG, nic->netdev, 1184 netif_printk(nic, hw, KERN_DEBUG, nic->netdev,
1182 "[16-23]=%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n", 1185 "[16-23]=%02X:%02X:%02X:%02X:%02X:%02X:%02X:%02X\n",
1183 c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]); 1186 c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]);
1187 return 0;
1184} 1188}
1185 1189
1186/************************************************************************* 1190/*************************************************************************
@@ -1331,7 +1335,7 @@ static const struct firmware *e100_request_firmware(struct nic *nic)
1331 return fw; 1335 return fw;
1332} 1336}
1333 1337
1334static void e100_setup_ucode(struct nic *nic, struct cb *cb, 1338static int e100_setup_ucode(struct nic *nic, struct cb *cb,
1335 struct sk_buff *skb) 1339 struct sk_buff *skb)
1336{ 1340{
1337 const struct firmware *fw = (void *)skb; 1341 const struct firmware *fw = (void *)skb;
@@ -1358,6 +1362,7 @@ static void e100_setup_ucode(struct nic *nic, struct cb *cb,
1358 cb->u.ucode[min_size] |= cpu_to_le32((BUNDLESMALL) ? 0xFFFF : 0xFF80); 1362 cb->u.ucode[min_size] |= cpu_to_le32((BUNDLESMALL) ? 0xFFFF : 0xFF80);
1359 1363
1360 cb->command = cpu_to_le16(cb_ucode | cb_el); 1364 cb->command = cpu_to_le16(cb_ucode | cb_el);
1365 return 0;
1361} 1366}
1362 1367
1363static inline int e100_load_ucode_wait(struct nic *nic) 1368static inline int e100_load_ucode_wait(struct nic *nic)
@@ -1400,18 +1405,20 @@ static inline int e100_load_ucode_wait(struct nic *nic)
1400 return err; 1405 return err;
1401} 1406}
1402 1407
1403static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, 1408static int e100_setup_iaaddr(struct nic *nic, struct cb *cb,
1404 struct sk_buff *skb) 1409 struct sk_buff *skb)
1405{ 1410{
1406 cb->command = cpu_to_le16(cb_iaaddr); 1411 cb->command = cpu_to_le16(cb_iaaddr);
1407 memcpy(cb->u.iaaddr, nic->netdev->dev_addr, ETH_ALEN); 1412 memcpy(cb->u.iaaddr, nic->netdev->dev_addr, ETH_ALEN);
1413 return 0;
1408} 1414}
1409 1415
1410static void e100_dump(struct nic *nic, struct cb *cb, struct sk_buff *skb) 1416static int e100_dump(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1411{ 1417{
1412 cb->command = cpu_to_le16(cb_dump); 1418 cb->command = cpu_to_le16(cb_dump);
1413 cb->u.dump_buffer_addr = cpu_to_le32(nic->dma_addr + 1419 cb->u.dump_buffer_addr = cpu_to_le32(nic->dma_addr +
1414 offsetof(struct mem, dump_buf)); 1420 offsetof(struct mem, dump_buf));
1421 return 0;
1415} 1422}
1416 1423
1417static int e100_phy_check_without_mii(struct nic *nic) 1424static int e100_phy_check_without_mii(struct nic *nic)
@@ -1581,7 +1588,7 @@ static int e100_hw_init(struct nic *nic)
1581 return 0; 1588 return 0;
1582} 1589}
1583 1590
1584static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb) 1591static int e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1585{ 1592{
1586 struct net_device *netdev = nic->netdev; 1593 struct net_device *netdev = nic->netdev;
1587 struct netdev_hw_addr *ha; 1594 struct netdev_hw_addr *ha;
@@ -1596,6 +1603,7 @@ static void e100_multi(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1596 memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &ha->addr, 1603 memcpy(&cb->u.multi.addr[i++ * ETH_ALEN], &ha->addr,
1597 ETH_ALEN); 1604 ETH_ALEN);
1598 } 1605 }
1606 return 0;
1599} 1607}
1600 1608
1601static void e100_set_multicast_list(struct net_device *netdev) 1609static void e100_set_multicast_list(struct net_device *netdev)
@@ -1756,11 +1764,18 @@ static void e100_watchdog(unsigned long data)
1756 round_jiffies(jiffies + E100_WATCHDOG_PERIOD)); 1764 round_jiffies(jiffies + E100_WATCHDOG_PERIOD));
1757} 1765}
1758 1766
1759static void e100_xmit_prepare(struct nic *nic, struct cb *cb, 1767static int e100_xmit_prepare(struct nic *nic, struct cb *cb,
1760 struct sk_buff *skb) 1768 struct sk_buff *skb)
1761{ 1769{
1770 dma_addr_t dma_addr;
1762 cb->command = nic->tx_command; 1771 cb->command = nic->tx_command;
1763 1772
1773 dma_addr = pci_map_single(nic->pdev,
1774 skb->data, skb->len, PCI_DMA_TODEVICE);
1775 /* If we can't map the skb, have the upper layer try later */
1776 if (pci_dma_mapping_error(nic->pdev, dma_addr))
1777 return -ENOMEM;
1778
1764 /* 1779 /*
1765 * Use the last 4 bytes of the SKB payload packet as the CRC, used for 1780 * Use the last 4 bytes of the SKB payload packet as the CRC, used for
1766 * testing, ie sending frames with bad CRC. 1781 * testing, ie sending frames with bad CRC.
@@ -1777,11 +1792,10 @@ static void e100_xmit_prepare(struct nic *nic, struct cb *cb,
1777 cb->u.tcb.tcb_byte_count = 0; 1792 cb->u.tcb.tcb_byte_count = 0;
1778 cb->u.tcb.threshold = nic->tx_threshold; 1793 cb->u.tcb.threshold = nic->tx_threshold;
1779 cb->u.tcb.tbd_count = 1; 1794 cb->u.tcb.tbd_count = 1;
1780 cb->u.tcb.tbd.buf_addr = cpu_to_le32(pci_map_single(nic->pdev, 1795 cb->u.tcb.tbd.buf_addr = cpu_to_le32(dma_addr);
1781 skb->data, skb->len, PCI_DMA_TODEVICE));
1782 /* check for mapping failure? */
1783 cb->u.tcb.tbd.size = cpu_to_le16(skb->len); 1796 cb->u.tcb.tbd.size = cpu_to_le16(skb->len);
1784 skb_tx_timestamp(skb); 1797 skb_tx_timestamp(skb);
1798 return 0;
1785} 1799}
1786 1800
1787static netdev_tx_t e100_xmit_frame(struct sk_buff *skb, 1801static netdev_tx_t e100_xmit_frame(struct sk_buff *skb,
diff --git a/drivers/net/ethernet/intel/igb/igb.h b/drivers/net/ethernet/intel/igb/igb.h
index c92115e71ebe..9d6c075e232d 100644
--- a/drivers/net/ethernet/intel/igb/igb.h
+++ b/drivers/net/ethernet/intel/igb/igb.h
@@ -293,18 +293,10 @@ struct igb_q_vector {
293enum e1000_ring_flags_t { 293enum e1000_ring_flags_t {
294 IGB_RING_FLAG_RX_SCTP_CSUM, 294 IGB_RING_FLAG_RX_SCTP_CSUM,
295 IGB_RING_FLAG_RX_LB_VLAN_BSWAP, 295 IGB_RING_FLAG_RX_LB_VLAN_BSWAP,
296 IGB_RING_FLAG_RX_BUILD_SKB_ENABLED,
297 IGB_RING_FLAG_TX_CTX_IDX, 296 IGB_RING_FLAG_TX_CTX_IDX,
298 IGB_RING_FLAG_TX_DETECT_HANG 297 IGB_RING_FLAG_TX_DETECT_HANG
299}; 298};
300 299
301#define ring_uses_build_skb(ring) \
302 test_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
303#define set_ring_build_skb_enabled(ring) \
304 set_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
305#define clear_ring_build_skb_enabled(ring) \
306 clear_bit(IGB_RING_FLAG_RX_BUILD_SKB_ENABLED, &(ring)->flags)
307
308#define IGB_TXD_DCMD (E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_RS) 300#define IGB_TXD_DCMD (E1000_ADVTXD_DCMD_EOP | E1000_ADVTXD_DCMD_RS)
309 301
310#define IGB_RX_DESC(R, i) \ 302#define IGB_RX_DESC(R, i) \
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c
index 9bf08b977daa..dcaa35481dd7 100644
--- a/drivers/net/ethernet/intel/igb/igb_main.c
+++ b/drivers/net/ethernet/intel/igb/igb_main.c
@@ -3387,20 +3387,6 @@ void igb_configure_rx_ring(struct igb_adapter *adapter,
3387 wr32(E1000_RXDCTL(reg_idx), rxdctl); 3387 wr32(E1000_RXDCTL(reg_idx), rxdctl);
3388} 3388}
3389 3389
3390static void igb_set_rx_buffer_len(struct igb_adapter *adapter,
3391 struct igb_ring *rx_ring)
3392{
3393#define IGB_MAX_BUILD_SKB_SIZE \
3394 (SKB_WITH_OVERHEAD(IGB_RX_BUFSZ) - \
3395 (NET_SKB_PAD + NET_IP_ALIGN + IGB_TS_HDR_LEN))
3396
3397 /* set build_skb flag */
3398 if (adapter->max_frame_size <= IGB_MAX_BUILD_SKB_SIZE)
3399 set_ring_build_skb_enabled(rx_ring);
3400 else
3401 clear_ring_build_skb_enabled(rx_ring);
3402}
3403
3404/** 3390/**
3405 * igb_configure_rx - Configure receive Unit after Reset 3391 * igb_configure_rx - Configure receive Unit after Reset
3406 * @adapter: board private structure 3392 * @adapter: board private structure
@@ -3421,11 +3407,8 @@ static void igb_configure_rx(struct igb_adapter *adapter)
3421 /* Setup the HW Rx Head and Tail Descriptor Pointers and 3407 /* Setup the HW Rx Head and Tail Descriptor Pointers and
3422 * the Base and Length of the Rx Descriptor Ring 3408 * the Base and Length of the Rx Descriptor Ring
3423 */ 3409 */
3424 for (i = 0; i < adapter->num_rx_queues; i++) { 3410 for (i = 0; i < adapter->num_rx_queues; i++)
3425 struct igb_ring *rx_ring = adapter->rx_ring[i]; 3411 igb_configure_rx_ring(adapter, adapter->rx_ring[i]);
3426 igb_set_rx_buffer_len(adapter, rx_ring);
3427 igb_configure_rx_ring(adapter, rx_ring);
3428 }
3429} 3412}
3430 3413
3431/** 3414/**
@@ -6238,78 +6221,6 @@ static bool igb_add_rx_frag(struct igb_ring *rx_ring,
6238 return igb_can_reuse_rx_page(rx_buffer, page, truesize); 6221 return igb_can_reuse_rx_page(rx_buffer, page, truesize);
6239} 6222}
6240 6223
6241static struct sk_buff *igb_build_rx_buffer(struct igb_ring *rx_ring,
6242 union e1000_adv_rx_desc *rx_desc)
6243{
6244 struct igb_rx_buffer *rx_buffer;
6245 struct sk_buff *skb;
6246 struct page *page;
6247 void *page_addr;
6248 unsigned int size = le16_to_cpu(rx_desc->wb.upper.length);
6249#if (PAGE_SIZE < 8192)
6250 unsigned int truesize = IGB_RX_BUFSZ;
6251#else
6252 unsigned int truesize = SKB_DATA_ALIGN(sizeof(struct skb_shared_info)) +
6253 SKB_DATA_ALIGN(NET_SKB_PAD +
6254 NET_IP_ALIGN +
6255 size);
6256#endif
6257
6258 /* If we spanned a buffer we have a huge mess so test for it */
6259 BUG_ON(unlikely(!igb_test_staterr(rx_desc, E1000_RXD_STAT_EOP)));
6260
6261 rx_buffer = &rx_ring->rx_buffer_info[rx_ring->next_to_clean];
6262 page = rx_buffer->page;
6263 prefetchw(page);
6264
6265 page_addr = page_address(page) + rx_buffer->page_offset;
6266
6267 /* prefetch first cache line of first page */
6268 prefetch(page_addr + NET_SKB_PAD + NET_IP_ALIGN);
6269#if L1_CACHE_BYTES < 128
6270 prefetch(page_addr + L1_CACHE_BYTES + NET_SKB_PAD + NET_IP_ALIGN);
6271#endif
6272
6273 /* build an skb to around the page buffer */
6274 skb = build_skb(page_addr, truesize);
6275 if (unlikely(!skb)) {
6276 rx_ring->rx_stats.alloc_failed++;
6277 return NULL;
6278 }
6279
6280 /* we are reusing so sync this buffer for CPU use */
6281 dma_sync_single_range_for_cpu(rx_ring->dev,
6282 rx_buffer->dma,
6283 rx_buffer->page_offset,
6284 IGB_RX_BUFSZ,
6285 DMA_FROM_DEVICE);
6286
6287 /* update pointers within the skb to store the data */
6288 skb_reserve(skb, NET_IP_ALIGN + NET_SKB_PAD);
6289 __skb_put(skb, size);
6290
6291 /* pull timestamp out of packet data */
6292 if (igb_test_staterr(rx_desc, E1000_RXDADV_STAT_TSIP)) {
6293 igb_ptp_rx_pktstamp(rx_ring->q_vector, skb->data, skb);
6294 __skb_pull(skb, IGB_TS_HDR_LEN);
6295 }
6296
6297 if (igb_can_reuse_rx_page(rx_buffer, page, truesize)) {
6298 /* hand second half of page back to the ring */
6299 igb_reuse_rx_page(rx_ring, rx_buffer);
6300 } else {
6301 /* we are not reusing the buffer so unmap it */
6302 dma_unmap_page(rx_ring->dev, rx_buffer->dma,
6303 PAGE_SIZE, DMA_FROM_DEVICE);
6304 }
6305
6306 /* clear contents of buffer_info */
6307 rx_buffer->dma = 0;
6308 rx_buffer->page = NULL;
6309
6310 return skb;
6311}
6312
6313static struct sk_buff *igb_fetch_rx_buffer(struct igb_ring *rx_ring, 6224static struct sk_buff *igb_fetch_rx_buffer(struct igb_ring *rx_ring,
6314 union e1000_adv_rx_desc *rx_desc, 6225 union e1000_adv_rx_desc *rx_desc,
6315 struct sk_buff *skb) 6226 struct sk_buff *skb)
@@ -6719,10 +6630,7 @@ static bool igb_clean_rx_irq(struct igb_q_vector *q_vector, const int budget)
6719 rmb(); 6630 rmb();
6720 6631
6721 /* retrieve a buffer from the ring */ 6632 /* retrieve a buffer from the ring */
6722 if (ring_uses_build_skb(rx_ring)) 6633 skb = igb_fetch_rx_buffer(rx_ring, rx_desc, skb);
6723 skb = igb_build_rx_buffer(rx_ring, rx_desc);
6724 else
6725 skb = igb_fetch_rx_buffer(rx_ring, rx_desc, skb);
6726 6634
6727 /* exit if we failed to retrieve a buffer */ 6635 /* exit if we failed to retrieve a buffer */
6728 if (!skb) 6636 if (!skb)
@@ -6808,14 +6716,6 @@ static bool igb_alloc_mapped_page(struct igb_ring *rx_ring,
6808 return true; 6716 return true;
6809} 6717}
6810 6718
6811static inline unsigned int igb_rx_offset(struct igb_ring *rx_ring)
6812{
6813 if (ring_uses_build_skb(rx_ring))
6814 return NET_SKB_PAD + NET_IP_ALIGN;
6815 else
6816 return 0;
6817}
6818
6819/** 6719/**
6820 * igb_alloc_rx_buffers - Replace used receive buffers; packet split 6720 * igb_alloc_rx_buffers - Replace used receive buffers; packet split
6821 * @adapter: address of board private structure 6721 * @adapter: address of board private structure
@@ -6841,9 +6741,7 @@ void igb_alloc_rx_buffers(struct igb_ring *rx_ring, u16 cleaned_count)
6841 /* Refresh the desc even if buffer_addrs didn't change 6741 /* Refresh the desc even if buffer_addrs didn't change
6842 * because each write-back erases this info. 6742 * because each write-back erases this info.
6843 */ 6743 */
6844 rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + 6744 rx_desc->read.pkt_addr = cpu_to_le64(bi->dma + bi->page_offset);
6845 bi->page_offset +
6846 igb_rx_offset(rx_ring));
6847 6745
6848 rx_desc++; 6746 rx_desc++;
6849 bi++; 6747 bi++;
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
index 2d4bdcc4fdbe..1e7d587c4e57 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
@@ -1052,6 +1052,12 @@ int ixgbe_ndo_set_vf_vlan(struct net_device *netdev, int vf, u16 vlan, u8 qos)
1052 if ((vf >= adapter->num_vfs) || (vlan > 4095) || (qos > 7)) 1052 if ((vf >= adapter->num_vfs) || (vlan > 4095) || (qos > 7))
1053 return -EINVAL; 1053 return -EINVAL;
1054 if (vlan || qos) { 1054 if (vlan || qos) {
1055 if (adapter->vfinfo[vf].pf_vlan)
1056 err = ixgbe_set_vf_vlan(adapter, false,
1057 adapter->vfinfo[vf].pf_vlan,
1058 vf);
1059 if (err)
1060 goto out;
1055 err = ixgbe_set_vf_vlan(adapter, true, vlan, vf); 1061 err = ixgbe_set_vf_vlan(adapter, true, vlan, vf);
1056 if (err) 1062 if (err)
1057 goto out; 1063 goto out;
diff --git a/drivers/net/ethernet/marvell/Kconfig b/drivers/net/ethernet/marvell/Kconfig
index 0051f0ef3cd0..a49e81bdf8e8 100644
--- a/drivers/net/ethernet/marvell/Kconfig
+++ b/drivers/net/ethernet/marvell/Kconfig
@@ -33,6 +33,7 @@ config MV643XX_ETH
33 33
34config MVMDIO 34config MVMDIO
35 tristate "Marvell MDIO interface support" 35 tristate "Marvell MDIO interface support"
36 select PHYLIB
36 ---help--- 37 ---help---
37 This driver supports the MDIO interface found in the network 38 This driver supports the MDIO interface found in the network
38 interface units of the Marvell EBU SoCs (Kirkwood, Orion5x, 39 interface units of the Marvell EBU SoCs (Kirkwood, Orion5x,
@@ -43,7 +44,6 @@ config MVMDIO
43config MVNETA 44config MVNETA
44 tristate "Marvell Armada 370/XP network interface support" 45 tristate "Marvell Armada 370/XP network interface support"
45 depends on MACH_ARMADA_370_XP 46 depends on MACH_ARMADA_370_XP
46 select PHYLIB
47 select MVMDIO 47 select MVMDIO
48 ---help--- 48 ---help---
49 This driver supports the network interface units in the 49 This driver supports the network interface units in the
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index e48261e468f3..c96678555233 100644
--- a/drivers/net/ethernet/marvell/mvneta.c
+++ b/drivers/net/ethernet/marvell/mvneta.c
@@ -374,7 +374,6 @@ static int rxq_number = 8;
374static int txq_number = 8; 374static int txq_number = 8;
375 375
376static int rxq_def; 376static int rxq_def;
377static int txq_def;
378 377
379#define MVNETA_DRIVER_NAME "mvneta" 378#define MVNETA_DRIVER_NAME "mvneta"
380#define MVNETA_DRIVER_VERSION "1.0" 379#define MVNETA_DRIVER_VERSION "1.0"
@@ -1475,7 +1474,8 @@ error:
1475static int mvneta_tx(struct sk_buff *skb, struct net_device *dev) 1474static int mvneta_tx(struct sk_buff *skb, struct net_device *dev)
1476{ 1475{
1477 struct mvneta_port *pp = netdev_priv(dev); 1476 struct mvneta_port *pp = netdev_priv(dev);
1478 struct mvneta_tx_queue *txq = &pp->txqs[txq_def]; 1477 u16 txq_id = skb_get_queue_mapping(skb);
1478 struct mvneta_tx_queue *txq = &pp->txqs[txq_id];
1479 struct mvneta_tx_desc *tx_desc; 1479 struct mvneta_tx_desc *tx_desc;
1480 struct netdev_queue *nq; 1480 struct netdev_queue *nq;
1481 int frags = 0; 1481 int frags = 0;
@@ -1485,7 +1485,7 @@ static int mvneta_tx(struct sk_buff *skb, struct net_device *dev)
1485 goto out; 1485 goto out;
1486 1486
1487 frags = skb_shinfo(skb)->nr_frags + 1; 1487 frags = skb_shinfo(skb)->nr_frags + 1;
1488 nq = netdev_get_tx_queue(dev, txq_def); 1488 nq = netdev_get_tx_queue(dev, txq_id);
1489 1489
1490 /* Get a descriptor for the first part of the packet */ 1490 /* Get a descriptor for the first part of the packet */
1491 tx_desc = mvneta_txq_next_desc_get(txq); 1491 tx_desc = mvneta_txq_next_desc_get(txq);
@@ -2679,7 +2679,7 @@ static int mvneta_probe(struct platform_device *pdev)
2679 return -EINVAL; 2679 return -EINVAL;
2680 } 2680 }
2681 2681
2682 dev = alloc_etherdev_mq(sizeof(struct mvneta_port), 8); 2682 dev = alloc_etherdev_mqs(sizeof(struct mvneta_port), txq_number, rxq_number);
2683 if (!dev) 2683 if (!dev)
2684 return -ENOMEM; 2684 return -ENOMEM;
2685 2685
@@ -2761,16 +2761,17 @@ static int mvneta_probe(struct platform_device *pdev)
2761 2761
2762 netif_napi_add(dev, &pp->napi, mvneta_poll, pp->weight); 2762 netif_napi_add(dev, &pp->napi, mvneta_poll, pp->weight);
2763 2763
2764 dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
2765 dev->hw_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
2766 dev->vlan_features |= NETIF_F_SG | NETIF_F_IP_CSUM;
2767 dev->priv_flags |= IFF_UNICAST_FLT;
2768
2764 err = register_netdev(dev); 2769 err = register_netdev(dev);
2765 if (err < 0) { 2770 if (err < 0) {
2766 dev_err(&pdev->dev, "failed to register\n"); 2771 dev_err(&pdev->dev, "failed to register\n");
2767 goto err_deinit; 2772 goto err_deinit;
2768 } 2773 }
2769 2774
2770 dev->features = NETIF_F_SG | NETIF_F_IP_CSUM;
2771 dev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM;
2772 dev->priv_flags |= IFF_UNICAST_FLT;
2773
2774 netdev_info(dev, "mac: %pM\n", dev->dev_addr); 2775 netdev_info(dev, "mac: %pM\n", dev->dev_addr);
2775 2776
2776 platform_set_drvdata(pdev, pp->dev); 2777 platform_set_drvdata(pdev, pp->dev);
@@ -2833,4 +2834,3 @@ module_param(rxq_number, int, S_IRUGO);
2833module_param(txq_number, int, S_IRUGO); 2834module_param(txq_number, int, S_IRUGO);
2834 2835
2835module_param(rxq_def, int, S_IRUGO); 2836module_param(rxq_def, int, S_IRUGO);
2836module_param(txq_def, int, S_IRUGO);
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index 32a95c105e4e..fd0829c2839d 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -1619,6 +1619,12 @@ int qlcnic_83xx_loopback_test(struct net_device *netdev, u8 mode)
1619 } 1619 }
1620 } while ((adapter->ahw->linkup && ahw->has_link_events) != 1); 1620 } while ((adapter->ahw->linkup && ahw->has_link_events) != 1);
1621 1621
1622 /* Make sure carrier is off and queue is stopped during loopback */
1623 if (netif_running(netdev)) {
1624 netif_carrier_off(netdev);
1625 netif_stop_queue(netdev);
1626 }
1627
1622 ret = qlcnic_do_lb_test(adapter, mode); 1628 ret = qlcnic_do_lb_test(adapter, mode);
1623 1629
1624 qlcnic_83xx_clear_lb_mode(adapter, mode); 1630 qlcnic_83xx_clear_lb_mode(adapter, mode);
@@ -2944,6 +2950,7 @@ static u64 *qlcnic_83xx_fill_stats(struct qlcnic_adapter *adapter,
2944void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data) 2950void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
2945{ 2951{
2946 struct qlcnic_cmd_args cmd; 2952 struct qlcnic_cmd_args cmd;
2953 struct net_device *netdev = adapter->netdev;
2947 int ret = 0; 2954 int ret = 0;
2948 2955
2949 qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_STATISTICS); 2956 qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_GET_STATISTICS);
@@ -2953,7 +2960,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
2953 data = qlcnic_83xx_fill_stats(adapter, &cmd, data, 2960 data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
2954 QLC_83XX_STAT_TX, &ret); 2961 QLC_83XX_STAT_TX, &ret);
2955 if (ret) { 2962 if (ret) {
2956 dev_info(&adapter->pdev->dev, "Error getting MAC stats\n"); 2963 netdev_err(netdev, "Error getting Tx stats\n");
2957 goto out; 2964 goto out;
2958 } 2965 }
2959 /* Get MAC stats */ 2966 /* Get MAC stats */
@@ -2963,8 +2970,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
2963 data = qlcnic_83xx_fill_stats(adapter, &cmd, data, 2970 data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
2964 QLC_83XX_STAT_MAC, &ret); 2971 QLC_83XX_STAT_MAC, &ret);
2965 if (ret) { 2972 if (ret) {
2966 dev_info(&adapter->pdev->dev, 2973 netdev_err(netdev, "Error getting MAC stats\n");
2967 "Error getting Rx stats\n");
2968 goto out; 2974 goto out;
2969 } 2975 }
2970 /* Get Rx stats */ 2976 /* Get Rx stats */
@@ -2974,8 +2980,7 @@ void qlcnic_83xx_get_stats(struct qlcnic_adapter *adapter, u64 *data)
2974 data = qlcnic_83xx_fill_stats(adapter, &cmd, data, 2980 data = qlcnic_83xx_fill_stats(adapter, &cmd, data,
2975 QLC_83XX_STAT_RX, &ret); 2981 QLC_83XX_STAT_RX, &ret);
2976 if (ret) 2982 if (ret)
2977 dev_info(&adapter->pdev->dev, 2983 netdev_err(netdev, "Error getting Rx stats\n");
2978 "Error getting Tx stats\n");
2979out: 2984out:
2980 qlcnic_free_mbx_args(&cmd); 2985 qlcnic_free_mbx_args(&cmd);
2981} 2986}
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
index 356859b9f21c..d3f8797efcc3 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
@@ -362,8 +362,7 @@ set_flags:
362 memcpy(&first_desc->eth_addr, skb->data, ETH_ALEN); 362 memcpy(&first_desc->eth_addr, skb->data, ETH_ALEN);
363 } 363 }
364 opcode = TX_ETHER_PKT; 364 opcode = TX_ETHER_PKT;
365 if ((adapter->netdev->features & (NETIF_F_TSO | NETIF_F_TSO6)) && 365 if (skb_is_gso(skb)) {
366 skb_shinfo(skb)->gso_size > 0) {
367 hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); 366 hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb);
368 first_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size); 367 first_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
369 first_desc->total_hdr_length = hdr_len; 368 first_desc->total_hdr_length = hdr_len;
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
index c77675da671f..4e22e794a186 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c
@@ -198,10 +198,10 @@ beacon_err:
198 } 198 }
199 199
200 err = qlcnic_config_led(adapter, b_state, b_rate); 200 err = qlcnic_config_led(adapter, b_state, b_rate);
201 if (!err) 201 if (!err) {
202 err = len; 202 err = len;
203 else
204 ahw->beacon_state = b_state; 203 ahw->beacon_state = b_state;
204 }
205 205
206 if (test_and_clear_bit(__QLCNIC_DIAG_RES_ALLOC, &adapter->state)) 206 if (test_and_clear_bit(__QLCNIC_DIAG_RES_ALLOC, &adapter->state))
207 qlcnic_diag_free_res(adapter->netdev, max_sds_rings); 207 qlcnic_diag_free_res(adapter->netdev, max_sds_rings);
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge.h b/drivers/net/ethernet/qlogic/qlge/qlge.h
index a131d7b5d2fe..7e8d68263963 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge.h
+++ b/drivers/net/ethernet/qlogic/qlge/qlge.h
@@ -18,7 +18,7 @@
18 */ 18 */
19#define DRV_NAME "qlge" 19#define DRV_NAME "qlge"
20#define DRV_STRING "QLogic 10 Gigabit PCI-E Ethernet Driver " 20#define DRV_STRING "QLogic 10 Gigabit PCI-E Ethernet Driver "
21#define DRV_VERSION "v1.00.00.31" 21#define DRV_VERSION "v1.00.00.32"
22 22
23#define WQ_ADDR_ALIGN 0x3 /* 4 byte alignment */ 23#define WQ_ADDR_ALIGN 0x3 /* 4 byte alignment */
24 24
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
index 6f316ab23257..0780e039b271 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_ethtool.c
@@ -379,13 +379,13 @@ static int ql_get_settings(struct net_device *ndev,
379 379
380 ecmd->supported = SUPPORTED_10000baseT_Full; 380 ecmd->supported = SUPPORTED_10000baseT_Full;
381 ecmd->advertising = ADVERTISED_10000baseT_Full; 381 ecmd->advertising = ADVERTISED_10000baseT_Full;
382 ecmd->autoneg = AUTONEG_ENABLE;
383 ecmd->transceiver = XCVR_EXTERNAL; 382 ecmd->transceiver = XCVR_EXTERNAL;
384 if ((qdev->link_status & STS_LINK_TYPE_MASK) == 383 if ((qdev->link_status & STS_LINK_TYPE_MASK) ==
385 STS_LINK_TYPE_10GBASET) { 384 STS_LINK_TYPE_10GBASET) {
386 ecmd->supported |= (SUPPORTED_TP | SUPPORTED_Autoneg); 385 ecmd->supported |= (SUPPORTED_TP | SUPPORTED_Autoneg);
387 ecmd->advertising |= (ADVERTISED_TP | ADVERTISED_Autoneg); 386 ecmd->advertising |= (ADVERTISED_TP | ADVERTISED_Autoneg);
388 ecmd->port = PORT_TP; 387 ecmd->port = PORT_TP;
388 ecmd->autoneg = AUTONEG_ENABLE;
389 } else { 389 } else {
390 ecmd->supported |= SUPPORTED_FIBRE; 390 ecmd->supported |= SUPPORTED_FIBRE;
391 ecmd->advertising |= ADVERTISED_FIBRE; 391 ecmd->advertising |= ADVERTISED_FIBRE;
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 44cf72ac2489..87463bc701a6 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -1432,11 +1432,13 @@ map_error:
1432} 1432}
1433 1433
1434/* Categorizing receive firmware frame errors */ 1434/* Categorizing receive firmware frame errors */
1435static void ql_categorize_rx_err(struct ql_adapter *qdev, u8 rx_err) 1435static void ql_categorize_rx_err(struct ql_adapter *qdev, u8 rx_err,
1436 struct rx_ring *rx_ring)
1436{ 1437{
1437 struct nic_stats *stats = &qdev->nic_stats; 1438 struct nic_stats *stats = &qdev->nic_stats;
1438 1439
1439 stats->rx_err_count++; 1440 stats->rx_err_count++;
1441 rx_ring->rx_errors++;
1440 1442
1441 switch (rx_err & IB_MAC_IOCB_RSP_ERR_MASK) { 1443 switch (rx_err & IB_MAC_IOCB_RSP_ERR_MASK) {
1442 case IB_MAC_IOCB_RSP_ERR_CODE_ERR: 1444 case IB_MAC_IOCB_RSP_ERR_CODE_ERR:
@@ -1472,6 +1474,12 @@ static void ql_process_mac_rx_gro_page(struct ql_adapter *qdev,
1472 struct bq_desc *lbq_desc = ql_get_curr_lchunk(qdev, rx_ring); 1474 struct bq_desc *lbq_desc = ql_get_curr_lchunk(qdev, rx_ring);
1473 struct napi_struct *napi = &rx_ring->napi; 1475 struct napi_struct *napi = &rx_ring->napi;
1474 1476
1477 /* Frame error, so drop the packet. */
1478 if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
1479 ql_categorize_rx_err(qdev, ib_mac_rsp->flags2, rx_ring);
1480 put_page(lbq_desc->p.pg_chunk.page);
1481 return;
1482 }
1475 napi->dev = qdev->ndev; 1483 napi->dev = qdev->ndev;
1476 1484
1477 skb = napi_get_frags(napi); 1485 skb = napi_get_frags(napi);
@@ -1525,6 +1533,12 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
1525 addr = lbq_desc->p.pg_chunk.va; 1533 addr = lbq_desc->p.pg_chunk.va;
1526 prefetch(addr); 1534 prefetch(addr);
1527 1535
1536 /* Frame error, so drop the packet. */
1537 if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
1538 ql_categorize_rx_err(qdev, ib_mac_rsp->flags2, rx_ring);
1539 goto err_out;
1540 }
1541
1528 /* The max framesize filter on this chip is set higher than 1542 /* The max framesize filter on this chip is set higher than
1529 * MTU since FCoE uses 2k frames. 1543 * MTU since FCoE uses 2k frames.
1530 */ 1544 */
@@ -1608,6 +1622,13 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
1608 memcpy(skb_put(new_skb, length), skb->data, length); 1622 memcpy(skb_put(new_skb, length), skb->data, length);
1609 skb = new_skb; 1623 skb = new_skb;
1610 1624
1625 /* Frame error, so drop the packet. */
1626 if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
1627 ql_categorize_rx_err(qdev, ib_mac_rsp->flags2, rx_ring);
1628 dev_kfree_skb_any(skb);
1629 return;
1630 }
1631
1611 /* loopback self test for ethtool */ 1632 /* loopback self test for ethtool */
1612 if (test_bit(QL_SELFTEST, &qdev->flags)) { 1633 if (test_bit(QL_SELFTEST, &qdev->flags)) {
1613 ql_check_lb_frame(qdev, skb); 1634 ql_check_lb_frame(qdev, skb);
@@ -1913,6 +1934,13 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev,
1913 return; 1934 return;
1914 } 1935 }
1915 1936
1937 /* Frame error, so drop the packet. */
1938 if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
1939 ql_categorize_rx_err(qdev, ib_mac_rsp->flags2, rx_ring);
1940 dev_kfree_skb_any(skb);
1941 return;
1942 }
1943
1916 /* The max framesize filter on this chip is set higher than 1944 /* The max framesize filter on this chip is set higher than
1917 * MTU since FCoE uses 2k frames. 1945 * MTU since FCoE uses 2k frames.
1918 */ 1946 */
@@ -1994,12 +2022,6 @@ static unsigned long ql_process_mac_rx_intr(struct ql_adapter *qdev,
1994 2022
1995 QL_DUMP_IB_MAC_RSP(ib_mac_rsp); 2023 QL_DUMP_IB_MAC_RSP(ib_mac_rsp);
1996 2024
1997 /* Frame error, so drop the packet. */
1998 if (ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_ERR_MASK) {
1999 ql_categorize_rx_err(qdev, ib_mac_rsp->flags2);
2000 return (unsigned long)length;
2001 }
2002
2003 if (ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV) { 2025 if (ib_mac_rsp->flags4 & IB_MAC_IOCB_RSP_HV) {
2004 /* The data and headers are split into 2026 /* The data and headers are split into
2005 * separate buffers. 2027 * separate buffers.
diff --git a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
index 0c74a702d461..50617c5a0bdb 100644
--- a/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/mmc_core.c
@@ -149,6 +149,7 @@ void dwmac_mmc_intr_all_mask(void __iomem *ioaddr)
149{ 149{
150 writel(MMC_DEFAULT_MASK, ioaddr + MMC_RX_INTR_MASK); 150 writel(MMC_DEFAULT_MASK, ioaddr + MMC_RX_INTR_MASK);
151 writel(MMC_DEFAULT_MASK, ioaddr + MMC_TX_INTR_MASK); 151 writel(MMC_DEFAULT_MASK, ioaddr + MMC_TX_INTR_MASK);
152 writel(MMC_DEFAULT_MASK, ioaddr + MMC_RX_IPC_INTR_MASK);
152} 153}
153 154
154/* This reads the MAC core counters (if actaully supported). 155/* This reads the MAC core counters (if actaully supported).
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 5cf8d03b8cae..25c364209a21 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -1520,7 +1520,7 @@ static int cpsw_probe_dt(struct cpsw_platform_data *data,
1520 memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN); 1520 memcpy(slave_data->mac_addr, mac_addr, ETH_ALEN);
1521 1521
1522 if (data->dual_emac) { 1522 if (data->dual_emac) {
1523 if (of_property_read_u32(node, "dual_emac_res_vlan", 1523 if (of_property_read_u32(slave_node, "dual_emac_res_vlan",
1524 &prop)) { 1524 &prop)) {
1525 pr_err("Missing dual_emac_res_vlan in DT.\n"); 1525 pr_err("Missing dual_emac_res_vlan in DT.\n");
1526 slave_data->dual_emac_res_vlan = i+1; 1526 slave_data->dual_emac_res_vlan = i+1;