Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 2002 23:58:08 +0200
From:      Mark Santcroos <marks@ripe.net>
To:        Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
Cc:        imp@bsdimp.com, freebsd-current@FreeBSD.ORG
Subject:   Re: [PATCH] re-attach cards after resume
Message-ID:  <20021021215808.GA2789@laptop.6bone.nl>
In-Reply-To: <20021021.230429.85418678.iwasaki@jp.FreeBSD.org>
References:  <20021021.230429.85418678.iwasaki@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021021215808.GA2789>