source:
clfs-embedded/patches/linux-2.6.20.1-tulip-1.patch@
6d1c66e
Last change on this file since 6d1c66e was 9a57cc4, checked in by , 18 years ago | |
---|---|
|
|
File size: 4.4 KB |
-
drivers/net/tulip/21142.c
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2007-02-04 Initial Package Version: 2.6.20 Origin: Grant Gundler (parisc linux) Upstream Status: in -mm Description: Make the tulip drivers follow the chipset specs diff -Naur linux-2.6.20.orig/drivers/net/tulip/21142.c linux-2.6.20/drivers/net/tulip/21142.c
old new 173 173 int i; 174 174 for (i = 0; i < tp->mtable->leafcount; i++) 175 175 if (tp->mtable->mleaf[i].media == dev->if_port) { 176 int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65)));176 int startup = ! ((tp->chip_id == DC21143 && tp->revision == 65)); 177 177 tp->cur_index = i; 178 178 tulip_select_media(dev, startup); 179 179 setup_done = 1; -
drivers/net/tulip/media.c
diff -Naur linux-2.6.20.orig/drivers/net/tulip/media.c linux-2.6.20/drivers/net/tulip/media.c
old new 44 44 45 45 /* MII transceiver control section. 46 46 Read and write the MII registers using software-generated serial 47 MDIO protocol. See the MII specifications or DP83840A data sheet 48 for details. */ 47 MDIO protocol. 48 See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions") 49 or DP83840A data sheet for more details. 50 */ 49 51 50 52 int tulip_mdio_read(struct net_device *dev, int phy_id, int location) 51 53 { … … 261 263 u16 *reset_sequence = &((u16*)(p+3))[init_length]; 262 264 int reset_length = p[2 + init_length*2]; 263 265 misc_info = reset_sequence + reset_length; 264 if (startup) 266 if (startup) { 267 int timeout = 10; /* max 1 ms */ 265 268 for (i = 0; i < reset_length; i++) 266 269 iowrite32(get_u16(&reset_sequence[i]) << 16, ioaddr + CSR15); 270 271 /* flush posted writes */ 272 ioread32(ioaddr + CSR15); 273 274 /* Sect 3.10.3 in DP83840A.pdf (p39) */ 275 udelay(500); 276 277 /* Section 4.2 in DP83840A.pdf (p43) */ 278 /* and IEEE 802.3 "22.2.4.1.1 Reset" */ 279 while (timeout-- && 280 (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET)) 281 udelay(100); 282 } 267 283 for (i = 0; i < init_length; i++) 268 284 iowrite32(get_u16(&init_sequence[i]) << 16, ioaddr + CSR15); 285 286 ioread32(ioaddr + CSR15); /* flush posted writes */ 269 287 } else { 270 288 u8 *init_sequence = p + 2; 271 289 u8 *reset_sequence = p + 3 + init_length; 272 290 int reset_length = p[2 + init_length]; 273 291 misc_info = (u16*)(reset_sequence + reset_length); 274 292 if (startup) { 293 int timeout = 10; /* max 1 ms */ 275 294 iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12); 276 295 for (i = 0; i < reset_length; i++) 277 296 iowrite32(reset_sequence[i], ioaddr + CSR12); 297 298 /* flush posted writes */ 299 ioread32(ioaddr + CSR12); 300 301 /* Sect 3.10.3 in DP83840A.pdf (p39) */ 302 udelay(500); 303 304 /* Section 4.2 in DP83840A.pdf (p43) */ 305 /* and IEEE 802.3 "22.2.4.1.1 Reset" */ 306 while (timeout-- && 307 (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET)) 308 udelay(100); 278 309 } 279 310 for (i = 0; i < init_length; i++) 280 311 iowrite32(init_sequence[i], ioaddr + CSR12); 312 313 ioread32(ioaddr + CSR12); /* flush posted writes */ 281 314 } 315 282 316 tmp_info = get_u16(&misc_info[1]); 283 317 if (tmp_info) 284 318 tp->advertising[phy_num] = tmp_info | 1; -
drivers/net/tulip/tulip.h
diff -Naur linux-2.6.20.orig/drivers/net/tulip/tulip.h linux-2.6.20/drivers/net/tulip/tulip.h
old new 482 482 udelay(10); 483 483 484 484 if (!i) 485 printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n", 486 pci_name(tp->pdev)); 485 printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed" 486 " (CSR5 0x%x CSR6 0x%x)\n", 487 pci_name(tp->pdev), 488 ioread32(ioaddr + CSR5), 489 ioread32(ioaddr + CSR6)); 487 490 } 488 491 } 489 492 -
drivers/net/tulip/tulip_core.c
diff -Naur linux-2.6.20.orig/drivers/net/tulip/tulip_core.c linux-2.6.20/drivers/net/tulip/tulip_core.c
old new 21 21 #else 22 22 #define DRV_VERSION "1.1.14" 23 23 #endif 24 #define DRV_RELDATE " May 11, 2002"24 #define DRV_RELDATE "December 15, 2004" 25 25 26 26 27 27 #include <linux/module.h>
Note:
See TracBrowser
for help on using the repository browser.