Skip to content

Commit 4cea870

Browse files
committed
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
2 parents 7ae1277 + e79aa86 commit 4cea870

File tree

14 files changed

+103
-28
lines changed

14 files changed

+103
-28
lines changed

drivers/net/8139cp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,8 +598,8 @@ static int cp_rx_poll(struct napi_struct *napi, int budget)
598598
goto rx_status_loop;
599599

600600
spin_lock_irqsave(&cp->lock, flags);
601-
cpw16_f(IntrMask, cp_intr_mask);
602601
__napi_complete(napi);
602+
cpw16_f(IntrMask, cp_intr_mask);
603603
spin_unlock_irqrestore(&cp->lock, flags);
604604
}
605605

drivers/net/8139too.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2089,8 +2089,8 @@ static int rtl8139_poll(struct napi_struct *napi, int budget)
20892089
* again when we think we are done.
20902090
*/
20912091
spin_lock_irqsave(&tp->lock, flags);
2092-
RTL_W16_F(IntrMask, rtl8139_intr_mask);
20932092
__napi_complete(napi);
2093+
RTL_W16_F(IntrMask, rtl8139_intr_mask);
20942094
spin_unlock_irqrestore(&tp->lock, flags);
20952095
}
20962096
spin_unlock(&tp->rx_lock);

drivers/net/gianfar.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -747,8 +747,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
747747
FSL_GIANFAR_DEV_HAS_CSUM |
748748
FSL_GIANFAR_DEV_HAS_VLAN |
749749
FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
750-
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH |
751-
FSL_GIANFAR_DEV_HAS_TIMER;
750+
FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
752751

753752
ctype = of_get_property(np, "phy-connection-type", NULL);
754753

drivers/net/phy/lxt.c

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@
5353

5454
#define MII_LXT971_ISR 19 /* Interrupt Status Register */
5555

56+
/* register definitions for the 973 */
57+
#define MII_LXT973_PCR 16 /* Port Configuration Register */
58+
#define PCR_FIBER_SELECT 1
5659

5760
MODULE_DESCRIPTION("Intel LXT PHY driver");
5861
MODULE_AUTHOR("Andy Fleming");
@@ -119,6 +122,33 @@ static int lxt971_config_intr(struct phy_device *phydev)
119122
return err;
120123
}
121124

125+
static int lxt973_probe(struct phy_device *phydev)
126+
{
127+
int val = phy_read(phydev, MII_LXT973_PCR);
128+
129+
if (val & PCR_FIBER_SELECT) {
130+
/*
131+
* If fiber is selected, then the only correct setting
132+
* is 100Mbps, full duplex, and auto negotiation off.
133+
*/
134+
val = phy_read(phydev, MII_BMCR);
135+
val |= (BMCR_SPEED100 | BMCR_FULLDPLX);
136+
val &= ~BMCR_ANENABLE;
137+
phy_write(phydev, MII_BMCR, val);
138+
/* Remember that the port is in fiber mode. */
139+
phydev->priv = lxt973_probe;
140+
} else {
141+
phydev->priv = NULL;
142+
}
143+
return 0;
144+
}
145+
146+
static int lxt973_config_aneg(struct phy_device *phydev)
147+
{
148+
/* Do nothing if port is in fiber mode. */
149+
return phydev->priv ? 0 : genphy_config_aneg(phydev);
150+
}
151+
122152
static struct phy_driver lxt970_driver = {
123153
.phy_id = 0x78100000,
124154
.name = "LXT970",
@@ -146,6 +176,18 @@ static struct phy_driver lxt971_driver = {
146176
.driver = { .owner = THIS_MODULE,},
147177
};
148178

179+
static struct phy_driver lxt973_driver = {
180+
.phy_id = 0x00137a10,
181+
.name = "LXT973",
182+
.phy_id_mask = 0xfffffff0,
183+
.features = PHY_BASIC_FEATURES,
184+
.flags = 0,
185+
.probe = lxt973_probe,
186+
.config_aneg = lxt973_config_aneg,
187+
.read_status = genphy_read_status,
188+
.driver = { .owner = THIS_MODULE,},
189+
};
190+
149191
static int __init lxt_init(void)
150192
{
151193
int ret;
@@ -157,9 +199,15 @@ static int __init lxt_init(void)
157199
ret = phy_driver_register(&lxt971_driver);
158200
if (ret)
159201
goto err2;
202+
203+
ret = phy_driver_register(&lxt973_driver);
204+
if (ret)
205+
goto err3;
160206
return 0;
161207

162-
err2:
208+
err3:
209+
phy_driver_unregister(&lxt971_driver);
210+
err2:
163211
phy_driver_unregister(&lxt970_driver);
164212
err1:
165213
return ret;
@@ -169,6 +217,7 @@ static void __exit lxt_exit(void)
169217
{
170218
phy_driver_unregister(&lxt970_driver);
171219
phy_driver_unregister(&lxt971_driver);
220+
phy_driver_unregister(&lxt973_driver);
172221
}
173222

174223
module_init(lxt_init);

drivers/net/r8169.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
560560
udelay(25);
561561
}
562562
/*
563-
* Some configurations require a small delay even after the write
564-
* completed indication or the next write might fail.
563+
* According to hardware specs a 20us delay is required after write
564+
* complete indication, but before sending next command.
565565
*/
566-
udelay(25);
566+
udelay(20);
567567
}
568568

569569
static int mdio_read(void __iomem *ioaddr, int reg_addr)
@@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
583583
}
584584
udelay(25);
585585
}
586+
/*
587+
* According to hardware specs a 20us delay is required after read
588+
* complete indication, but before sending next command.
589+
*/
590+
udelay(20);
591+
586592
return value;
587593
}
588594

drivers/net/wimax/i2400m/fw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m,
11921192
unsigned module_type, header_len, major_version, minor_version,
11931193
module_id, module_vendor, date, size;
11941194

1195-
module_type = bcf_hdr->module_type;
1195+
module_type = le32_to_cpu(bcf_hdr->module_type);
11961196
header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len);
11971197
major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000)
11981198
>> 16;

include/linux/skbuff.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,10 @@ struct sk_buff {
380380
kmemcheck_bitfield_begin(flags2);
381381
__u16 queue_mapping:16;
382382
#ifdef CONFIG_IPV6_NDISC_NODETYPE
383-
__u8 ndisc_nodetype:2;
383+
__u8 ndisc_nodetype:2,
384+
deliver_no_wcard:1;
385+
#else
386+
__u8 deliver_no_wcard:1;
384387
#endif
385388
kmemcheck_bitfield_end(flags2);
386389

net/8021q/vlan_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ int __vlan_hwaccel_rx(struct sk_buff *skb, struct vlan_group *grp,
1212
return NET_RX_DROP;
1313

1414
if (skb_bond_should_drop(skb, ACCESS_ONCE(skb->dev->master)))
15-
goto drop;
15+
skb->deliver_no_wcard = 1;
1616

1717
skb->skb_iif = skb->dev->ifindex;
1818
__vlan_hwaccel_put_tag(skb, vlan_tci);
@@ -84,7 +84,7 @@ vlan_gro_common(struct napi_struct *napi, struct vlan_group *grp,
8484
struct sk_buff *p;
8585

8686
if (skb_bond_should_drop(skb, ACCESS_ONCE(skb->dev->master)))
87-
goto drop;
87+
skb->deliver_no_wcard = 1;
8888

8989
skb->skb_iif = skb->dev->ifindex;
9090
__vlan_hwaccel_put_tag(skb, vlan_tci);

net/caif/cfrfml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static int cfrfml_transmit(struct cflayer *layr, struct cfpkt *pkt)
8383
if (!cfsrvl_ready(service, &ret))
8484
return ret;
8585

86-
if (!cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
86+
if (cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
8787
pr_err("CAIF: %s():Packet too large - size=%d\n",
8888
__func__, cfpkt_getlen(pkt));
8989
return -EOVERFLOW;

net/caif/cfveil.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ static int cfvei_transmit(struct cflayer *layr, struct cfpkt *pkt)
8484
return ret;
8585
caif_assert(layr->dn != NULL);
8686
caif_assert(layr->dn->transmit != NULL);
87-
if (!cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
87+
if (cfpkt_getlen(pkt) > CAIF_MAX_PAYLOAD_SIZE) {
8888
pr_warning("CAIF: %s(): Packet too large - size=%d\n",
8989
__func__, cfpkt_getlen(pkt));
9090
return -EOVERFLOW;

0 commit comments

Comments
 (0)