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
This commit is contained in:
commit
fffdedef69
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/pci.h>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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_;
|
||||
|
|
|
@ -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 },
|
||||
};
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -35,7 +35,7 @@ int skb_dma_map(struct device *dev, struct sk_buff *skb,
|
|||
return 0;
|
||||
|
||||
unwind:
|
||||
while (i-- >= 0) {
|
||||
while (--i >= 0) {
|
||||
skb_frag_t *fp = &sp->frags[i];
|
||||
|
||||
dma_unmap_page(dev, sp->dma_maps[i + 1],
|
||||
|
|
|
@ -1379,6 +1379,7 @@ ieee80211_rx_h_amsdu(struct ieee80211_rx_data *rx)
|
|||
return RX_QUEUED;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MAC80211_MESH
|
||||
static ieee80211_rx_result
|
||||
ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
||||
{
|
||||
|
@ -1453,7 +1454,7 @@ ieee80211_rx_h_mesh_fwding(struct ieee80211_rx_data *rx)
|
|||
else
|
||||
return RX_DROP_MONITOR;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static ieee80211_rx_result debug_noinline
|
||||
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
|
||||
|
@ -1780,8 +1781,10 @@ static void ieee80211_invoke_rx_handlers(struct ieee80211_sub_if_data *sdata,
|
|||
/* must be after MMIC verify so header is counted in MPDU mic */
|
||||
CALL_RXH(ieee80211_rx_h_remove_qos_control)
|
||||
CALL_RXH(ieee80211_rx_h_amsdu)
|
||||
#ifdef CONFIG_MAC80211_MESH
|
||||
if (ieee80211_vif_is_mesh(&sdata->vif))
|
||||
CALL_RXH(ieee80211_rx_h_mesh_fwding);
|
||||
#endif
|
||||
CALL_RXH(ieee80211_rx_h_data)
|
||||
CALL_RXH(ieee80211_rx_h_ctrl)
|
||||
CALL_RXH(ieee80211_rx_h_action)
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <linux/version.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <linux/net.h>
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/debugfs.h>
|
||||
#include <linux/notifier.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/list.h>
|
||||
#include <net/genetlink.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/wireless.h>
|
||||
|
|
Loading…
Reference in a new issue