Felipe W Damasio wrote: > Hi, > > According to Clifford Chiang <wrchiang@msx.realtek.com.tw>, the LinkChg > is used just to inform the driver the link status has changed, the > changes are automatically set. > > Here's a patch against version 0.2.1. > > Please consider pulling it from: > > http://cscience.org/~felipewd/linux/patches-fwd/2.5/8139cp-LinkChg.patch > > Comments? You need to track link state by calling netif_carrier_on() and netif_carrier_off(). Initialize it in cp_open, and update it when you get a link change interrupt. Also, I would rather you created a short inline function to handle the link change interrupt, rather than coding it in the main interrupt function itself. Finally, don't forget there is a certain amount of "bounce" time during link change, so you need to test and see that link really is present when the link change interrupt is handled. You might get a LinkChange interrupt before autonegotiation is complete. So, at that instant, link would be down, so you always need to check after autonegotiation is complete. Jeff - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html