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: (27 commits)
  netfilter: fix CONFIG_COMPAT support
  isdn/avm: fix build when PCMCIA is not enabled
  header: fix broken headers for user space
  e1000e: don't check for alternate MAC addr on parts that don't support it
  e1000e: disable ASPM L1 on 82573
  ll_temac: Fix poll implementation
  netxen: fix a race in netxen_nic_get_stats()
  qlnic: fix a race in qlcnic_get_stats()
  irda: fix a race in irlan_eth_xmit()
  net: sh_eth: remove unused variable
  netxen: update version 4.0.74
  netxen: fix inconsistent lock state
  vlan: Match underlying dev carrier on vlan add
  ibmveth: Fix opps during MTU change on an active device
  ehea: Fix synchronization between HW and SW send queue
  bnx2x: Update bnx2x version to 1.52.53-4
  bnx2x: Fix PHY locking problem
  rds: fix a leak of kernel memory
  netlink: fix compat recvmsg
  netfilter: fix userspace header warning
  ...
  • Loading branch information
Linus Torvalds committed Aug 24, 2010
2 parents 9c5ea36 + cca77b7 commit d1b113b
Show file tree
Hide file tree
Showing 61 changed files with 2,064 additions and 246 deletions.
3 changes: 2 additions & 1 deletion drivers/isdn/hardware/avm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ config ISDN_DRV_AVMB1_T1ISA

config ISDN_DRV_AVMB1_B1PCMCIA
tristate "AVM B1/M1/M2 PCMCIA support"
depends on PCMCIA
help
Enable support for the PCMCIA version of the AVM B1 card.

config ISDN_DRV_AVMB1_AVM_CS
tristate "AVM B1/M1/M2 PCMCIA cs module"
depends on ISDN_DRV_AVMB1_B1PCMCIA && PCMCIA
depends on ISDN_DRV_AVMB1_B1PCMCIA
help
Enable the PCMCIA client driver for the AVM B1/M1/M2
PCMCIA cards.
Expand Down
10 changes: 10 additions & 0 deletions drivers/net/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,16 @@ config SMC91X
The module will be called smc91x. If you want to compile it as a
module, say M here and read <file:Documentation/kbuild/modules.txt>.

config PXA168_ETH
tristate "Marvell pxa168 ethernet support"
depends on CPU_PXA168
select PHYLIB
help
This driver supports the pxa168 Ethernet ports.

To compile this driver as a module, choose M here. The module
will be called pxa168_eth.

config NET_NETX
tristate "NetX Ethernet support"
select MII
Expand Down
1 change: 1 addition & 0 deletions drivers/net/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ obj-$(CONFIG_MYRI10GE) += myri10ge/
obj-$(CONFIG_SMC91X) += smc91x.o
obj-$(CONFIG_SMC911X) += smc911x.o
obj-$(CONFIG_SMSC911X) += smsc911x.o
obj-$(CONFIG_PXA168_ETH) += pxa168_eth.o
obj-$(CONFIG_BFIN_MAC) += bfin_mac.o
obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_PASEMI_MAC) += pasemi_mac_driver.o
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/bnx2x/bnx2x.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
* (you will need to reboot afterwards) */
/* #define BNX2X_STOP_ON_ERROR */

#define DRV_MODULE_VERSION "1.52.53-3"
#define DRV_MODULE_RELDATE "2010/18/04"
#define DRV_MODULE_VERSION "1.52.53-4"
#define DRV_MODULE_RELDATE "2010/16/08"
#define BNX2X_BC_VER 0x040200

#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
Expand Down
9 changes: 7 additions & 2 deletions drivers/net/bnx2x/bnx2x_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4328,10 +4328,12 @@ static int bnx2x_init_port(struct bnx2x *bp)
val |= aeu_gpio_mask;
REG_WR(bp, offset, val);
}
bp->port.need_hw_lock = 1;
break;

case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101:
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8727:
bp->port.need_hw_lock = 1;
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_SFX7101:
/* add SPIO 5 to group 0 */
{
u32 reg_addr = (port ? MISC_REG_AEU_ENABLE1_FUNC_1_OUT_0 :
Expand All @@ -4341,7 +4343,10 @@ static int bnx2x_init_port(struct bnx2x *bp)
REG_WR(bp, reg_addr, val);
}
break;

case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8072:
case PORT_HW_CFG_XGXS_EXT_PHY_TYPE_BCM8073:
bp->port.need_hw_lock = 1;
break;
default:
break;
}
Expand Down
31 changes: 18 additions & 13 deletions drivers/net/e1000e/82571.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,12 +936,14 @@ static s32 e1000_reset_hw_82571(struct e1000_hw *hw)
ew32(IMC, 0xffffffff);
icr = er32(ICR);

/* Install any alternate MAC address into RAR0 */
ret_val = e1000_check_alt_mac_addr_generic(hw);
if (ret_val)
return ret_val;
if (hw->mac.type == e1000_82571) {
/* Install any alternate MAC address into RAR0 */
ret_val = e1000_check_alt_mac_addr_generic(hw);
if (ret_val)
return ret_val;

e1000e_set_laa_state_82571(hw, true);
e1000e_set_laa_state_82571(hw, true);
}

/* Reinitialize the 82571 serdes link state machine */
if (hw->phy.media_type == e1000_media_type_internal_serdes)
Expand Down Expand Up @@ -1618,14 +1620,16 @@ static s32 e1000_read_mac_addr_82571(struct e1000_hw *hw)
{
s32 ret_val = 0;

/*
* If there's an alternate MAC address place it in RAR0
* so that it will override the Si installed default perm
* address.
*/
ret_val = e1000_check_alt_mac_addr_generic(hw);
if (ret_val)
goto out;
if (hw->mac.type == e1000_82571) {
/*
* If there's an alternate MAC address place it in RAR0
* so that it will override the Si installed default perm
* address.
*/
ret_val = e1000_check_alt_mac_addr_generic(hw);
if (ret_val)
goto out;
}

ret_val = e1000_read_mac_addr_generic(hw);

Expand Down Expand Up @@ -1833,6 +1837,7 @@ struct e1000_info e1000_82573_info = {
| FLAG_HAS_SMART_POWER_DOWN
| FLAG_HAS_AMT
| FLAG_HAS_SWSM_ON_LOAD,
.flags2 = FLAG2_DISABLE_ASPM_L1,
.pba = 20,
.max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN,
.get_variants = e1000_get_variants_82571,
Expand Down
4 changes: 4 additions & 0 deletions drivers/net/e1000e/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -621,6 +621,7 @@
#define E1000_FLASH_UPDATES 2000

/* NVM Word Offsets */
#define NVM_COMPAT 0x0003
#define NVM_ID_LED_SETTINGS 0x0004
#define NVM_INIT_CONTROL2_REG 0x000F
#define NVM_INIT_CONTROL3_PORT_B 0x0014
Expand All @@ -643,6 +644,9 @@
/* Mask bits for fields in Word 0x1a of the NVM */
#define NVM_WORD1A_ASPM_MASK 0x000C

/* Mask bits for fields in Word 0x03 of the EEPROM */
#define NVM_COMPAT_LOM 0x0800

/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
#define NVM_SUM 0xBABA

Expand Down
10 changes: 10 additions & 0 deletions drivers/net/e1000e/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ s32 e1000_check_alt_mac_addr_generic(struct e1000_hw *hw)
u16 offset, nvm_alt_mac_addr_offset, nvm_data;
u8 alt_mac_addr[ETH_ALEN];

ret_val = e1000_read_nvm(hw, NVM_COMPAT, 1, &nvm_data);
if (ret_val)
goto out;

/* Check for LOM (vs. NIC) or one of two valid mezzanine cards */
if (!((nvm_data & NVM_COMPAT_LOM) ||
(hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_DUAL) ||
(hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)))
goto out;

ret_val = e1000_read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1,
&nvm_alt_mac_addr_offset);
if (ret_val) {
Expand Down
3 changes: 2 additions & 1 deletion drivers/net/ehea/ehea.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <asm/io.h>

#define DRV_NAME "ehea"
#define DRV_VERSION "EHEA_0105"
#define DRV_VERSION "EHEA_0106"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down Expand Up @@ -400,6 +400,7 @@ struct ehea_port_res {
u32 poll_counter;
struct net_lro_mgr lro_mgr;
struct net_lro_desc lro_desc[MAX_LRO_DESCRIPTORS];
int sq_restart_flag;
};


Expand Down
60 changes: 59 additions & 1 deletion drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,53 @@ static int ehea_proc_rwqes(struct net_device *dev,
return processed;
}

#define SWQE_RESTART_CHECK 0xdeadbeaff00d0000ull

static void reset_sq_restart_flag(struct ehea_port *port)
{
int i;

for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) {
struct ehea_port_res *pr = &port->port_res[i];
pr->sq_restart_flag = 0;
}
}

static void check_sqs(struct ehea_port *port)
{
struct ehea_swqe *swqe;
int swqe_index;
int i, k;

for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++) {
struct ehea_port_res *pr = &port->port_res[i];
k = 0;
swqe = ehea_get_swqe(pr->qp, &swqe_index);
memset(swqe, 0, SWQE_HEADER_SIZE);
atomic_dec(&pr->swqe_avail);

swqe->tx_control |= EHEA_SWQE_PURGE;
swqe->wr_id = SWQE_RESTART_CHECK;
swqe->tx_control |= EHEA_SWQE_SIGNALLED_COMPLETION;
swqe->tx_control |= EHEA_SWQE_IMM_DATA_PRESENT;
swqe->immediate_data_length = 80;

ehea_post_swqe(pr->qp, swqe);

while (pr->sq_restart_flag == 0) {
msleep(5);
if (++k == 100) {
ehea_error("HW/SW queues out of sync");
ehea_schedule_port_reset(pr->port);
return;
}
}
}

return;
}


static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)
{
struct sk_buff *skb;
Expand All @@ -793,6 +840,13 @@ static struct ehea_cqe *ehea_proc_cqes(struct ehea_port_res *pr, int my_quota)

cqe_counter++;
rmb();

if (cqe->wr_id == SWQE_RESTART_CHECK) {
pr->sq_restart_flag = 1;
swqe_av++;
break;
}

if (cqe->status & EHEA_CQE_STAT_ERR_MASK) {
ehea_error("Bad send completion status=0x%04X",
cqe->status);
Expand Down Expand Up @@ -2675,8 +2729,10 @@ static void ehea_flush_sq(struct ehea_port *port)
int k = 0;
while (atomic_read(&pr->swqe_avail) < swqe_max) {
msleep(5);
if (++k == 20)
if (++k == 20) {
ehea_error("WARNING: sq not flushed completely");
break;
}
}
}
}
Expand Down Expand Up @@ -2917,6 +2973,7 @@ static void ehea_rereg_mrs(struct work_struct *work)
port_napi_disable(port);
mutex_unlock(&port->port_lock);
}
reset_sq_restart_flag(port);
}

/* Unregister old memory region */
Expand Down Expand Up @@ -2951,6 +3008,7 @@ static void ehea_rereg_mrs(struct work_struct *work)
mutex_lock(&port->port_lock);
port_napi_enable(port);
ret = ehea_restart_qps(dev);
check_sqs(port);
if (!ret)
netif_wake_queue(dev);
mutex_unlock(&port->port_lock);
Expand Down
32 changes: 15 additions & 17 deletions drivers/net/ibmveth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,7 +1113,8 @@ static int ibmveth_change_mtu(struct net_device *dev, int new_mtu)
struct ibmveth_adapter *adapter = netdev_priv(dev);
struct vio_dev *viodev = adapter->vdev;
int new_mtu_oh = new_mtu + IBMVETH_BUFF_OH;
int i;
int i, rc;
int need_restart = 0;

if (new_mtu < IBMVETH_MAX_MTU)
return -EINVAL;
Expand All @@ -1127,35 +1128,32 @@ static int ibmveth_change_mtu(struct net_device *dev, int new_mtu)

/* Deactivate all the buffer pools so that the next loop can activate
only the buffer pools necessary to hold the new MTU */
for (i = 0; i < IbmVethNumBufferPools; i++)
if (adapter->rx_buff_pool[i].active) {
ibmveth_free_buffer_pool(adapter,
&adapter->rx_buff_pool[i]);
adapter->rx_buff_pool[i].active = 0;
}
if (netif_running(adapter->netdev)) {
need_restart = 1;
adapter->pool_config = 1;
ibmveth_close(adapter->netdev);
adapter->pool_config = 0;
}

/* Look for an active buffer pool that can hold the new MTU */
for(i = 0; i<IbmVethNumBufferPools; i++) {
adapter->rx_buff_pool[i].active = 1;

if (new_mtu_oh < adapter->rx_buff_pool[i].buff_size) {
if (netif_running(adapter->netdev)) {
adapter->pool_config = 1;
ibmveth_close(adapter->netdev);
adapter->pool_config = 0;
dev->mtu = new_mtu;
vio_cmo_set_dev_desired(viodev,
ibmveth_get_desired_dma
(viodev));
return ibmveth_open(adapter->netdev);
}
dev->mtu = new_mtu;
vio_cmo_set_dev_desired(viodev,
ibmveth_get_desired_dma
(viodev));
if (need_restart) {
return ibmveth_open(adapter->netdev);
}
return 0;
}
}

if (need_restart && (rc = ibmveth_open(adapter->netdev)))
return rc;

return -EINVAL;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ll_temac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,8 @@ temac_poll_controller(struct net_device *ndev)
disable_irq(lp->tx_irq);
disable_irq(lp->rx_irq);

ll_temac_rx_irq(lp->tx_irq, lp);
ll_temac_tx_irq(lp->rx_irq, lp);
ll_temac_rx_irq(lp->tx_irq, ndev);
ll_temac_tx_irq(lp->rx_irq, ndev);

enable_irq(lp->tx_irq);
enable_irq(lp->rx_irq);
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/netxen/netxen_nic.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@

#define _NETXEN_NIC_LINUX_MAJOR 4
#define _NETXEN_NIC_LINUX_MINOR 0
#define _NETXEN_NIC_LINUX_SUBVERSION 73
#define NETXEN_NIC_LINUX_VERSIONID "4.0.73"
#define _NETXEN_NIC_LINUX_SUBVERSION 74
#define NETXEN_NIC_LINUX_VERSIONID "4.0.74"

#define NETXEN_VERSION_CODE(a, b, c) (((a) << 24) + ((b) << 16) + (c))
#define _major(v) (((v) >> 24) & 0xff)
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/netxen/netxen_nic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1805,8 +1805,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
netxen_ctx_msg msg = 0;
struct list_head *head;

spin_lock(&rds_ring->lock);

producer = rds_ring->producer;

head = &rds_ring->free_list;
Expand Down Expand Up @@ -1853,8 +1851,6 @@ netxen_post_rx_buffers(struct netxen_adapter *adapter, u32 ringid,
NETXEN_RCV_PRODUCER_OFFSET), msg);
}
}

spin_unlock(&rds_ring->lock);
}

static void
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/netxen/netxen_nic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2032,8 +2032,6 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
struct netxen_adapter *adapter = netdev_priv(netdev);
struct net_device_stats *stats = &netdev->stats;

memset(stats, 0, sizeof(*stats));

stats->rx_packets = adapter->stats.rx_pkts + adapter->stats.lro_pkts;
stats->tx_packets = adapter->stats.xmitfinished;
stats->rx_bytes = adapter->stats.rxbytes;
Expand Down
Loading

0 comments on commit d1b113b

Please sign in to comment.