Date: Wed, 1 Dec 1999 12:36:25 -0500 (EST) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: current@freebsd.org Subject: Last if_dc update before import Message-ID: <199912011736.MAA24983@skynet.ctr.columbia.edu>
next in thread | raw e-mail | index | archive | help
I've made one more round of fixes to the if_dc driver, which I hope will be the last before I import it into -current this coming weekend so that I can get it in before the feature freeze. The changes are: - Modified the behavior of dc_mii_tick() so that the DC_REDUCED_MII_POLL flag works for non-21143 chips that either don't have a 'link failure' bit in their status registers or have one which doesn't behave like the one in the 21143 (the 21143's link failure bit works for both 10 and 100Mbps modes). The problem is that with MII-based NICs, we need to poll the PHY status register in order to monitor the link state, however this involves a lot of work for chips with a serial MDIO interface (all that bit banging) and I have observed that polling during periods of heavy receive activity sometimes causes RX CRC errors. With the 21143, we avoid polling unless the link fail bit goes up; for the other chips, we avoid polling if a) a we have any outstanding packets on the TX queue and b) the RX state as shown by CSR5 indicates that that the receiver is not idle. - Enabled DC_REDUCED_MII_POLL flag for all non-21143 chips that use bit-bang MDIO interface as a result of the previous change. - Corrected dc_eeprom_idle() and dc_eeprom_getword() so that they pull the clock line low before setting chip select: this way we start out our transaction with the EEPROM with the clock low, which conforms with the timing diagrams in the 93C66 datasheet. This allows us to read the EEPROM on the ADMtek AN985 cards again: I noticed yesterday that this didn't work anymore even though it had worked when I tested the ADMtek cards with this driver some weeks ago. I suspect this is related to the gcc switch: it could be that the previous code worked by accident due to some peculiarity in egcs 1.1.2 which is no longer present in gcc 2.95.2. Reading the 93C64 EEPROMs on all the other cards still works as before. - Disabled TX descriptor polling for the ADMtek cards. Descriptor polling means that the chip checks for packets in the TX ring itself rather than waiting for the host to issue a TX DMA start request. However some chips appear to constantly generate 'no TX buffer present' interrupts each time they poll and find the ring is empty. This causes unnecessary interrupt activity when the transmitter is idle. - Wrote a man page. As usual, the tarball is at http://www.freebsd.org/~wpaul/dc.tar.gz. I haven't been able to produce alpha KLD binaries since beast.cdrom.com appears to be dead. Note that I am still accepting bug/non-bug reports. I'm particularly interested in hearing from people with PNIC 82c168 and 82c169 cards (LinkSys LNE100TX, NetGear FA310-TX Rev D1, D2, D3, Kingston KNE110TX, Matrox FastNIC, etc...) since I want to be certain that I've gotten all of the various chip workarounds working right. NOTE: once I add this driver to the tree, I intend to remove the al, ax, dm, pn and mx drivers and man pages since they should no longer be needed. Please remember to update your rc.conf files accordingly! I will post an additional heads up when I finally do the deed. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "It is not I who am crazy; it is I who am mad!" - Ren Hoek, "Space Madness" ============================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912011736.MAA24983>