usb/118741: [PATCH] Support for Nikon D300 digital camera (as USB mass storage device)

Yuri yuri at tsoft.com
Sat Dec 15 23:20:02 PST 2007


>Number:         118741
>Category:       usb
>Synopsis:       [PATCH] Support for Nikon D300 digital camera (as USB mass storage device)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-usb
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 16 07:20:01 UTC 2007
>Closed-Date:
>Last-Modified:
>Originator:     Yuri
>Release:        7.0-BETA4
>Organization:
n/a
>Environment:
>Description:
Support for new Nikon high end digital camera D300.

This patch makes the camera to be identified as umassN device and can be mounted as /dev/da0s1.

In my opinion this patch should be applied to 7.0 and 6.X

There is a caveat though: D300 has USB mode selection in menu: either [MTP/PTP] (default) or [Mass Storage]. In [MTP/PTP] mode camera is designed to work with proprietary Nikon software for Windows only and is not a mass storage device. So in order for it to work with FreeBSD [Mass Storage] mode should first be selected in menu.

Thanks,
Yuri

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -u sys/dev/usb.orig/umass.c sys/dev/usb/umass.c
--- sys/dev/usb.orig/umass.c	2007-07-04 22:26:08.000000000 -0700
+++ sys/dev/usb/umass.c	2007-12-15 23:07:48.000000000 -0800
@@ -568,6 +568,10 @@
 	  UMASS_PROTO_ATAPI,
 	  NO_INQUIRY
 	},
+	{ USB_VENDOR_NIKON, USB_PRODUCT_NIKON_D300, RID_WILDCARD,
+	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+	  NO_QUIRKS
+	},
 	{ USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1, RID_WILDCARD,
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  WRONG_CSWSIG
diff -u sys/dev/usb.orig/usbdevs sys/dev/usb/usbdevs
--- sys/dev/usb.orig/usbdevs	2007-12-05 19:10:36.000000000 -0800
+++ sys/dev/usb/usbdevs	2007-12-15 23:07:32.000000000 -0800
@@ -1754,6 +1754,7 @@
 /* Nikon products */
 product NIKON E990		0x0102	Digital Camera E990
 product NIKON LS40		0x4000	CoolScan LS40 ED
+product NIKON D300		0x041a  Digital Camera D300
 
 /* NovaTech Products */
 product NOVATECH NV902		0x9020	NovaTech NV-902W


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-usb mailing list