Date: Wed, 12 Jan 2005 14:39:18 -0500 From: Christopher Sean Hilton <chris@vindaloo.com> To: "M. Warner Losh" <imp@bsdimp.com> Cc: nate@root.org Subject: Re: Suspend problem on FreeBSD 5.3-STABLE Message-ID: <20050112193918.GA17164@yavin.vindaloo.com> In-Reply-To: <20050112.072948.89901373.imp@bsdimp.com> References: <41E19C0E.6030400@root.org> <41E48E70.30807@vindaloo.com> <41E4BC93.40608@root.org> <20050112.072948.89901373.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 12, 2005 at 07:29:48AM -0700, M. Warner Losh wrote: > : > FA411 16 bit PCMCIA card after a suspend/resume works as expected. I > : > will try to down the interface and kldunload the dc driver before > : > shutdown to see if that helps. > : > : That fits with my analysis as well. It seems that cardbus handles > : things fine but individual drivers may be lacking in suspend/resume support. > > Cardbus should be detaching and reattaching the device. So that's > clearly a bug in cardbus. Individual drivers have no choice in this > matter, since we can't know if the cards that are there after the > resume were the ones we suspended with. This doesn't matter too much > for NIC cards (but none of the drivers cope with MAC addresses > changing), but matters a great deal for things like flash cards. > > : That's a good testing approach, btw. If you find the dc(4) driver seems > : to be the culprit, the next step is to go through any datasheets and > : other OS drivers to see if you can find what we're doing differently. > > I don't think that it is a dc problem. > After my tests I'm not sure where it is. Here's what I did: o Compiled a kernel without dc support so I could # kldload if_dc o Loaded if_dc.ko as a module o Inserted the card At this time the card was properly probed. o Ran dhclient dc0 and observed the card get an ip address from my dhcp server. o Did some more network tests (hit http://www.ebay.com in firefox...) o Turned off the card nicely prior to detaching it: # ifconfig dc0 down delete o Unplugged the card and observed it detach from the cbb0 "slot". o Unloaded the if_dc driver: # kldunload if_dc o Suspend the laptop to standby mode: # sysctl hw.acpi.lid_switch_state="S3" Close the laptop's lid o Resume: Open the laptop's lid o Reload the driver (kldload if_dc...) o Pluggin the card At this time the cardbus driver reports: "cbb0: CardBus card activation failed" This leads me to believe that either the CardBus handler has a problem attaching an existing "used" dc driver to the card after a suspend/resume or the dc driver has left something in a state after it's detach where a re-attach will not work correctly. Has anyone got any other ideas? -- Chris -- -- Chris Hilton chilton-at-vindaloo-dot-com ------------------------------------------------------------------------ "All I was doing was trying to get home from work!" -- Rosa Parks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050112193918.GA17164>