From nobody@FreeBSD.org  Mon Dec 31 18:28:17 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 6EAEE37B428
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 31 Dec 2001 18:28:17 -0800 (PST)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.6/8.11.6) id g012SH043082;
	Mon, 31 Dec 2001 18:28:17 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200201010228.g012SH043082@freefall.freebsd.org>
Date: Mon, 31 Dec 2001 18:28:17 -0800 (PST)
From: Brian Behlendorf <brian@hyperreal.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Nikon 885 umass support (related to #29160)
X-Send-Pr-Version: www-1.0

>Number:         33407
>Category:       kern
>Synopsis:       Nikon 885 umass support (related to #29160)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 31 18:30:00 PST 2001
>Closed-Date:    Sun Jan 6 06:41:37 PST 2002
>Last-Modified:  Sun Jan 06 06:42:22 PST 2002
>Originator:     Brian Behlendorf
>Release:        4.5-PRERELEASE
>Organization:
>Environment:
FreeBSD yez.hyperreal.org 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #3: Mon Dec 31 17:49:55 PST 2001     brian@yez.hyperreal.org:/usr/obj/usr/src/sys/yez  i386

>Description:
Similar to #29160, umass support for the Nikon 885 requires a patch to scsi_da.c in order to access the pictures on the card.

>How-To-Repeat:
Plug a Nikon 885 into the USB port and attempt to mount_msdos /dev/da0s1.  You'll get:
Dec 31 16:25:43 yez /kernel: (da0:umass-sim0:0:0:0): READ(06). CDB: 8 0 0 0 1 0 
Dec 31 16:25:43 yez /kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0
Dec 31 16:25:43 yez /kernel: (da0:umass-sim0:0:0:0): Invalid command operation code
Dec 31 16:25:43 yez /kernel: da0: reading primary partition table: error reading fsbn 0

>Fix:
The camera identifies itself as:

Dec 31 18:09:57 yez /kernel: da0: <Nikon Digital Camera 1.00> Removable Direct Access SCSI-2 device 

Note that this is a much more generic identifier than the Nikon 995 patch was looking for, so it would be ideal to test this with a couple other Nikon cameras as well, or at least compare identifiers.

Despite the warnings to not include patches, here ya go:

[yez] 6:27pm scsi > diff -c3 scsi_da.c.orig scsi_da.c
*** scsi_da.c.orig      Sat Dec 29 11:48:25 2001
--- scsi_da.c   Mon Dec 31 17:34:18 2001
***************
*** 329,334 ****
--- 329,341 ----
        },
        {
                /*
+                * Nikon Coolpix 885
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "Nikon", "Digital Camera", "*"},
+               /*quirks*/ DA_Q_NO_6_BYTE
+       },
+       {
+               /*
                 * Minolta Dimage 2330
                 */
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "MINOLTA", "DIMAGE 2330*", "*"},

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: jedgar 
State-Changed-When: Tue Jan 1 05:28:29 PST 2002 
State-Changed-Why:  
Committed to -current, waiting for -stable. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33407 
State-Changed-From-To: analyzed->closed 
State-Changed-By: jedgar 
State-Changed-When: Sun Jan 6 06:41:37 PST 2002 
State-Changed-Why:  
MFC'd to RELENG_4, thanks for the submission! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=33407 
>Unformatted:
