Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194649
b: refs/heads/master
c: f546061
h: refs/heads/master
i:
  194647: 2d3a80f
v: v3
  • Loading branch information
David S. Miller committed May 3, 2010
1 parent 6fe5d9e commit ef670a9
Show file tree
Hide file tree
Showing 62 changed files with 1,663 additions and 342 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: 0e3aef8d09a8c11e3fb83cdcb24b5bc7421b3726
refs/heads/master: f5460618405eec8c3300947a499011528a115acd
48 changes: 27 additions & 21 deletions trunk/drivers/net/bnx2.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@
#include "bnx2_fw.h"

#define DRV_MODULE_NAME "bnx2"
#define DRV_MODULE_VERSION "2.0.8"
#define DRV_MODULE_RELDATE "Feb 15, 2010"
#define DRV_MODULE_VERSION "2.0.9"
#define DRV_MODULE_RELDATE "April 27, 2010"
#define FW_MIPS_FILE_06 "bnx2/bnx2-mips-06-5.0.0.j6.fw"
#define FW_RV2P_FILE_06 "bnx2/bnx2-rv2p-06-5.0.0.j3.fw"
#define FW_MIPS_FILE_09 "bnx2/bnx2-mips-09-5.0.0.j9.fw"
Expand Down Expand Up @@ -651,9 +651,10 @@ bnx2_napi_enable(struct bnx2 *bp)
}

static void
bnx2_netif_stop(struct bnx2 *bp)
bnx2_netif_stop(struct bnx2 *bp, bool stop_cnic)
{
bnx2_cnic_stop(bp);
if (stop_cnic)
bnx2_cnic_stop(bp);
if (netif_running(bp->dev)) {
int i;

Expand All @@ -671,14 +672,15 @@ bnx2_netif_stop(struct bnx2 *bp)
}

static void
bnx2_netif_start(struct bnx2 *bp)
bnx2_netif_start(struct bnx2 *bp, bool start_cnic)
{
if (atomic_dec_and_test(&bp->intr_sem)) {
if (netif_running(bp->dev)) {
netif_tx_wake_all_queues(bp->dev);
bnx2_napi_enable(bp);
bnx2_enable_int(bp);
bnx2_cnic_start(bp);
if (start_cnic)
bnx2_cnic_start(bp);
}
}
}
Expand Down Expand Up @@ -4758,8 +4760,12 @@ bnx2_reset_chip(struct bnx2 *bp, u32 reset_code)
rc = bnx2_alloc_bad_rbuf(bp);
}

if (bp->flags & BNX2_FLAG_USING_MSIX)
if (bp->flags & BNX2_FLAG_USING_MSIX) {
bnx2_setup_msix_tbl(bp);
/* Prevent MSIX table reads and write from timing out */
REG_WR(bp, BNX2_MISC_ECO_HW_CTL,
BNX2_MISC_ECO_HW_CTL_LARGE_GRC_TMOUT_EN);
}

return rc;
}
Expand Down Expand Up @@ -6272,12 +6278,12 @@ bnx2_reset_task(struct work_struct *work)
return;
}

bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);

bnx2_init_nic(bp, 1);

atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);
rtnl_unlock();
}

Expand Down Expand Up @@ -6319,7 +6325,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
struct bnx2 *bp = netdev_priv(dev);

if (netif_running(dev))
bnx2_netif_stop(bp);
bnx2_netif_stop(bp, false);

bp->vlgrp = vlgrp;

Expand All @@ -6330,7 +6336,7 @@ bnx2_vlan_rx_register(struct net_device *dev, struct vlan_group *vlgrp)
if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN)
bnx2_fw_sync(bp, BNX2_DRV_MSG_CODE_KEEP_VLAN_UPDATE, 0, 1);

bnx2_netif_start(bp);
bnx2_netif_start(bp, false);
}
#endif

Expand Down Expand Up @@ -7050,9 +7056,9 @@ bnx2_set_coalesce(struct net_device *dev, struct ethtool_coalesce *coal)
bp->stats_ticks &= BNX2_HC_STATS_TICKS_HC_STAT_TICKS;

if (netif_running(bp->dev)) {
bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);
bnx2_init_nic(bp, 0);
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);
}

return 0;
Expand Down Expand Up @@ -7082,7 +7088,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx)
/* Reset will erase chipset stats; save them */
bnx2_save_stats(bp);

bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);
bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_RESET);
bnx2_free_skbs(bp);
bnx2_free_mem(bp);
Expand Down Expand Up @@ -7110,7 +7116,7 @@ bnx2_change_ring_size(struct bnx2 *bp, u32 rx, u32 tx)
bnx2_setup_cnic_irq_info(bp);
mutex_unlock(&bp->cnic_lock);
#endif
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);
}
return 0;
}
Expand Down Expand Up @@ -7363,7 +7369,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
if (etest->flags & ETH_TEST_FL_OFFLINE) {
int i;

bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);
bnx2_reset_chip(bp, BNX2_DRV_MSG_CODE_DIAG);
bnx2_free_skbs(bp);

Expand All @@ -7382,7 +7388,7 @@ bnx2_self_test(struct net_device *dev, struct ethtool_test *etest, u64 *buf)
bnx2_shutdown_chip(bp);
else {
bnx2_init_nic(bp, 1);
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);
}

/* wait for link up */
Expand Down Expand Up @@ -8376,7 +8382,7 @@ bnx2_suspend(struct pci_dev *pdev, pm_message_t state)
return 0;

flush_scheduled_work();
bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);
netif_device_detach(dev);
del_timer_sync(&bp->timer);
bnx2_shutdown_chip(bp);
Expand All @@ -8398,7 +8404,7 @@ bnx2_resume(struct pci_dev *pdev)
bnx2_set_power_state(bp, PCI_D0);
netif_device_attach(dev);
bnx2_init_nic(bp, 1);
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);
return 0;
}

Expand All @@ -8425,7 +8431,7 @@ static pci_ers_result_t bnx2_io_error_detected(struct pci_dev *pdev,
}

if (netif_running(dev)) {
bnx2_netif_stop(bp);
bnx2_netif_stop(bp, true);
del_timer_sync(&bp->timer);
bnx2_reset_nic(bp, BNX2_DRV_MSG_CODE_RESET);
}
Expand Down Expand Up @@ -8482,7 +8488,7 @@ static void bnx2_io_resume(struct pci_dev *pdev)

rtnl_lock();
if (netif_running(dev))
bnx2_netif_start(bp);
bnx2_netif_start(bp, true);

netif_device_attach(dev);
rtnl_unlock();
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -5020,6 +5020,9 @@ static void __e1000e_disable_aspm(struct pci_dev *pdev, u16 state)
reg16 &= ~state;
pci_write_config_word(pdev, pos + PCI_EXP_LNKCTL, reg16);

if (!pdev->bus->self)
return;

pos = pci_pcie_cap(pdev->bus->self);
pci_read_config_word(pdev->bus->self, pos + PCI_EXP_LNKCTL, &reg16);
reg16 &= ~state;
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1567,9 +1567,9 @@ static void gfar_halt_nodisable(struct net_device *dev)
tempval |= (DMACTRL_GRS | DMACTRL_GTS);
gfar_write(&regs->dmactrl, tempval);

while (!(gfar_read(&regs->ievent) &
(IEVENT_GRSC | IEVENT_GTSC)))
cpu_relax();
spin_event_timeout(((gfar_read(&regs->ievent) &
(IEVENT_GRSC | IEVENT_GTSC)) ==
(IEVENT_GRSC | IEVENT_GTSC)), -1, 0);
}
}

Expand Down
4 changes: 0 additions & 4 deletions trunk/drivers/net/ixgbe/ixgbe.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@
#define MAX_EMULATION_MAC_ADDRS 16
#define VMDQ_P(p) ((p) + adapter->num_vfs)

#define IXGBE_SUBDEV_ID_82598AF_MEZZ 0x0049
#define IXGBE_SUBDEV_ID_82598AF_MENLO_Q_MEZZ 0x004a
#define IXGBE_SUBDEV_ID_82598AF_MENLO_E_MEZZ 0x004b

struct vf_data_storage {
unsigned char vf_mac_addresses[ETH_ALEN];
u16 vf_mc_hashes[IXGBE_MAX_VF_MC_ENTRIES];
Expand Down
17 changes: 1 addition & 16 deletions trunk/drivers/net/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4314,9 +4314,6 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
int err = 0;
int vector, v_budget;

if (!(adapter->flags & IXGBE_FLAG_MSIX_CAPABLE))
goto try_msi;

/*
* It's easy to be greedy for MSI-X vectors, but it really
* doesn't do us much good if we have a lot more vectors
Expand Down Expand Up @@ -4348,7 +4345,7 @@ static int ixgbe_set_interrupt_capability(struct ixgbe_adapter *adapter)
if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED)
goto out;
}
try_msi:

adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
Expand Down Expand Up @@ -4629,18 +4626,6 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
adapter->ring_feature[RING_F_RSS].indices = rss;
adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
adapter->ring_feature[RING_F_DCB].indices = IXGBE_MAX_DCB_INDICES;
adapter->flags |= IXGBE_FLAG_MSIX_CAPABLE;
if (adapter->hw.device_id == IXGBE_DEV_ID_82598AF_DUAL_PORT) {
switch (adapter->hw.subsystem_device_id) {
case IXGBE_SUBDEV_ID_82598AF_MEZZ:
case IXGBE_SUBDEV_ID_82598AF_MENLO_Q_MEZZ:
case IXGBE_SUBDEV_ID_82598AF_MENLO_E_MEZZ:
adapter->flags &= ~IXGBE_FLAG_MSIX_CAPABLE;
break;
default:
break;
}
}
if (hw->mac.type == ixgbe_mac_82598EB) {
if (hw->device_id == IXGBE_DEV_ID_82598AT)
adapter->flags |= IXGBE_FLAG_FAN_FAIL_CAPABLE;
Expand Down
13 changes: 9 additions & 4 deletions trunk/drivers/net/macvtap.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
struct macvtap_queue {
struct sock sk;
struct socket sock;
struct socket_wq wq;
struct macvlan_dev *vlan;
struct file *file;
unsigned int flags;
Expand Down Expand Up @@ -242,12 +243,15 @@ static struct rtnl_link_ops macvtap_link_ops __read_mostly = {

static void macvtap_sock_write_space(struct sock *sk)
{
wait_queue_head_t *wqueue;

if (!sock_writeable(sk) ||
!test_and_clear_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags))
return;

if (sk_sleep(sk) && waitqueue_active(sk_sleep(sk)))
wake_up_interruptible_poll(sk_sleep(sk), POLLOUT | POLLWRNORM | POLLWRBAND);
wqueue = sk_sleep(sk);
if (wqueue && waitqueue_active(wqueue))
wake_up_interruptible_poll(wqueue, POLLOUT | POLLWRNORM | POLLWRBAND);
}

static int macvtap_open(struct inode *inode, struct file *file)
Expand All @@ -272,7 +276,8 @@ static int macvtap_open(struct inode *inode, struct file *file)
if (!q)
goto out;

init_waitqueue_head(&q->sock.wait);
q->sock.wq = &q->wq;
init_waitqueue_head(&q->wq.wait);
q->sock.type = SOCK_RAW;
q->sock.state = SS_CONNECTED;
q->sock.file = file;
Expand Down Expand Up @@ -308,7 +313,7 @@ static unsigned int macvtap_poll(struct file *file, poll_table * wait)
goto out;

mask = 0;
poll_wait(file, &q->sock.wait, wait);
poll_wait(file, &q->wq.wait, wait);

if (!skb_queue_empty(&q->sk.sk_receive_queue))
mask |= POLLIN | POLLRDNORM;
Expand Down
Loading

0 comments on commit ef670a9

Please sign in to comment.