Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Browse files Browse the repository at this point in the history
Pull networking fixes from David Miller:
 "I'm hoping this is the very last batch of networking fixes for 3.13,
  here goes nothing:

   1) Fix crashes in VLAN's header_ops passthru.

   2) Bridge multicast code needs to use BH spinlocks to prevent
      deadlocks with timers.  From Curt Brune.

   3) ipv6 tunnels lack proper synchornization when updating percpu
      statistics.  From Li RongQing.

   4) Fixes to bnx2x driver from Yaniv Rosner, Dmitry Kravkov and Michal
      Kalderon.

   5) Avoid undefined operator evaluation order in llc code, from Daniel
      Borkmann.

   6) Error paths in various GSO offload paths do not unwind properly,
      in particular they must undo any modifications they have made to
      the SKB.  From Wei-Chun Chao.

   7) Fix RX refill races during restore in virtio-net, from Jason Wang.

   8) Fix SKB use after free in LLC code, from Daniel Borkmann.

   9) Missing unlock and OOPS in netpoll code when VLAN tag handling
      fails.

  10) Fix vxlan device attachment wrt ipv6, from Fan Du.

  11) Don't allow creating infiniband links to non-infiniband devices,
      from Hangbin Liu.

  12) Revert FEC phy reset active low change, it breaks things.  From
      Fabio Estevam.

  13) Fix header pointer handling in 6lowpan header building code, from
      Daniel Borkmann.

  14) Fix RSS handling in be2net driver, from Vasundhara Volam.

  15) Fix modem port indexing in HSO driver, from Dan Williams"

* http://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (38 commits)
  bridge: use spin_lock_bh() in br_multicast_set_hash_max
  ipv6: don't install anycast address for /128 addresses on routers
  hso: fix handling of modem port SERIAL_STATE notifications
  isdn: Drop big endian cpp checks from telespci and hfc_pci drivers
  be2net: fix max_evt_qs calculation for BE3 in SR-IOV config
  be2net: increase the timeout value for loopback-test FW cmd
  be2net: disable RSS when number of RXQs is reduced to 1 via set-channels
  xen-netback: Include header for vmalloc
  net: 6lowpan: fix lowpan_header_create non-compression memcpy call
  fec: Revert "fec: Do not assume that PHY reset is active low"
  bnx2x: fix VLAN configuration for VFs.
  bnx2x: fix AFEX memory overflow
  bnx2x: Clean before update RSS arrives
  bnx2x: Correct number of MSI-X vectors for VFs
  bnx2x: limit number of interrupt vectors for 57711
  qlcnic: Fix bug in Tx completion path
  infiniband: make sure the src net is infiniband when create new link
  {vxlan, inet6} Mark vxlan_dev flags with VXLAN_F_IPV6 properly
  cxgb4: allow large buffer size to have page size
  netpoll: Fix missing TXQ unlock and and OOPS.
  ...
  • Loading branch information
torvalds committed Jan 7, 2014
2 parents f0a679a + fe0d692 commit a707271
Show file tree
Hide file tree
Showing 45 changed files with 478 additions and 327 deletions.
3 changes: 2 additions & 1 deletion drivers/infiniband/ulp/ipoib/ipoib_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*/

#include <linux/netdevice.h>
#include <linux/if_arp.h> /* For ARPHRD_xxx */
#include <linux/module.h>
#include <net/rtnetlink.h>
#include "ipoib.h"
Expand Down Expand Up @@ -103,7 +104,7 @@ static int ipoib_new_child_link(struct net *src_net, struct net_device *dev,
return -EINVAL;

pdev = __dev_get_by_index(src_net, nla_get_u32(tb[IFLA_LINK]));
if (!pdev)
if (!pdev || pdev->type != ARPHRD_INFINIBAND)
return -ENODEV;

ppriv = netdev_priv(pdev);
Expand Down
4 changes: 0 additions & 4 deletions drivers/isdn/hisax/hfc_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1643,10 +1643,6 @@ setup_hfcpci(struct IsdnCard *card)
int i;
struct pci_dev *tmp_hfcpci = NULL;

#ifdef __BIG_ENDIAN
#error "not running on big endian machines now"
#endif

strcpy(tmp, hfcpci_revision);
printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp));

Expand Down
4 changes: 0 additions & 4 deletions drivers/isdn/hisax/telespci.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,10 +290,6 @@ int setup_telespci(struct IsdnCard *card)
struct IsdnCardState *cs = card->cs;
char tmp[64];

#ifdef __BIG_ENDIAN
#error "not running on big endian machines now"
#endif

strcpy(tmp, telespci_revision);
printk(KERN_INFO "HiSax: Teles/PCI driver Rev. %s\n", HiSax_getrev(tmp));
if (cs->typ != ISDN_CTYPE_TELESPCI)
Expand Down
7 changes: 6 additions & 1 deletion drivers/net/ethernet/broadcom/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,10 @@ struct bnx2x_slowpath {
* Therefore, if they would have been defined in the same union,
* data can get corrupted.
*/
struct afex_vif_list_ramrod_data func_afex_rdata;
union {
struct afex_vif_list_ramrod_data viflist_data;
struct function_update_data func_update;
} func_afex_rdata;

/* used by dmae command executer */
struct dmae_command dmae[MAX_DMAE_C];
Expand Down Expand Up @@ -2499,4 +2502,6 @@ void bnx2x_set_local_cmng(struct bnx2x *bp);
#define MCPR_SCRATCH_BASE(bp) \
(CHIP_IS_E1x(bp) ? MCP_REG_MCPR_SCRATCH : MCP_A_REG_MCPR_SCRATCH)

#define E1H_MAX_MF_SB_COUNT (HC_SB_MAX_SB_E1X/(E1HVN_MAX * PORT_MAX))

#endif /* bnx2x.h */
94 changes: 58 additions & 36 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -3865,6 +3865,19 @@ static void bnx2x_warpcore_enable_AN_KR(struct bnx2x_phy *phy,

bnx2x_warpcore_enable_AN_KR2(phy, params, vars);
} else {
/* Enable Auto-Detect to support 1G over CL37 as well */
bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
MDIO_WC_REG_SERDESDIGITAL_CONTROL1000X1, 0x10);

/* Force cl48 sync_status LOW to avoid getting stuck in CL73
* parallel-detect loop when CL73 and CL37 are enabled.
*/
CL22_WR_OVER_CL45(bp, phy, MDIO_REG_BANK_AER_BLOCK,
MDIO_AER_BLOCK_AER_REG, 0);
bnx2x_cl45_write(bp, phy, MDIO_WC_DEVAD,
MDIO_WC_REG_RXB_ANA_RX_CONTROL_PCI, 0x0800);
bnx2x_set_aer_mmd(params, phy);

bnx2x_disable_kr2(params, vars, phy);
}

Expand Down Expand Up @@ -8120,17 +8133,20 @@ static int bnx2x_get_edc_mode(struct bnx2x_phy *phy,
*edc_mode = EDC_MODE_ACTIVE_DAC;
else
check_limiting_mode = 1;
} else if (copper_module_type &
SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) {
} else {
*edc_mode = EDC_MODE_PASSIVE_DAC;
/* Even in case PASSIVE_DAC indication is not set,
* treat it as a passive DAC cable, since some cables
* don't have this indication.
*/
if (copper_module_type &
SFP_EEPROM_FC_TX_TECH_BITMASK_COPPER_PASSIVE) {
DP(NETIF_MSG_LINK,
"Passive Copper cable detected\n");
*edc_mode =
EDC_MODE_PASSIVE_DAC;
} else {
DP(NETIF_MSG_LINK,
"Unknown copper-cable-type 0x%x !!!\n",
copper_module_type);
return -EINVAL;
} else {
DP(NETIF_MSG_LINK,
"Unknown copper-cable-type\n");
}
}
break;
}
Expand Down Expand Up @@ -10825,9 +10841,9 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
(1<<11));

if (((phy->req_line_speed == SPEED_AUTO_NEG) &&
(phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_1G)) ||
(phy->req_line_speed == SPEED_1000)) {
(phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_1G)) ||
(phy->req_line_speed == SPEED_1000)) {
an_1000_val |= (1<<8);
autoneg_val |= (1<<9 | 1<<12);
if (phy->req_duplex == DUPLEX_FULL)
Expand All @@ -10843,30 +10859,32 @@ static int bnx2x_54618se_config_init(struct bnx2x_phy *phy,
0x09,
&an_1000_val);

/* Set 100 speed advertisement */
if (((phy->req_line_speed == SPEED_AUTO_NEG) &&
(phy->speed_cap_mask &
(PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL |
PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF)))) {
an_10_100_val |= (1<<7);
/* Enable autoneg and restart autoneg for legacy speeds */
autoneg_val |= (1<<9 | 1<<12);

if (phy->req_duplex == DUPLEX_FULL)
an_10_100_val |= (1<<8);
DP(NETIF_MSG_LINK, "Advertising 100M\n");
}

/* Set 10 speed advertisement */
if (((phy->req_line_speed == SPEED_AUTO_NEG) &&
(phy->speed_cap_mask &
(PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL |
PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_HALF)))) {
an_10_100_val |= (1<<5);
autoneg_val |= (1<<9 | 1<<12);
if (phy->req_duplex == DUPLEX_FULL)
/* Advertise 10/100 link speed */
if (phy->req_line_speed == SPEED_AUTO_NEG) {
if (phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_HALF) {
an_10_100_val |= (1<<5);
autoneg_val |= (1<<9 | 1<<12);
DP(NETIF_MSG_LINK, "Advertising 10M-HD\n");
}
if (phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL) {
an_10_100_val |= (1<<6);
DP(NETIF_MSG_LINK, "Advertising 10M\n");
autoneg_val |= (1<<9 | 1<<12);
DP(NETIF_MSG_LINK, "Advertising 10M-FD\n");
}
if (phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_HALF) {
an_10_100_val |= (1<<7);
autoneg_val |= (1<<9 | 1<<12);
DP(NETIF_MSG_LINK, "Advertising 100M-HD\n");
}
if (phy->speed_cap_mask &
PORT_HW_CFG_SPEED_CAPABILITY_D0_100M_FULL) {
an_10_100_val |= (1<<8);
autoneg_val |= (1<<9 | 1<<12);
DP(NETIF_MSG_LINK, "Advertising 100M-FD\n");
}
}

/* Only 10/100 are allowed to work in FORCE mode */
Expand Down Expand Up @@ -13342,6 +13360,10 @@ static u8 bnx2x_analyze_link_error(struct link_params *params,
DP(NETIF_MSG_LINK, "Link changed:[%x %x]->%x\n", vars->link_up,
old_status, status);

/* Do not touch the link in case physical link down */
if ((vars->phy_flags & PHY_PHYSICAL_LINK_FLAG) == 0)
return 1;

/* a. Update shmem->link_status accordingly
* b. Update link_vars->link_up
*/
Expand Down Expand Up @@ -13550,7 +13572,7 @@ static void bnx2x_check_kr2_wa(struct link_params *params,
*/
not_kr2_device = (((base_page & 0x8000) == 0) ||
(((base_page & 0x8000) &&
((next_page & 0xe0) == 0x2))));
((next_page & 0xe0) == 0x20))));

/* In case KR2 is already disabled, check if we need to re-enable it */
if (!(vars->link_attr_sync & LINK_ATTR_SYNC_KR2_ENABLE)) {
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11447,9 +11447,9 @@ static int bnx2x_get_hwinfo(struct bnx2x *bp)
}
}

/* adjust igu_sb_cnt to MF for E1x */
if (CHIP_IS_E1x(bp) && IS_MF(bp))
bp->igu_sb_cnt /= E1HVN_MAX;
/* adjust igu_sb_cnt to MF for E1H */
if (CHIP_IS_E1H(bp) && IS_MF(bp))
bp->igu_sb_cnt = min_t(u8, bp->igu_sb_cnt, E1H_MAX_MF_SB_COUNT);

/* port info */
bnx2x_get_port_hwinfo(bp);
Expand Down
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -7179,6 +7179,7 @@ Theotherbitsarereservedandshouldbezero*/
#define MDIO_WC_REG_RX1_PCI_CTRL 0x80ca
#define MDIO_WC_REG_RX2_PCI_CTRL 0x80da
#define MDIO_WC_REG_RX3_PCI_CTRL 0x80ea
#define MDIO_WC_REG_RXB_ANA_RX_CONTROL_PCI 0x80fa
#define MDIO_WC_REG_XGXSBLK2_UNICORE_MODE_10G 0x8104
#define MDIO_WC_REG_XGXS_STATUS3 0x8129
#define MDIO_WC_REG_PAR_DET_10G_STATUS 0x8130
Expand Down
15 changes: 11 additions & 4 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2038,6 +2038,7 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
struct bnx2x_vlan_mac_ramrod_params p;
struct bnx2x_exe_queue_obj *exeq = &o->exe_queue;
struct bnx2x_exeq_elem *exeq_pos, *exeq_pos_n;
unsigned long flags;
int read_lock;
int rc = 0;

Expand All @@ -2046,8 +2047,9 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
spin_lock_bh(&exeq->lock);

list_for_each_entry_safe(exeq_pos, exeq_pos_n, &exeq->exe_queue, link) {
if (exeq_pos->cmd_data.vlan_mac.vlan_mac_flags ==
*vlan_mac_flags) {
flags = exeq_pos->cmd_data.vlan_mac.vlan_mac_flags;
if (BNX2X_VLAN_MAC_CMP_FLAGS(flags) ==
BNX2X_VLAN_MAC_CMP_FLAGS(*vlan_mac_flags)) {
rc = exeq->remove(bp, exeq->owner, exeq_pos);
if (rc) {
BNX2X_ERR("Failed to remove command\n");
Expand Down Expand Up @@ -2080,7 +2082,9 @@ static int bnx2x_vlan_mac_del_all(struct bnx2x *bp,
return read_lock;

list_for_each_entry(pos, &o->head, link) {
if (pos->vlan_mac_flags == *vlan_mac_flags) {
flags = pos->vlan_mac_flags;
if (BNX2X_VLAN_MAC_CMP_FLAGS(flags) ==
BNX2X_VLAN_MAC_CMP_FLAGS(*vlan_mac_flags)) {
p.user_req.vlan_mac_flags = pos->vlan_mac_flags;
memcpy(&p.user_req.u, &pos->u, sizeof(pos->u));
rc = bnx2x_config_vlan_mac(bp, &p);
Expand Down Expand Up @@ -4382,8 +4386,11 @@ int bnx2x_config_rss(struct bnx2x *bp,
struct bnx2x_raw_obj *r = &o->raw;

/* Do nothing if only driver cleanup was requested */
if (test_bit(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags))
if (test_bit(RAMROD_DRV_CLR_ONLY, &p->ramrod_flags)) {
DP(BNX2X_MSG_SP, "Not configuring RSS ramrod_flags=%lx\n",
p->ramrod_flags);
return 0;
}

r->set_pending(r);

Expand Down
7 changes: 7 additions & 0 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ enum {
BNX2X_DONT_CONSUME_CAM_CREDIT,
BNX2X_DONT_CONSUME_CAM_CREDIT_DEST,
};
/* When looking for matching filters, some flags are not interesting */
#define BNX2X_VLAN_MAC_CMP_MASK (1 << BNX2X_UC_LIST_MAC | \
1 << BNX2X_ETH_MAC | \
1 << BNX2X_ISCSI_ETH_MAC | \
1 << BNX2X_NETQ_ETH_MAC)
#define BNX2X_VLAN_MAC_CMP_FLAGS(flags) \
((flags) & BNX2X_VLAN_MAC_CMP_MASK)

struct bnx2x_vlan_mac_ramrod_params {
/* Object to run the command from */
Expand Down
Loading

0 comments on commit a707271

Please sign in to comment.