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: (37 commits)
  net: deinit automatic LIST_HEAD
  net: dont leave active on stack LIST_HEAD
  net: provide default_advmss() methods to blackhole dst_ops
  tg3: Restrict phy ioctl access
  drivers/net: Call netif_carrier_off at the end of the probe
  ixgbe: work around for DDP last buffer size
  ixgbe: fix panic due to uninitialised pointer
  e1000e: flush all writebacks before unload
  e1000e: check down flag in tasks
  isdn: hisax: Use l2headersize() instead of dup (and buggy) func.
  arp_notify: unconditionally send gratuitous ARP for NETDEV_NOTIFY_PEERS.
  cxgb4vf: Use defined Mailbox Timeout
  cxgb4vf: Quiesce Virtual Interfaces on shutdown ...
  cxgb4vf: Behave properly when CONFIG_DEBUG_FS isn't defined ...
  cxgb4vf: Check driver parameters in the right place ...
  pch_gbe: Fix the MAC Address load issue.
  iwlwifi: Delete iwl3945_good_plcp_health.
  net/can/softing: make CAN_SOFTING_CS depend on CAN_SOFTING
  netfilter: nf_iterate: fix incorrect RCU usage
  pch_gbe: Fix the issue that the receiving data is not normal.
  ...
  • Loading branch information
Linus Torvalds committed Feb 18, 2011
2 parents a5bbef0 + ceaaec9 commit 4c3021d
Show file tree
Hide file tree
Showing 34 changed files with 327 additions and 201 deletions.
2 changes: 2 additions & 0 deletions Documentation/networking/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ obj- := dummy.o
# List of programs to build
hostprogs-y := ifenslave

HOSTCFLAGS_ifenslave.o += -I$(objtree)/usr/include

# Tell kbuild to always build the programs
always := $(hostprogs-y)

Expand Down
5 changes: 3 additions & 2 deletions drivers/atm/solos-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,9 @@ static int popen(struct atm_vcc *vcc)
}

skb = alloc_skb(sizeof(*header), GFP_ATOMIC);
if (!skb && net_ratelimit()) {
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in popen()\n");
if (!skb) {
if (net_ratelimit())
dev_warn(&card->dev->dev, "Failed to allocate sk_buff in popen()\n");
return -ENOMEM;
}
header = (void *)skb_put(skb, sizeof(*header));
Expand Down
2 changes: 2 additions & 0 deletions drivers/bluetooth/ath3k.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ static struct usb_device_id ath3k_table[] = {
/* Atheros AR3011 with sflash firmware*/
{ USB_DEVICE(0x0CF3, 0x3002) },

/* Atheros AR9285 Malbec with sflash firmware */
{ USB_DEVICE(0x03F0, 0x311D) },
{ } /* Terminating entry */
};

Expand Down
3 changes: 3 additions & 0 deletions drivers/bluetooth/btusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ static struct usb_device_id blacklist_table[] = {
/* Atheros 3011 with sflash firmware */
{ USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },

/* Atheros AR9285 Malbec with sflash firmware */
{ USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },

/* Broadcom BCM2035 */
{ USB_DEVICE(0x0a5c, 0x2035), .driver_info = BTUSB_WRONG_SCO_MTU },
{ USB_DEVICE(0x0a5c, 0x200a), .driver_info = BTUSB_WRONG_SCO_MTU },
Expand Down
28 changes: 13 additions & 15 deletions drivers/isdn/hisax/isdnl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1247,10 +1247,10 @@ static void
l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
{
struct PStack *st = fi->userdata;
struct sk_buff *skb, *oskb;
struct sk_buff *skb;
struct Layer2 *l2 = &st->l2;
u_char header[MAX_HEADER_LEN];
int i;
int i, hdr_space_needed;
int unsigned p1;
u_long flags;

Expand All @@ -1261,6 +1261,16 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
if (!skb)
return;

hdr_space_needed = l2headersize(l2, 0);
if (hdr_space_needed > skb_headroom(skb)) {
struct sk_buff *orig_skb = skb;

skb = skb_realloc_headroom(skb, hdr_space_needed);
if (!skb) {
dev_kfree_skb(orig_skb);
return;
}
}
spin_lock_irqsave(&l2->lock, flags);
if(test_bit(FLG_MOD128, &l2->flag))
p1 = (l2->vs - l2->va) % 128;
Expand All @@ -1285,19 +1295,7 @@ l2_pull_iqueue(struct FsmInst *fi, int event, void *arg)
l2->vs = (l2->vs + 1) % 8;
}
spin_unlock_irqrestore(&l2->lock, flags);
p1 = skb->data - skb->head;
if (p1 >= i)
memcpy(skb_push(skb, i), header, i);
else {
printk(KERN_WARNING
"isdl2 pull_iqueue skb header(%d/%d) too short\n", i, p1);
oskb = skb;
skb = alloc_skb(oskb->len + i, GFP_ATOMIC);
memcpy(skb_put(skb, i), header, i);
skb_copy_from_linear_data(oskb,
skb_put(skb, oskb->len), oskb->len);
dev_kfree_skb(oskb);
}
memcpy(skb_push(skb, i), header, i);
st->l2.l2l1(st, PH_PULL | INDICATION, skb);
test_and_clear_bit(FLG_ACK_PEND, &st->l2.flag);
if (!test_and_set_bit(FLG_T200_RUN, &st->l2.flag)) {
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/softing/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ config CAN_SOFTING
config CAN_SOFTING_CS
tristate "Softing Gmbh CAN pcmcia cards"
depends on PCMCIA
select CAN_SOFTING
depends on CAN_SOFTING
---help---
Support for PCMCIA cards from Softing Gmbh & some cards
from Vector Gmbh.
Expand Down
80 changes: 60 additions & 20 deletions drivers/net/cxgb4vf/cxgb4vf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2040,7 +2040,7 @@ static int __devinit setup_debugfs(struct adapter *adapter)
{
int i;

BUG_ON(adapter->debugfs_root == NULL);
BUG_ON(IS_ERR_OR_NULL(adapter->debugfs_root));

/*
* Debugfs support is best effort.
Expand All @@ -2061,7 +2061,7 @@ static int __devinit setup_debugfs(struct adapter *adapter)
*/
static void cleanup_debugfs(struct adapter *adapter)
{
BUG_ON(adapter->debugfs_root == NULL);
BUG_ON(IS_ERR_OR_NULL(adapter->debugfs_root));

/*
* Unlike our sister routine cleanup_proc(), we don't need to remove
Expand Down Expand Up @@ -2488,17 +2488,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
struct port_info *pi;
struct net_device *netdev;

/*
* Vet our module parameters.
*/
if (msi != MSI_MSIX && msi != MSI_MSI) {
dev_err(&pdev->dev, "bad module parameter msi=%d; must be %d"
" (MSI-X or MSI) or %d (MSI)\n", msi, MSI_MSIX,
MSI_MSI);
err = -EINVAL;
goto err_out;
}

/*
* Print our driver banner the first time we're called to initialize a
* device.
Expand Down Expand Up @@ -2711,11 +2700,11 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
/*
* Set up our debugfs entries.
*/
if (cxgb4vf_debugfs_root) {
if (!IS_ERR_OR_NULL(cxgb4vf_debugfs_root)) {
adapter->debugfs_root =
debugfs_create_dir(pci_name(pdev),
cxgb4vf_debugfs_root);
if (adapter->debugfs_root == NULL)
if (IS_ERR_OR_NULL(adapter->debugfs_root))
dev_warn(&pdev->dev, "could not create debugfs"
" directory");
else
Expand Down Expand Up @@ -2770,7 +2759,7 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
*/

err_free_debugfs:
if (adapter->debugfs_root) {
if (!IS_ERR_OR_NULL(adapter->debugfs_root)) {
cleanup_debugfs(adapter);
debugfs_remove_recursive(adapter->debugfs_root);
}
Expand Down Expand Up @@ -2802,7 +2791,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
err_disable_device:
pci_disable_device(pdev);

err_out:
return err;
}

Expand Down Expand Up @@ -2840,7 +2828,7 @@ static void __devexit cxgb4vf_pci_remove(struct pci_dev *pdev)
/*
* Tear down our debugfs entries.
*/
if (adapter->debugfs_root) {
if (!IS_ERR_OR_NULL(adapter->debugfs_root)) {
cleanup_debugfs(adapter);
debugfs_remove_recursive(adapter->debugfs_root);
}
Expand Down Expand Up @@ -2873,6 +2861,46 @@ static void __devexit cxgb4vf_pci_remove(struct pci_dev *pdev)
pci_release_regions(pdev);
}

/*
* "Shutdown" quiesce the device, stopping Ingress Packet and Interrupt
* delivery.
*/
static void __devexit cxgb4vf_pci_shutdown(struct pci_dev *pdev)
{
struct adapter *adapter;
int pidx;

adapter = pci_get_drvdata(pdev);
if (!adapter)
return;

/*
* Disable all Virtual Interfaces. This will shut down the
* delivery of all ingress packets into the chip for these
* Virtual Interfaces.
*/
for_each_port(adapter, pidx) {
struct net_device *netdev;
struct port_info *pi;

if (!test_bit(pidx, &adapter->registered_device_map))
continue;

netdev = adapter->port[pidx];
if (!netdev)
continue;

pi = netdev_priv(netdev);
t4vf_enable_vi(adapter, pi->viid, false, false);
}

/*
* Free up all Queues which will prevent further DMA and
* Interrupts allowing various internal pathways to drain.
*/
t4vf_free_sge_resources(adapter);
}

/*
* PCI Device registration data structures.
*/
Expand Down Expand Up @@ -2906,6 +2934,7 @@ static struct pci_driver cxgb4vf_driver = {
.id_table = cxgb4vf_pci_tbl,
.probe = cxgb4vf_pci_probe,
.remove = __devexit_p(cxgb4vf_pci_remove),
.shutdown = __devexit_p(cxgb4vf_pci_shutdown),
};

/*
Expand All @@ -2915,14 +2944,25 @@ static int __init cxgb4vf_module_init(void)
{
int ret;

/*
* Vet our module parameters.
*/
if (msi != MSI_MSIX && msi != MSI_MSI) {
printk(KERN_WARNING KBUILD_MODNAME
": bad module parameter msi=%d; must be %d"
" (MSI-X or MSI) or %d (MSI)\n",
msi, MSI_MSIX, MSI_MSI);
return -EINVAL;
}

/* Debugfs support is optional, just warn if this fails */
cxgb4vf_debugfs_root = debugfs_create_dir(KBUILD_MODNAME, NULL);
if (!cxgb4vf_debugfs_root)
if (IS_ERR_OR_NULL(cxgb4vf_debugfs_root))
printk(KERN_WARNING KBUILD_MODNAME ": could not create"
" debugfs entry, continuing\n");

ret = pci_register_driver(&cxgb4vf_driver);
if (ret < 0)
if (ret < 0 && !IS_ERR_OR_NULL(cxgb4vf_debugfs_root))
debugfs_remove(cxgb4vf_debugfs_root);
return ret;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/cxgb4vf/t4vf_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ int t4vf_wr_mbox_core(struct adapter *adapter, const void *cmd, int size,
delay_idx = 0;
ms = delay[0];

for (i = 0; i < 500; i += ms) {
for (i = 0; i < FW_CMD_MAX_TIMEOUT; i += ms) {
if (sleep_ok) {
ms = delay[delay_idx];
if (delay_idx < ARRAY_SIZE(delay) - 1)
Expand Down
52 changes: 42 additions & 10 deletions drivers/net/e1000e/netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,9 @@ static void e1000_print_hw_hang(struct work_struct *work)
u16 phy_status, phy_1000t_status, phy_ext_status;
u16 pci_status;

if (test_bit(__E1000_DOWN, &adapter->state))
return;

e1e_rphy(hw, PHY_STATUS, &phy_status);
e1e_rphy(hw, PHY_1000T_STATUS, &phy_1000t_status);
e1e_rphy(hw, PHY_EXT_STATUS, &phy_ext_status);
Expand Down Expand Up @@ -1506,6 +1509,9 @@ static void e1000e_downshift_workaround(struct work_struct *work)
struct e1000_adapter *adapter = container_of(work,
struct e1000_adapter, downshift_task);

if (test_bit(__E1000_DOWN, &adapter->state))
return;

e1000e_gig_downshift_workaround_ich8lan(&adapter->hw);
}

Expand Down Expand Up @@ -3338,6 +3344,21 @@ int e1000e_up(struct e1000_adapter *adapter)
return 0;
}

static void e1000e_flush_descriptors(struct e1000_adapter *adapter)
{
struct e1000_hw *hw = &adapter->hw;

if (!(adapter->flags2 & FLAG2_DMA_BURST))
return;

/* flush pending descriptor writebacks to memory */
ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);

/* execute the writes immediately */
e1e_flush();
}

void e1000e_down(struct e1000_adapter *adapter)
{
struct net_device *netdev = adapter->netdev;
Expand Down Expand Up @@ -3377,6 +3398,9 @@ void e1000e_down(struct e1000_adapter *adapter)

if (!pci_channel_offline(adapter->pdev))
e1000e_reset(adapter);

e1000e_flush_descriptors(adapter);

e1000_clean_tx_ring(adapter);
e1000_clean_rx_ring(adapter);

Expand Down Expand Up @@ -3765,6 +3789,10 @@ static void e1000e_update_phy_task(struct work_struct *work)
{
struct e1000_adapter *adapter = container_of(work,
struct e1000_adapter, update_phy_task);

if (test_bit(__E1000_DOWN, &adapter->state))
return;

e1000_get_phy_info(&adapter->hw);
}

Expand All @@ -3775,6 +3803,10 @@ static void e1000e_update_phy_task(struct work_struct *work)
static void e1000_update_phy_info(unsigned long data)
{
struct e1000_adapter *adapter = (struct e1000_adapter *) data;

if (test_bit(__E1000_DOWN, &adapter->state))
return;

schedule_work(&adapter->update_phy_task);
}

Expand Down Expand Up @@ -4149,6 +4181,9 @@ static void e1000_watchdog_task(struct work_struct *work)
u32 link, tctl;
int tx_pending = 0;

if (test_bit(__E1000_DOWN, &adapter->state))
return;

link = e1000e_has_link(adapter);
if ((netif_carrier_ok(netdev)) && link) {
/* Cancel scheduled suspend requests. */
Expand Down Expand Up @@ -4337,19 +4372,12 @@ static void e1000_watchdog_task(struct work_struct *work)
else
ew32(ICS, E1000_ICS_RXDMT0);

/* flush pending descriptors to memory before detecting Tx hang */
e1000e_flush_descriptors(adapter);

/* Force detection of hung controller every watchdog period */
adapter->detect_tx_hung = 1;

/* flush partial descriptors to memory before detecting Tx hang */
if (adapter->flags2 & FLAG2_DMA_BURST) {
ew32(TIDV, adapter->tx_int_delay | E1000_TIDV_FPD);
ew32(RDTR, adapter->rx_int_delay | E1000_RDTR_FPD);
/*
* no need to flush the writes because the timeout code does
* an er32 first thing
*/
}

/*
* With 82571 controllers, LAA may be overwritten due to controller
* reset from the other port. Set the appropriate LAA in RAR[0]
Expand Down Expand Up @@ -4887,6 +4915,10 @@ static void e1000_reset_task(struct work_struct *work)
struct e1000_adapter *adapter;
adapter = container_of(work, struct e1000_adapter, reset_task);

/* don't run the task if already down */
if (test_bit(__E1000_DOWN, &adapter->state))
return;

if (!((adapter->flags & FLAG_RX_NEEDS_RESTART) &&
(adapter->flags & FLAG_RX_RESTART_NOW))) {
e1000e_dump(adapter);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -5645,6 +5645,8 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
goto out_error;
}

netif_carrier_off(dev);

dev_info(&pci_dev->dev, "ifname %s, PHY OUI 0x%x @ %d, addr %pM\n",
dev->name, np->phy_oui, np->phyaddr, dev->dev_addr);

Expand Down
Loading

0 comments on commit 4c3021d

Please sign in to comment.