mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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: wimax/i2400m: fix missing endian correction read in fw loader net8139: fix a race at the end of NAPI pktgen: Fix accuracy of inter-packet delay. pkt_sched: gen_estimator: add a new lock net: deliver skbs on inactive slaves to exact matches ipv6: fix ICMP6_MIB_OUTERRORS r8169: fix mdio_read and update mdio_write according to hw specs gianfar: Revive the driver for eTSEC devices (disable timestamping) caif: fix a couple range checks phylib: Add support for the LXT973 phy. net: Print num_rx_queues imbalance warning only when there are allocated queues
This commit is contained in:
commit
4cea8706c3
14 changed files with 103 additions and 28 deletions
|
|
@ -598,8 +598,8 @@ rx_next:
|
|||
goto rx_status_loop;
|
||||
|
||||
spin_lock_irqsave(&cp->lock, flags);
|
||||
cpw16_f(IntrMask, cp_intr_mask);
|
||||
__napi_complete(napi);
|
||||
cpw16_f(IntrMask, cp_intr_mask);
|
||||
spin_unlock_irqrestore(&cp->lock, flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2089,8 +2089,8 @@ static int rtl8139_poll(struct napi_struct *napi, int budget)
|
|||
* again when we think we are done.
|
||||
*/
|
||||
spin_lock_irqsave(&tp->lock, flags);
|
||||
RTL_W16_F(IntrMask, rtl8139_intr_mask);
|
||||
__napi_complete(napi);
|
||||
RTL_W16_F(IntrMask, rtl8139_intr_mask);
|
||||
spin_unlock_irqrestore(&tp->lock, flags);
|
||||
}
|
||||
spin_unlock(&tp->rx_lock);
|
||||
|
|
|
|||
|
|
@ -747,8 +747,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
|
|||
FSL_GIANFAR_DEV_HAS_CSUM |
|
||||
FSL_GIANFAR_DEV_HAS_VLAN |
|
||||
FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
|
||||
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH |
|
||||
FSL_GIANFAR_DEV_HAS_TIMER;
|
||||
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
|
||||
|
||||
ctype = of_get_property(np, "phy-connection-type", NULL);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@
|
|||
|
||||
#define MII_LXT971_ISR 19 /* Interrupt Status Register */
|
||||
|
||||
/* register definitions for the 973 */
|
||||
#define MII_LXT973_PCR 16 /* Port Configuration Register */
|
||||
#define PCR_FIBER_SELECT 1
|
||||
|
||||
MODULE_DESCRIPTION("Intel LXT PHY driver");
|
||||
MODULE_AUTHOR("Andy Fleming");
|
||||
|
|
@ -119,6 +122,33 @@ static int lxt971_config_intr(struct phy_device *phydev)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int lxt973_probe(struct phy_device *phydev)
|
||||
{
|
||||
int val = phy_read(phydev, MII_LXT973_PCR);
|
||||
|
||||
if (val & PCR_FIBER_SELECT) {
|
||||
/*
|
||||
* If fiber is selected, then the only correct setting
|
||||
* is 100Mbps, full duplex, and auto negotiation off.
|
||||
*/
|
||||
val = phy_read(phydev, MII_BMCR);
|
||||
val |= (BMCR_SPEED100 | BMCR_FULLDPLX);
|
||||
val &= ~BMCR_ANENABLE;
|
||||
phy_write(phydev, MII_BMCR, val);
|
||||
/* Remember that the port is in fiber mode. */
|
||||
phydev->priv = lxt973_probe;
|
||||
} else {
|
||||
phydev->priv = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lxt973_config_aneg(struct phy_device *phydev)
|
||||
{
|
||||
/* Do nothing if port is in fiber mode. */
|
||||
return phydev->priv ? 0 : genphy_config_aneg(phydev);
|
||||
}
|
||||
|
||||
static struct phy_driver lxt970_driver = {
|
||||
.phy_id = 0x78100000,
|
||||
.name = "LXT970",
|
||||
|
|
@ -146,6 +176,18 @@ static struct phy_driver lxt971_driver = {
|
|||
.driver = { .owner = THIS_MODULE,},
|
||||
};
|
||||
|
||||
static struct phy_driver lxt973_driver = {
|
||||
.phy_id = 0x00137a10,
|
||||
.name = "LXT973",
|
||||
.phy_id_mask = 0xfffffff0,
|
||||
.features = PHY_BASIC_FEATURES,
|
||||
.flags = 0,
|
||||
.probe = lxt973_probe,
|
||||
.config_aneg = lxt973_config_aneg,
|
||||
.read_status = genphy_read_status,
|
||||
.driver = { .owner = THIS_MODULE,},
|
||||
};
|
||||
|
||||
static int __init lxt_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -157,9 +199,15 @@ static int __init lxt_init(void)
|
|||
ret = phy_driver_register(&lxt971_driver);
|
||||
if (ret)
|
||||
goto err2;
|
||||
|
||||
ret = phy_driver_register(&lxt973_driver);
|
||||
if (ret)
|
||||
goto err3;
|
||||
return 0;
|
||||
|
||||
err2:
|
||||
err3:
|
||||
phy_driver_unregister(&lxt971_driver);
|
||||
err2:
|
||||
phy_driver_unregister(&lxt970_driver);
|
||||
err1:
|
||||
return ret;
|
||||
|
|
@ -169,6 +217,7 @@ static void __exit lxt_exit(void)
|
|||
{
|
||||
phy_driver_unregister(&lxt970_driver);
|
||||
phy_driver_unregister(&lxt971_driver);
|
||||
phy_driver_unregister(&lxt973_driver);
|
||||
}
|
||||
|
||||
module_init(lxt_init);
|
||||
|
|
|
|||
|
|
@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
|
|||
udelay(25);
|
||||
}
|
||||
/*
|
||||
* Some configurations require a small delay even after the write
|
||||
* completed indication or the next write might fail.
|
||||
* According to hardware specs a 20us delay is required after write
|
||||
* complete indication, but before sending next command.
|
||||
*/
|
||||
udelay(25);
|
||||
udelay(20);
|
||||
}
|
||||
|
||||
static int mdio_read(void __iomem *ioaddr, int reg_addr)
|
||||
|
|
@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
|
|||
}
|
||||
udelay(25);
|
||||
}
|
||||
/*
|
||||
* According to hardware specs a 20us delay is required after read
|
||||
* complete indication, but before sending next command.
|
||||
*/
|
||||
udelay(20);
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m,
|
|||
unsigned module_type, header_len, major_version, minor_version,
|
||||
module_id, module_vendor, date, size;
|
||||
|
||||
module_type = bcf_hdr->module_type;
|
||||
module_type = le32_to_cpu(bcf_hdr->module_type);
|
||||
header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len);
|
||||
major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000)
|
||||
>> 16;
|
||||
|
|
|
|||
Loading…
Reference in a new issue