aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-18 01:19:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-18 01:19:28 -0500
commit7d0d46da750a252371cb747b48ddda27d1047881 (patch)
treedb6ac506c54775047278332e1cd3e42aad2aacb9 /drivers
parent48ba620aab90f4c7e9bb002e2f30863a4ea0f915 (diff)
parent3af57f78c38131b7a66e2b01e06fdacae01992a3 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) The value choosen for the new SO_MAX_PACING_RATE socket option on parisc was very poorly choosen, let's fix it while we still can. From Eric Dumazet. 2) Our generic reciprocal divide was found to handle some edge cases incorrectly, part of this is encoded into the BPF as deep as the JIT engines themselves. Just use a real divide throughout for now. From Eric Dumazet. 3) Because the initial lookup is lockless, the TCP metrics engine can end up creating two entries for the same lookup key. Fix this by doing a second lookup under the lock before we actually create the new entry. From Christoph Paasch. 4) Fix scatter-gather list init in usbnet driver, from Bjørn Mork. 5) Fix unintended 32-bit truncation in cxgb4 driver's bit shifting. From Dan Carpenter. 6) Netlink socket dumping uses the wrong socket state for timewait sockets. Fix from Neal Cardwell. 7) Fix netlink memory leak in ieee802154_add_iface(), from Christian Engelmayer. 8) Multicast forwarding in ipv4 can overflow the per-rule reference counts, causing all multicast traffic to cease. Fix from Hannes Frederic Sowa. 9) via-rhine needs to stop all TX queues when it resets the device, from Richard Weinberger. 10) Fix RDS per-cpu accesses broken by the this_cpu_* conversions. From Gerald Schaefer. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: s390/bpf,jit: fix 32 bit divisions, use unsigned divide instructions parisc: fix SO_MAX_PACING_RATE typo ipv6: simplify detection of first operational link-local address on interface tcp: metrics: Avoid duplicate entries with the same destination-IP net: rds: fix per-cpu helper usage e1000e: Fix compilation warning when !CONFIG_PM_SLEEP bpf: do not use reciprocal divide be2net: add dma_mapping_error() check for dma_map_page() bnx2x: Don't release PCI bars on shutdown net,via-rhine: Fix tx_timeout handling batman-adv: fix batman-adv header overhead calculation qlge: Fix vlan netdev features. net: avoid reference counter overflows on fib_rules in multicast forwarding dm9601: add USB IDs for new dm96xx variants MAINTAINERS: add virtio-dev ML for virtio ieee802154: Fix memory leak in ieee802154_add_iface() net: usbnet: fix SG initialisation inet_diag: fix inet_diag_dump_icsk() to use correct state for timewait sockets cxgb4: silence shift wrapping static checker warning
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c29
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/l2t.c2
-rw-r--r--drivers/net/ethernet/emulex/benet/be_main.c11
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c8
-rw-r--r--drivers/net/ethernet/qlogic/qlge/qlge_main.c2
-rw-r--r--drivers/net/ethernet/via/via-rhine.c1
-rw-r--r--drivers/net/usb/dm9601.c12
-rw-r--r--drivers/net/usb/usbnet.c2
8 files changed, 43 insertions, 24 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 8b3107b2fcc1..0067b975873f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -12942,25 +12942,26 @@ static void __bnx2x_remove(struct pci_dev *pdev,
12942 pci_set_power_state(pdev, PCI_D3hot); 12942 pci_set_power_state(pdev, PCI_D3hot);
12943 } 12943 }
12944 12944
12945 if (bp->regview) 12945 if (remove_netdev) {
12946 iounmap(bp->regview); 12946 if (bp->regview)
12947 iounmap(bp->regview);
12947 12948
12948 /* for vf doorbells are part of the regview and were unmapped along with 12949 /* For vfs, doorbells are part of the regview and were unmapped
12949 * it. FW is only loaded by PF. 12950 * along with it. FW is only loaded by PF.
12950 */ 12951 */
12951 if (IS_PF(bp)) { 12952 if (IS_PF(bp)) {
12952 if (bp->doorbells) 12953 if (bp->doorbells)
12953 iounmap(bp->doorbells); 12954 iounmap(bp->doorbells);
12954 12955
12955 bnx2x_release_firmware(bp); 12956 bnx2x_release_firmware(bp);
12956 } 12957 }
12957 bnx2x_free_mem_bp(bp); 12958 bnx2x_free_mem_bp(bp);
12958 12959
12959 if (remove_netdev)
12960 free_netdev(dev); 12960 free_netdev(dev);
12961 12961
12962 if (atomic_read(&pdev->enable_cnt) == 1) 12962 if (atomic_read(&pdev->enable_cnt) == 1)
12963 pci_release_regions(pdev); 12963 pci_release_regions(pdev);
12964 }
12964 12965
12965 pci_disable_device(pdev); 12966 pci_disable_device(pdev);
12966} 12967}
diff --git a/drivers/net/ethernet/chelsio/cxgb4/l2t.c b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
index cb05be905def..81e8402a74b4 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/l2t.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/l2t.c
@@ -423,7 +423,7 @@ u64 cxgb4_select_ntuple(struct net_device *dev,
423 * in the Compressed Filter Tuple. 423 * in the Compressed Filter Tuple.
424 */ 424 */
425 if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE) 425 if (tp->vlan_shift >= 0 && l2t->vlan != VLAN_NONE)
426 ntuple |= (F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift; 426 ntuple |= (u64)(F_FT_VLAN_VLD | l2t->vlan) << tp->vlan_shift;
427 427
428 if (tp->port_shift >= 0) 428 if (tp->port_shift >= 0)
429 ntuple |= (u64)l2t->lport << tp->port_shift; 429 ntuple |= (u64)l2t->lport << tp->port_shift;
diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
index bf40fdaecfa3..a37039d353c5 100644
--- a/drivers/net/ethernet/emulex/benet/be_main.c
+++ b/drivers/net/ethernet/emulex/benet/be_main.c
@@ -1776,6 +1776,7 @@ static void be_post_rx_frags(struct be_rx_obj *rxo, gfp_t gfp)
1776 struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL; 1776 struct be_rx_page_info *page_info = NULL, *prev_page_info = NULL;
1777 struct be_queue_info *rxq = &rxo->q; 1777 struct be_queue_info *rxq = &rxo->q;
1778 struct page *pagep = NULL; 1778 struct page *pagep = NULL;
1779 struct device *dev = &adapter->pdev->dev;
1779 struct be_eth_rx_d *rxd; 1780 struct be_eth_rx_d *rxd;
1780 u64 page_dmaaddr = 0, frag_dmaaddr; 1781 u64 page_dmaaddr = 0, frag_dmaaddr;
1781 u32 posted, page_offset = 0; 1782 u32 posted, page_offset = 0;
@@ -1788,9 +1789,15 @@ static void be_post_rx_frags(struct be_rx_obj *rxo, gfp_t gfp)
1788 rx_stats(rxo)->rx_post_fail++; 1789 rx_stats(rxo)->rx_post_fail++;
1789 break; 1790 break;
1790 } 1791 }
1791 page_dmaaddr = dma_map_page(&adapter->pdev->dev, pagep, 1792 page_dmaaddr = dma_map_page(dev, pagep, 0,
1792 0, adapter->big_page_size, 1793 adapter->big_page_size,
1793 DMA_FROM_DEVICE); 1794 DMA_FROM_DEVICE);
1795 if (dma_mapping_error(dev, page_dmaaddr)) {
1796 put_page(pagep);
1797 pagep = NULL;
1798 rx_stats(rxo)->rx_post_fail++;
1799 break;
1800 }
1794 page_info->page_offset = 0; 1801 page_info->page_offset = 0;
1795 } else { 1802 } else {
1796 get_page(pagep); 1803 get_page(pagep);
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index c30d41d6e426..6d14eea17918 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -6174,7 +6174,7 @@ static int __e1000_resume(struct pci_dev *pdev)
6174 return 0; 6174 return 0;
6175} 6175}
6176 6176
6177#ifdef CONFIG_PM 6177#ifdef CONFIG_PM_SLEEP
6178static int e1000_suspend(struct device *dev) 6178static int e1000_suspend(struct device *dev)
6179{ 6179{
6180 struct pci_dev *pdev = to_pci_dev(dev); 6180 struct pci_dev *pdev = to_pci_dev(dev);
@@ -6193,7 +6193,7 @@ static int e1000_resume(struct device *dev)
6193 6193
6194 return __e1000_resume(pdev); 6194 return __e1000_resume(pdev);
6195} 6195}
6196#endif /* CONFIG_PM */ 6196#endif /* CONFIG_PM_SLEEP */
6197 6197
6198#ifdef CONFIG_PM_RUNTIME 6198#ifdef CONFIG_PM_RUNTIME
6199static int e1000_runtime_suspend(struct device *dev) 6199static int e1000_runtime_suspend(struct device *dev)
@@ -7015,13 +7015,11 @@ static DEFINE_PCI_DEVICE_TABLE(e1000_pci_tbl) = {
7015}; 7015};
7016MODULE_DEVICE_TABLE(pci, e1000_pci_tbl); 7016MODULE_DEVICE_TABLE(pci, e1000_pci_tbl);
7017 7017
7018#ifdef CONFIG_PM
7019static const struct dev_pm_ops e1000_pm_ops = { 7018static const struct dev_pm_ops e1000_pm_ops = {
7020 SET_SYSTEM_SLEEP_PM_OPS(e1000_suspend, e1000_resume) 7019 SET_SYSTEM_SLEEP_PM_OPS(e1000_suspend, e1000_resume)
7021 SET_RUNTIME_PM_OPS(e1000_runtime_suspend, e1000_runtime_resume, 7020 SET_RUNTIME_PM_OPS(e1000_runtime_suspend, e1000_runtime_resume,
7022 e1000_idle) 7021 e1000_idle)
7023}; 7022};
7024#endif
7025 7023
7026/* PCI Device API Driver */ 7024/* PCI Device API Driver */
7027static struct pci_driver e1000_driver = { 7025static struct pci_driver e1000_driver = {
@@ -7029,11 +7027,9 @@ static struct pci_driver e1000_driver = {
7029 .id_table = e1000_pci_tbl, 7027 .id_table = e1000_pci_tbl,
7030 .probe = e1000_probe, 7028 .probe = e1000_probe,
7031 .remove = e1000_remove, 7029 .remove = e1000_remove,
7032#ifdef CONFIG_PM
7033 .driver = { 7030 .driver = {
7034 .pm = &e1000_pm_ops, 7031 .pm = &e1000_pm_ops,
7035 }, 7032 },
7036#endif
7037 .shutdown = e1000_shutdown, 7033 .shutdown = e1000_shutdown,
7038 .err_handler = &e1000_err_handler 7034 .err_handler = &e1000_err_handler
7039}; 7035};
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 449f506d2e8f..f705aeeba767 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -4765,6 +4765,8 @@ static int qlge_probe(struct pci_dev *pdev,
4765 NETIF_F_RXCSUM; 4765 NETIF_F_RXCSUM;
4766 ndev->features = ndev->hw_features; 4766 ndev->features = ndev->hw_features;
4767 ndev->vlan_features = ndev->hw_features; 4767 ndev->vlan_features = ndev->hw_features;
4768 /* vlan gets same features (except vlan filter) */
4769 ndev->vlan_features &= ~NETIF_F_HW_VLAN_CTAG_FILTER;
4768 4770
4769 if (test_bit(QL_DMA64, &qdev->flags)) 4771 if (test_bit(QL_DMA64, &qdev->flags))
4770 ndev->features |= NETIF_F_HIGHDMA; 4772 ndev->features |= NETIF_F_HIGHDMA;
diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
index cce6c4bc556a..ef312bc6b865 100644
--- a/drivers/net/ethernet/via/via-rhine.c
+++ b/drivers/net/ethernet/via/via-rhine.c
@@ -1618,6 +1618,7 @@ static void rhine_reset_task(struct work_struct *work)
1618 goto out_unlock; 1618 goto out_unlock;
1619 1619
1620 napi_disable(&rp->napi); 1620 napi_disable(&rp->napi);
1621 netif_tx_disable(dev);
1621 spin_lock_bh(&rp->lock); 1622 spin_lock_bh(&rp->lock);
1622 1623
1623 /* clear all descriptors */ 1624 /* clear all descriptors */
diff --git a/drivers/net/usb/dm9601.c b/drivers/net/usb/dm9601.c
index 14aa48fa8d7e..e80219877730 100644
--- a/drivers/net/usb/dm9601.c
+++ b/drivers/net/usb/dm9601.c
@@ -614,6 +614,18 @@ static const struct usb_device_id products[] = {
614 USB_DEVICE(0x0a46, 0x9621), /* DM9621A USB to Fast Ethernet Adapter */ 614 USB_DEVICE(0x0a46, 0x9621), /* DM9621A USB to Fast Ethernet Adapter */
615 .driver_info = (unsigned long)&dm9601_info, 615 .driver_info = (unsigned long)&dm9601_info,
616 }, 616 },
617 {
618 USB_DEVICE(0x0a46, 0x9622), /* DM9622 USB to Fast Ethernet Adapter */
619 .driver_info = (unsigned long)&dm9601_info,
620 },
621 {
622 USB_DEVICE(0x0a46, 0x0269), /* DM962OA USB to Fast Ethernet Adapter */
623 .driver_info = (unsigned long)&dm9601_info,
624 },
625 {
626 USB_DEVICE(0x0a46, 0x1269), /* DM9621A USB to Fast Ethernet Adapter */
627 .driver_info = (unsigned long)&dm9601_info,
628 },
617 {}, // END 629 {}, // END
618}; 630};
619 631
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index 8494bb53ebdc..aba04f561760 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1245,7 +1245,7 @@ static int build_dma_sg(const struct sk_buff *skb, struct urb *urb)
1245 return -ENOMEM; 1245 return -ENOMEM;
1246 1246
1247 urb->num_sgs = num_sgs; 1247 urb->num_sgs = num_sgs;
1248 sg_init_table(urb->sg, urb->num_sgs); 1248 sg_init_table(urb->sg, urb->num_sgs + 1);
1249 1249
1250 sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb)); 1250 sg_set_buf(&urb->sg[s++], skb->data, skb_headlen(skb));
1251 total_len += skb_headlen(skb); 1251 total_len += skb_headlen(skb);