aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/8139cp.c2
-rw-r--r--drivers/net/8139too.c2
-rw-r--r--drivers/net/gianfar.c3
-rw-r--r--drivers/net/phy/lxt.c51
-rw-r--r--drivers/net/r8169.c12
-rw-r--r--drivers/net/wimax/i2400m/fw.c2
6 files changed, 63 insertions, 9 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 9c149750e2bf..284a5f4a63ac 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -598,8 +598,8 @@ rx_next:
598 goto rx_status_loop; 598 goto rx_status_loop;
599 599
600 spin_lock_irqsave(&cp->lock, flags); 600 spin_lock_irqsave(&cp->lock, flags);
601 cpw16_f(IntrMask, cp_intr_mask);
602 __napi_complete(napi); 601 __napi_complete(napi);
602 cpw16_f(IntrMask, cp_intr_mask);
603 spin_unlock_irqrestore(&cp->lock, flags); 603 spin_unlock_irqrestore(&cp->lock, flags);
604 } 604 }
605 605
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 80cd074d3817..97d8068b372b 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -2089,8 +2089,8 @@ static int rtl8139_poll(struct napi_struct *napi, int budget)
2089 * again when we think we are done. 2089 * again when we think we are done.
2090 */ 2090 */
2091 spin_lock_irqsave(&tp->lock, flags); 2091 spin_lock_irqsave(&tp->lock, flags);
2092 RTL_W16_F(IntrMask, rtl8139_intr_mask);
2093 __napi_complete(napi); 2092 __napi_complete(napi);
2093 RTL_W16_F(IntrMask, rtl8139_intr_mask);
2094 spin_unlock_irqrestore(&tp->lock, flags); 2094 spin_unlock_irqrestore(&tp->lock, flags);
2095 } 2095 }
2096 spin_unlock(&tp->rx_lock); 2096 spin_unlock(&tp->rx_lock);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 1830f3199cb5..46c69cd06553 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -747,8 +747,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
747 FSL_GIANFAR_DEV_HAS_CSUM | 747 FSL_GIANFAR_DEV_HAS_CSUM |
748 FSL_GIANFAR_DEV_HAS_VLAN | 748 FSL_GIANFAR_DEV_HAS_VLAN |
749 FSL_GIANFAR_DEV_HAS_MAGIC_PACKET | 749 FSL_GIANFAR_DEV_HAS_MAGIC_PACKET |
750 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH | 750 FSL_GIANFAR_DEV_HAS_EXTENDED_HASH;
751 FSL_GIANFAR_DEV_HAS_TIMER;
752 751
753 ctype = of_get_property(np, "phy-connection-type", NULL); 752 ctype = of_get_property(np, "phy-connection-type", NULL);
754 753
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 8ee929b796d8..dbd003453737 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -53,6 +53,9 @@
53 53
54#define MII_LXT971_ISR 19 /* Interrupt Status Register */ 54#define MII_LXT971_ISR 19 /* Interrupt Status Register */
55 55
56/* register definitions for the 973 */
57#define MII_LXT973_PCR 16 /* Port Configuration Register */
58#define PCR_FIBER_SELECT 1
56 59
57MODULE_DESCRIPTION("Intel LXT PHY driver"); 60MODULE_DESCRIPTION("Intel LXT PHY driver");
58MODULE_AUTHOR("Andy Fleming"); 61MODULE_AUTHOR("Andy Fleming");
@@ -119,6 +122,33 @@ static int lxt971_config_intr(struct phy_device *phydev)
119 return err; 122 return err;
120} 123}
121 124
125static 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
146static 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
122static struct phy_driver lxt970_driver = { 152static struct phy_driver lxt970_driver = {
123 .phy_id = 0x78100000, 153 .phy_id = 0x78100000,
124 .name = "LXT970", 154 .name = "LXT970",
@@ -146,6 +176,18 @@ static struct phy_driver lxt971_driver = {
146 .driver = { .owner = THIS_MODULE,}, 176 .driver = { .owner = THIS_MODULE,},
147}; 177};
148 178
179static 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
149static int __init lxt_init(void) 191static int __init lxt_init(void)
150{ 192{
151 int ret; 193 int ret;
@@ -157,9 +199,15 @@ static int __init lxt_init(void)
157 ret = phy_driver_register(&lxt971_driver); 199 ret = phy_driver_register(&lxt971_driver);
158 if (ret) 200 if (ret)
159 goto err2; 201 goto err2;
202
203 ret = phy_driver_register(&lxt973_driver);
204 if (ret)
205 goto err3;
160 return 0; 206 return 0;
161 207
162 err2: 208 err3:
209 phy_driver_unregister(&lxt971_driver);
210 err2:
163 phy_driver_unregister(&lxt970_driver); 211 phy_driver_unregister(&lxt970_driver);
164 err1: 212 err1:
165 return ret; 213 return ret;
@@ -169,6 +217,7 @@ static void __exit lxt_exit(void)
169{ 217{
170 phy_driver_unregister(&lxt970_driver); 218 phy_driver_unregister(&lxt970_driver);
171 phy_driver_unregister(&lxt971_driver); 219 phy_driver_unregister(&lxt971_driver);
220 phy_driver_unregister(&lxt973_driver);
172} 221}
173 222
174module_init(lxt_init); 223module_init(lxt_init);
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 03a8318d90a2..96b6cfbf0a3a 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -560,10 +560,10 @@ static void mdio_write(void __iomem *ioaddr, int reg_addr, int value)
560 udelay(25); 560 udelay(25);
561 } 561 }
562 /* 562 /*
563 * Some configurations require a small delay even after the write 563 * According to hardware specs a 20us delay is required after write
564 * completed indication or the next write might fail. 564 * complete indication, but before sending next command.
565 */ 565 */
566 udelay(25); 566 udelay(20);
567} 567}
568 568
569static int mdio_read(void __iomem *ioaddr, int reg_addr) 569static int mdio_read(void __iomem *ioaddr, int reg_addr)
@@ -583,6 +583,12 @@ static int mdio_read(void __iomem *ioaddr, int reg_addr)
583 } 583 }
584 udelay(25); 584 udelay(25);
585 } 585 }
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
586 return value; 592 return value;
587} 593}
588 594
diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c
index 3f283bff0ff7..11491354e5b5 100644
--- a/drivers/net/wimax/i2400m/fw.c
+++ b/drivers/net/wimax/i2400m/fw.c
@@ -1192,7 +1192,7 @@ int i2400m_fw_hdr_check(struct i2400m *i2400m,
1192 unsigned module_type, header_len, major_version, minor_version, 1192 unsigned module_type, header_len, major_version, minor_version,
1193 module_id, module_vendor, date, size; 1193 module_id, module_vendor, date, size;
1194 1194
1195 module_type = bcf_hdr->module_type; 1195 module_type = le32_to_cpu(bcf_hdr->module_type);
1196 header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len); 1196 header_len = sizeof(u32) * le32_to_cpu(bcf_hdr->header_len);
1197 major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000) 1197 major_version = (le32_to_cpu(bcf_hdr->header_version) & 0xffff0000)
1198 >> 16; 1198 >> 16;