Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Jan 2015 09:04:49 +0100
From:      Hans Petter Selasky <hps@selasky.org>
To:        Miroslav Lachman <000.fbsd@quip.cz>, freebsd-usb@FreeBSD.org
Subject:   Re: Action Cam SJ4000 (SJCAM) unrecognized as mass storage
Message-ID:  <54ACE8A1.6060307@selasky.org>
In-Reply-To: <54AC7728.1020306@quip.cz>
References:  <54AC7728.1020306@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------030305080407080404050508
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit

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: <NOVATEK> at usbus1
> umass0: <NOVATEK J1455, class 0/0, rev 2.00/1.00, addr 4> 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: <J1455 NOVATEK> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps)
> pwr=ON (500mA)
>
>    bLength = 0x0012
>    bDescriptorType = 0x0001
>    bcdUSB = 0x0200
>    bDeviceClass = 0x0000
>    bDeviceSubClass = 0x0000
>    bDeviceProtocol = 0x0000
>    bMaxPacketSize0 = 0x0040
>    idVendor = 0x0603
>    idProduct = 0x8611
>    bcdDevice = 0x0100
>    iManufacturer = 0x0001  <NOVATEK >
>    iProduct = 0x0002  <J1455 >
>    iSerialNumber = 0x0003  <966110000000100>
>    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


--------------030305080407080404050508
Content-Type: text/x-patch;
 name="scsi_da.c.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="scsi_da.c.diff"

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);

--------------030305080407080404050508--



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