Issues with embedded card reader (Laptop ASUS K43SJ)

2012-05-16 Thread Eugene Dzhurinsky
Hi all!

I have some problems with the card reader - it is not recognized as mass
storage device.

OS is: FreeBSD devbox 9.0-STABLE FreeBSD 9.0-STABLE #23: Wed May 16 18:45:28 
EEST
2012 root@devbox:/usr/obj/usr/src/sys/BOFHMOD  amd64

 usbconfig list

ugen0.1: EHCI root HUB Intel at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE
ugen1.1: EHCI root HUB Intel at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE
ugen2.1: XHCI root HUB 0x1b21 at usbus2, cfg=0 md=HOST spd=SUPER (5.0Gbps) 
pwr=SAVE
ugen0.2: product 0x0024 vendor 0x8087 at usbus0, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE
ugen1.2: product 0x0024 vendor 0x8087 at usbus1, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE
ugen0.3: product 0x3304 vendor 0x13d3 at usbus0, cfg=0 md=HOST spd=FULL 
(12Mbps) pwr=ON
ugen0.4: ASUS USB2.0 WebCam 04G6200086K1AN17J000SGH at usbus0, cfg=0 md=HOST 
spd=HIGH (480Mbps) pwr=ON
ugen0.5: USB2.0-CRW Generic at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=O

 usbconfig -d 0.5 dump_device_desc
ugen0.5: USB2.0-CRW Generic at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ff 
  bDeviceSubClass = 0x00ff 
  bDeviceProtocol = 0x00ff 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0bda 
  idProduct = 0x0139 
  bcdDevice = 0x3960 
  iManufacturer = 0x0001  Generic
  iProduct = 0x0002  USB2.0-CRW
  iSerialNumber = 0x0003  2010020139600
  bNumConfigurations = 0x0001

I added the following lines to /usr/src/sys/dev/usb/usbdevs

 product REALTEK USB201CRW   0x0139  USB20CRW Card Reader

and to /usr/src/sys/dev/usb/quirk/usb_quirk.c

USB_QUIRK(REALTEK, USB201CRW, 0x, 0x, UQ_MSC_NO_GETMAXLUN,
UQ_MSC_FORCE_WIRE_BBB, 
 UQ_MSC_FORCE_PROTO_SCSI),

After loading modules:

usb_quirk.ko
uhci.ko
ohci.ko
ehci.ko
xhci.ko
umass.ko

in dmesg I can see:

ugen0.5: Generic at usbus0
umass0: Bulk-In, Bulk-Out, Interface on usbus0
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:2:0:-1: Attached to scbus2

however when the card is plugged in - no /dev/da* entries appear. What may be
wrong with my config and what else can I try? 

many thanks in advance!

-- 
Eugene N Dzhurinsky


pgpa9eLFpMvsb.pgp
Description: PGP signature


Support of internal card-reader for ASUS K43SJ

2011-10-19 Thread Eugene Dzhurinsky
Hello, all!

I need some advice - it seems that the cardreader is not recognizable on
FreeBSD 8.2  STABLE:

 uname -a
FreeBSD devbox 8.2-STABLE FreeBSD 8.2-STABLE #5: Wed Oct 19 12:20:43 EEST 2011  
   root@devbox:/usr/obj/usr/src/sys/BOFHMOD  amd64

 usbconfig list 

ugen0.1: EHCI root HUB Intel at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE
ugen1.1: EHCI root HUB Intel at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE
ugen0.2: product 0x0024 vendor 0x8087 at usbus0, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE
ugen1.2: product 0x0024 vendor 0x8087 at usbus1, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE
ugen0.3: product 0x3304 vendor 0x13d3 at usbus0, cfg=0 md=HOST spd=FULL 
(12Mbps) pwr=ON
ugen0.4: ASUS USB2.0 WebCam 04G6200086K1AN17J000SGH at usbus0, cfg=0 md=HOST 
spd=HIGH (480Mbps) pwr=ON
ugen0.5: USB2.0-CRW Generic at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

And dumps follow:



ugen0.1: EHCI root HUB Intel at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0009 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x 
  idProduct = 0x 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  Intel
  iProduct = 0x0002  EHCI root HUB
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 


ugen1.1: EHCI root HUB Intel at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) 
pwr=SAVE

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0009 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x 
  idProduct = 0x 
  bcdDevice = 0x0100 
  iManufacturer = 0x0001  Intel
  iProduct = 0x0002  EHCI root HUB
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 


ugen0.2: product 0x0024 vendor 0x8087 at usbus0, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0009 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x8087 
  idProduct = 0x0024 
  bcdDevice = 0x 
  iManufacturer = 0x  no string
  iProduct = 0x  no string
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 


ugen1.2: product 0x0024 vendor 0x8087 at usbus1, cfg=0 md=HOST spd=HIGH 
(480Mbps) pwr=SAVE

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x0009 
  bDeviceSubClass = 0x 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x8087 
  idProduct = 0x0024 
  bcdDevice = 0x 
  iManufacturer = 0x  no string
  iProduct = 0x  no string
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 

ugen0.3: product 0x3304 vendor 0x13d3 at usbus0, cfg=0 md=HOST spd=FULL 
(12Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0110 
  bDeviceClass = 0x00e0 
  bDeviceSubClass = 0x0001 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x13d3 
  idProduct = 0x3304 
  bcdDevice = 0x0001 
  iManufacturer = 0x  no string
  iProduct = 0x  no string
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 

ugen0.4: ASUS USB2.0 WebCam 04G6200086K1AN17J000SGH at usbus0, cfg=0 md=HOST 
spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ef 
  bDeviceSubClass = 0x0002 
  bDeviceProtocol = 0x0001 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x058f 
  idProduct = 0xa014 
  bcdDevice = 0x0003 
  iManufacturer = 0x0003  04G6200086K1AN17J000SGH
  iProduct = 0x0001  ASUS USB2.0 WebCam
  iSerialNumber = 0x  no string
  bNumConfigurations = 0x0001 

ugen0.5: USB2.0-CRW Generic at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

  bLength = 0x0012 
  bDescriptorType = 0x0001 
  bcdUSB = 0x0200 
  bDeviceClass = 0x00ff 
  bDeviceSubClass = 0x00ff 
  bDeviceProtocol = 0x00ff 
  bMaxPacketSize0 = 0x0040 
  idVendor = 0x0bda 
  idProduct = 0x0139 
  bcdDevice = 0x3960 
  iManufacturer = 0x0001  Generic
  iProduct = 0x0002  USB2.0-CRW
  iSerialNumber = 0x0003  2010020139600
  bNumConfigurations = 0x0001 



Now, when I insert USB flash stick - it gets recognized as da%n drive, however
any SD card does not appear in the system, and nothing in logs.

What may be wrong there and how to fix?

Many thanks in advance!

-- 
Eugene N Dzhurinsky
___
freebsd-usb@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to freebsd-usb-unsubscr...@freebsd.org


Re: Support of internal card-reader for ASUS K43SJ

2011-10-19 Thread Eugene Dzhurinsky
On Wed, Oct 19, 2011 at 09:42:51PM +0200, Hans Petter Selasky wrote:
 Hi,
 
 You need to dump the configuration descriptor using usbconfig.
 
 Also see the quirks available how to force the UMASS mode of a device.

Hi, with configuration descriptor you mean dump_curr_config_desc ?

Also I don't really understand what are the quirks and how can/should I force
something. Could you please explain?

Thanks!

-- 
Eugene N Dzhurinsky


pgpPC8vZ9ruUM.pgp
Description: PGP signature


Re: Support of internal card-reader for ASUS K43SJ

2011-10-19 Thread Eugene Dzhurinsky
On Wed, Oct 19, 2011 at 09:52:51PM +0200, Hans Petter Selasky wrote:
   Also see the quirks available how to force the UMASS mode of a device.
  Hi, with configuration descriptor you mean dump_curr_config_desc ?
 
 Yes.

ugen0.5: USB2.0-CRW Generic at usbus0, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

 Configuration index 0

bLength = 0x0009 
bDescriptorType = 0x0002 
wTotalLength = 0x0027 
bNumInterfaces = 0x0001 
bConfigurationValue = 0x0001 
iConfiguration = 0x0004  CARD READER
bmAttributes = 0x00a0 
bMaxPower = 0x00fa 

Interface 0
  bLength = 0x0009 
  bDescriptorType = 0x0004 
  bInterfaceNumber = 0x 
  bAlternateSetting = 0x 
  bNumEndpoints = 0x0003 
  bInterfaceClass = 0x00ff 
  bInterfaceSubClass = 0x0006 
  bInterfaceProtocol = 0x0050 
  iInterface = 0x0005  Bulk-In, Bulk-Out, Interface

 Endpoint 0
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0001  OUT
bmAttributes = 0x0002  BULK
wMaxPacketSize = 0x0200 
bInterval = 0x 
bRefresh = 0x 
bSynchAddress = 0x 

 Endpoint 1
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0082  IN
bmAttributes = 0x0002  BULK
wMaxPacketSize = 0x0200 
bInterval = 0x 
bRefresh = 0x 
bSynchAddress = 0x 

 Endpoint 2
bLength = 0x0007 
bDescriptorType = 0x0005 
bEndpointAddress = 0x0083  IN
bmAttributes = 0x0003  INTERRUPT
wMaxPacketSize = 0x0003 
bInterval = 0x000a 
bRefresh = 0x 
bSynchAddress = 0x 

  Also I don't really understand what are the quirks and how can/should I
  force something. Could you please explain?
 
 usbconfig dump_quirk_names | grep MSC
 
 UQ_MSC_FORCE_WIRE_BBB
 UQ_MSC_FORCE_WIRE_CBI
 UQ_MSC_FORCE_WIRE_CBI_I
 UQ_MSC_FORCE_PROTO_SCSI
 UQ_MSC_FORCE_PROTO_ATAPI
 UQ_MSC_FORCE_PROTO_UFI
 UQ_MSC_FORCE_PROTO_RBC
 
 After applying the quirk you need to use USB config to reset the device.

I'm a bit lost, which quirk I should apply? I'm sorry, but I know very little
about all this stuff :(

UQ_MSC_NO_TEST_UNIT_READY
UQ_MSC_NO_RS_CLEAR_UA
UQ_MSC_NO_START_STOP
UQ_MSC_NO_GETMAXLUN
UQ_MSC_NO_INQUIRY
UQ_MSC_NO_INQUIRY_EVPD
UQ_MSC_NO_SYNC_CACHE
UQ_MSC_SHUTTLE_INIT
UQ_MSC_ALT_IFACE_1
UQ_MSC_FLOPPY_SPEED
UQ_MSC_IGNORE_RESIDUE
UQ_MSC_WRONG_CSWSIG
UQ_MSC_RBC_PAD_TO_12
UQ_MSC_READ_CAP_OFFBY1
UQ_MSC_FORCE_SHORT_INQ
UQ_MSC_FORCE_WIRE_BBB
UQ_MSC_FORCE_WIRE_CBI
UQ_MSC_FORCE_WIRE_CBI_I
UQ_MSC_FORCE_PROTO_SCSI
UQ_MSC_FORCE_PROTO_ATAPI
UQ_MSC_FORCE_PROTO_UFI
UQ_MSC_FORCE_PROTO_RBC
UQ_MSC_EJECT_HUAWEI
UQ_MSC_EJECT_SIERRA
UQ_MSC_EJECT_SCSIEJECT
UQ_MSC_EJECT_REZERO
UQ_MSC_EJECT_ZTESTOR
UQ_MSC_EJECT_CMOTECH
UQ_MSC_EJECT_WAIT
UQ_MSC_EJECT_SAEL_M460
UQ_MSC_EJECT_HUAWEISCSI
UQ_MSC_EJECT_TCT

-- 
Eugene N Dzhurinsky


pgphshsvq6tCI.pgp
Description: PGP signature