From owner-freebsd-usb@FreeBSD.ORG Wed Jan 7 08:04:04 2015 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13EA4C03 for ; Wed, 7 Jan 2015 08:04:04 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C674D6613F for ; Wed, 7 Jan 2015 08:04:03 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EAD3D1FE022; Wed, 7 Jan 2015 09:04:01 +0100 (CET) Message-ID: <54ACE8A1.6060307@selasky.org> Date: Wed, 07 Jan 2015 09:04:49 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz>, freebsd-usb@FreeBSD.org Subject: Re: Action Cam SJ4000 (SJCAM) unrecognized as mass storage References: <54AC7728.1020306@quip.cz> In-Reply-To: <54AC7728.1020306@quip.cz> Content-Type: multipart/mixed; boundary="------------030305080407080404050508" X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Jan 2015 08:04:04 -0000 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: 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 = 0x0000 > bDeviceSubClass = 0x0000 > bDeviceProtocol = 0x0000 > bMaxPacketSize0 = 0x0040 > idVendor = 0x0603 > idProduct = 0x8611 > bcdDevice = 0x0100 > iManufacturer = 0x0001 > iProduct = 0x0002 > 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--