From owner-freebsd-current Mon Oct 21 7: 4:59 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B6ABF37B401 for ; Mon, 21 Oct 2002 07:04:57 -0700 (PDT) Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 608E343E65 for ; Mon, 21 Oct 2002 07:04:56 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5]) by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id g9LE4YY59556; Mon, 21 Oct 2002 23:04:35 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Mon, 21 Oct 2002 23:04:29 +0900 (JST) Message-Id: <20021021.230429.85418678.iwasaki@jp.FreeBSD.org> To: imp@bsdimp.com Cc: freebsd-current@FreeBSD.ORG Subject: [PATCH] re-attach cards after resume From: Mitsuru IWASAKI X-Mailer: Mew version 2.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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