From owner-freebsd-current Mon Oct 21 14:58:18 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 8420837B401 for ; Mon, 21 Oct 2002 14:58:16 -0700 (PDT) Received: from birch.ripe.net (birch.ripe.net [193.0.1.96]) by mx1.FreeBSD.org (Postfix) with ESMTP id A173243E65 for ; Mon, 21 Oct 2002 14:58:15 -0700 (PDT) (envelope-from marks@ripe.net) Received: from laptop.6bone.nl (cow.ripe.net [193.0.1.239]) by birch.ripe.net (8.12.5/8.11.6) with SMTP id g9LLwAnZ002950; Mon, 21 Oct 2002 23:58:10 +0200 Received: (nullmailer pid 2873 invoked by uid 1000); Mon, 21 Oct 2002 21:58:09 -0000 Date: Mon, 21 Oct 2002 23:58:08 +0200 From: Mark Santcroos To: Mitsuru IWASAKI Cc: imp@bsdimp.com, freebsd-current@FreeBSD.ORG Subject: Re: [PATCH] re-attach cards after resume Message-ID: <20021021215808.GA2789@laptop.6bone.nl> References: <20021021.230429.85418678.iwasaki@jp.FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021021.230429.85418678.iwasaki@jp.FreeBSD.org> User-Agent: Mutt/1.4i X-Handles: MS6-6BONE, MS18417-RIPE X-RIPE-Spam-Status: NONE ; -1023 X-RIPE-Spam-Level: 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 I reported the same(+different fix) to Warner a while ago. He had troubles with his tree and didn't want to commit before he had the issues sorted out. However, it seems to me a very crucial fix. Hopefully it can be committed now. Btw, your patch is alot smaller than mine :-) (Mine was explicitly calling the reattaching code again) Mark On Mon, Oct 21, 2002 at 11:04:29PM +0900, Mitsuru IWASAKI wrote: > 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 -- Mark Santcroos RIPE Network Coordination Centre http://www.ripe.net/home/mark/ New Projects Group/TTM To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message