diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 10:08:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-13 10:08:08 -0700 |
commit | fffdedef691a0f6fa7ca1fc0a2a508cbb49def69 (patch) | |
tree | 124b128308a4d35bab0ac8001da4b324d40220eb /drivers | |
parent | 5723ff931a94acf0738df42604ee89f852e151b0 (diff) | |
parent | bf94e17bc8d35fc339945a42990a2f2b5e9b5a40 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net/mac80211/rx.c: fix build error
acpi: Make ACPI_TOSHIBA depend on INPUT.
net/bfin_mac.c MDIO namespace fixes
jme: remove unused #include <version.h>
netfilter: remove unused #include <version.h>
net: Fix off-by-one in skb_dma_map
smc911x: Add support for LAN921{5,7,8} chips from SMSC
qlge: remove duplicated #include
wireless: remove duplicated #include
net/au1000_eth.c MDIO namespace fixes
net/tc35815.c: fix compilation
sky2: Fix WOL regression
r8169: NULL pointer dereference on r8169 load
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/acpi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/net/au1000_eth.c | 27 | ||||
-rw-r--r-- | drivers/net/bfin_mac.c | 26 | ||||
-rw-r--r-- | drivers/net/jme.c | 1 | ||||
-rw-r--r-- | drivers/net/qlge/qlge_ethtool.c | 1 | ||||
-rw-r--r-- | drivers/net/qlge/qlge_main.c | 1 | ||||
-rw-r--r-- | drivers/net/r8169.c | 3 | ||||
-rw-r--r-- | drivers/net/sky2.c | 19 | ||||
-rw-r--r-- | drivers/net/smc911x.c | 6 | ||||
-rw-r--r-- | drivers/net/smc911x.h | 14 | ||||
-rw-r--r-- | drivers/net/tc35815.c | 2 |
11 files changed, 50 insertions, 52 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 12cf5d491f0..da49b006bcc 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -259,7 +259,7 @@ config ACPI_ASUS config ACPI_TOSHIBA tristate "Toshiba Laptop Extras" - depends on X86 + depends on X86 && INPUT select INPUT_POLLDEV select NET select RFKILL diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index 7b92201a7b5..019b13c08ae 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c @@ -94,8 +94,8 @@ static irqreturn_t au1000_interrupt(int, void *); static void au1000_tx_timeout(struct net_device *); static void set_rx_mode(struct net_device *); static int au1000_ioctl(struct net_device *, struct ifreq *, int); -static int mdio_read(struct net_device *, int, int); -static void mdio_write(struct net_device *, int, int, u16); +static int au1000_mdio_read(struct net_device *, int, int); +static void au1000_mdio_write(struct net_device *, int, int, u16); static void au1000_adjust_link(struct net_device *); static void enable_mac(struct net_device *, int); @@ -191,7 +191,7 @@ struct au1000_private *au_macs[NUM_ETH_INTERFACES]; /* * MII operations */ -static int mdio_read(struct net_device *dev, int phy_addr, int reg) +static int au1000_mdio_read(struct net_device *dev, int phy_addr, int reg) { struct au1000_private *aup = (struct au1000_private *) dev->priv; volatile u32 *const mii_control_reg = &aup->mac->mii_control; @@ -225,7 +225,8 @@ static int mdio_read(struct net_device *dev, int phy_addr, int reg) return (int)*mii_data_reg; } -static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value) +static void au1000_mdio_write(struct net_device *dev, int phy_addr, + int reg, u16 value) { struct au1000_private *aup = (struct au1000_private *) dev->priv; volatile u32 *const mii_control_reg = &aup->mac->mii_control; @@ -249,7 +250,7 @@ static void mdio_write(struct net_device *dev, int phy_addr, int reg, u16 value) *mii_control_reg = mii_control; } -static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) +static int au1000_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) { /* WARNING: bus->phy_map[phy_addr].attached_dev == dev does * _NOT_ hold (e.g. when PHY is accessed through other MAC's MII bus) */ @@ -257,21 +258,21 @@ static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) enable_mac(dev, 0); /* make sure the MAC associated with this * mii_bus is enabled */ - return mdio_read(dev, phy_addr, regnum); + return au1000_mdio_read(dev, phy_addr, regnum); } -static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, - u16 value) +static int au1000_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, + u16 value) { struct net_device *const dev = bus->priv; enable_mac(dev, 0); /* make sure the MAC associated with this * mii_bus is enabled */ - mdio_write(dev, phy_addr, regnum, value); + au1000_mdio_write(dev, phy_addr, regnum, value); return 0; } -static int mdiobus_reset(struct mii_bus *bus) +static int au1000_mdiobus_reset(struct mii_bus *bus) { struct net_device *const dev = bus->priv; @@ -703,9 +704,9 @@ static struct net_device * au1000_probe(int port_num) goto err_out; aup->mii_bus->priv = dev; - aup->mii_bus->read = mdiobus_read; - aup->mii_bus->write = mdiobus_write; - aup->mii_bus->reset = mdiobus_reset; + aup->mii_bus->read = au1000_mdiobus_read; + aup->mii_bus->write = au1000_mdiobus_write; + aup->mii_bus->reset = au1000_mdiobus_reset; aup->mii_bus->name = "au1000_eth_mii"; snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%x", aup->mac_id); aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index a0d41c5d97d..b458d607a9c 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c @@ -253,7 +253,7 @@ init_error: * MII operations */ /* Wait until the previous MDC/MDIO transaction has completed */ -static void mdio_poll(void) +static void bfin_mdio_poll(void) { int timeout_cnt = MAX_TIMEOUT_CNT; @@ -269,25 +269,25 @@ static void mdio_poll(void) } /* Read an off-chip register in a PHY through the MDC/MDIO port */ -static int mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) +static int bfin_mdiobus_read(struct mii_bus *bus, int phy_addr, int regnum) { - mdio_poll(); + bfin_mdio_poll(); /* read mode */ bfin_write_EMAC_STAADD(SET_PHYAD((u16) phy_addr) | SET_REGAD((u16) regnum) | STABUSY); - mdio_poll(); + bfin_mdio_poll(); return (int) bfin_read_EMAC_STADAT(); } /* Write an off-chip register in a PHY through the MDC/MDIO port */ -static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, - u16 value) +static int bfin_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, + u16 value) { - mdio_poll(); + bfin_mdio_poll(); bfin_write_EMAC_STADAT((u32) value); @@ -297,12 +297,12 @@ static int mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum, STAOP | STABUSY); - mdio_poll(); + bfin_mdio_poll(); return 0; } -static int mdiobus_reset(struct mii_bus *bus) +static int bfin_mdiobus_reset(struct mii_bus *bus) { return 0; } @@ -818,7 +818,7 @@ static void bfin_mac_enable(void) bfin_write_DMA1_CONFIG(rx_list_head->desc_a.config); /* Wait MII done */ - mdio_poll(); + bfin_mdio_poll(); /* We enable only RX here */ /* ASTP : Enable Automatic Pad Stripping @@ -1063,9 +1063,9 @@ static int __devinit bfin_mac_probe(struct platform_device *pdev) goto out_err_mdiobus_alloc; lp->mii_bus->priv = ndev; - lp->mii_bus->read = mdiobus_read; - lp->mii_bus->write = mdiobus_write; - lp->mii_bus->reset = mdiobus_reset; + lp->mii_bus->read = bfin_mdiobus_read; + lp->mii_bus->write = bfin_mdiobus_write; + lp->mii_bus->reset = bfin_mdiobus_reset; lp->mii_bus->name = "bfin_mac_mdio"; snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "0"); lp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); diff --git a/drivers/net/jme.c b/drivers/net/jme.c index 5f9a1313fa3..156f159aafb 100644 --- a/drivers/net/jme.c +++ b/drivers/net/jme.c @@ -21,7 +21,6 @@ * */ -#include <linux/version.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/pci.h> diff --git a/drivers/net/qlge/qlge_ethtool.c b/drivers/net/qlge/qlge_ethtool.c index 6457f8c4fda..b62fbd4bf00 100644 --- a/drivers/net/qlge/qlge_ethtool.c +++ b/drivers/net/qlge/qlge_ethtool.c @@ -29,7 +29,6 @@ #include <linux/skbuff.h> #include <linux/rtnetlink.h> #include <linux/if_vlan.h> -#include <linux/init.h> #include <linux/delay.h> #include <linux/mm.h> #include <linux/vmalloc.h> diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 3af822b6226..297877b68c4 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -36,7 +36,6 @@ #include <linux/skbuff.h> #include <linux/rtnetlink.h> #include <linux/if_vlan.h> -#include <linux/init.h> #include <linux/delay.h> #include <linux/mm.h> #include <linux/vmalloc.h> diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index bdae2c59a75..c821da21d8e 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2154,6 +2154,8 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) spin_lock_init(&tp->lock); + tp->mmio_addr = ioaddr; + rtl_init_mac_address(tp, ioaddr); /* Get MAC address */ @@ -2186,7 +2188,6 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) #endif tp->intr_mask = 0xffff; - tp->mmio_addr = ioaddr; tp->align = cfg->align; tp->hw_start = cfg->hw_start; tp->intr_event = cfg->intr_event; diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3805b9318be..3813d15e2df 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -3034,7 +3034,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) struct sky2_port *sky2 = netdev_priv(dev); struct sky2_hw *hw = sky2->hw; - if (wol->wolopts & ~sky2_wol_supported(sky2->hw)) + if ((wol->wolopts & ~sky2_wol_supported(sky2->hw)) + || !device_can_wakeup(&hw->pdev->dev)) return -EOPNOTSUPP; sky2->wol = wol->wolopts; @@ -3045,6 +3046,8 @@ static int sky2_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) sky2_write32(hw, B0_CTST, sky2->wol ? Y2_HW_WOL_ON : Y2_HW_WOL_OFF); + device_set_wakeup_enable(&hw->pdev->dev, sky2->wol); + if (!netif_running(dev)) sky2_wol_init(sky2); return 0; @@ -4179,18 +4182,6 @@ static int __devinit sky2_test_msi(struct sky2_hw *hw) return err; } -static int __devinit pci_wake_enabled(struct pci_dev *dev) -{ - int pm = pci_find_capability(dev, PCI_CAP_ID_PM); - u16 value; - - if (!pm) - return 0; - if (pci_read_config_word(dev, pm + PCI_PM_CTRL, &value)) - return 0; - return value & PCI_PM_CTRL_PME_ENABLE; -} - /* * Read and parse the first part of Vital Product Data */ @@ -4314,7 +4305,7 @@ static int __devinit sky2_probe(struct pci_dev *pdev, } } - wol_default = pci_wake_enabled(pdev) ? WAKE_MAGIC : 0; + wol_default = device_may_wakeup(&pdev->dev) ? WAKE_MAGIC : 0; err = -ENOMEM; hw = kzalloc(sizeof(*hw), GFP_KERNEL); diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index 3d19d00e8ee..8aa7460ef0e 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c @@ -685,8 +685,10 @@ static void smc911x_phy_detect(struct net_device *dev) * PHY#1 to PHY#31, and then PHY#0 last. */ switch(lp->version) { - case 0x115: - case 0x117: + case CHIP_9115: + case CHIP_9117: + case CHIP_9215: + case CHIP_9217: cfg = SMC_GET_HW_CFG(lp); if (cfg & HW_CFG_EXT_PHY_DET_) { cfg &= ~HW_CFG_PHY_CLK_SEL_; diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h index 2abfc284519..bf6240f23f5 100644 --- a/drivers/net/smc911x.h +++ b/drivers/net/smc911x.h @@ -666,10 +666,13 @@ smc_pxa_dma_outsl(struct smc911x_local *lp, u_long physaddr, #define LAN911X_INTERNAL_PHY_ID (0x0007C000) /* Chip ID values */ -#define CHIP_9115 0x115 -#define CHIP_9116 0x116 -#define CHIP_9117 0x117 -#define CHIP_9118 0x118 +#define CHIP_9115 0x0115 +#define CHIP_9116 0x0116 +#define CHIP_9117 0x0117 +#define CHIP_9118 0x0118 +#define CHIP_9215 0x115A +#define CHIP_9217 0x117A +#define CHIP_9218 0x118A struct chip_id { u16 id; @@ -681,6 +684,9 @@ static const struct chip_id chip_ids[] = { { CHIP_9116, "LAN9116" }, { CHIP_9117, "LAN9117" }, { CHIP_9118, "LAN9118" }, + { CHIP_9215, "LAN9215" }, + { CHIP_9217, "LAN9217" }, + { CHIP_9218, "LAN9218" }, { 0, NULL }, }; diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c index 4980b12b621..df20cafff7d 100644 --- a/drivers/net/tc35815.c +++ b/drivers/net/tc35815.c @@ -796,7 +796,7 @@ err_out_unregister_bus: mdiobus_unregister(lp->mii_bus); err_out_free_mdio_irq: kfree(lp->mii_bus->irq); -err_out_free_mii_bus; +err_out_free_mii_bus: mdiobus_free(lp->mii_bus); err_out: return err; |