Skip to content

Commit ff3421d

Browse files
committed
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) sadb_msg prepared for IPSEC userspace forgets to initialize the satype field, fix from Nicolas Dichtel. 2) Fix mac80211 synchronization during station removal, from Johannes Berg. 3) Fix IPSEC sequence number notifications when they wrap, from Steffen Klassert. 4) Fix cfg80211 wdev tracing crashes when add_virtual_intf() returns an error pointer, from Johannes Berg. 5) In mac80211, don't call into the channel context code with the interface list mutex held. From Johannes Berg. 6) In mac80211, if we don't actually associate, do not restart the STA timer, otherwise we can crash. From Ben Greear. 7) Missing dma_mapping_error() check in e1000, ixgb, and e1000e. From Christoph Paasch. 8) Fix sja1000 driver defines to not conflict with SH port, from Marc Kleine-Budde. 9) Don't call il4965_rs_use_green with a NULL station, from Colin Ian King. 10) Suspend/Resume in the FEC driver fail because the buffer descriptors are not initialized at all the moments in which they should. Fix from Frank Li. 11) cpsw and davinci_emac drivers both use the wrong interface to restart a stopped TX queue. Use netif_wake_queue not netif_start_queue, the latter is for initialization/bringup not active management of the queue. From Mugunthan V N. 12) Fix regression in rate calculations done by psched_ratecfg_precompute(), missing u64 type promotion. From Sergey Popovich. 13) Fix length overflow in tg3 VPD parsing, from Kees Cook. 14) AOE driver fails to allocate enough headroom, resulting in crashes. Fix from Eric Dumazet. 15) RX overflow happens too quickly in sky2 driver because pause packet thresholds are not programmed correctly. From Mirko Lindner. 16) Bonding driver manages arp_interval and miimon settings incorrectly, disabling one unintentionally disables both. Fix from Nikolay Aleksandrov. 17) smsc75xx drivers don't program the RX mac properly for jumbo frames. Fix from Steve Glendinning. 18) Fix off-by-one in Codel packet scheduler. From Vijay Subramanian. 19) Fix packet corruption in atl1c by disabling MSI support, from Hannes Frederic Sowa. 20) netdev_rx_handler_unregister() needs a synchronize_net() to fix crashes in bonding driver unload stress tests. From Eric Dumazet. 21) rxlen field of ks8851 RX packet descriptors not interpreted correctly (it is 12 bits not 16 bits, so needs to be masked after shifting the 32-bit value down 16 bits). Fix from Max Nekludov. 22) Fix missed RX/TX enable in sh_eth driver due to mishandling of link change indications. From Sergei Shtylyov. 23) Fix crashes during spurious ECI interrupts in sh_eth driver, also from Sergei Shtylyov. 24) dm9000 driver initialization is done wrong for revision B devices with DSP PHY, from Joseph CHANG. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (53 commits) DM9000B: driver initialization upgrade sh_eth: make 'link' field of 'struct sh_eth_private' *int* sh_eth: workaround for spurious ECI interrupt sh_eth: fix handling of no LINK signal ks8851: Fix interpretation of rxlen field. net: add a synchronize_net() in netdev_rx_handler_unregister() MAINTAINERS: Update netxen_nic maintainers list atl1e: drop pci-msi support because of packet corruption net: fq_codel: Fix off-by-one error net: calxedaxgmac: Wake-on-LAN fixes net: calxedaxgmac: fix rx ring handling when OOM net: core: Remove redundant call to 'nf_reset' in 'dev_forward_skb' smsc75xx: fix jumbo frame support net: fix the use of this_cpu_ptr bonding: fix disabling of arp_interval and miimon ipv6: don't accept node local multicast traffic from the wire sky2: Threshold for Pause Packet is set wrong sky2: Receive Overflows not counted aoe: reserve enough headroom on skbs line up comment for ndo_bridge_getlink ...
2 parents 07961ac + 6741f40 commit ff3421d

File tree

57 files changed

+793
-611
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+793
-611
lines changed

MAINTAINERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5065,9 +5065,8 @@ S: Maintained
50655065
F: drivers/net/ethernet/marvell/sk*
50665066

50675067
MARVELL LIBERTAS WIRELESS DRIVER
5068-
M: Dan Williams <dcbw@redhat.com>
50695068
L: libertas-dev@lists.infradead.org
5070-
S: Maintained
5069+
S: Orphan
50715070
F: drivers/net/wireless/libertas/
50725071

50735072
MARVELL MV643XX ETHERNET DRIVER
@@ -5569,6 +5568,7 @@ F: include/uapi/linux/if_*
55695568
F: include/uapi/linux/netdevice.h
55705569

55715570
NETXEN (1/10) GbE SUPPORT
5571+
M: Manish Chopra <manish.chopra@qlogic.com>
55725572
M: Sony Chacko <sony.chacko@qlogic.com>
55735573
M: Rajesh Borundia <rajesh.borundia@qlogic.com>
55745574
L: netdev@vger.kernel.org

drivers/block/aoe/aoecmd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ new_skb(ulong len)
5151
{
5252
struct sk_buff *skb;
5353

54-
skb = alloc_skb(len, GFP_ATOMIC);
54+
skb = alloc_skb(len + MAX_HEADER, GFP_ATOMIC);
5555
if (skb) {
56+
skb_reserve(skb, MAX_HEADER);
5657
skb_reset_mac_header(skb);
5758
skb_reset_network_header(skb);
5859
skb->protocol = __constant_htons(ETH_P_AOE);

drivers/net/bonding/bond_sysfs.c

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ static ssize_t bonding_store_arp_interval(struct device *d,
527527
goto out;
528528
}
529529
if (new_value < 0) {
530-
pr_err("%s: Invalid arp_interval value %d not in range 1-%d; rejected.\n",
530+
pr_err("%s: Invalid arp_interval value %d not in range 0-%d; rejected.\n",
531531
bond->dev->name, new_value, INT_MAX);
532532
ret = -EINVAL;
533533
goto out;
@@ -542,25 +542,29 @@ static ssize_t bonding_store_arp_interval(struct device *d,
542542
pr_info("%s: Setting ARP monitoring interval to %d.\n",
543543
bond->dev->name, new_value);
544544
bond->params.arp_interval = new_value;
545-
if (bond->params.miimon) {
546-
pr_info("%s: ARP monitoring cannot be used with MII monitoring. %s Disabling MII monitoring.\n",
547-
bond->dev->name, bond->dev->name);
548-
bond->params.miimon = 0;
549-
}
550-
if (!bond->params.arp_targets[0]) {
551-
pr_info("%s: ARP monitoring has been set up, but no ARP targets have been specified.\n",
552-
bond->dev->name);
545+
if (new_value) {
546+
if (bond->params.miimon) {
547+
pr_info("%s: ARP monitoring cannot be used with MII monitoring. %s Disabling MII monitoring.\n",
548+
bond->dev->name, bond->dev->name);
549+
bond->params.miimon = 0;
550+
}
551+
if (!bond->params.arp_targets[0])
552+
pr_info("%s: ARP monitoring has been set up, but no ARP targets have been specified.\n",
553+
bond->dev->name);
553554
}
554555
if (bond->dev->flags & IFF_UP) {
555556
/* If the interface is up, we may need to fire off
556557
* the ARP timer. If the interface is down, the
557558
* timer will get fired off when the open function
558559
* is called.
559560
*/
560-
cancel_delayed_work_sync(&bond->mii_work);
561-
queue_delayed_work(bond->wq, &bond->arp_work, 0);
561+
if (!new_value) {
562+
cancel_delayed_work_sync(&bond->arp_work);
563+
} else {
564+
cancel_delayed_work_sync(&bond->mii_work);
565+
queue_delayed_work(bond->wq, &bond->arp_work, 0);
566+
}
562567
}
563-
564568
out:
565569
rtnl_unlock();
566570
return ret;
@@ -702,7 +706,7 @@ static ssize_t bonding_store_downdelay(struct device *d,
702706
}
703707
if (new_value < 0) {
704708
pr_err("%s: Invalid down delay value %d not in range %d-%d; rejected.\n",
705-
bond->dev->name, new_value, 1, INT_MAX);
709+
bond->dev->name, new_value, 0, INT_MAX);
706710
ret = -EINVAL;
707711
goto out;
708712
} else {
@@ -757,8 +761,8 @@ static ssize_t bonding_store_updelay(struct device *d,
757761
goto out;
758762
}
759763
if (new_value < 0) {
760-
pr_err("%s: Invalid down delay value %d not in range %d-%d; rejected.\n",
761-
bond->dev->name, new_value, 1, INT_MAX);
764+
pr_err("%s: Invalid up delay value %d not in range %d-%d; rejected.\n",
765+
bond->dev->name, new_value, 0, INT_MAX);
762766
ret = -EINVAL;
763767
goto out;
764768
} else {
@@ -968,37 +972,37 @@ static ssize_t bonding_store_miimon(struct device *d,
968972
}
969973
if (new_value < 0) {
970974
pr_err("%s: Invalid miimon value %d not in range %d-%d; rejected.\n",
971-
bond->dev->name, new_value, 1, INT_MAX);
975+
bond->dev->name, new_value, 0, INT_MAX);
972976
ret = -EINVAL;
973977
goto out;
974-
} else {
975-
pr_info("%s: Setting MII monitoring interval to %d.\n",
976-
bond->dev->name, new_value);
977-
bond->params.miimon = new_value;
978-
if (bond->params.updelay)
979-
pr_info("%s: Note: Updating updelay (to %d) since it is a multiple of the miimon value.\n",
980-
bond->dev->name,
981-
bond->params.updelay * bond->params.miimon);
982-
if (bond->params.downdelay)
983-
pr_info("%s: Note: Updating downdelay (to %d) since it is a multiple of the miimon value.\n",
984-
bond->dev->name,
985-
bond->params.downdelay * bond->params.miimon);
986-
if (bond->params.arp_interval) {
987-
pr_info("%s: MII monitoring cannot be used with ARP monitoring. Disabling ARP monitoring...\n",
988-
bond->dev->name);
989-
bond->params.arp_interval = 0;
990-
if (bond->params.arp_validate) {
991-
bond->params.arp_validate =
992-
BOND_ARP_VALIDATE_NONE;
993-
}
994-
}
995-
996-
if (bond->dev->flags & IFF_UP) {
997-
/* If the interface is up, we may need to fire off
998-
* the MII timer. If the interface is down, the
999-
* timer will get fired off when the open function
1000-
* is called.
1001-
*/
978+
}
979+
pr_info("%s: Setting MII monitoring interval to %d.\n",
980+
bond->dev->name, new_value);
981+
bond->params.miimon = new_value;
982+
if (bond->params.updelay)
983+
pr_info("%s: Note: Updating updelay (to %d) since it is a multiple of the miimon value.\n",
984+
bond->dev->name,
985+
bond->params.updelay * bond->params.miimon);
986+
if (bond->params.downdelay)
987+
pr_info("%s: Note: Updating downdelay (to %d) since it is a multiple of the miimon value.\n",
988+
bond->dev->name,
989+
bond->params.downdelay * bond->params.miimon);
990+
if (new_value && bond->params.arp_interval) {
991+
pr_info("%s: MII monitoring cannot be used with ARP monitoring. Disabling ARP monitoring...\n",
992+
bond->dev->name);
993+
bond->params.arp_interval = 0;
994+
if (bond->params.arp_validate)
995+
bond->params.arp_validate = BOND_ARP_VALIDATE_NONE;
996+
}
997+
if (bond->dev->flags & IFF_UP) {
998+
/* If the interface is up, we may need to fire off
999+
* the MII timer. If the interface is down, the
1000+
* timer will get fired off when the open function
1001+
* is called.
1002+
*/
1003+
if (!new_value) {
1004+
cancel_delayed_work_sync(&bond->mii_work);
1005+
} else {
10021006
cancel_delayed_work_sync(&bond->arp_work);
10031007
queue_delayed_work(bond->wq, &bond->mii_work, 0);
10041008
}

drivers/net/can/sja1000/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ config CAN_EMS_PCI
4646
config CAN_PEAK_PCMCIA
4747
tristate "PEAK PCAN-PC Card"
4848
depends on PCMCIA
49+
depends on HAS_IOPORT
4950
---help---
5051
This driver is for the PCAN-PC Card PCMCIA adapter (1 or 2 channels)
5152
from PEAK-System (http://www.peak-system.com). To compile this

drivers/net/can/sja1000/plx_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
348348
*/
349349
if ((priv->read_reg(priv, REG_CR) & REG_CR_BASICCAN_INITIAL_MASK) ==
350350
REG_CR_BASICCAN_INITIAL &&
351-
(priv->read_reg(priv, REG_SR) == REG_SR_BASICCAN_INITIAL) &&
351+
(priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_BASICCAN_INITIAL) &&
352352
(priv->read_reg(priv, REG_IR) == REG_IR_BASICCAN_INITIAL))
353353
flag = 1;
354354

@@ -360,7 +360,7 @@ static inline int plx_pci_check_sja1000(const struct sja1000_priv *priv)
360360
* See states on p. 23 of the Datasheet.
361361
*/
362362
if (priv->read_reg(priv, REG_MOD) == REG_MOD_PELICAN_INITIAL &&
363-
priv->read_reg(priv, REG_SR) == REG_SR_PELICAN_INITIAL &&
363+
priv->read_reg(priv, SJA1000_REG_SR) == REG_SR_PELICAN_INITIAL &&
364364
priv->read_reg(priv, REG_IR) == REG_IR_PELICAN_INITIAL)
365365
return flag;
366366

drivers/net/can/sja1000/sja1000.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static void sja1000_write_cmdreg(struct sja1000_priv *priv, u8 val)
9292
*/
9393
spin_lock_irqsave(&priv->cmdreg_lock, flags);
9494
priv->write_reg(priv, REG_CMR, val);
95-
priv->read_reg(priv, REG_SR);
95+
priv->read_reg(priv, SJA1000_REG_SR);
9696
spin_unlock_irqrestore(&priv->cmdreg_lock, flags);
9797
}
9898

@@ -502,7 +502,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
502502

503503
while ((isrc = priv->read_reg(priv, REG_IR)) && (n < SJA1000_MAX_IRQ)) {
504504
n++;
505-
status = priv->read_reg(priv, REG_SR);
505+
status = priv->read_reg(priv, SJA1000_REG_SR);
506506
/* check for absent controller due to hw unplug */
507507
if (status == 0xFF && sja1000_is_absent(priv))
508508
return IRQ_NONE;
@@ -530,7 +530,7 @@ irqreturn_t sja1000_interrupt(int irq, void *dev_id)
530530
/* receive interrupt */
531531
while (status & SR_RBS) {
532532
sja1000_rx(dev);
533-
status = priv->read_reg(priv, REG_SR);
533+
status = priv->read_reg(priv, SJA1000_REG_SR);
534534
/* check for absent controller */
535535
if (status == 0xFF && sja1000_is_absent(priv))
536536
return IRQ_NONE;

drivers/net/can/sja1000/sja1000.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
/* SJA1000 registers - manual section 6.4 (Pelican Mode) */
5757
#define REG_MOD 0x00
5858
#define REG_CMR 0x01
59-
#define REG_SR 0x02
59+
#define SJA1000_REG_SR 0x02
6060
#define REG_IR 0x03
6161
#define REG_IER 0x04
6262
#define REG_ALC 0x0B

drivers/net/ethernet/atheros/atl1e/atl1e.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ struct atl1e_adapter {
438438
struct atl1e_hw hw;
439439
struct atl1e_hw_stats hw_stats;
440440

441-
bool have_msi;
442441
u32 wol;
443442
u16 link_speed;
444443
u16 link_duplex;

drivers/net/ethernet/atheros/atl1e/atl1e_main.c

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,34 +1849,19 @@ static void atl1e_free_irq(struct atl1e_adapter *adapter)
18491849
struct net_device *netdev = adapter->netdev;
18501850

18511851
free_irq(adapter->pdev->irq, netdev);
1852-
1853-
if (adapter->have_msi)
1854-
pci_disable_msi(adapter->pdev);
18551852
}
18561853

18571854
static int atl1e_request_irq(struct atl1e_adapter *adapter)
18581855
{
18591856
struct pci_dev *pdev = adapter->pdev;
18601857
struct net_device *netdev = adapter->netdev;
1861-
int flags = 0;
18621858
int err = 0;
18631859

1864-
adapter->have_msi = true;
1865-
err = pci_enable_msi(pdev);
1866-
if (err) {
1867-
netdev_dbg(netdev,
1868-
"Unable to allocate MSI interrupt Error: %d\n", err);
1869-
adapter->have_msi = false;
1870-
}
1871-
1872-
if (!adapter->have_msi)
1873-
flags |= IRQF_SHARED;
1874-
err = request_irq(pdev->irq, atl1e_intr, flags, netdev->name, netdev);
1860+
err = request_irq(pdev->irq, atl1e_intr, IRQF_SHARED, netdev->name,
1861+
netdev);
18751862
if (err) {
18761863
netdev_dbg(adapter->netdev,
18771864
"Unable to allocate interrupt Error: %d\n", err);
1878-
if (adapter->have_msi)
1879-
pci_disable_msi(pdev);
18801865
return err;
18811866
}
18821867
netdev_dbg(netdev, "atl1e_request_irq OK\n");

drivers/net/ethernet/broadcom/tg3.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14604,8 +14604,11 @@ static void tg3_read_vpd(struct tg3 *tp)
1460414604
if (j + len > block_end)
1460514605
goto partno;
1460614606

14607-
memcpy(tp->fw_ver, &vpd_data[j], len);
14608-
strncat(tp->fw_ver, " bc ", vpdlen - len - 1);
14607+
if (len >= sizeof(tp->fw_ver))
14608+
len = sizeof(tp->fw_ver) - 1;
14609+
memset(tp->fw_ver, 0, sizeof(tp->fw_ver));
14610+
snprintf(tp->fw_ver, sizeof(tp->fw_ver), "%.*s bc ", len,
14611+
&vpd_data[j]);
1460914612
}
1461014613

1461114614
partno:

0 commit comments

Comments
 (0)