Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150126
b: refs/heads/master
c: 0e41f71
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 6, 2009
1 parent fbfbb26 commit f873984
Show file tree
Hide file tree
Showing 63 changed files with 741 additions and 1,519 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22f6dacdfcfdc792d068e9c41234808860498d04
refs/heads/master: 0e41f715c04f85a40ae6531d660be2241717be1c
6 changes: 2 additions & 4 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@

#define DRV_MODULE_NAME "bnx2"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "2.0.1"
#define DRV_MODULE_RELDATE "May 6, 2009"
#define DRV_MODULE_VERSION "2.0.0"
#define DRV_MODULE_RELDATE "April 2, 2009"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-4.6.16.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-4.6.16.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-4.6.17.fw"
Expand Down Expand Up @@ -2600,7 +2600,6 @@ bnx2_get_hw_tx_cons(struct bnx2_napi *bnapi)
/* Tell compiler that status block fields can change. */
barrier();
cons = *bnapi->hw_tx_cons_ptr;
barrier();
if (unlikely((cons & MAX_TX_DESC_CNT) == MAX_TX_DESC_CNT))
cons++;
return cons;
Expand Down Expand Up @@ -2880,7 +2879,6 @@ bnx2_get_hw_rx_cons(struct bnx2_napi *bnapi)
/* Tell compiler that status block fields can change. */
barrier();
cons = *bnapi->hw_rx_cons_ptr;
barrier();
if (unlikely((cons & MAX_RX_DESC_CNT) == MAX_RX_DESC_CNT))
cons++;
return cons;
Expand Down
12 changes: 9 additions & 3 deletions trunk/drivers/net/bonding/bond_alb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1706,8 +1706,10 @@ void bond_alb_handle_active_change(struct bonding *bond, struct slave *new_slave
* Called with RTNL
*/
int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
__acquires(&bond->lock)
__releases(&bond->curr_slave_lock)
__releases(&bond->lock)
__acquires(&bond->lock)
__acquires(&bond->curr_slave_lock)
{
struct bonding *bond = netdev_priv(bond_dev);
struct sockaddr *sa = addr;
Expand Down Expand Up @@ -1743,22 +1745,26 @@ int bond_alb_set_mac_address(struct net_device *bond_dev, void *addr)
}
}

write_unlock_bh(&bond->curr_slave_lock);
read_unlock(&bond->lock);

if (swap_slave) {
alb_swap_mac_addr(bond, swap_slave, bond->curr_active_slave);
alb_fasten_mac_swap(bond, swap_slave, bond->curr_active_slave);
} else {
alb_set_slave_mac_addr(bond->curr_active_slave, bond_dev->dev_addr,
bond->alb_info.rlb_enabled);

read_lock(&bond->lock);
alb_send_learning_packets(bond->curr_active_slave, bond_dev->dev_addr);
if (bond->alb_info.rlb_enabled) {
/* inform clients mac address has changed */
rlb_req_update_slave_clients(bond, bond->curr_active_slave);
}
read_unlock(&bond->lock);
}

read_lock(&bond->lock);
write_lock_bh(&bond->curr_slave_lock);

return 0;
}

Expand Down
30 changes: 10 additions & 20 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3459,37 +3459,19 @@ static void bond_destroy_proc_dir(void)
bond_proc_dir = NULL;
}
}

#else /* !CONFIG_PROC_FS */

static int bond_create_proc_entry(struct bonding *bond)
{
}

static void bond_remove_proc_entry(struct bonding *bond)
{
}

static void bond_create_proc_dir(void)
{
}

static void bond_destroy_proc_dir(void)
{
}

#endif /* CONFIG_PROC_FS */


/*-------------------------- netdev event handling --------------------------*/

/*
* Change device name
*/
static int bond_event_changename(struct bonding *bond)
{
#ifdef CONFIG_PROC_FS
bond_remove_proc_entry(bond);
bond_create_proc_entry(bond);
#endif
down_write(&(bonding_rwsem));
bond_destroy_sysfs_entry(bond);
bond_create_sysfs_entry(bond);
Expand Down Expand Up @@ -4655,7 +4637,9 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
NETIF_F_HW_VLAN_RX |
NETIF_F_HW_VLAN_FILTER);

#ifdef CONFIG_PROC_FS
bond_create_proc_entry(bond);
#endif
list_add_tail(&bond->bond_list, &bond_dev_list);

return 0;
Expand Down Expand Up @@ -4693,7 +4677,9 @@ static void bond_deinit(struct net_device *bond_dev)

bond_work_cancel_all(bond);

#ifdef CONFIG_PROC_FS
bond_remove_proc_entry(bond);
#endif
}

/* Unregister and free all bond devices.
Expand All @@ -4712,7 +4698,9 @@ static void bond_free_all(void)
bond_destroy(bond);
}

#ifdef CONFIG_PROC_FS
bond_destroy_proc_dir();
#endif
}

/*------------------------- Module initialization ---------------------------*/
Expand Down Expand Up @@ -5208,7 +5196,9 @@ static int __init bonding_init(void)
goto out;
}

#ifdef CONFIG_PROC_FS
bond_create_proc_dir();
#endif

init_rwsem(&bonding_rwsem);

Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/net/e1000/e1000_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2646,8 +2646,6 @@ static void e1000_watchdog(unsigned long data)
* (Do the reset outside of interrupt context). */
adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task);
/* return immediately since reset is imminent */
return;
}
}

Expand Down Expand Up @@ -3741,7 +3739,7 @@ static irqreturn_t e1000_intr(int irq, void *data)
struct e1000_hw *hw = &adapter->hw;
u32 rctl, icr = er32(ICR);

if (unlikely((!icr) || test_bit(__E1000_DOWN, &adapter->flags)))
if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags)))
return IRQ_NONE; /* Not our interrupt */

/* IMS will not auto-mask if INT_ASSERTED is not set, and if it is
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -3651,8 +3651,6 @@ static void e1000_watchdog_task(struct work_struct *work)
*/
adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task);
/* return immediately since reset is imminent */
return;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/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_0101"
#define DRV_VERSION "EHEA_0100"

/* eHEA capability flags */
#define DLPAR_PORT_ADD_REM 1
Expand Down
31 changes: 13 additions & 18 deletions trunk/drivers/net/ehea/ehea_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,17 +545,14 @@ static inline struct sk_buff *get_skb_by_index(struct sk_buff **skb_array,
x &= (arr_len - 1);

pref = skb_array[x];
if (pref) {
prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);

pref = (skb_array[x]->data);
prefetch(pref);
prefetch(pref + EHEA_CACHE_LINE);
prefetch(pref + EHEA_CACHE_LINE * 2);
prefetch(pref + EHEA_CACHE_LINE * 3);
}

prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);

pref = (skb_array[x]->data);
prefetch(pref);
prefetch(pref + EHEA_CACHE_LINE);
prefetch(pref + EHEA_CACHE_LINE * 2);
prefetch(pref + EHEA_CACHE_LINE * 3);
skb = skb_array[skb_index];
skb_array[skb_index] = NULL;
return skb;
Expand All @@ -572,14 +569,12 @@ static inline struct sk_buff *get_skb_by_index_ll(struct sk_buff **skb_array,
x &= (arr_len - 1);

pref = skb_array[x];
if (pref) {
prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);
prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);

pref = (skb_array[x]->data);
prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);
}
pref = (skb_array[x]->data);
prefetchw(pref);
prefetchw(pref + EHEA_CACHE_LINE);

skb = skb_array[wqe_index];
skb_array[wqe_index] = NULL;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/igb/igb.h
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ struct igb_adapter {
u64 hw_csum_err;
u64 hw_csum_good;
u32 alloc_rx_buff_failed;
bool rx_csum;
u32 gorc;
u64 gorc_old;
u16 rx_ps_hdr_size;
Expand Down Expand Up @@ -285,7 +286,6 @@ struct igb_adapter {
#define IGB_FLAG_DCA_ENABLED (1 << 1)
#define IGB_FLAG_QUAD_PORT_A (1 << 2)
#define IGB_FLAG_NEED_CTX_IDX (1 << 3)
#define IGB_FLAG_RX_CSUM_DISABLED (1 << 4)

enum e1000_state_t {
__IGB_TESTING,
Expand Down
8 changes: 2 additions & 6 deletions trunk/drivers/net/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,17 +275,13 @@ static int igb_set_pauseparam(struct net_device *netdev,
static u32 igb_get_rx_csum(struct net_device *netdev)
{
struct igb_adapter *adapter = netdev_priv(netdev);
return !(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED);
return adapter->rx_csum;
}

static int igb_set_rx_csum(struct net_device *netdev, u32 data)
{
struct igb_adapter *adapter = netdev_priv(netdev);

if (data)
adapter->flags &= ~IGB_FLAG_RX_CSUM_DISABLED;
else
adapter->flags |= IGB_FLAG_RX_CSUM_DISABLED;
adapter->rx_csum = data;

return 0;
}
Expand Down
26 changes: 14 additions & 12 deletions trunk/drivers/net/igb/igb_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,8 @@ static int __devinit igb_probe(struct pci_dev *pdev,

igb_validate_mdi_setting(hw);

adapter->rx_csum = 1;

/* Initial Wake on LAN setting If APM wake is enabled in the EEPROM,
* enable the ACPI Magic Packet filter
*/
Expand Down Expand Up @@ -2010,7 +2012,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
struct e1000_hw *hw = &adapter->hw;
u32 rctl;
u32 srrctl = 0;
int i;
int i, j;

rctl = rd32(E1000_RCTL);

Expand Down Expand Up @@ -2075,23 +2077,25 @@ static void igb_setup_rctl(struct igb_adapter *adapter)
if (adapter->vfs_allocated_count) {
u32 vmolr;

j = adapter->rx_ring[0].reg_idx;

/* set all queue drop enable bits */
wr32(E1000_QDE, ALL_QUEUES);
srrctl |= E1000_SRRCTL_DROP_EN;

/* disable queue 0 to prevent tail write w/o re-config */
wr32(E1000_RXDCTL(0), 0);

vmolr = rd32(E1000_VMOLR(adapter->vfs_allocated_count));
vmolr = rd32(E1000_VMOLR(j));
if (rctl & E1000_RCTL_LPE)
vmolr |= E1000_VMOLR_LPE;
if (adapter->num_rx_queues > 1)
if (adapter->num_rx_queues > 0)
vmolr |= E1000_VMOLR_RSSE;
wr32(E1000_VMOLR(adapter->vfs_allocated_count), vmolr);
wr32(E1000_VMOLR(j), vmolr);
}

for (i = 0; i < adapter->num_rx_queues; i++) {
int j = adapter->rx_ring[i].reg_idx;
j = adapter->rx_ring[i].reg_idx;
wr32(E1000_SRRCTL(j), srrctl);
}

Expand Down Expand Up @@ -2245,12 +2249,13 @@ static void igb_configure_rx(struct igb_adapter *adapter)
rxcsum = rd32(E1000_RXCSUM);
/* Disable raw packet checksumming */
rxcsum |= E1000_RXCSUM_PCSD;

if (adapter->hw.mac.type == e1000_82576)
/* Don't need to set TUOFL or IPOFL, they default to 1 */
if (!adapter->rx_csum)
rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPOFL);
else if (adapter->hw.mac.type == e1000_82576)
/* Enable Receive Checksum Offload for SCTP */
rxcsum |= E1000_RXCSUM_CRCOFL;

/* Don't need to set TUOFL or IPOFL, they default to 1 */
wr32(E1000_RXCSUM, rxcsum);

/* Set the default pool for the PF's first queue */
Expand Down Expand Up @@ -2709,8 +2714,6 @@ static void igb_watchdog_task(struct work_struct *work)
* (Do the reset outside of interrupt context). */
adapter->tx_timeout_count++;
schedule_work(&adapter->reset_task);
/* return immediately since reset is imminent */
return;
}
}

Expand Down Expand Up @@ -4452,8 +4455,7 @@ static inline void igb_rx_checksum_adv(struct igb_adapter *adapter,
skb->ip_summed = CHECKSUM_NONE;

/* Ignore Checksum bit is set or checksum is disabled through ethtool */
if ((status_err & E1000_RXD_STAT_IXSM) ||
(adapter->flags & IGB_FLAG_RX_CSUM_DISABLED))
if ((status_err & E1000_RXD_STAT_IXSM) || !adapter->rx_csum)
return;
/* TCP/UDP checksum error bit is set */
if (status_err &
Expand Down
Loading

0 comments on commit f873984

Please sign in to comment.