Loading drivers/net/bonding/bond_alb.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_ index = next_index; index = next_index; } } _unlock_tx_hashtbl(bond); tlb_init_slave(slave); tlb_init_slave(slave); _unlock_tx_hashtbl(bond); } } /* Must be called before starting the monitor timer */ /* Must be called before starting the monitor timer */ Loading drivers/net/bonding/bonding.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,8 +22,8 @@ #include "bond_3ad.h" #include "bond_3ad.h" #include "bond_alb.h" #include "bond_alb.h" #define DRV_VERSION "3.0.0" #define DRV_VERSION "3.0.1" #define DRV_RELDATE "November 8, 2005" #define DRV_RELDATE "January 9, 2006" #define DRV_NAME "bonding" #define DRV_NAME "bonding" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" Loading drivers/net/e100.c +29 −3 Original line number Original line Diff line number Diff line Loading @@ -132,6 +132,10 @@ * TODO: * TODO: * o several entry points race with dev->close * o several entry points race with dev->close * o check for tx-no-resources/stop Q races with tx clean/wake Q * o check for tx-no-resources/stop Q races with tx clean/wake Q * * FIXES: * 2005/12/02 - Michael O'Donnell <Michael.ODonnell at stratus dot com> * - Stratus87247: protect MDI control register manipulations */ */ #include <linux/config.h> #include <linux/config.h> Loading Loading @@ -578,6 +582,7 @@ struct nic { u16 leds; u16 leds; u16 eeprom_wc; u16 eeprom_wc; u16 eeprom[256]; u16 eeprom[256]; spinlock_t mdio_lock; }; }; static inline void e100_write_flush(struct nic *nic) static inline void e100_write_flush(struct nic *nic) Loading Loading @@ -876,7 +881,27 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) { { u32 data_out = 0; u32 data_out = 0; unsigned int i; unsigned int i; unsigned long flags; /* * Stratus87247: we shouldn't be writing the MDI control * register until the Ready bit shows True. Also, since * manipulation of the MDI control registers is a multi-step * procedure it should be done under lock. */ spin_lock_irqsave(&nic->mdio_lock, flags); for (i = 100; i; --i) { if (readl(&nic->csr->mdi_ctrl) & mdi_ready) break; udelay(20); } if (unlikely(!i)) { printk("e100.mdio_ctrl(%s) won't go Ready\n", nic->netdev->name ); spin_unlock_irqrestore(&nic->mdio_lock, flags); return 0; /* No way to indicate timeout error */ } writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) { Loading @@ -884,7 +909,7 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) break; break; } } spin_unlock_irqrestore(&nic->mdio_lock, flags); DPRINTK(HW, DEBUG, DPRINTK(HW, DEBUG, "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); Loading Loading @@ -2562,6 +2587,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, /* locks must be initialized before calling hw_reset */ /* locks must be initialized before calling hw_reset */ spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cmd_lock); spin_lock_init(&nic->cmd_lock); spin_lock_init(&nic->mdio_lock); /* Reset the device before pci_set_master() in case device is in some /* Reset the device before pci_set_master() in case device is in some * funky state and has an interrupt pending - hint: we don't have the * funky state and has an interrupt pending - hint: we don't have the Loading drivers/net/gianfar.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -84,6 +84,7 @@ #include <linux/ip.h> #include <linux/ip.h> #include <linux/tcp.h> #include <linux/tcp.h> #include <linux/udp.h> #include <linux/udp.h> #include <linux/in.h> #include <asm/io.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/irq.h> Loading Loading @@ -398,12 +399,15 @@ static int init_phy(struct net_device *dev) priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? SUPPORTED_1000baseT_Full : 0; SUPPORTED_1000baseT_Full : 0; struct phy_device *phydev; struct phy_device *phydev; char phy_id[BUS_ID_SIZE]; priv->oldlink = 0; priv->oldlink = 0; priv->oldspeed = 0; priv->oldspeed = 0; priv->oldduplex = -1; priv->oldduplex = -1; phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); phydev = phy_connect(dev, phy_id, &adjust_link, 0); if (IS_ERR(phydev)) { if (IS_ERR(phydev)) { printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); Loading drivers/net/gianfar_mii.c +4 −1 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev) struct gianfar_mdio_data *pdata; struct gianfar_mdio_data *pdata; struct gfar_mii *regs; struct gfar_mii *regs; struct mii_bus *new_bus; struct mii_bus *new_bus; struct resource *r; int err = 0; int err = 0; if (NULL == dev) if (NULL == dev) Loading @@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev) return -ENODEV; return -ENODEV; } } r = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* Set the PHY base address */ /* Set the PHY base address */ regs = (struct gfar_mii *) ioremap(pdata->paddr, regs = (struct gfar_mii *) ioremap(r->start, sizeof (struct gfar_mii)); sizeof (struct gfar_mii)); if (NULL == regs) { if (NULL == regs) { Loading Loading
drivers/net/bonding/bond_alb.c +2 −2 Original line number Original line Diff line number Diff line Loading @@ -169,9 +169,9 @@ static void tlb_clear_slave(struct bonding *bond, struct slave *slave, int save_ index = next_index; index = next_index; } } _unlock_tx_hashtbl(bond); tlb_init_slave(slave); tlb_init_slave(slave); _unlock_tx_hashtbl(bond); } } /* Must be called before starting the monitor timer */ /* Must be called before starting the monitor timer */ Loading
drivers/net/bonding/bonding.h +2 −2 Original line number Original line Diff line number Diff line Loading @@ -22,8 +22,8 @@ #include "bond_3ad.h" #include "bond_3ad.h" #include "bond_alb.h" #include "bond_alb.h" #define DRV_VERSION "3.0.0" #define DRV_VERSION "3.0.1" #define DRV_RELDATE "November 8, 2005" #define DRV_RELDATE "January 9, 2006" #define DRV_NAME "bonding" #define DRV_NAME "bonding" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" #define DRV_DESCRIPTION "Ethernet Channel Bonding Driver" Loading
drivers/net/e100.c +29 −3 Original line number Original line Diff line number Diff line Loading @@ -132,6 +132,10 @@ * TODO: * TODO: * o several entry points race with dev->close * o several entry points race with dev->close * o check for tx-no-resources/stop Q races with tx clean/wake Q * o check for tx-no-resources/stop Q races with tx clean/wake Q * * FIXES: * 2005/12/02 - Michael O'Donnell <Michael.ODonnell at stratus dot com> * - Stratus87247: protect MDI control register manipulations */ */ #include <linux/config.h> #include <linux/config.h> Loading Loading @@ -578,6 +582,7 @@ struct nic { u16 leds; u16 leds; u16 eeprom_wc; u16 eeprom_wc; u16 eeprom[256]; u16 eeprom[256]; spinlock_t mdio_lock; }; }; static inline void e100_write_flush(struct nic *nic) static inline void e100_write_flush(struct nic *nic) Loading Loading @@ -876,7 +881,27 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) { { u32 data_out = 0; u32 data_out = 0; unsigned int i; unsigned int i; unsigned long flags; /* * Stratus87247: we shouldn't be writing the MDI control * register until the Ready bit shows True. Also, since * manipulation of the MDI control registers is a multi-step * procedure it should be done under lock. */ spin_lock_irqsave(&nic->mdio_lock, flags); for (i = 100; i; --i) { if (readl(&nic->csr->mdi_ctrl) & mdi_ready) break; udelay(20); } if (unlikely(!i)) { printk("e100.mdio_ctrl(%s) won't go Ready\n", nic->netdev->name ); spin_unlock_irqrestore(&nic->mdio_lock, flags); return 0; /* No way to indicate timeout error */ } writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); writel((reg << 16) | (addr << 21) | dir | data, &nic->csr->mdi_ctrl); for (i = 0; i < 100; i++) { for (i = 0; i < 100; i++) { Loading @@ -884,7 +909,7 @@ static u16 mdio_ctrl(struct nic *nic, u32 addr, u32 dir, u32 reg, u16 data) if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) if ((data_out = readl(&nic->csr->mdi_ctrl)) & mdi_ready) break; break; } } spin_unlock_irqrestore(&nic->mdio_lock, flags); DPRINTK(HW, DEBUG, DPRINTK(HW, DEBUG, "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", "%s:addr=%d, reg=%d, data_in=0x%04X, data_out=0x%04X\n", dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); dir == mdi_read ? "READ" : "WRITE", addr, reg, data, data_out); Loading Loading @@ -2562,6 +2587,7 @@ static int __devinit e100_probe(struct pci_dev *pdev, /* locks must be initialized before calling hw_reset */ /* locks must be initialized before calling hw_reset */ spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cb_lock); spin_lock_init(&nic->cmd_lock); spin_lock_init(&nic->cmd_lock); spin_lock_init(&nic->mdio_lock); /* Reset the device before pci_set_master() in case device is in some /* Reset the device before pci_set_master() in case device is in some * funky state and has an interrupt pending - hint: we don't have the * funky state and has an interrupt pending - hint: we don't have the Loading
drivers/net/gianfar.c +5 −1 Original line number Original line Diff line number Diff line Loading @@ -84,6 +84,7 @@ #include <linux/ip.h> #include <linux/ip.h> #include <linux/tcp.h> #include <linux/tcp.h> #include <linux/udp.h> #include <linux/udp.h> #include <linux/in.h> #include <asm/io.h> #include <asm/io.h> #include <asm/irq.h> #include <asm/irq.h> Loading Loading @@ -398,12 +399,15 @@ static int init_phy(struct net_device *dev) priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? SUPPORTED_1000baseT_Full : 0; SUPPORTED_1000baseT_Full : 0; struct phy_device *phydev; struct phy_device *phydev; char phy_id[BUS_ID_SIZE]; priv->oldlink = 0; priv->oldlink = 0; priv->oldspeed = 0; priv->oldspeed = 0; priv->oldduplex = -1; priv->oldduplex = -1; phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); phydev = phy_connect(dev, phy_id, &adjust_link, 0); if (IS_ERR(phydev)) { if (IS_ERR(phydev)) { printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); Loading
drivers/net/gianfar_mii.c +4 −1 Original line number Original line Diff line number Diff line Loading @@ -128,6 +128,7 @@ int gfar_mdio_probe(struct device *dev) struct gianfar_mdio_data *pdata; struct gianfar_mdio_data *pdata; struct gfar_mii *regs; struct gfar_mii *regs; struct mii_bus *new_bus; struct mii_bus *new_bus; struct resource *r; int err = 0; int err = 0; if (NULL == dev) if (NULL == dev) Loading @@ -151,8 +152,10 @@ int gfar_mdio_probe(struct device *dev) return -ENODEV; return -ENODEV; } } r = platform_get_resource(pdev, IORESOURCE_MEM, 0); /* Set the PHY base address */ /* Set the PHY base address */ regs = (struct gfar_mii *) ioremap(pdata->paddr, regs = (struct gfar_mii *) ioremap(r->start, sizeof (struct gfar_mii)); sizeof (struct gfar_mii)); if (NULL == regs) { if (NULL == regs) { Loading