Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 2003 19:25:50 +0200
From:      Arjan van Leeuwen <avleeuwen@piwebs.com>
To:        current@freebsd.org
Subject:   Panic with Apacer USB flash card reader
Message-ID:  <200309251925.51010.avleeuwen@piwebs.com>

next in thread | raw e-mail | index | archive | help
Hi,

I've bought an Apacer internal USB card reader that can read CompactFlash, 
SmartMedia, MMC, SD and MemoryStick flash cards. It is a USB2 device, but 
according to Apacer it should work on a USB1.1 connection without a problem.

If there are no cards in the drive, everything seems to be detected the way it 
should. From dmesg:

uhci0: <VIA 83C572 USB controller> port 0xa800-0xa81f irq 5 at device 7.2 on 
pci
usb0: <VIA 83C572 USB controller> on uhci0
usb0: USB revision 1.0
uhub0: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <VIA 83C572 USB controller> port 0xac00-0xac1f irq 5 at device 7.3 on 
pci
usb1: <VIA 83C572 USB controller> on uhci1
usb1: USB revision 1.0
uhub1: VIA UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
umass0: USB2.0 product 0x0500, rev 2.00/1.63, addr 2
(...)
GEOM: create disk da0 dp=0xc4276450
GEOM: create disk da1 dp=0xc4275850
GEOM: create disk da2 dp=0xc4274c50
GEOM: create disk da3 dp=0xc426cc50
(...)
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <USB2.0 HS-CF 1.63> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <USB2.0 HS-MS 1.63> Removable Direct Access SCSI-0 device
da1: 1.000MB/s transfers
da1: Attempt to query device size failed: NOT READY, Medium not present
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <USB2.0 HS-SM 1.63> Removable Direct Access SCSI-0 device
da2: 1.000MB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
da3 at umass-sim0 bus 0 target 0 lun 3
da3: <USB2.0 HS-SD/MMC 1.63> Removable Direct Access SCSI-0 device
da3: 1.000MB/s transfers
da3: Attempt to query device size failed: NOT READY, Medium not present
(da0:umass-sim0:0:0:0): READ CAPACITY. CDB: 25 0 0 0 0 0 0 0 0 0
(da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(da0:umass-sim0:0:0:0): SCSI Status: Check Condition
(da0:umass-sim0:0:0:0): NOT READY asc:3a,0
(da0:umass-sim0:0:0:0): Medium not present
(da0:umass-sim0:0:0:0): Unretryable error
Opened disk da0 -> 6

(the last 7 lines repeated twice for da0, da1, da2 and da3).

However, if I put a CF card in the drive, the boot hangs before GEOM: create 
disk da0 dp=0xc4276450 and repeatedly displays this message:

umass0: BBB reset failed, TIMEOUT

After some time, it manages to find da0 and da1. The TIMEOUTs keep coming, but 
I also see this:
da0:(umass-sim0:0:0:0)	: got CAM status 0x4
					: fatal error, failed to attach device
					: lost device
					: removing device entry

It does the same for da1, and immediately after that, I get a panic (fatal 
trap 12: page fault while in kernel mode).

Where do I go from here? Should I try to debug the panic, or is this a known 
problem and is there a known solution? 

I tried adding some quirks to src/sys/cam/scsi_da.c, but I couldn't see if 
they were active or not (is there a way to check this?). If they were active, 
they didn't work. I tried DA_Q_NO_SYNC_CACHE and DA_Q_NO_6_BYTE.

What is the next step?

Thanks,

Arjan



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