Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David S Miller:

1) Netfilter xt_limit module can use uninitialized rules, from Jan
Engelhardt.

2) Wei Yongjun has found several more spots where error pointers were
treated as NULL/non-NULL and vice versa.

3) bnx2x was converted to pci_io{,un}map() but one remaining plain
iounmap() got missed. From Neil Horman.

4) Due to a fence-post type error in initialization of inetpeer entries
(which is where we store the ICMP rate limiting information), we can
erroneously drop ICMPs if the inetpeer was created right around when
jiffies wraps.

Fix from Nicolas Dichtel.

5) smsc75xx resume fix from Steve Glendinnig.

6) LAN87xx smsc chips need an explicit hardware init, from Marek Vasut.

7) qlcnic uses msleep() with locks held, fix from Narendra K.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
netdev: octeon: fix return value check in octeon_mgmt_init_phy()
inetpeer: fix token initialization
qlcnic: Fix scheduling while atomic bug
bnx2: Clean up remaining iounmap
net: phy: smsc: Implement PHY config_init for LAN87xx
smsc75xx: fix resume after device reset
netdev: pasemi: fix return value check in pasemi_mac_phy_init()
team: fix return value check
l2tp: fix return value check
netfilter: xt_limit: have r->cost != 0 case work

+54 -26
+1 -1
drivers/net/ethernet/broadcom/bnx2.c
··· 8564 8564 return 0; 8565 8565 8566 8566 error: 8567 - iounmap(bp->regview); 8567 + pci_iounmap(pdev, bp->regview); 8568 8568 pci_release_regions(pdev); 8569 8569 pci_disable_device(pdev); 8570 8570 pci_set_drvdata(pdev, NULL);
+1 -3
drivers/net/ethernet/octeon/octeon_mgmt.c
··· 722 722 octeon_mgmt_adjust_link, 0, 723 723 PHY_INTERFACE_MODE_MII); 724 724 725 - if (IS_ERR(p->phydev)) { 726 - p->phydev = NULL; 725 + if (!p->phydev) 727 726 return -1; 728 - } 729 727 730 728 phy_start_aneg(p->phydev); 731 729
+2 -2
drivers/net/ethernet/pasemi/pasemi_mac.c
··· 1101 1101 phydev = of_phy_connect(dev, phy_dn, &pasemi_adjust_link, 0, 1102 1102 PHY_INTERFACE_MODE_SGMII); 1103 1103 1104 - if (IS_ERR(phydev)) { 1104 + if (!phydev) { 1105 1105 printk(KERN_ERR "%s: Could not attach to phy\n", dev->name); 1106 - return PTR_ERR(phydev); 1106 + return -ENODEV; 1107 1107 } 1108 1108 1109 1109 mac->phydev = phydev;
+2 -2
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
··· 15 15 16 16 do { 17 17 /* give atleast 1ms for firmware to respond */ 18 - msleep(1); 18 + mdelay(1); 19 19 20 20 if (++timeout > QLCNIC_OS_CRB_RETRY_COUNT) 21 21 return QLCNIC_CDRP_RSP_TIMEOUT; ··· 601 601 qlcnic_fw_cmd_destroy_tx_ctx(adapter); 602 602 603 603 /* Allow dma queues to drain after context reset */ 604 - msleep(20); 604 + mdelay(20); 605 605 } 606 606 } 607 607
+27 -1
drivers/net/phy/smsc.c
··· 56 56 return smsc_phy_ack_interrupt (phydev); 57 57 } 58 58 59 + static int lan87xx_config_init(struct phy_device *phydev) 60 + { 61 + /* 62 + * Make sure the EDPWRDOWN bit is NOT set. Setting this bit on 63 + * LAN8710/LAN8720 PHY causes the PHY to misbehave, likely due 64 + * to a bug on the chip. 65 + * 66 + * When the system is powered on with the network cable being 67 + * disconnected all the way until after ifconfig ethX up is 68 + * issued for the LAN port with this PHY, connecting the cable 69 + * afterwards does not cause LINK change detection, while the 70 + * expected behavior is the Link UP being detected. 71 + */ 72 + int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS); 73 + if (rc < 0) 74 + return rc; 75 + 76 + rc &= ~MII_LAN83C185_EDPWRDOWN; 77 + 78 + rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS, rc); 79 + if (rc < 0) 80 + return rc; 81 + 82 + return smsc_phy_ack_interrupt(phydev); 83 + } 84 + 59 85 static int lan911x_config_init(struct phy_device *phydev) 60 86 { 61 87 return smsc_phy_ack_interrupt(phydev); ··· 188 162 /* basic functions */ 189 163 .config_aneg = genphy_config_aneg, 190 164 .read_status = genphy_read_status, 191 - .config_init = smsc_phy_config_init, 165 + .config_init = lan87xx_config_init, 192 166 193 167 /* IRQ related */ 194 168 .ack_interrupt = smsc_phy_ack_interrupt,
+6 -6
drivers/net/team/team.c
··· 1653 1653 1654 1654 hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, 1655 1655 &team_nl_family, 0, TEAM_CMD_NOOP); 1656 - if (IS_ERR(hdr)) { 1657 - err = PTR_ERR(hdr); 1656 + if (!hdr) { 1657 + err = -EMSGSIZE; 1658 1658 goto err_msg_put; 1659 1659 } 1660 1660 ··· 1848 1848 1849 1849 hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags | NLM_F_MULTI, 1850 1850 TEAM_CMD_OPTIONS_GET); 1851 - if (IS_ERR(hdr)) 1852 - return PTR_ERR(hdr); 1851 + if (!hdr) 1852 + return -EMSGSIZE; 1853 1853 1854 1854 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) 1855 1855 goto nla_put_failure; ··· 2068 2068 2069 2069 hdr = genlmsg_put(skb, pid, seq, &team_nl_family, flags, 2070 2070 TEAM_CMD_PORT_LIST_GET); 2071 - if (IS_ERR(hdr)) 2072 - return PTR_ERR(hdr); 2071 + if (!hdr) 2072 + return -EMSGSIZE; 2073 2073 2074 2074 if (nla_put_u32(skb, TEAM_ATTR_TEAM_IFINDEX, team->dev->ifindex)) 2075 2075 goto nla_put_failure;
+1
drivers/net/usb/smsc75xx.c
··· 1253 1253 .probe = usbnet_probe, 1254 1254 .suspend = usbnet_suspend, 1255 1255 .resume = usbnet_resume, 1256 + .reset_resume = usbnet_resume, 1256 1257 .disconnect = usbnet_disconnect, 1257 1258 .disable_hub_initiated_lpm = 1, 1258 1259 };
+4 -1
net/ipv4/inetpeer.c
··· 510 510 secure_ipv6_id(daddr->addr.a6)); 511 511 p->metrics[RTAX_LOCK-1] = INETPEER_METRICS_NEW; 512 512 p->rate_tokens = 0; 513 - p->rate_last = 0; 513 + /* 60*HZ is arbitrary, but chosen enough high so that the first 514 + * calculation of tokens is at its maximum. 515 + */ 516 + p->rate_last = jiffies - 60*HZ; 514 517 INIT_LIST_HEAD(&p->gc_list); 515 518 516 519 /* Link the node. */
+6 -6
net/l2tp/l2tp_netlink.c
··· 80 80 81 81 hdr = genlmsg_put(msg, info->snd_pid, info->snd_seq, 82 82 &l2tp_nl_family, 0, L2TP_CMD_NOOP); 83 - if (IS_ERR(hdr)) { 84 - ret = PTR_ERR(hdr); 83 + if (!hdr) { 84 + ret = -EMSGSIZE; 85 85 goto err_out; 86 86 } 87 87 ··· 250 250 251 251 hdr = genlmsg_put(skb, pid, seq, &l2tp_nl_family, flags, 252 252 L2TP_CMD_TUNNEL_GET); 253 - if (IS_ERR(hdr)) 254 - return PTR_ERR(hdr); 253 + if (!hdr) 254 + return -EMSGSIZE; 255 255 256 256 if (nla_put_u8(skb, L2TP_ATTR_PROTO_VERSION, tunnel->version) || 257 257 nla_put_u32(skb, L2TP_ATTR_CONN_ID, tunnel->tunnel_id) || ··· 617 617 sk = tunnel->sock; 618 618 619 619 hdr = genlmsg_put(skb, pid, seq, &l2tp_nl_family, flags, L2TP_CMD_SESSION_GET); 620 - if (IS_ERR(hdr)) 621 - return PTR_ERR(hdr); 620 + if (!hdr) 621 + return -EMSGSIZE; 622 622 623 623 if (nla_put_u32(skb, L2TP_ATTR_CONN_ID, tunnel->tunnel_id) || 624 624 nla_put_u32(skb, L2TP_ATTR_SESSION_ID, session->session_id) ||
+4 -4
net/netfilter/xt_limit.c
··· 117 117 118 118 /* For SMP, we only want to use one set of state. */ 119 119 r->master = priv; 120 + /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies * 121 + 128. */ 122 + priv->prev = jiffies; 123 + priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ 120 124 if (r->cost == 0) { 121 - /* User avg in seconds * XT_LIMIT_SCALE: convert to jiffies * 122 - 128. */ 123 - priv->prev = jiffies; 124 - priv->credit = user2credits(r->avg * r->burst); /* Credits full. */ 125 125 r->credit_cap = priv->credit; /* Credits full. */ 126 126 r->cost = user2credits(r->avg); 127 127 }