Date: Mon, 21 Oct 2002 23:04:29 +0900 (JST) From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> To: imp@bsdimp.com Cc: freebsd-current@FreeBSD.ORG Subject: [PATCH] re-attach cards after resume Message-ID: <20021021.230429.85418678.iwasaki@jp.FreeBSD.org>
next in thread | raw e-mail | index | archive | help
Hi, warner. My laptops (FIVA and Toshiba 3110CT) doesn't re-attach cards after resume. ---- ata1: resetting devices .. done cbb0: card inserted: event=0x00000000, state=30000010 pccard0: chip_socket_enable cbb_pcic_socket_enable: cbb0: cbb_power: CARD_VCC_0V and CARD_VPP_0V [44] cbb0: Unknown card voltage pccard0: read_cis pccard0: check_cis_quirks pccard0: Card has no functions! ---- It seems that doing only cbb_setb(sc, CBB_SOCKET_FORCE, CBB_SOCKET_EVENT_CD) doesn't work on many CBB, so I've made following patch. This is working well so far in both cases of 16-bits cards and Cardbus cards. Could you review and commit this if OK? Thanks Index: pccbb.c =================================================================== RCS file: /home/ncvs/src/sys/dev/pccbb/pccbb.c,v retrieving revision 1.59 diff -u -r1.59 pccbb.c --- pccbb.c 11 Oct 2002 04:30:59 -0000 1.59 +++ pccbb.c 21 Oct 2002 11:41:12 -0000 @@ -1918,7 +1918,10 @@ cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD); /* Force us to go query the socket state */ - cbb_setb(sc, CBB_SOCKET_FORCE, CBB_SOCKET_EVENT_CD); + mtx_lock(&sc->mtx); + sc->flags &= ~CBB_CARD_OK; + cv_signal(&sc->cv); + mtx_unlock(&sc->mtx); error = bus_generic_resume(self); 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?20021021.230429.85418678.iwasaki>