Re: Action Cam SJ4000 (SJCAM) unrecognized as mass storage

2015-01-08 Thread Hans Petter Selasky

Hi,

A fix will be in 10-stable in a weeks time:

https://svnweb.freebsd.org/changeset/base/276825

Thank you!

--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: Action Cam SJ4000 (SJCAM) unrecognized as mass storage

2015-01-07 Thread Miroslav Lachman

Hans Petter Selasky wrote on 01/07/2015 09:04:

On 01/07/15 01:00, Miroslav Lachman wrote:

I have action camera SJ4000 based on Novatek NTK96650+AR0330 solution.
It has a USB cable and can be connected as USB mass storage, but FreeBSD
10.1 does not properly recognize it.

ugen1.4:  at usbus1
umass0:  on usbus1


[...]


Hi,

Can you build a kernel with the attached patch?

cat scsi_da.c.diff | patch -d /usr/src/sys

Does it help?


Confirmed, it helps.
The device is now recognized as da0:  
Removable Direct Access SCSI-5 device


Thank you very much for your quick help!


ugen1.4:  at usbus1
umass0:  on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x4100
umass0:2:0:-1: Attached to scbus2
(probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 
10 00 00

(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid 
command operation code)

(probe0:umass-sim0:0:0:0): Error 22, Unretryable error
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0:  Removable Direct Access SCSI-5 device
da0: Serial Number 96611000100
da0: 40.000MB/s transfers
da0: 29984MB (61407232 512 byte sectors: 255H 63S/T 3822C)
da0: quirks=0x2


> uname -srmi
FreeBSD 10.1-RELEASE-p13 amd64 GENERIC

(PC-BSD 10.1)

Miroslav Lachman
___
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: Action Cam SJ4000 (SJCAM) unrecognized as mass storage

2015-01-07 Thread Miroslav Lachman

Hans Petter Selasky wrote on 01/07/2015 09:04:

On 01/07/15 01:00, Miroslav Lachman wrote:

I have action camera SJ4000 based on Novatek NTK96650+AR0330 solution.
It has a USB cable and can be connected as USB mass storage, but FreeBSD
10.1 does not properly recognize it.

ugen1.4:  at usbus1
umass0:  on usbus1


[...]


Hi,

Can you build a kernel with the attached patch?

cat scsi_da.c.diff | patch -d /usr/src/sys

Does it help?


Thank you, I will try it later today.


I blindly tested

usbconfig -d 1.4 add_quirk UQ_MSC_NO_INQUIRY

described in

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195372

and it accidentaly work. (so for now, I have a workaround)

Miroslav Lachman
___
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: Action Cam SJ4000 (SJCAM) unrecognized as mass storage

2015-01-07 Thread Hans Petter Selasky

On 01/07/15 01:00, Miroslav Lachman wrote:

I have action camera SJ4000 based on Novatek NTK96650+AR0330 solution.
It has a USB cable and can be connected as USB mass storage, but FreeBSD
10.1 does not properly recognize it.

ugen1.4:  at usbus1
umass0:  on usbus1
umass0:  SCSI over Bulk-Only; quirks = 0x4100
umass0:2:0:-1: Attached to scbus2
(probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00
10 00 00
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: ILLEGAL REQUEST asc:20,0 (Invalid
command operation code)
(probe0:umass-sim0:0:0:0): Error 22, Unretryable error
(da0:umass-sim0:0:0:0): unsupportable block size 0

Are there any quirks that I can try to attach this cam as mass storage?

# usbconfig -d 1.4 dump_device_desc
ugen1.4:  at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps)
pwr=ON (500mA)

   bLength = 0x0012
   bDescriptorType = 0x0001
   bcdUSB = 0x0200
   bDeviceClass = 0x
   bDeviceSubClass = 0x
   bDeviceProtocol = 0x
   bMaxPacketSize0 = 0x0040
   idVendor = 0x0603
   idProduct = 0x8611
   bcdDevice = 0x0100
   iManufacturer = 0x0001  
   iProduct = 0x0002  
   iSerialNumber = 0x0003  <96611000100>
   bNumConfigurations = 0x0001

What more details should I provide?

Miroslav Lachman


Hi,

Can you build a kernel with the attached patch?

cat scsi_da.c.diff | patch -d /usr/src/sys

Does it help?

--HPS

Index: cam/scsi/scsi_da.c
===
--- cam/scsi/scsi_da.c	(revision 276747)
+++ cam/scsi/scsi_da.c	(working copy)
@@ -3094,8 +3094,10 @@
 			if (block_size == 0 && maxsector == 0) {
 block_size = 512;
 maxsector = -1;
+			} else if (block_size == 0) {
+block_size = 512;
 			}
-			if (block_size >= MAXPHYS || block_size == 0) {
+			if (block_size >= MAXPHYS) {
 xpt_print(periph->path,
 "unsupportable block size %ju\n",
 (uintmax_t) block_size);
___
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"