aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/tulip/de4x5.c4
-rw-r--r--drivers/net/tulip/media.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c
index 98e86826b2c7..6430a2ec6db1 100644
--- a/drivers/net/tulip/de4x5.c
+++ b/drivers/net/tulip/de4x5.c
@@ -3942,8 +3942,8 @@ PCI_signature(char *name, struct de4x5_private *lp)
3942 strcpy(name, "DE434/5"); 3942 strcpy(name, "DE434/5");
3943 return status; 3943 return status;
3944 } else { /* Search for a DEC name in the SROM */ 3944 } else { /* Search for a DEC name in the SROM */
3945 int i = *((char *)&lp->srom + 19) * 3; 3945 int tmp = *((char *)&lp->srom + 19) * 3;
3946 strncpy(name, (char *)&lp->srom + 26 + i, 8); 3946 strncpy(name, (char *)&lp->srom + 26 + tmp, 8);
3947 } 3947 }
3948 name[8] = '\0'; 3948 name[8] = '\0';
3949 for (i=0; i<siglen; i++) { 3949 for (i=0; i<siglen; i++) {
diff --git a/drivers/net/tulip/media.c b/drivers/net/tulip/media.c
index 91cf9c863910..daddfa51853e 100644
--- a/drivers/net/tulip/media.c
+++ b/drivers/net/tulip/media.c
@@ -69,11 +69,10 @@ int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
69 69
70 spin_lock_irqsave(&tp->mii_lock, flags); 70 spin_lock_irqsave(&tp->mii_lock, flags);
71 if (tp->chip_id == LC82C168) { 71 if (tp->chip_id == LC82C168) {
72 int i = 1000;
73 iowrite32(0x60020000 + (phy_id<<23) + (location<<18), ioaddr + 0xA0); 72 iowrite32(0x60020000 + (phy_id<<23) + (location<<18), ioaddr + 0xA0);
74 ioread32(ioaddr + 0xA0); 73 ioread32(ioaddr + 0xA0);
75 ioread32(ioaddr + 0xA0); 74 ioread32(ioaddr + 0xA0);
76 while (--i > 0) { 75 for (i = 1000; i >= 0; --i) {
77 barrier(); 76 barrier();
78 if ( ! ((retval = ioread32(ioaddr + 0xA0)) & 0x80000000)) 77 if ( ! ((retval = ioread32(ioaddr + 0xA0)) & 0x80000000))
79 break; 78 break;
@@ -131,13 +130,12 @@ void tulip_mdio_write(struct net_device *dev, int phy_id, int location, int val)
131 130
132 spin_lock_irqsave(&tp->mii_lock, flags); 131 spin_lock_irqsave(&tp->mii_lock, flags);
133 if (tp->chip_id == LC82C168) { 132 if (tp->chip_id == LC82C168) {
134 int i = 1000;
135 iowrite32(cmd, ioaddr + 0xA0); 133 iowrite32(cmd, ioaddr + 0xA0);
136 do { 134 for (i = 1000; i >= 0; --i) {
137 barrier(); 135 barrier();
138 if ( ! (ioread32(ioaddr + 0xA0) & 0x80000000)) 136 if ( ! (ioread32(ioaddr + 0xA0) & 0x80000000))
139 break; 137 break;
140 } while (--i > 0); 138 }
141 spin_unlock_irqrestore(&tp->mii_lock, flags); 139 spin_unlock_irqrestore(&tp->mii_lock, flags);
142 return; 140 return;
143 } 141 }