From owner-freebsd-questions@FreeBSD.ORG Thu Apr 9 22:20:50 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAE03106566C for ; Thu, 9 Apr 2009 22:20:50 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from smtp-vbr17.xs4all.nl (smtp-vbr17.xs4all.nl [194.109.24.37]) by mx1.freebsd.org (Postfix) with ESMTP id 6F1BD8FC08 for ; Thu, 9 Apr 2009 22:20:50 +0000 (UTC) (envelope-from rsmith@xs4all.nl) Received: from slackbox.xs4all.nl (slackbox.xs4all.nl [213.84.242.160]) by smtp-vbr17.xs4all.nl (8.13.8/8.13.8) with ESMTP id n39MKmOF027764; Fri, 10 Apr 2009 00:20:48 +0200 (CEST) (envelope-from rsmith@xs4all.nl) Received: by slackbox.xs4all.nl (Postfix, from userid 1001) id E5DF6BA93; Fri, 10 Apr 2009 00:20:47 +0200 (CEST) Date: Fri, 10 Apr 2009 00:20:47 +0200 From: Roland Smith To: perryh@pluto.rain.com Message-ID: <20090409222047.GA44772@slackbox.xs4all.nl> References: <49de2c9a.QlCBOleCO/iBrMcf%perryh@pluto.rain.com> <20090409181009.GA38361@slackbox.xs4all.nl> <49de50cb.gcYrr9F1eSmdUBu9%perryh@pluto.rain.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2fHTh5uZTiUOsy+g" Content-Disposition: inline In-Reply-To: <49de50cb.gcYrr9F1eSmdUBu9%perryh@pluto.rain.com> X-GPG-Fingerprint: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 X-GPG-Key: http://www.xs4all.nl/~rsmith/pubkey.txt X-GPG-Notice: If this message is not signed, don't assume I sent it! User-Agent: Mutt/1.5.19 (2009-01-05) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: freebsd-questions@freebsd.org Subject: Re: USB SD-card reader recognized, but not working, on 6.1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Apr 2009 22:20:51 -0000 --2fHTh5uZTiUOsy+g Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 09, 2009 at 12:47:23PM -0700, perryh@pluto.rain.com wrote: > Roland Smith wrote: > > Are you sure that the drive isn't partitioned? In other words, > > if you plug in the drive, and you give the command 'ls /dev/da0*', > > do you only get /dev/da0 or perhaps also /dev/da0s1? If it is > > partitioned, try /dev/da0s? instead. >=20 > It's an SD card, not a "drive", so I had not expected it to be > partitioned; but yes, it is: >=20 > $ ls -l /dev/da0* > crw-r----- 1 root operator 0, 244 Feb 14 15:09 /dev/da0 > crw-r----- 1 root operator 0, 245 Feb 14 15:09 /dev/da0s1 That would suggest that there is a filesystem on there, doesn't it? =20 > > Second, does the user running mtools have read and write access > > to the device? >=20 > Read-only, which should be sufficient for mdir. The card is, > deliberately, write-protected. >=20 > After reconfiguring mtools to read from /dev/da0s1, I started > getting those umass0: BBB bulk-in clear stall failed, TIMEOUT > messages again, but I can read it a sector at a time using dd: Try running unplugging the device, run 'camcontrol rescan all' and plug it in again. Then wait until the devices show up. > $ dd if=3D/dev/da0 of=3D~/sd bs=3D1b >=20 > That's been running for something like 45 minutes now, and based on > the size of the output file it has read about a tenth of the card. Reading one byte at a time is bound to be slow. It could be that this USB chipset needs some "quirks" to work correctly. There are some really crappy USB chipsets out there. E.g. I've had trouble with prolific controllers, especially on older (single core) machines. If you are in a position to do so, you could try the new USB stack in 8-CURRENT.=20 > > Have you tried just mounting the card reader? >=20 > No, because I'd expect to panic the system if it is not in fact a > valid (and readable) FAT filesystem. Mtools seems much safer. I can't recall mount_msdosfs ever panicing the kernel on me in that case. It usually just fails. Roland --=20 R.F.Smith http://www.xs4all.nl/~rsmith/ [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated] pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725) --2fHTh5uZTiUOsy+g Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAknedL8ACgkQEnfvsMMhpyW3pwCfUwKX6ysftpIi939Q95DCpTsv IhQAoJnuewM54lLxpVZAKD0yEfJ1yT54 =Yc7r -----END PGP SIGNATURE----- --2fHTh5uZTiUOsy+g--