Re: Realtek SD Card Reader 0x0bda / 0x0129 detection?

2014-04-08 Thread Ivan Rokotov
2014-04-08 15:00 GMT+04:00 Hans Petter Selasky :
> Can you check using:
>
> usbdump -i usbusX -f Y -s 65536 -vvv
>
> what is going on with regards to USB communication towards your adapter?
>
> X and Y are the numbers after ugenX.Y for your device.

Sure. I attached the output (to avoid line breaking) of what happens
when a card is inserted and what then happens when I turn off the USB
port and then turn it on. This is happening with the quirk
'UQ_MSC_NO_SYNC_CACHE" enabled as I described above. If the port
should be tested without that quirk or with any other configuration,
please let me know.

Ivan
# usbdump -i usbus1 -f 3 -s 65536 -vvv

# inserting card: nothing happens.
# usbconfig -d 1.3 power_off

18:48:25.150591 usbus1.3 SUBM-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   00 09 00 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
 flags 0x10 
 status 0xca1a3 

18:48:25.150668 usbus1.3 
DONE-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 flags 0x10 
 status 0xea1a1 


# usbconfig -d 1.3 power_on
# /var/log/messages log:
# Apr  8 18:48:38 tor devd: Executing 'logger Unknown USB device: vendor 0x0bda 
product 0x0129 bus uhub4'
# Apr  8 18:48:38 tor root: Unknown USB device: vendor 0x0bda product 0x0129 
bus uhub4

18:48:37.904355 usbus1.3 SUBM-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   00 09 00 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
 flags 0x10 
 status 0xea1a3 

18:48:37.904456 usbus1.3 
DONE-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=STALLED
 frame[0] WRITE 0 bytes
 flags 0x10 
 status 0xca1a1 

18:48:38.209403 usbus1.3 SUBM-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   00 05 03 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
 flags 0x50 
 status 0xea3a3 

18:48:38.209465 usbus1.3 
DONE-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 flags 0x50 
 status 0xca3a1 

18:48:38.209489 usbus1.3 SUBM-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0
 frame[0] WRITE 0 bytes
 flags 0x10 
 status 0xca0a3 

18:48:38.209580 usbus1.3 
DONE-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 frame[0] WRITE 0 bytes
 flags 0x10 
 status 0xea0a1 

18:48:38.222399 usbus1.3 SUBM-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 01 00 00 12 00  -- -- -- -- -- -- -- --  ||
 frame[1] READ 18 bytes
 flags 0x10 
 status 0xea1a3 

18:48:38.222458 usbus1.3 
DONE-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=20,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 18 bytes
   12 01 00 02 FF FF FF 40  DA 0B 29 01 60 39 01 02  |...@..).`9..|
 0010  03 01 -- -- -- -- -- --  -- -- -- -- -- -- -- --  |..  |
 flags 0x10 
 status 0xca1a1 

18:48:38.224371 usbus1.3 SUBM-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 02 00 00 09 00  -- -- -- -- -- -- -- --  ||
 frame[1] READ 9 bytes
 flags 0x10 
 status 0xea1a3 

18:48:38.224454 usbus1.3 
DONE-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=12,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 9 bytes
   09 02 27 00 01 01 04 A0  FA -- -- -- -- -- -- --  |..'..   |
 flags 0x10 
 status 0xca1a1 

18:48:38.224473 usbus1.3 SUBM-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   80 06 00 02 00 00 27 00  -- -- -- -- -- -- -- --  |..'.|
 frame[1] READ 39 bytes
 flags 0x10 
 status 0xca1a3 

18:48:38.224577 usbus1.3 
DONE-CTRL-EP=0080,SPD=HIGH,NFR=2,SLEN=40,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 frame[1] READ 39 bytes
   09 02 27 00 01 01 04 A0  FA 09 04 00 00 03 FF 06  |..'.|
 0010  50 05 07 05 01 02 00 02  00 07 05 82 02 00 02 00  |P...|
 0020  07 05 83 03 03 00 0A --  -- -- -- -- -- -- -- --  |... |
 flags 0x10 
 status 0xea1a1 

18:48:38.224595 usbus1.3 SUBM-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=8,IVAL=0
 frame[0] WRITE 8 bytes
   00 09 01 00 00 00 00 00  -- -- -- -- -- -- -- --  ||
 flags 0x10 
 status 0xea1a3 

18:48:38.224702 usbus1.3 
DONE-CTRL-EP=,SPD=HIGH,NFR=1,SLEN=0,IVAL=0,ERR=0
 frame[0] WRITE 8 bytes
 flags 0x10 
 status 0xca1a1 

^C
16 packets captured
484 packets received by filter
0 packets dropped by kernel
#___
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: Realtek SD Card Reader 0x0bda / 0x0129 detection?

2014-04-08 Thread Hans Petter Selasky

On 04/08/14 02:33, Ivan Rokotov wrote:

2014-04-07 16:47 GMT+04:00 Hans Petter Selasky :

Hi,

How did you add the quirk?


Hi hps@,

I added this to sys/dev/usb/usbdevs:
product REALTEK USB20CRW_T  0x0129  USB20CRW Card Reader

and this to sys/dev/usb/quirk/usb_quirk.c
USB_QUIRK(REALTEK, USB20CRW_T, 0x, 0x, ),

and recompiled my kernel. 'usbconfig' confirms that quirks were added, e.g.

# usbconfig -d 1.4 dump_device_quirks | grep 0x0129
VID=0x0bda PID=0x0129 REVLO=0x REVHI=0x QUIRK=UQ_MSC_NO_SYNC_CACHE

Changing quirks without recompiling kernel (simply using add_quirks
and then turning off/on the device) gave no visible effect, i.e. no
dmesg events.



Hi,

Can you check using:

usbdump -i usbusX -f Y -s 65536 -vvv

what is going on with regards to USB communication towards your adapter?

X and Y are the numbers after ugenX.Y for your device.

--HPS

___
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: Realtek SD Card Reader 0x0bda / 0x0129 detection?

2014-04-07 Thread Ivan Rokotov
2014-04-07 16:47 GMT+04:00 Hans Petter Selasky :
> Hi,
>
> How did you add the quirk?

Hi hps@,

I added this to sys/dev/usb/usbdevs:
product REALTEK USB20CRW_T  0x0129  USB20CRW Card Reader

and this to sys/dev/usb/quirk/usb_quirk.c
USB_QUIRK(REALTEK, USB20CRW_T, 0x, 0x, ),

and recompiled my kernel. 'usbconfig' confirms that quirks were added, e.g.

# usbconfig -d 1.4 dump_device_quirks | grep 0x0129
VID=0x0bda PID=0x0129 REVLO=0x REVHI=0x QUIRK=UQ_MSC_NO_SYNC_CACHE

Changing quirks without recompiling kernel (simply using add_quirks
and then turning off/on the device) gave no visible effect, i.e. no
dmesg events.

Ivan
___
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: Realtek SD Card Reader 0x0bda / 0x0129 detection?

2014-04-07 Thread Hans Petter Selasky

On 04/06/14 03:53, Ivan Rokotov wrote:

Hi,

Environment: FreeBSD 10.0-RELEASE/amd64 on Lenovo IdeaPad S400.

SD Card Reader visible by usbconfig:
ugen1.4:  at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=ON (500mA)

usbconfig info:
   bLength = 0x0012
   bDescriptorType = 0x0001
   bcdUSB = 0x0200
   bDeviceClass = 0x00ff
   bDeviceSubClass = 0x00ff
   bDeviceProtocol = 0x00ff
   bMaxPacketSize0 = 0x0040
   idVendor = 0x0bda
   idProduct = 0x0129
   bcdDevice = 0x3960
   iManufacturer = 0x0001  
   iProduct = 0x0002  
   iSerialNumber = 0x0003  <2010020139600>
   bNumConfigurations = 0x0001

Adding/removing SD card yields nothing. The same with booting with SD
card and/or turning power on/off with usbconfig.

If I add this to /usr/src/sys/dev/usb/usbdevs
product REALTEK USB20CRW_T  0x0129  USB20CRW Card Reader

- nothing changes.

If I add these quirks to /usr/src/sys/dev/usb/quirk/usb_quirk.c
USB_QUIRK(REALTEK, USB20CRW_T, 0x, 0x, UQ_MSC_NO_GETMAXLUN,
UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI)

then I get:
umass0:  on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x0100
umass0:3:0:-1: Attached to scbus3
...
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 00 00 00 24 00
(probe0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(probe0:umass-sim0:0:0:0): Retrying command
...
(probe0:umass-sim0:0:0:0): Error 5, Retries exhausted

Adding the 'UQ_MSC_NO_SYNC_CACHE" quirk changes nothing.

Does anybody know what should be done and is it possible at all to use
this card reader with FreeBSD 10.0?

Ivan
___
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"



Hi,

How did you add the quirk?

--HPS
___
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"