From owner-freebsd-current@FreeBSD.ORG Fri Nov 9 01:43:15 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42EDE16A419 for ; Fri, 9 Nov 2007 01:43:15 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.186]) by mx1.freebsd.org (Postfix) with ESMTP id BC31513C4AA for ; Fri, 9 Nov 2007 01:43:14 +0000 (UTC) (envelope-from max@love2party.net) Received: from amd64.laiers.local (dslb-088-066-048-233.pools.arcor-ip.net [88.66.48.233]) by mrelayeu.kundenserver.de (node=mrelayeu7) with ESMTP (Nemesis) id 0ML2xA-1IqIte47uZ-0004wa; Fri, 09 Nov 2007 02:43:00 +0100 From: Max Laier Organization: FreeBSD To: Benjamin Close Date: Fri, 9 Nov 2007 02:42:46 +0100 User-Agent: KMail/1.9.7 References: <200711071056.13466.root@solink.ru> <4733B96C.2010307@clearchain.com> In-Reply-To: <4733B96C.2010307@clearchain.com> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2916183.KU7U9Qqipb"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200711090242.57554.max@love2party.net> X-Provags-ID: V01U2FsdGVkX1/Pmmhj/5w+csnXyC3Mi1XeHE5jHTSq+0CziEh 6xWUy90CAvi1PxTG5ajQ6KhWC5+z6JsV3aLfULJ+N4pkbXrebD Dqo0uHNZ3UfcW9lxLhIiSy/Cf9UUT7e3KSw1/H2wro= Cc: Bachilo Dmitry , mobile@freebsd.org, current@freebsd.org, Alexandre Sunny Kovalenko , Rene Ladan Subject: Re: PCI Cardreader X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2007 01:43:15 -0000 --nextPart2916183.KU7U9Qqipb Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Friday 09 November 2007, Benjamin Close wrote: > Rene Ladan wrote: > > 2007/11/8, Rene Ladan : > >> Alexandre "Sunny" Kovalenko schreef: > >>> On Wed, 2007-11-07 at 22:13 +0100, Rene Ladan wrote: > >>>> Bachilo Dmitry schreef: > >>>>> Hello all. > >>>>> I always used USB cardreaders and had no problem with it, but now > >>>>> in my notebook I have a cardreader, that appears to be onboard > >>>>> PCI device. And so FreeBSD sees it as this: > >>>>> pci6: at device 4.1 (no driver attached) > >>>>> pci6: at device 4.2 (no driver attached) > >>>>> pci6: at device 4.3 (no driver attached) > >>>>> pci6: at device 4.4 (no driver attached) > >>>>> > >>>>> > >>>>> That's even more odd because three are recognized as flash and > >>>>> one is not. pciconf -lv shows this: > >>>>> > >>>>> none13@pci6:4:1: class=3D0x050100 card=3D0x009f1025 > >>>>> chip=3D0x05301524 rev=3D0x01 hdr=3D0x00 > >>>>> vendor =3D 'ENE Technology Inc' > >>>>> device =3D 'PCI Memory Stick Card Reader Controller' > >>>>> class =3D memory > >>>>> subclass =3D flash > >>>>> > >>>>> Well, in 7.0-CURRENT it showed all four devices and now in BETA-2 > >>>>> only this one. > >>>> > >>>> On my 8.0-CURRENT box (20071105) it shows all four devices: > >>>> > >>>> cbb0@pci0:4:1:0: class=3D0x060700 card=3D0x14371043 > >>>> chip=3D0x04761180 rev=3D0xb3 hdr=3D0x02 vendor =3D 'Ricoh Compan= y, > >>>> Ltd.' > >>>> device =3D 'unknown Ricoh R/RL/5C476(II)' > >>>> class =3D bridge > >>>> subclass =3D PCI-CardBus > >>>> fwohci0@pci0:4:1:1: class=3D0x0c0010 card=3D0x14371043 > >>>> chip=3D0x05521180 rev=3D0x08 hdr=3D0x00 vendor =3D 'Ricoh Compan= y, > >>>> Ltd.' > >>>> device =3D 'RL5c552 IEEE-1394 Controller' > >>>> class =3D serial bus > >>>> subclass =3D FireWire > >>>> none0@pci0:4:1:2: class=3D0x080500 card=3D0x14371043 > >>>> chip=3D0x08221180 rev=3D0x17 hdr=3D0x00 vendor =3D 'Ricoh Compan= y, > >>>> Ltd.' > >>>> device =3D 'R5C832, R5C843 SDA Standard Compliant SD Host > >>>> Controller' class =3D base peripheral > >>>> none1@pci0:4:1:3: class=3D0x088000 card=3D0x14371043 > >>>> chip=3D0x05921180 rev=3D0x08 hdr=3D0x00 vendor =3D 'Ricoh Compan= y, > >>>> Ltd.' > >>>> device =3D '13871043 Ricoh Memory Stick Host Controller' > >>>> class =3D base peripheral > >>>> > >>>>> Is there any way I can make them work? > >>>> > >>>> You can add these lines to your kernel configuration: > >>>> > >>>> device mmc > >>>> device mmcsd > >>>> > >>>> But don't expect any magic. mmc(4) and mmcsd(4) tell that nothing > >>>> currently works, which seems to be true on my Asus A6JE (using a > >>>> Kingston micro-SD card with adapter). > >>>> > >>>> imp@ is the last person who touched the driver which lives in > >>>> /usr/src/sys/dev/mmc/ > >>> > >>> Thing below is on my list to try out when I get enough breathing > >>> room (or when I would have a dire need to read SD cards on my > >>> ThinkPad X60 ;). Did you, by any chance, try it? Any experiences to > >>> share? > >>> > >>> http://www.freebsd.org/cgi/getmsg.cgi?fetch=3D17399+21119 > >>> +/usr/local/www/db/text/2007/freebsd-mobile/20070916.freebsd-mobile > >> > >> Not yet, I didn't see the message until now since I'm not (yet) on > >> the mobile list. A quick try showed that it does not compile on my > >> box. I'll investigate why. The author did not leave an email > >> address in the files. > > > > The short story is bus_setup_intr() gained some parameters, I'll > > figure out which. According to a blog at bsdimp.blogspot.com, Ricoh > > based readers should work with this driver :) > > The attached patch gets it compiling but I think there might be some > locking issues still as I got an immediate panic at module load. Not > sure who put up the tar.gz but I know Max has done some work porting it > from OpenBSD in p4: > > http://perforce.freebsd.org/changeList.cgi?CMD=3Dchanges&FSPC=3D//depot/u= se >r/mlaier/sdmmc/sys/... Nah, that's crap. Never got anywhere. Just me toying around. > > diff -ur sdmmc-20070627/dev/sdmmc/sdshc.c > sdmmc-20070627-devel/dev/sdmmc/sdshc.c > --- sdmmc-20070627/dev/sdmmc/sdshc.c 2007-06-25 19:55:52.000000000 > +0930 +++ sdmmc-20070627-devel/dev/sdmmc/sdshc.c 2007-11-09 > 11:45:00.779789122 +1030 > @@ -42,6 +42,8 @@ > #include > #include > #include > +#include > +#include > > #include > #include > @@ -342,7 +344,7 @@ > * Hook our interrupt after all initialization is complete. > */ > LOG(0x10, (dev, "Setup Intr\n")); > - error =3D bus_setup_intr(dev, sc->irq, INTR_TYPE_NET|INTR_MPSAFE , > + error =3D bus_setup_intr(dev, sc->irq, INTR_TYPE_NET|INTR_MPSAFE , > NULL, sdshc_intr, sc, &sc->ih); > if (error !=3D 0) { > MSG((dev, "could not set up interrupt\n")); > diff -ur sdmmc-20070627/dev/sdmmc/sdshcbus.c > sdmmc-20070627-devel/dev/sdmmc/sdshcbus.c > --- sdmmc-20070627/dev/sdmmc/sdshcbus.c 2007-06-20 03:12:28.000000000 > +0930 +++ sdmmc-20070627-devel/dev/sdmmc/sdshcbus.c 2007-11-09 > 11:49:18.706315189 +1030 > @@ -41,6 +41,8 @@ > #include > #include > #include > +#include > +#include > > #include "sdbus_if.h" =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart2916183.KU7U9Qqipb Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQBHM7shXyyEoT62BG0RAmWsAJkBZbXkX8vFAuO2Da3wUwUbQSgGiACdH5p7 e9CKfIvD9Na+2eZKEAZr34Q= =nOh4 -----END PGP SIGNATURE----- --nextPart2916183.KU7U9Qqipb--