source:
patches/linux-2.6.18.1-tulip-1.patch@
0177e46
Last change on this file since 0177e46 was 60d7c102, checked in by , 18 years ago | |
---|---|
|
|
File size: 4.7 KB |
-
drivers/net/tulip/21142.c
Submitted By: Jim Gifford (patches at jg555 dot com) Date: 2005-10-29 Initial Package Version: 2.6.14 Origin: Grant Gundler (parisc linux) Upstream Status: in -mm Description: Make the tulip drivers follow the chipset specs diff -Naur linux-2.6.14.orig/drivers/net/tulip/21142.c linux-2.6.14/drivers/net/tulip/21142.c
old new 172 172 int i; 173 173 for (i = 0; i < tp->mtable->leafcount; i++) 174 174 if (tp->mtable->mleaf[i].media == dev->if_port) { 175 int startup = ! ((tp->chip_id == DC21143 && (tp->revision == 48 || tp->revision == 65)));175 int startup = ! ((tp->chip_id == DC21143 && tp->revision == 65)); 176 176 tp->cur_index = i; 177 177 tulip_select_media(dev, startup); 178 178 setup_done = 1; -
drivers/net/tulip/media.c
diff -Naur linux-2.6.14.orig/drivers/net/tulip/media.c linux-2.6.14/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.14.orig/drivers/net/tulip/tulip.h linux-2.6.14/drivers/net/tulip/tulip.h
old new 474 474 udelay(10); 475 475 476 476 if (!i) 477 printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n", 478 pci_name(tp->pdev)); 477 printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed" 478 " (CSR5 0x%x CSR6 0x%x)\n", 479 pci_name(tp->pdev), 480 ioread32(ioaddr + CSR5), 481 ioread32(ioaddr + CSR6)); 479 482 } 480 483 } 481 484 -
drivers/net/tulip/tulip_core.c
diff -Naur linux-2.6.14.orig/drivers/net/tulip/tulip_core.c linux-2.6.14/drivers/net/tulip/tulip_core.c
old new 22 22 #else 23 23 #define DRV_VERSION "1.1.13" 24 24 #endif 25 #define DRV_RELDATE " May 11, 2002"25 #define DRV_RELDATE "December 15, 2004" 26 26 27 27 28 28 #include <linux/module.h> … … 148 148 HAS_MII | HAS_MEDIA_TABLE | CSR12_IN_SROM | HAS_PCI_MWI, tulip_timer }, 149 149 150 150 /* DC21142, DC21143 */ 151 { "Digital DS2114 3 Tulip", 128, 0x0801fbff,151 { "Digital DS21142/DS21143 Tulip", 128, 0x0801fbff, 152 152 HAS_MII | HAS_MEDIA_TABLE | ALWAYS_CHECK_MII | HAS_ACPI | HAS_NWAY 153 153 | HAS_INTR_MITIGATION | HAS_PCI_MWI, t21142_timer }, 154 154
Note:
See TracBrowser
for help on using the repository browser.