From owner-freebsd-scsi@FreeBSD.ORG Fri Dec 24 10:26:57 2010 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17C44106566B; Fri, 24 Dec 2010 10:26:57 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 6FCE38FC17; Fri, 24 Dec 2010 10:26:56 +0000 (UTC) Received: by fxm16 with SMTP id 16so7485907fxm.13 for ; Fri, 24 Dec 2010 02:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=Q+Y4RlFmXtsfeiL2OVxlSQABEdfUQjIIF3rKfbOqlyw=; b=lqCy/Whu6bNaeG2fGRTu7TZyKHKAaCrdKg/iAmcK8I7sZiHdCqtAsEjaFCFOyreD8t NRrPUPLz6F7oa+d6Ujg4Pbh/oVkk6Fd/XAGUW524p9kbDgieADfuC9ufrgaaUYbXr4Dj deuMxGzC7DuYv9N6RfhPnKFcQjMooxQzzqtTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=jg6zz2m4WfNa4vroc7PvEt5wOxC9ofmsR+LaGIBW8fuPei9/0HSPwOx66/Was/PwQO HI/7XxuXD3AAAmfXeo/RrxlsWGjmgZQWxvNa2NgWoSgqPxerhYqNaJM1LXi4f9EZ6la4 n0haI6sks501HZKflnnXy5GfklDIz5ryDSe2I= Received: by 10.223.103.197 with SMTP id l5mr1787434fao.7.1293186415412; Fri, 24 Dec 2010 02:26:55 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id e6sm2246091fav.8.2010.12.24.02.26.52 (version=SSLv3 cipher=RC4-MD5); Fri, 24 Dec 2010 02:26:54 -0800 (PST) Sender: Alexander Motin Message-ID: <4D147552.3080504@FreeBSD.org> Date: Fri, 24 Dec 2010 12:26:26 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Hans Petter Selasky , Adam Vande More References: <201012241058.50100.hselasky@c2i.net> In-Reply-To: <201012241058.50100.hselasky@c2i.net> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, freebsd-usb@freebsd.org Subject: Re: Android 2.2 umass -> da failure X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Dec 2010 10:26:57 -0000 Hans Petter Selasky wrote: > On Friday 24 December 2010 07:21:57 Adam Vande More wrote: >> On Thu, Dec 23, 2010 at 10:34 PM, Adam Vande More > wrote: >>> Additional info >>> >>> It seems have something to do with how fast your at pressing the "Turn on >>> USB Storage" on the Android interface. After connecting the usb device, >>> if you wait a couple of seconds before pressing "Turn on USB Storage" >>> button you won't be able to get a /dev/daX. camcontrol functions don't >>> seem to work to get a /dev/daX either, a physical unplug, plug-in, >>> quickly press the button is the only way I've found to mount the device. >> Also the partition table doesn't seem to be correctly recognized after >> this. Only /dev/da0 is present, not /dev/da0s1 Once I preform an action >> on /dev/da0 then the slice is seen. This there a way to automate this >> tasting? > > Can you try 9-current. I think there might be a fix for this issue there. That patch was merged to 8-STABLE. This is different problem. Phrase "SCSI sense: Error code 0x72" means that device returned sense data in "descriptor" format. As I can see, our code supports only "fixed" format. As kind of dirty hack, this patch should probably help: --- scsi_da.c.prev 2010-10-24 21:53:16.000000000 +0300 +++ scsi_da.c 2010-12-24 12:25:03.000000000 +0200 @@ -1763,6 +1763,10 @@ dadone(struct cam_periph *periph, union "size failed: %s, %s", sense_key_desc, asc_desc); + } else if ((have_sense) && + (error_code == 0x72)) { + scsi_sense_print( + &done_ccb->csio); } else { if (have_sense) scsi_sense_print( -- Alexander Motin