Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Browse files Browse the repository at this point in the history
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (92 commits)
  gianfar: Revive VLAN support
  vlan: Export symbols as non GPL symbols.
  bnx2x: tx_has_work should not wait for FW
  netxen: reduce memory footprint
  netxen: fix vlan tso/checksum offload
  net: Fix linux/if_frad.h's suitability for userspace.
  net: Move config NET_NS to from net/Kconfig to init/Kconfig
  isdn: Fix missing ifdef in isdn_ppp
  networking: document "nc" in addition to "netcat" in netconsole.txt
  e1000e: workaround hw errata
  af_key: initialize xfrm encap_oa
  virtio_net: Fix MAX_PACKET_LEN to support 802.1Q VLANs
  lcs: fix compilation for !CONFIG_IP_MULTICAST
  rtl8187: Add termination packet to prevent stall
  iwlwifi: fix rs_get_rate WARN_ON()
  p54usb: fix packet loss with first generation devices
  sctp: Fix another socket race during accept/peeloff
  sctp: Properly timestamp outgoing data chunks for rtx purposes
  sctp: Correctly start rtx timer on new packet transmissions.
  sctp: Fix crc32c calculations on big-endian arhes.
  ...
  • Loading branch information
torvalds committed Jan 26, 2009
2 parents 66673f1 + cd1f55a commit 924d26d
Show file tree
Hide file tree
Showing 67 changed files with 801 additions and 464 deletions.
3 changes: 2 additions & 1 deletion Documentation/networking/netconsole.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ Built-in netconsole starts immediately after the TCP stack is
initialized and attempts to bring up the supplied dev at the supplied
address.

The remote host can run either 'netcat -u -l -p <port>' or syslogd.
The remote host can run either 'netcat -u -l -p <port>',
'nc -l -u <port>' or syslogd.

Dynamic reconfiguration:
========================
Expand Down
2 changes: 2 additions & 0 deletions drivers/isdn/i4l/isdn_ppp.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,7 @@ set_arg(void __user *b, void *val,int len)
return 0;
}

#ifdef CONFIG_IPPP_FILTER
static int get_filter(void __user *arg, struct sock_filter **p)
{
struct sock_fprog uprog;
Expand Down Expand Up @@ -465,6 +466,7 @@ static int get_filter(void __user *arg, struct sock_filter **p)
*p = code;
return uprog.len;
}
#endif /* CONFIG_IPPP_FILTER */

/*
* ippp device ioctl
Expand Down
11 changes: 2 additions & 9 deletions drivers/net/bnx2x.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* bnx2x.h: Broadcom Everest network driver.
*
* Copyright (c) 2007-2008 Broadcom Corporation
* Copyright (c) 2007-2009 Broadcom Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -271,14 +271,7 @@ struct bnx2x_fastpath {

#define bnx2x_fp(bp, nr, var) (bp->fp[nr].var)

#define BNX2X_HAS_TX_WORK(fp) \
((fp->tx_pkt_prod != le16_to_cpu(*fp->tx_cons_sb)) || \
(fp->tx_pkt_prod != fp->tx_pkt_cons))

#define BNX2X_HAS_RX_WORK(fp) \
(fp->rx_comp_cons != rx_cons_sb)

#define BNX2X_HAS_WORK(fp) (BNX2X_HAS_RX_WORK(fp) || BNX2X_HAS_TX_WORK(fp))
#define BNX2X_HAS_WORK(fp) (bnx2x_has_rx_work(fp) || bnx2x_has_tx_work(fp))


/* MC hsi */
Expand Down
64 changes: 46 additions & 18 deletions drivers/net/bnx2x_link.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2008 Broadcom Corporation
/* Copyright 2008-2009 Broadcom Corporation
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
Expand Down Expand Up @@ -317,6 +317,9 @@ static u8 bnx2x_emac_enable(struct link_params *params,
val &= ~0x810;
EMAC_WR(bp, EMAC_REG_EMAC_MODE, val);

/* enable emac */
REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 1);

/* enable emac for jumbo packets */
EMAC_WR(bp, EMAC_REG_EMAC_RX_MTU_SIZE,
(EMAC_RX_MTU_SIZE_JUMBO_ENA |
Expand Down Expand Up @@ -1609,7 +1612,7 @@ static u8 bnx2x_link_settings_status(struct link_params *params,
u32 gp_status)
{
struct bnx2x *bp = params->bp;

u16 new_line_speed;
u8 rc = 0;
vars->link_status = 0;

Expand All @@ -1629,15 +1632,15 @@ static u8 bnx2x_link_settings_status(struct link_params *params,

switch (gp_status & GP_STATUS_SPEED_MASK) {
case GP_STATUS_10M:
vars->line_speed = SPEED_10;
new_line_speed = SPEED_10;
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_10TFD;
else
vars->link_status |= LINK_10THD;
break;

case GP_STATUS_100M:
vars->line_speed = SPEED_100;
new_line_speed = SPEED_100;
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_100TXFD;
else
Expand All @@ -1646,15 +1649,15 @@ static u8 bnx2x_link_settings_status(struct link_params *params,

case GP_STATUS_1G:
case GP_STATUS_1G_KX:
vars->line_speed = SPEED_1000;
new_line_speed = SPEED_1000;
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_1000TFD;
else
vars->link_status |= LINK_1000THD;
break;

case GP_STATUS_2_5G:
vars->line_speed = SPEED_2500;
new_line_speed = SPEED_2500;
if (vars->duplex == DUPLEX_FULL)
vars->link_status |= LINK_2500TFD;
else
Expand All @@ -1671,32 +1674,32 @@ static u8 bnx2x_link_settings_status(struct link_params *params,
case GP_STATUS_10G_KX4:
case GP_STATUS_10G_HIG:
case GP_STATUS_10G_CX4:
vars->line_speed = SPEED_10000;
new_line_speed = SPEED_10000;
vars->link_status |= LINK_10GTFD;
break;

case GP_STATUS_12G_HIG:
vars->line_speed = SPEED_12000;
new_line_speed = SPEED_12000;
vars->link_status |= LINK_12GTFD;
break;

case GP_STATUS_12_5G:
vars->line_speed = SPEED_12500;
new_line_speed = SPEED_12500;
vars->link_status |= LINK_12_5GTFD;
break;

case GP_STATUS_13G:
vars->line_speed = SPEED_13000;
new_line_speed = SPEED_13000;
vars->link_status |= LINK_13GTFD;
break;

case GP_STATUS_15G:
vars->line_speed = SPEED_15000;
new_line_speed = SPEED_15000;
vars->link_status |= LINK_15GTFD;
break;

case GP_STATUS_16G:
vars->line_speed = SPEED_16000;
new_line_speed = SPEED_16000;
vars->link_status |= LINK_16GTFD;
break;

Expand All @@ -1708,6 +1711,15 @@ static u8 bnx2x_link_settings_status(struct link_params *params,
break;
}

/* Upon link speed change set the NIG into drain mode.
Comes to deals with possible FIFO glitch due to clk change
when speed is decreased without link down indicator */
if (new_line_speed != vars->line_speed) {
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE
+ params->port*4, 0);
msleep(1);
}
vars->line_speed = new_line_speed;
vars->link_status |= LINK_STATUS_SERDES_LINK;

if ((params->req_line_speed == SPEED_AUTO_NEG) &&
Expand Down Expand Up @@ -3571,7 +3583,7 @@ static void bnx2x_set_xgxs_loopback(struct link_params *params,
(MDIO_REG_BANK_CL73_IEEEB0 +
(MDIO_CL73_IEEEB0_CL73_AN_CONTROL & 0xf)),
0x6041);

msleep(200);
/* set aer mmd back */
bnx2x_set_aer_mmd(params, vars);

Expand Down Expand Up @@ -3870,9 +3882,15 @@ static u8 bnx2x_link_initialize(struct link_params *params,
}

if (vars->phy_flags & PHY_XGXS_FLAG) {
if (params->req_line_speed &&
if ((params->req_line_speed &&
((params->req_line_speed == SPEED_100) ||
(params->req_line_speed == SPEED_10))) {
(params->req_line_speed == SPEED_10))) ||
(!params->req_line_speed &&
(params->speed_cap_mask >=
PORT_HW_CFG_SPEED_CAPABILITY_D0_10M_FULL) &&
(params->speed_cap_mask <
PORT_HW_CFG_SPEED_CAPABILITY_D0_1G)
)) {
vars->phy_flags |= PHY_SGMII_FLAG;
} else {
vars->phy_flags &= ~PHY_SGMII_FLAG;
Expand Down Expand Up @@ -4194,6 +4212,11 @@ static u8 bnx2x_update_link_down(struct link_params *params,
/* activate nig drain */
REG_WR(bp, NIG_REG_EGRESS_DRAIN0_MODE + port*4, 1);

/* disable emac */
REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0);

msleep(10);

/* reset BigMac */
bnx2x_bmac_rx_disable(bp, params->port);
REG_WR(bp, GRCBASE_MISC +
Expand Down Expand Up @@ -4238,6 +4261,7 @@ static u8 bnx2x_update_link_up(struct link_params *params,

/* update shared memory */
bnx2x_update_mng(params, vars->link_status);
msleep(20);
return rc;
}
/* This function should called upon link interrupt */
Expand Down Expand Up @@ -4276,6 +4300,9 @@ u8 bnx2x_link_update(struct link_params *params, struct link_vars *vars)
REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK10G + port*0x68),
REG_RD(bp, NIG_REG_XGXS0_STATUS_LINK_STATUS + port*0x68));

/* disable emac */
REG_WR(bp, NIG_REG_NIG_EMAC0_EN + port*4, 0);

ext_phy_type = XGXS_EXT_PHY_TYPE(params->ext_phy_config);

/* Check external link change only for non-direct */
Expand Down Expand Up @@ -4377,10 +4404,11 @@ static u8 bnx2x_8073_common_init_phy(struct bnx2x *bp, u32 shmem_base)
ext_phy_addr[port],
MDIO_PMA_DEVAD,
MDIO_PMA_REG_ROM_VER1, &fw_ver1);
if (fw_ver1 == 0) {
if (fw_ver1 == 0 || fw_ver1 == 0x4321) {
DP(NETIF_MSG_LINK,
"bnx2x_8073_common_init_phy port %x "
"fw Download failed\n", port);
"bnx2x_8073_common_init_phy port %x:"
"Download failed. fw version = 0x%x\n",
port, fw_ver1);
return -EINVAL;
}

Expand Down
Loading

0 comments on commit 924d26d

Please sign in to comment.