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: (33 commits)
  r8169: offical fix for CVE-2009-4537 (overlength frame DMAs)
  ipv6: Don't drop cache route entry unless timer actually expired.
  tulip: Add missing parens.
  r8169: fix broken register writes
  pcnet_cs: add new id
  bonding: fix broken multicast with round-robin mode
  drivers/net: Fix continuation lines
  e1000: do not modify tx_queue_len on link speed change
  net: ipmr/ip6mr: prevent out-of-bounds vif_table access
  ixgbe: Do not run all Diagnostic offline tests when VFs are active
  igb: use correct bits to identify if managability is enabled
  benet: Fix compile warnnings in drivers/net/benet/be_ethtool.c
  net: Add MSG_WAITFORONE flag to recvmmsg
  e1000e: do not modify tx_queue_len on link speed change
  igbvf: do not modify tx_queue_len on link speed change
  ipv4: Restart rt_intern_hash after emergency rebuild (v2)
  ipv4: Cleanup struct net dereference in rt_intern_hash
  net: fix netlink address dumping in IPv4/IPv6
  tulip: Fix null dereference in uli526x_rx_packet()
  gianfar: fix undo of reserve()
  ...
  • Loading branch information
torvalds committed Mar 29, 2010
2 parents c45140a + c0cd884 commit 6631424
Show file tree
Hide file tree
Showing 35 changed files with 256 additions and 144 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3083,6 +3083,7 @@ F: include/scsi/*iscsi*
ISDN SUBSYSTEM
M: Karsten Keil <isdn@linux-pingi.de>
L: isdn4linux@listserv.isdn4linux.de (subscribers-only)
L: netdev@vger.kernel.org
W: http://www.isdn4linux.de
T: git git://git.kernel.org/pub/scm/linux/kernel/git/kkeil/isdn-2.6.git
S: Maintained
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/atlx/atl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

#define ATLX_DRIVER_VERSION "2.1.3"
MODULE_AUTHOR("Xiong Huang <xiong.huang@atheros.com>, \
Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>");
Chris Snook <csnook@redhat.com>, Jay Cliburn <jcliburn@gmail.com>");
MODULE_LICENSE("GPL");
MODULE_VERSION(ATLX_DRIVER_VERSION);

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/benet/be_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ be_test_ddr_dma(struct be_adapter *adapter)
{
int ret, i;
struct be_dma_mem ddrdma_cmd;
u64 pattern[2] = {0x5a5a5a5a5a5a5a5a, 0xa5a5a5a5a5a5a5a5};
u64 pattern[2] = {0x5a5a5a5a5a5a5a5aULL, 0xa5a5a5a5a5a5a5a5ULL};

ddrdma_cmd.size = sizeof(struct be_cmd_req_ddrdma_test);
ddrdma_cmd.va = pci_alloc_consistent(adapter->pdev, ddrdma_cmd.size,
Expand Down
40 changes: 32 additions & 8 deletions drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1235,6 +1235,11 @@ void bond_change_active_slave(struct bonding *bond, struct slave *new_active)
write_lock_bh(&bond->curr_slave_lock);
}
}

/* resend IGMP joins since all were sent on curr_active_slave */
if (bond->params.mode == BOND_MODE_ROUNDROBIN) {
bond_resend_igmp_join_requests(bond);
}
}

/**
Expand Down Expand Up @@ -4138,22 +4143,41 @@ static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev
struct bonding *bond = netdev_priv(bond_dev);
struct slave *slave, *start_at;
int i, slave_no, res = 1;
struct iphdr *iph = ip_hdr(skb);

read_lock(&bond->lock);

if (!BOND_IS_OK(bond))
goto out;

/*
* Concurrent TX may collide on rr_tx_counter; we accept that
* as being rare enough not to justify using an atomic op here
* Start with the curr_active_slave that joined the bond as the
* default for sending IGMP traffic. For failover purposes one
* needs to maintain some consistency for the interface that will
* send the join/membership reports. The curr_active_slave found
* will send all of this type of traffic.
*/
slave_no = bond->rr_tx_counter++ % bond->slave_cnt;
if ((iph->protocol == htons(IPPROTO_IGMP)) &&
(skb->protocol == htons(ETH_P_IP))) {

bond_for_each_slave(bond, slave, i) {
slave_no--;
if (slave_no < 0)
break;
read_lock(&bond->curr_slave_lock);
slave = bond->curr_active_slave;
read_unlock(&bond->curr_slave_lock);

if (!slave)
goto out;
} else {
/*
* Concurrent TX may collide on rr_tx_counter; we accept
* that as being rare enough not to justify using an
* atomic op here.
*/
slave_no = bond->rr_tx_counter++ % bond->slave_cnt;

bond_for_each_slave(bond, slave, i) {
slave_no--;
if (slave_no < 0)
break;
}
}

start_at = slave;
Expand Down
1 change: 0 additions & 1 deletion drivers/net/e1000/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ struct e1000_adapter {
/* TX */
struct e1000_tx_ring *tx_ring; /* One per active queue */
unsigned int restart_queue;
unsigned long tx_queue_len;
u32 txd_cmd;
u32 tx_int_delay;
u32 tx_abs_int_delay;
Expand Down
9 changes: 1 addition & 8 deletions drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,6 @@ static void e1000_configure(struct e1000_adapter *adapter)
adapter->alloc_rx_buf(adapter, ring,
E1000_DESC_UNUSED(ring));
}

adapter->tx_queue_len = netdev->tx_queue_len;
}

int e1000_up(struct e1000_adapter *adapter)
Expand Down Expand Up @@ -503,7 +501,6 @@ void e1000_down(struct e1000_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer);

netdev->tx_queue_len = adapter->tx_queue_len;
adapter->link_speed = 0;
adapter->link_duplex = 0;
netif_carrier_off(netdev);
Expand Down Expand Up @@ -2316,19 +2313,15 @@ static void e1000_watchdog(unsigned long data)
E1000_CTRL_RFCE) ? "RX" : ((ctrl &
E1000_CTRL_TFCE) ? "TX" : "None" )));

/* tweak tx_queue_len according to speed/duplex
* and adjust the timeout factor */
netdev->tx_queue_len = adapter->tx_queue_len;
/* adjust timeout factor according to speed/duplex */
adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) {
case SPEED_10:
txb2b = false;
netdev->tx_queue_len = 10;
adapter->tx_timeout_factor = 16;
break;
case SPEED_100:
txb2b = false;
netdev->tx_queue_len = 100;
/* maybe add some timeout factor ? */
break;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/net/e1000e/e1000.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ struct e1000_adapter {

struct napi_struct napi;

unsigned long tx_queue_len;
unsigned int restart_queue;
u32 txd_cmd;

Expand Down
11 changes: 1 addition & 10 deletions drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2289,8 +2289,6 @@ static void e1000_configure_tx(struct e1000_adapter *adapter)
ew32(TCTL, tctl);

e1000e_config_collision_dist(hw);

adapter->tx_queue_len = adapter->netdev->tx_queue_len;
}

/**
Expand Down Expand Up @@ -2877,7 +2875,6 @@ void e1000e_down(struct e1000_adapter *adapter)
del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer);

netdev->tx_queue_len = adapter->tx_queue_len;
netif_carrier_off(netdev);
adapter->link_speed = 0;
adapter->link_duplex = 0;
Expand Down Expand Up @@ -3588,21 +3585,15 @@ static void e1000_watchdog_task(struct work_struct *work)
"link gets many collisions.\n");
}

/*
* tweak tx_queue_len according to speed/duplex
* and adjust the timeout factor
*/
netdev->tx_queue_len = adapter->tx_queue_len;
/* adjust timeout factor according to speed/duplex */
adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) {
case SPEED_10:
txb2b = 0;
netdev->tx_queue_len = 10;
adapter->tx_timeout_factor = 16;
break;
case SPEED_100:
txb2b = 0;
netdev->tx_queue_len = 100;
adapter->tx_timeout_factor = 10;
break;
}
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -2393,6 +2393,7 @@ struct sk_buff * gfar_new_skb(struct net_device *dev)
* as many bytes as needed to align the data properly
*/
skb_reserve(skb, alignamount);
GFAR_CB(skb)->alignamount = alignamount;

return skb;
}
Expand Down Expand Up @@ -2533,13 +2534,13 @@ int gfar_clean_rx_ring(struct gfar_priv_rx_q *rx_queue, int rx_work_limit)
newskb = skb;
else if (skb) {
/*
* We need to reset ->data to what it
* We need to un-reserve() the skb to what it
* was before gfar_new_skb() re-aligned
* it to an RXBUF_ALIGNMENT boundary
* before we put the skb back on the
* recycle list.
*/
skb->data = skb->head + NET_SKB_PAD;
skb_reserve(skb, -GFAR_CB(skb)->alignamount);
__skb_queue_head(&priv->rx_recycle, skb);
}
} else {
Expand Down
6 changes: 6 additions & 0 deletions drivers/net/gianfar.h
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ struct rxfcb {
u16 vlctl; /* VLAN control word */
};

struct gianfar_skb_cb {
int alignamount;
};

#define GFAR_CB(skb) ((struct gianfar_skb_cb *)((skb)->cb))

struct rmon_mib
{
u32 tr64; /* 0x.680 - Transmit and Receive 64-byte Frame Counter */
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/igb/e1000_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,8 @@ s32 igb_write_8bit_ctrl_reg(struct e1000_hw *hw, u32 reg,
* igb_enable_mng_pass_thru - Enable processing of ARP's
* @hw: pointer to the HW structure
*
* Verifies the hardware needs to allow ARPs to be processed by the host.
* Verifies the hardware needs to leave interface enabled so that frames can
* be directed to and from the management interface.
**/
bool igb_enable_mng_pass_thru(struct e1000_hw *hw)
{
Expand All @@ -1380,8 +1381,7 @@ bool igb_enable_mng_pass_thru(struct e1000_hw *hw)

manc = rd32(E1000_MANC);

if (!(manc & E1000_MANC_RCV_TCO_EN) ||
!(manc & E1000_MANC_EN_MAC_ADDR_FILTER))
if (!(manc & E1000_MANC_RCV_TCO_EN))
goto out;

if (hw->mac.arc_subsystem_valid) {
Expand Down
1 change: 0 additions & 1 deletion drivers/net/igbvf/igbvf.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ struct igbvf_adapter {
struct igbvf_ring *tx_ring /* One per active queue */
____cacheline_aligned_in_smp;

unsigned long tx_queue_len;
unsigned int restart_queue;
u32 txd_cmd;

Expand Down
11 changes: 1 addition & 10 deletions drivers/net/igbvf/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1304,8 +1304,6 @@ static void igbvf_configure_tx(struct igbvf_adapter *adapter)

/* enable Report Status bit */
adapter->txd_cmd |= E1000_ADVTXD_DCMD_RS;

adapter->tx_queue_len = adapter->netdev->tx_queue_len;
}

/**
Expand Down Expand Up @@ -1524,7 +1522,6 @@ void igbvf_down(struct igbvf_adapter *adapter)

del_timer_sync(&adapter->watchdog_timer);

netdev->tx_queue_len = adapter->tx_queue_len;
netif_carrier_off(netdev);

/* record the stats before reset*/
Expand Down Expand Up @@ -1857,21 +1854,15 @@ static void igbvf_watchdog_task(struct work_struct *work)
&adapter->link_duplex);
igbvf_print_link_info(adapter);

/*
* tweak tx_queue_len according to speed/duplex
* and adjust the timeout factor
*/
netdev->tx_queue_len = adapter->tx_queue_len;
/* adjust timeout factor according to speed/duplex */
adapter->tx_timeout_factor = 1;
switch (adapter->link_speed) {
case SPEED_10:
txb2b = 0;
netdev->tx_queue_len = 10;
adapter->tx_timeout_factor = 16;
break;
case SPEED_100:
txb2b = 0;
netdev->tx_queue_len = 100;
/* maybe add some timeout factor ? */
break;
}
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,17 @@ enum ixgbe_ring_f_enum {
#define IXGBE_MAX_FDIR_INDICES 64
#ifdef IXGBE_FCOE
#define IXGBE_MAX_FCOE_INDICES 8
#define MAX_RX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
#define MAX_TX_QUEUES (IXGBE_MAX_FDIR_INDICES + IXGBE_MAX_FCOE_INDICES)
#else
#define MAX_RX_QUEUES IXGBE_MAX_FDIR_INDICES
#define MAX_TX_QUEUES IXGBE_MAX_FDIR_INDICES
#endif /* IXGBE_FCOE */
struct ixgbe_ring_feature {
int indices;
int mask;
} ____cacheline_internodealigned_in_smp;

#define MAX_RX_QUEUES 128
#define MAX_TX_QUEUES 128

#define MAX_RX_PACKET_BUFFERS ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) \
? 8 : 1)
Expand Down
21 changes: 21 additions & 0 deletions drivers/net/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -1853,6 +1853,26 @@ static void ixgbe_diag_test(struct net_device *netdev,
if (ixgbe_link_test(adapter, &data[4]))
eth_test->flags |= ETH_TEST_FL_FAILED;

if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) {
int i;
for (i = 0; i < adapter->num_vfs; i++) {
if (adapter->vfinfo[i].clear_to_send) {
netdev_warn(netdev, "%s",
"offline diagnostic is not "
"supported when VFs are "
"present\n");
data[0] = 1;
data[1] = 1;
data[2] = 1;
data[3] = 1;
eth_test->flags |= ETH_TEST_FL_FAILED;
clear_bit(__IXGBE_TESTING,
&adapter->state);
goto skip_ol_tests;
}
}
}

if (if_running)
/* indicate we're in test mode */
dev_close(netdev);
Expand Down Expand Up @@ -1908,6 +1928,7 @@ static void ixgbe_diag_test(struct net_device *netdev,

clear_bit(__IXGBE_TESTING, &adapter->state);
}
skip_ol_tests:
msleep_interruptible(4 * 1000);
}

Expand Down
Loading

0 comments on commit 6631424

Please sign in to comment.