net driver fixes
Subsystems (3)
PATCH 1/1 net driver fixes
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
to receive the following updates:
drivers/net/8139cp.c | 7 +- drivers/net/myri10ge/myri10ge.c | 23 ++++- drivers/net/sis190.c | 2 +- drivers/net/ucc_geth.c | 12 ++- drivers/net/ucc_geth_phy.c | 134 +++++++++++++-------------- drivers/net/wireless/bcm43xx/bcm43xx_main.c | 11 ++- 6 files changed, 103 insertions(+), 86 deletions(-)
Brice Goglin (3):
myri10ge: make wc_fifo usage load-time tunable
myri10ge: check that we can get an irq
myri10ge: update driver version to 1.2.0
Chris Lalancette (1):
8139cp: Don't blindly enable interrupts
Francois Romieu (1):
sis190: failure to set the MAC address from EEPROM
Larry Finger (1):
bcm43xx: Fix failure to deliver PCI-E interrupts
Timur Tabi (2):
Update ucc_geth.c for new workqueue structure Fix phy_read/write redefinition errors in ucc_geth_phy.c
drivers/net/8139cp.c +4 -3
@@ -765,17 +765,18 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)struct cp_private *cp =netdev_priv (dev);unsigned entry;u32 eor, flags; +unsigned long intr_flags;#if CP_VLAN_TAG_USED u32 vlan_tag =0 ;#endif int mss =0 ; -spin_lock_irq (&cp->lock); +spin_lock_irqsave (&cp->lock, intr_flags);/* This is a hard error, log it. */ if (TX_BUFFS_AVAIL (cp) <= (skb_shinfo (skb)->nr_frags +1 )) {netif_stop_queue (dev); -spin_unlock_irq (&cp->lock); +spin_unlock_irqrestore (&cp->lock, intr_flags); printk(KERN_ERR PFX "%s: BUG! Tx Ring full when queue awake!\n", dev->name);return 1 ;
@@ -908,7 +909,7 @@ static int cp_start_xmit (struct sk_buff *skb, struct net_device *dev)if (TX_BUFFS_AVAIL (cp) <= (MAX_SKB_FRAGS +1 ))netif_stop_queue (dev); -spin_unlock_irq (&cp->lock); +spin_unlock_irqrestore (&cp->lock, intr_flags);cpw8 (TxPoll, NormalTxPoll); dev->trans_start = jiffies;
drivers/net/myri10ge/myri10ge.c +18 -5
@@ -71,7 +71,7 @@#include "myri10ge_mcp.h" #include "myri10ge_mcp_gen_header.h" -#define MYRI10GE_VERSION_STR "1.1.0" +#define MYRI10GE_VERSION_STR "1.2.0"MODULE_DESCRIPTION ("Myricom 10G driver (10GbE)" );MODULE_AUTHOR ("Maintainer: [email protected]" );
@@ -274,6 +274,10 @@ static int myri10ge_fill_thresh = 256;module_param (myri10ge_fill_thresh, int,S_IRUGO |S_IWUSR );MODULE_PARM_DESC (myri10ge_fill_thresh,"Number of empty rx slots allowed\n" ); +static int myri10ge_wcfifo =1 ; +module_param (myri10ge_wcfifo, int,S_IRUGO ); +MODULE_PARM_DESC (myri10ge_wcfifo,"Enable WC Fifo when WC is enabled\n" ); +#define MYRI10GE_FW_OFFSET 1024*1024#define MYRI10GE_HIGHPART_TO_U32 (X ) \ (sizeof (X) == 8) ? ((u32)((u64)(X) >> 32)) : (0)
@@ -1714,7 +1718,7 @@ static int myri10ge_open(struct net_device *dev) goto abort_with_irq; } -if (mgp->mtrr >=0 ) { +if (myri10ge_wcfifo && mgp->mtrr >=0 ) { mgp->tx.wc_fifo = (u8 __iomem *) mgp->sram +MXGEFW_ETH_SEND_4 ; mgp->rx_small.wc_fifo = (u8 __iomem *) mgp->sram +MXGEFW_ETH_RECV_SMALL ;
@@ -2878,7 +2882,6 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->hard_start_xmit = myri10ge_xmit; netdev->get_stats = myri10ge_get_stats; netdev->base_addr = mgp->iomem_base; - netdev->irq = pdev->irq; netdev->change_mtu = myri10ge_change_mtu; netdev->set_multicast_list = myri10ge_set_multicast_list; netdev->set_mac_address = myri10ge_set_mac_address;
@@ -2888,6 +2891,15 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent) netdev->poll = myri10ge_poll; netdev->weight = myri10ge_napi_weight; +/* make sure we can get an irq, and that MSI can be +* setup (if available). Also ensure netdev->irq +* is set to correct value if MSI is enabled */ + status =myri10ge_request_irq (mgp); +if (status !=0 ) + goto abort_with_firmware; + netdev->irq = pdev->irq; +myri10ge_free_irq (mgp); +/* Save configuration space to be restored if the * nic resets due to a parity error */ pci_save_state (pdev);
@@ -2903,8 +2915,9 @@ static int myri10ge_probe(struct pci_dev *pdev, const struct pci_device_id *ent)dev_err (&pdev->dev,"register_netdev failed: %d\n" , status); goto abort_with_state; } -dev_info (dev,"%d, tx bndry %d, fw %s, WC %s\n" , - pdev->irq, mgp->tx.boundary, mgp->fw_name, +dev_info (dev,"%s IRQ %d, tx bndry %d, fw %s, WC %s\n" , + (mgp->msi_enabled ?"MSI" :"xPIC" ), + netdev->irq, mgp->tx.boundary, mgp->fw_name, (mgp->mtrr >=0 ?"Enabled" :"Disabled" ));return 0 ;
drivers/net/sis190.c +1 -1
@@ -1562,7 +1562,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,for (i =0 ; i <MAC_ADDR_LEN /2 ; i++) {__le16 w =sis190_read_eeprom (ioaddr, EEPROMMACAddr + i); - ((u16 *)dev->dev_addr)[0 ] =le16_to_cpu (w); + ((u16 *)dev->dev_addr)[i] =le16_to_cpu (w); }sis190_set_rgmii (tp,sis190_read_eeprom (ioaddr, EEPROMInfo));
drivers/net/ucc_geth.c +7 -5
@@ -29,6 +29,7 @@#include <linux/fsl_devices.h> #include <linux/ethtool.h> #include <linux/mii.h> +#include <linux/workqueue.h> #include <asm/of_platform.h> #include <asm/uaccess.h>
@@ -472,7 +473,7 @@ static void put_enet_addr_container(struct enet_addr_container *enet_addr_cont)kfree (enet_addr_cont); } -static int set_mac_addr (__be16 __iomem *reg,u8 *mac) +static void set_mac_addr (__be16 __iomem *reg,u8 *mac) {out_be16 (®[0 ], ((u16 )mac[5 ] <<8 ) | mac[4 ]);out_be16 (®[1 ], ((u16 )mac[3 ] <<8 ) | mac[2 ]);
@@ -3920,10 +3921,11 @@ static irqreturn_t phy_interrupt(int irq, void *dev_id) }/* Scheduled by the phy_interrupt/timer to handle PHY changes */ -static void ugeth_phy_change (void *data) +static void ugeth_phy_change (struct work_struct *work) { -struct net_device *dev = (struct net_device *)data; -struct ucc_geth_private *ugeth =netdev_priv (dev); +struct ucc_geth_private *ugeth = + container_of(work, struct ucc_geth_private, tq); +struct net_device *dev = ugeth->dev;struct ucc_geth *ug_regs;int result =0 ;
@@ -4080,7 +4082,7 @@ static int ucc_geth_open(struct net_device *dev)#endif /* CONFIG_UGETH_NAPI */ /* Set up the PHY change work queue */ -INIT_WORK (&ugeth->tq, ugeth_phy_change, dev); +INIT_WORK (&ugeth->tq, ugeth_phy_change);init_timer (&ugeth->phy_info_timer); ugeth->phy_info_timer.function = &ugeth_phy_startup_timer;
drivers/net/ucc_geth_phy.c +66 -68
302 lines not on this page · raw message
drivers/net/wireless/bcm43xx/bcm43xx_main.c +7 -4
@@ -2701,8 +2701,8 @@ static int bcm43xx_probe_cores(struct bcm43xx_private *bcm) sb_id_hi =bcm43xx_read32 (bcm, BCM43xx_CIR_SB_ID_HI);/* extract core_id, core_rev, core_vendor */ - core_id = (sb_id_hi &0xFFF0 ) >>4 ; - core_rev = (sb_id_hi &0xF ); + core_id = (sb_id_hi &0x8FF0 ) >>4 ; + core_rev = ((sb_id_hi &0xF ) | ((sb_id_hi &0x7000 ) >>8 )); core_vendor = (sb_id_hi &0xFFFF0000 ) >>16 ; dprintk(KERN_INFO PFX "Core %d: ID 0x%x, rev 0x%x, vendor 0x%x\n",
@@ -2873,7 +2873,10 @@ static int bcm43xx_wireless_core_init(struct bcm43xx_private *bcm, sbimconfiglow =bcm43xx_read32 (bcm, BCM43xx_CIR_SBIMCONFIGLOW); sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_REQUEST_TOUT_MASK; sbimconfiglow &= ~ BCM43xx_SBIMCONFIGLOW_SERVICE_TOUT_MASK; - sbimconfiglow |=0x32 ; +if (bcm->bustype == BCM43xx_BUSTYPE_PCI) + sbimconfiglow |=0x32 ; +else + sbimconfiglow |=0x53 ;bcm43xx_write32 (bcm, BCM43xx_CIR_SBIMCONFIGLOW, sbimconfiglow); }
@@ -3077,7 +3080,7 @@ static int bcm43xx_setup_backplane_pci_connection(struct bcm43xx_private *bcm,if (err) goto out; -if (bcm->current_core->rev <6 || +if (bcm->current_core->rev <6 && bcm->current_core->id == BCM43xx_COREID_PCI) { value =bcm43xx_read32 (bcm, BCM43xx_CIR_SBINTVEC); value |= (1 << backplane_flag_nr);
Quoted 2 lines · Jeff Garzik
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
Jeff,
is there a reason that you didn't pull the e1000 tree from us? I send you all the information 5 days ago, WITH the changes that you requested.
Cheers,
Auke
Quoted 7 lines · Auke Kok
Quoted 2 lines · Jeff Garzik
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
Jeff,
is there a reason that you didn't pull the e1000 tree from us? I send you all the information 5 days ago, WITH the changes that you requested.
I did pull the tree. The fixes were far more than just obvious one-liners, so they got pulled into #upstream.
Given the past history of breakage during -rc from huge Intel "fix" patchsets, there's no way I'm going to push those fixes to Linus without plenty of testing in -mm first.
Jeff
Quoted 10 lines · Jeff Garzik
Quoted 7 lines · Auke Kok
Quoted 2 lines · Jeff Garzik
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
Jeff,
is there a reason that you didn't pull the e1000 tree from us? I send you all the information 5 days ago, WITH the changes that you requested.
I did pull the tree. The fixes were far more than just obvious one-liners, so they got pulled into #upstream.
Forgive me for not seeing the 'pulled' message! I still don't see them in your tree on kernel.org either. Is it just slow again?
Cheers,
Auke
Quoted 6 lines · Auke Kok
Quoted 5 lines · Jeff Garzik
Quoted 4 lines · Auke Kok
Quoted 2 lines · Jeff Garzik
Please pull from 'upstream-linus' branch of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git upstream-linus
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Jeff,
is there a reason that you didn't pull the e1000 tree from us? I send you all the information 5 days ago, WITH the changes that you requested.
I did pull the tree. The fixes were far more than just obvious one-liners, so they got pulled into #upstream.
Forgive me for not seeing the 'pulled' message! I still don't see them in your tree on kernel.org either. Is it just slow again?
hrm, no, at the time of your message everything has been mirrored out. So, WYSIWYG.
I ACK'd your latest update of the patch series, so resend the pull info and I'll pull. Sorry about that.
Jeff