Bug 11685

Summary: A Nikon D300 is not seen.
Product: Drivers Reporter: Paul Ready (lxtwin)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: RESOLVED CODE_FIX    
Severity: normal    
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.26.5 Subsystem:
Regression: No Bisected commit-id:
Attachments: The output from the kernel debug
The new unusual_devs.h file

Description Paul Ready 2008-10-02 06:05:15 UTC
Latest working kernel version: 2.6.26.5
Earliest failing kernel version:
Distribution:
Hardware Environment:
Software Environment:
Problem Description: 

When A Nikon D300 camera is connected to a system it is seen in /proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms


I believe that an entry is needed in the ./drivers/usb/storage/unusual_devs.h file; and it should look like this:

/* Reported by paul ready <lxtwin@homecall.co.uk> */
UNUSUAL_DEV(  0x04b0, 0x041a, 0x0100, 0x0103,
                "NIKON",
                "NIKON DSC D300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),

I am not sure if the last Hex string should be 0x103 or 0x100 as I think that this refers to the firmware version.

I am running Mandriva 2008 Spring and using Kernel 2.6.24.7, I have looked in the 2.6.26.5 kernel and have not seen the entries in there.


Steps to reproduce:

 Connect a Nikon D300 to a USB port.


I hope this helps.
Comment 1 Alan 2008-10-02 07:14:54 UTC
The best thing to do here is to add an entry of that form, test it and then post the patch to the linux-usb@vger.kernel.org mailing list. Folks there will be happy to help out with any queries.

See also Documentation/SubmittingPatches
Comment 2 Paul Ready 2008-10-02 07:19:08 UTC
Thank you Alan.
Comment 3 Anonymous Emailer 2008-10-02 13:00:52 UTC
Reply-To: akpm@linux-foundation.org


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Thu,  2 Oct 2008 06:05:15 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
>            Summary: A Nikon D300 is not seen.
>            Product: Drivers
>            Version: 2.5
>      KernelVersion: 2.6.26.5
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: USB
>         AssignedTo: greg@kroah.com
>         ReportedBy: lxtwin@homecall.co.uk
> 
> 
> Latest working kernel version: 2.6.26.5
> Earliest failing kernel version:
> Distribution:
> Hardware Environment:
> Software Environment:
> Problem Description: 
> 
> When A Nikon D300 camera is connected to a system it is seen in
> /proc/bus/pci/devices but is not accessible.
> 
> This is seen in the above file:
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=04b0 ProdID=041a Rev= 1.03
> S:  Manufacturer=NIKON
> S:  Product=NIKON DSC D300
> S:  SerialNumber=000008014379
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> 
> 
> I believe that an entry is needed in the ./drivers/usb/storage/unusual_devs.h
> file; and it should look like this:
> 
> /* Reported by paul ready <lxtwin@homecall.co.uk> */
> UNUSUAL_DEV(  0x04b0, 0x041a, 0x0100, 0x0103,
>                 "NIKON",
>                 "NIKON DSC D300",
>                 US_SC_DEVICE, US_PR_DEVICE, NULL,
>                 US_FL_FIX_CAPACITY),
> 
> I am not sure if the last Hex string should be 0x103 or 0x100 as I think that
> this refers to the firmware version.
> 
> I am running Mandriva 2008 Spring and using Kernel 2.6.24.7, I have looked in
> the 2.6.26.5 kernel and have not seen the entries in there.
> 
> 
> Steps to reproduce:
> 
>  Connect a Nikon D300 to a USB port.
> 
> 
Comment 4 Paul Ready 2008-10-02 13:24:00 UTC
Hi all,
	I have sorted out my system and have tested 

> > UNUSUAL_DEV(  0x04b0, 0x041a, 0x0100, 0x0103,
> >                 "NIKON",
> >                 "NIKON DSC D300",
> >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> >                 US_FL_FIX_CAPACITY),

This entry does not work, I have to find out the bcdDeviceMin  and
bcdDeviceMax values.


regards

paul



On Thu, 2008-10-02 at 13:00 -0700, bugme-daemon@bugzilla.kernel.org
wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
> 
> 
> 
> 
> ------- Comment #3 from anonymous@kernel-bugs.osdl.org  2008-10-02 13:00
> -------
> Reply-To: akpm@linux-foundation.org
> 
> 
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> On Thu,  2 Oct 2008 06:05:15 -0700 (PDT) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=11685
> > 
> >            Summary: A Nikon D300 is not seen.
> >            Product: Drivers
> >            Version: 2.5
> >      KernelVersion: 2.6.26.5
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: USB
> >         AssignedTo: greg@kroah.com
> >         ReportedBy: lxtwin@homecall.co.uk
> > 
> > 
> > Latest working kernel version: 2.6.26.5
> > Earliest failing kernel version:
> > Distribution:
> > Hardware Environment:
> > Software Environment:
> > Problem Description: 
> > 
> > When A Nikon D300 camera is connected to a system it is seen in
> > /proc/bus/pci/devices but is not accessible.
> > 
> > This is seen in the above file:
> > 
> > T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=04b0 ProdID=041a Rev= 1.03
> > S:  Manufacturer=NIKON
> > S:  Product=NIKON DSC D300
> > S:  SerialNumber=000008014379
> > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> > I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> > 
> > 
> > I believe that an entry is needed in the
> ./drivers/usb/storage/unusual_devs.h
> > file; and it should look like this:
> > 
> > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > UNUSUAL_DEV(  0x04b0, 0x041a, 0x0100, 0x0103,
> >                 "NIKON",
> >                 "NIKON DSC D300",
> >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> >                 US_FL_FIX_CAPACITY),
> > 
> > I am not sure if the last Hex string should be 0x103 or 0x100 as I think
> that
> > this refers to the firmware version.
> > 
> > I am running Mandriva 2008 Spring and using Kernel 2.6.24.7, I have looked
> in
> > the 2.6.26.5 kernel and have not seen the entries in there.
> > 
> > 
> > Steps to reproduce:
> > 
> >  Connect a Nikon D300 to a USB port.
> > 
> > 
> 
> 
Comment 5 Paul Ready 2008-10-02 15:24:54 UTC
Hi there,
	I have worked out what I have to change in the unusual_devs.h file and
have the D300 working now.



This is the entry in the unusual_devs.h that works.


/* Reported by paul ready <lxtwin@homecall.co.uk> */
UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
                "NIKON",
                "NIKON DSC D300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY),


/proc/bus/usb/devices

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0419 Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms


dmesg

usb 1-6: new high speed USB device using ehci_hcd and address 10
usb 1-6: configuration #1 chosen from 1 choice
scsi8 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 10
usb-storage: waiting for device to settle before scanning
scsi 8:0:0:0: Direct-Access     NIKON    NIKON DSC D300   0103 PQ: 0
ANSI: 2
sd 8:0:0:0: [sdi] 15858864 512-byte hardware sectors (8120 MB)
sd 8:0:0:0: [sdi] Write Protect is off
sd 8:0:0:0: [sdi] Mode Sense: 0f 00 00 00
sd 8:0:0:0: [sdi] Assuming drive cache: write through
sd 8:0:0:0: [sdi] 15858864 512-byte hardware sectors (8120 MB)
sd 8:0:0:0: [sdi] Write Protect is off
sd 8:0:0:0: [sdi] Mode Sense: 0f 00 00 00
sd 8:0:0:0: [sdi] Assuming drive cache: write through
 sdi: sdi1
sd 8:0:0:0: [sdi] Attached SCSI removable disk
sd 8:0:0:0: Attached scsi generic sg8 type 0
usb-storage: device scan complete

df

/dev/sdi1             7.6G   15M  7.6G   1% /media/NIKON D300


All is working and I am happy. 


regards

paul

On Thu, 2008-10-02 at 13:00 -0700, bugme-daemon@bugzilla.kernel.org
wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
> 
> 
> 
> 
> ------- Comment #3 from anonymous@kernel-bugs.osdl.org  2008-10-02 13:00
> -------
> Reply-To: akpm@linux-foundation.org
> 
> 
> (switched to email.  Please respond via emailed reply-to-all, not via the
> bugzilla web interface).
> 
> On Thu,  2 Oct 2008 06:05:15 -0700 (PDT) bugme-daemon@bugzilla.kernel.org
> wrote:
> 
> > http://bugzilla.kernel.org/show_bug.cgi?id=11685
> > 
> >            Summary: A Nikon D300 is not seen.
> >            Product: Drivers
> >            Version: 2.5
> >      KernelVersion: 2.6.26.5
> >           Platform: All
> >         OS/Version: Linux
> >               Tree: Mainline
> >             Status: NEW
> >           Severity: normal
> >           Priority: P1
> >          Component: USB
> >         AssignedTo: greg@kroah.com
> >         ReportedBy: lxtwin@homecall.co.uk
> > 
> > 
> > Latest working kernel version: 2.6.26.5
> > Earliest failing kernel version:
> > Distribution:
> > Hardware Environment:
> > Software Environment:
> > Problem Description: 
> > 
> > When A Nikon D300 camera is connected to a system it is seen in
> > /proc/bus/pci/devices but is not accessible.
> > 
> > This is seen in the above file:
> > 
> > T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=04b0 ProdID=041a Rev= 1.03
> > S:  Manufacturer=NIKON
> > S:  Product=NIKON DSC D300
> > S:  SerialNumber=000008014379
> > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> > I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> > 
> > 
> > I believe that an entry is needed in the
> ./drivers/usb/storage/unusual_devs.h
> > file; and it should look like this:
> > 
> > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > UNUSUAL_DEV(  0x04b0, 0x041a, 0x0100, 0x0103,
> >                 "NIKON",
> >                 "NIKON DSC D300",
> >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> >                 US_FL_FIX_CAPACITY),
> > 
> > I am not sure if the last Hex string should be 0x103 or 0x100 as I think
> that
> > this refers to the firmware version.
> > 
> > I am running Mandriva 2008 Spring and using Kernel 2.6.24.7, I have looked
> in
> > the 2.6.26.5 kernel and have not seen the entries in there.
> > 
> > 
> > Steps to reproduce:
> > 
> >  Connect a Nikon D300 to a USB port.
> > 
> > 
> 
> 
Comment 6 Anonymous Emailer 2008-10-02 15:41:57 UTC
Reply-To: akpm@linux-foundation.org


You removed linux-usb from the Cc.  Please be careful about that.

On Thu, 02 Oct 2008 23:24:16 +0100
Pkr <lxtwin@homecall.co.uk> wrote:

>       I have worked out what I have to change in the unusual_devs.h file and
> have the D300 working now.
> 
> 
> 
> This is the entry in the unusual_devs.h that works.
> 
> 
> /* Reported by paul ready <lxtwin@homecall.co.uk> */
> UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
>                 "NIKON",
>                 "NIKON DSC D300",
>                 US_SC_DEVICE, US_PR_DEVICE, NULL,
>                 US_FL_FIX_INQUIRY),

OK, I wrote your patch for you ;)

Does this still work?


From: Paul Ready <lxtwin@homecall.co.uk>

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685

When A Nikon D300 camera is connected to a system it is seen in
/proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
+++ a/drivers/usb/storage/unusual_devs.h
@@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_INQUIRY ),
 
+/* Reported by paul ready <lxtwin@homecall.co.uk> */
+UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
+		"NIKON",
+		"NIKON DSC D300",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_INQUIRY),
+
 /* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */
 UNUSUAL_DEV(  0x0419, 0x0100, 0x0100, 0x0100,
 		"Samsung Info. Systems America, Inc.",
_
Comment 7 Alan Stern 2008-10-03 07:35:12 UTC
On Thu, 2 Oct 2008, Andrew Morton wrote:

> On Thu, 02 Oct 2008 23:24:16 +0100
> Pkr <lxtwin@homecall.co.uk> wrote:
> 
> >     I have worked out what I have to change in the unusual_devs.h file and
> > have the D300 working now.
> > 
> > 
> > 
> > This is the entry in the unusual_devs.h that works.
> > 
> > 
> > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> >                 "NIKON",
> >                 "NIKON DSC D300",
> >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> >                 US_FL_FIX_INQUIRY),
> 
> OK, I wrote your patch for you ;)
> 
> Does this still work?
> 
> 
> From: Paul Ready <lxtwin@homecall.co.uk>
> 
> Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
> When A Nikon D300 camera is connected to a system it is seen in
> /proc/bus/pci/devices but is not accessible.
> 
> This is seen in the above file:
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=04b0 ProdID=041a Rev= 1.03
> S:  Manufacturer=NIKON
> S:  Product=NIKON DSC D300
> S:  SerialNumber=000008014379
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> 
> Cc: Greg KH <greg@kroah.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/usb/storage/unusual_devs.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> drivers/usb/storage/unusual_devs.h
> --- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> +++ a/drivers/usb/storage/unusual_devs.h
> @@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
>               US_SC_DEVICE, US_PR_DEVICE, NULL,
>               US_FL_FIX_INQUIRY ),
>  
> +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> +             "NIKON",
> +             "NIKON DSC D300",
> +             US_SC_DEVICE, US_PR_DEVICE, NULL,
> +             US_FL_FIX_INQUIRY),
> +
>  /* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */
>  UNUSUAL_DEV(  0x0419, 0x0100, 0x0100, 0x0100,
>               "Samsung Info. Systems America, Inc.",

This is almost certainly wrong.  The FIX_INQUIRY flag should never be 
needed, with only extremely rare exceptions.

Can you provide a verbose debugging log, using either usbmon (see 
Documentation/usb/usbmon.txt) or CONFIG_USB_STORAGE_DEBUG showing why 
you think the unusual_devs entry is needed?

Furthermore, given that most of the other Nikon entries in unusual_devs 
include the FIX_CAPACITY flag, are you certain your entry doesn't need 
it as well?

Alan Stern
Comment 8 Paul Ready 2008-10-03 08:52:14 UTC
I can understand what you are saying, all the other entries are using
US_FL_FIX_CAPACITY, I had this at the beginning and changed every other
thing. Then I plugged in my D200 and got this:

T:  Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=040f Rev= 2.00
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D200
S:  SerialNumber=0000000
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms


/* Reported by Graber and Mike Pagano <mpagano-kernel@mpagano.com> */
UNUSUAL_DEV(  0x04b0, 0x040f, 0x0100, 0x0200,
                "NIKON",
                "NIKON DSC D200",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),


I then connected the D300 and got this:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 12 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0419 Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

so I created this:
UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
                "NIKON",
                "NIKON DSC D300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),

This did not work. One thing I did notice is that by changing the
settings on the camera the ProdID could be 419 or 41a. (P:  Vendor=04b0
ProdID=041a Rev= 1.03)

I then noticed that a USB storage device had this
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=05e3 ProdID=0702 Rev= 1.13
S: Product=USB Storage Device
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

and this entry

UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x0200,
                "EagleTec",
                "External Hard Disk",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_INQUIRY ),


So I tried US_FL_FIX_INQUIRY and it worked.


I will clean up everything, reset the camera to factory defaults, create
a  US_FL_FIX_CAPACITY version and retry it again.


On Fri, 2008-10-03 at 10:35 -0400, Alan Stern wrote:

> On Thu, 2 Oct 2008, Andrew Morton wrote:
> 
> > On Thu, 02 Oct 2008 23:24:16 +0100
> > Pkr <lxtwin@homecall.co.uk> wrote:
> > 
> > >   I have worked out what I have to change in the unusual_devs.h file and
> > > have the D300 working now.
> > > 
> > > 
> > > 
> > > This is the entry in the unusual_devs.h that works.
> > > 
> > > 
> > > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > > UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> > >                 "NIKON",
> > >                 "NIKON DSC D300",
> > >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> > >                 US_FL_FIX_INQUIRY),
> > 
> > OK, I wrote your patch for you ;)
> > 
> > Does this still work?
> > 
> > 
> > From: Paul Ready <lxtwin@homecall.co.uk>
> > 
> > Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685
> > 
> > When A Nikon D300 camera is connected to a system it is seen in
> > /proc/bus/pci/devices but is not accessible.
> > 
> > This is seen in the above file:
> > 
> > T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=04b0 ProdID=041a Rev= 1.03
> > S:  Manufacturer=NIKON
> > S:  Product=NIKON DSC D300
> > S:  SerialNumber=000008014379
> > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> > I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> > 
> > Cc: Greg KH <greg@kroah.com>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  drivers/usb/storage/unusual_devs.h |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> drivers/usb/storage/unusual_devs.h
> > ---
> a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> > +++ a/drivers/usb/storage/unusual_devs.h
> > @@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
> >             US_SC_DEVICE, US_PR_DEVICE, NULL,
> >             US_FL_FIX_INQUIRY ),
> >  
> > +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> > +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> > +           "NIKON",
> > +           "NIKON DSC D300",
> > +           US_SC_DEVICE, US_PR_DEVICE, NULL,
> > +           US_FL_FIX_INQUIRY),
> > +
> >  /* Submitted by Ernestas Vaiciukevicius <ernisv@gmail.com> */
> >  UNUSUAL_DEV(  0x0419, 0x0100, 0x0100, 0x0100,
> >             "Samsung Info. Systems America, Inc.",
> 
> This is almost certainly wrong.  The FIX_INQUIRY flag should never be 
> needed, with only extremely rare exceptions.
> 
> Can you provide a verbose debugging log, using either usbmon (see 
> Documentation/usb/usbmon.txt) or CONFIG_USB_STORAGE_DEBUG showing why 
> you think the unusual_devs entry is needed?
> 
> Furthermore, given that most of the other Nikon entries in unusual_devs 
> include the FIX_CAPACITY flag, are you certain your entry doesn't need 
> it as well?
> 
> Alan Stern
> 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.18.0">
</HEAD>
<BODY>
I can understand what you are saying, all the other entries are using US_FL_FIX_CAPACITY, I had this at the beginning and changed every other thing. Then I plugged in my D200 and got this:<BR>
<BR>
T:&nbsp; Bus=01 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#=&nbsp; 9 Spd=480 MxCh= 0<BR>
D:&nbsp; Ver= 2.00 Cls=00(&amp;gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=&nbsp; 1<BR>
P:&nbsp; Vendor=<B>04b0</B> ProdID=<B>040f</B> Rev= <B>2.00</B><BR>
S:&nbsp; Manufacturer=NIKON<BR>
S:&nbsp; Product=NIKON DSC D200<BR>
S:&nbsp; SerialNumber=0000000<BR>
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=&nbsp; 2mA<BR>
I:* If#= 0 Alt= 0 #EPs= 2<B> Cls=08(stor.)</B> <B>Sub=06</B><B><FONT COLOR="#000000"> Prot=50</FONT></B> Driver=usb-storage<BR>
E:&nbsp; Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms<BR>
E:&nbsp; Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms<BR>
<BR>
<BR>
/* Reported by Graber and Mike Pagano &lt;mpagano-kernel@mpagano.com&gt; */<BR>
UNUSUAL_DEV(&nbsp; 0x04b0, 0x040f, 0x0100, 0x0200,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;NIKON&quot;,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;NIKON DSC D200&quot;,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; US_SC_DEVICE, US_PR_DEVICE, NULL,<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; US_FL_FIX_CAPACITY),<BR>
<BR>
<BR>
<FONT COLOR="#000000">I then connected the D300 and got this:</FONT><BR>
<BR>
<FONT COLOR="#000000">T:&nbsp; Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 12 Spd=480 MxCh= 0</FONT><BR>
<FONT COLOR="#000000">D:&nbsp; Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=&nbsp; 1</FONT><BR>
<FONT COLOR="#000000">P:&nbsp; Vendor=</FONT><FONT COLOR="#000000"><B>04b0</B></FONT><FONT COLOR="#000000"> ProdID=</FONT><FONT COLOR="#000000"><B>0419</B></FONT><FONT COLOR="#000000"> Rev= </FONT><FONT COLOR="#000000"><B>1.03</B></FONT><BR>
<FONT COLOR="#000000">S:&nbsp; Manufacturer=NIKON</FONT><BR>
<FONT COLOR="#000000">S:&nbsp; Product=NIKON DSC D300</FONT><BR>
<FONT COLOR="#000000">S:&nbsp; SerialNumber=000008014379</FONT><BR>
<FONT COLOR="#000000">C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=&nbsp; 2mA</FONT><BR>
<FONT COLOR="#000000">I:* If#= 0 Alt= 0 #EPs= 2 </FONT><FONT COLOR="#000000"><B>Cls=08(stor.) Sub=06 Prot=50</B></FONT><FONT COLOR="#000000"> Driver=usb-storage</FONT><BR>
<FONT COLOR="#000000">E:&nbsp; Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms</FONT><BR>
<FONT COLOR="#000000">E:&nbsp; Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms</FONT><BR>
<BR>
<FONT COLOR="#000000">so I created this:</FONT><BR>
<FONT COLOR="#000000">UNUSUAL_DEV(&nbsp; 0x04b0, 0x0419, 0x0100, 0x0200,</FONT><BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;NIKON&quot;,</FONT><BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;NIKON DSC D300&quot;,</FONT><BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; US_SC_DEVICE, US_PR_DEVICE, NULL,</FONT><BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; US_FL_FIX_CAPACITY),</FONT><BR>
<BR>
<FONT COLOR="#000000">This did not work. One thing I did notice is that by changing the settings on the camera the ProdID could be 419 or 41a. (P:&nbsp; Vendor=04b0 ProdID=041a Rev= 1.03)</FONT><BR>
<BR>
<FONT COLOR="#000000">I then noticed that a USB storage device had this</FONT><BR>
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0<BR>
D: Ver= 1.10 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1<BR>
P: Vendor=<B>05e3</B> ProdID=<B>0702</B> Rev= 1.13<BR>
S: Product=USB Storage Device<BR>
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=500mA<BR>
I: If#= 0 Alt= 0 #EPs= 2 <B>Cls=08(stor.) Sub=06 Prot=50</B> Driver=usb-storage<BR>
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms<BR>
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms<BR>
<BR>
<FONT COLOR="#000000">and this entry</FONT><BR>
<BR>
UNUSUAL_DEV( 0x05e3, 0x0702, 0x0000, 0x0<FONT COLOR="#000000">2</FONT>0<FONT COLOR="#000000">0</FONT>,<BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>&quot;EagleTec&quot;,<BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;External Hard Disk&quot;,</FONT><BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>US_SC_DEVICE, US_PR_DEVICE, NULL,<BR>
<FONT COLOR="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>US_FL_FIX_INQUIRY ),<BR>
<BR>
<BR>
<FONT COLOR="#000000">So I tried </FONT>&#65279;US_FL_FIX_INQUIRY<FONT COLOR="#000000"> and it worked.</FONT><BR>
<BR>
<BR>
<FONT COLOR="#000000">I will clean up everything, reset the camera to factory defaults, create a&nbsp; </FONT>&#65279;<FONT COLOR="#000000">US_FL_FIX_CAPACITY version and retry it again.</FONT><BR>
<BR>
<BR>
On Fri, 2008-10-03 at 10:35 -0400, Alan Stern wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Thu, 2 Oct 2008, Andrew Morton wrote:

&gt; On Thu, 02 Oct 2008 23:24:16 +0100
&gt; Pkr &lt;<A HREF="mailto:lxtwin@homecall.co.uk">lxtwin@homecall.co.uk</A>&gt; wrote:
&gt; 
&gt; &gt; 	I have worked out what I have to change in the unusual_devs.h file and
&gt; &gt; have the D300 working now.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; 
&gt; &gt; This is the entry in the unusual_devs.h that works.
&gt; &gt; 
&gt; &gt; 
&gt; &gt; /* Reported by paul ready &lt;<A HREF="mailto:lxtwin@homecall.co.uk">lxtwin@homecall.co.uk</A>&gt; */
&gt; &gt; UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
&gt; &gt;                 &quot;NIKON&quot;,
&gt; &gt;                 &quot;NIKON DSC D300&quot;,
&gt; &gt;                 US_SC_DEVICE, US_PR_DEVICE, NULL,
&gt; &gt;                 US_FL_FIX_INQUIRY),
&gt; 
&gt; OK, I wrote your patch for you ;)
&gt; 
&gt; Does this still work?
&gt; 
&gt; 
&gt; From: Paul Ready &lt;<A HREF="mailto:lxtwin@homecall.co.uk">lxtwin@homecall.co.uk</A>&gt;
&gt; 
&gt; Addresses <A HREF="http://bugzilla.kernel.org/show_bug.cgi?id=11685">http://bugzilla.kernel.org/show_bug.cgi?id=11685</A>
&gt; 
&gt; When A Nikon D300 camera is connected to a system it is seen in
&gt; /proc/bus/pci/devices but is not accessible.
&gt; 
&gt; This is seen in the above file:
&gt; 
&gt; T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
&gt; D:  Ver= 2.00 Cls=00(&gt;ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
&gt; P:  Vendor=04b0 ProdID=041a Rev= 1.03
&gt; S:  Manufacturer=NIKON
&gt; S:  Product=NIKON DSC D300
&gt; S:  SerialNumber=000008014379
&gt; C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
&gt; I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
&gt; E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
&gt; E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
&gt; E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
&gt; 
&gt; Cc: Greg KH &lt;<A HREF="mailto:greg@kroah.com">greg@kroah.com</A>&gt;
&gt; Signed-off-by: Andrew Morton &lt;<A HREF="mailto:akpm@linux-foundation.org">akpm@linux-foundation.org</A>&gt;
&gt; ---
&gt; 
&gt;  drivers/usb/storage/unusual_devs.h |    7 +++++++
&gt;  1 file changed, 7 insertions(+)
&gt; 
&gt; diff -puN drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh drivers/usb/storage/unusual_devs.h
&gt; --- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
&gt; +++ a/drivers/usb/storage/unusual_devs.h
&gt; @@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
&gt;  		US_SC_DEVICE, US_PR_DEVICE, NULL,
&gt;  		US_FL_FIX_INQUIRY ),
&gt;  
&gt; +/* Reported by paul ready &lt;<A HREF="mailto:lxtwin@homecall.co.uk">lxtwin@homecall.co.uk</A>&gt; */
&gt; +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
&gt; +		&quot;NIKON&quot;,
&gt; +		&quot;NIKON DSC D300&quot;,
&gt; +		US_SC_DEVICE, US_PR_DEVICE, NULL,
&gt; +		US_FL_FIX_INQUIRY),
&gt; +
&gt;  /* Submitted by Ernestas Vaiciukevicius &lt;<A HREF="mailto:ernisv@gmail.com">ernisv@gmail.com</A>&gt; */
&gt;  UNUSUAL_DEV(  0x0419, 0x0100, 0x0100, 0x0100,
&gt;  		&quot;Samsung Info. Systems America, Inc.&quot;,

This is almost certainly wrong.  The FIX_INQUIRY flag should never be 
needed, with only extremely rare exceptions.

Can you provide a verbose debugging log, using either usbmon (see 
Documentation/usb/usbmon.txt) or CONFIG_USB_STORAGE_DEBUG showing why 
you think the unusual_devs entry is needed?

Furthermore, given that most of the other Nikon entries in unusual_devs 
include the FIX_CAPACITY flag, are you certain your entry doesn't need 
it as well?

Alan Stern

</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>
Comment 9 Alan Stern 2008-10-03 09:33:51 UTC
On Fri, 3 Oct 2008, Pkr wrote:

> I will clean up everything, reset the camera to factory defaults, create
> a  US_FL_FIX_CAPACITY version and retry it again.

When you do, remember to turn on CONFIG_USB_STORAGE_DEBUG.

Alan Stern
Comment 10 Paul Ready 2008-10-03 15:41:18 UTC
I have reset the camera to factory defaults and it is a lot better.

/proc/bus/usb/devices
T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0419 Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

different camera settings can change these:
P:  Vendor=04b0 ProdID=041a Rev= 1.03
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs


I have changed the entry to:

/* Reported by paul ready <lxtwin@homecall.co.uk> */
UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
                "NIKON",
                "NIKON DSC D300",
                US_SC_DEVICE, US_PR_DEVICE, NULL,
                US_FL_FIX_CAPACITY),


US_FL_FIX_CAPACITY and US_FL_FIX_INQUIRY both work but it is best to
stick to what Alan recommends.


I compiled with CONFIG_USB_STORAGE_DEBUG while I tested it. The camera
was turned on at 22:39:59 and off at 22:40:33 and captured in the
attached log.


I am sorry but I do not know how to create a patch file for Linux but
below is my best shot.


diff -puN
drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
drivers/usb/storage/unusual_devs.h
---
drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
2008-10-03 23:21:57.000000000 +0100
+++ drivers/usb/storage/unusual_devs.h	2008-10-03 23:21:24.000000000
+0100
@@ -357,13 +357,6 @@ UNUSUAL_DEV(  0x04b0, 0x040f, 0x0100, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY),
 
-/* Reported by paul ready <lxtwin@homecall.co.uk> */
-UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
-                "NIKON",
-                "NIKON DSC D300",
-                US_SC_DEVICE, US_PR_DEVICE, NULL,
-                US_FL_FIX_CAPACITY),
-
 /* Reported by Emil Larsson <emil@swip.net> */
 UNUSUAL_DEV(  0x04b0, 0x0411, 0x0100, 0x0111,
 		"NIKON",


On Fri, 2008-10-03 at 12:33 -0400, Alan Stern wrote:
> On Fri, 3 Oct 2008, Pkr wrote:
> 
> > I will clean up everything, reset the camera to factory defaults, create
> > a  US_FL_FIX_CAPACITY version and retry it again.
> 
> When you do, remember to turn on CONFIG_USB_STORAGE_DEBUG.
> 
> Alan Stern
> 
Comment 11 Paul Ready 2008-10-03 15:44:00 UTC
Created attachment 18147 [details]
The output from the kernel debug
Comment 12 Paul Ready 2008-10-03 15:46:14 UTC
Created attachment 18148 [details]
The new unusual_devs.h file
Comment 13 Anonymous Emailer 2008-10-03 16:07:56 UTC
Reply-To: akpm@linux-foundation.org

On Fri, 03 Oct 2008 23:40:57 +0100
Pkr <lxtwin@homecall.co.uk> wrote:

> I have changed the entry to:
> 
> /* Reported by paul ready <lxtwin@homecall.co.uk> */
> UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
>                 "NIKON",
>                 "NIKON DSC D300",
>                 US_SC_DEVICE, US_PR_DEVICE, NULL,
>                 US_FL_FIX_CAPACITY),
> 
> 
> US_FL_FIX_CAPACITY and US_FL_FIX_INQUIRY both work but it is best to
> stick to what Alan recommends.

That entry is the same as the one for the Nikon D200, which is encouraging.

Here's what I have:



From: Paul Ready <lxtwin@homecall.co.uk>

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685

When A Nikon D300 camera is connected to a system it is seen in
/proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

Cc: Greg KH <greg@kroah.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
+++ a/drivers/usb/storage/unusual_devs.h
@@ -383,6 +383,13 @@ UNUSUAL_DEV(  0x04b0, 0x040f, 0x0100, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY),
 
+/* Reported by paul ready <lxtwin@homecall.co.uk> */
+UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
+		"NIKON",
+		"NIKON DSC D300",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_CAPACITY),
+
 /* Reported by Emil Larsson <emil@swip.net> */
 UNUSUAL_DEV(  0x04b0, 0x0411, 0x0100, 0x0111,
 		"NIKON",
_
Comment 14 Alan Stern 2008-10-04 11:10:39 UTC
On Fri, 3 Oct 2008, Pkr wrote:

> I have reset the camera to factory defaults and it is a lot better.

> I have changed the entry to:
> 
> /* Reported by paul ready <lxtwin@homecall.co.uk> */
> UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
>                 "NIKON",
>                 "NIKON DSC D300",
>                 US_SC_DEVICE, US_PR_DEVICE, NULL,
>                 US_FL_FIX_CAPACITY),
> 
> 
> US_FL_FIX_CAPACITY and US_FL_FIX_INQUIRY both work but it is best to
> stick to what Alan recommends.
> 
> 
> I compiled with CONFIG_USB_STORAGE_DEBUG while I tested it. The camera
> was turned on at 22:39:59 and off at 22:40:33 and captured in the
> attached log.

You haven't presented any evidence that your patch is needed.  Can you 
collect a log showing what happens when the patch isn't present?

Alan Stern
Comment 15 Alan Stern 2008-10-04 11:15:18 UTC
On Fri, 3 Oct 2008, Andrew Morton wrote:

> On Fri, 03 Oct 2008 23:40:57 +0100
> Pkr <lxtwin@homecall.co.uk> wrote:
> 
> > I have changed the entry to:
> > 
> > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> >                 "NIKON",
> >                 "NIKON DSC D300",
> >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> >                 US_FL_FIX_CAPACITY),
> > 
> > 
> > US_FL_FIX_CAPACITY and US_FL_FIX_INQUIRY both work but it is best to
> > stick to what Alan recommends.
> 
> That entry is the same as the one for the Nikon D200, which is encouraging.
> 
> Here's what I have:
> 
> 
> 
> From: Paul Ready <lxtwin@homecall.co.uk>
> 
> Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
> When A Nikon D300 camera is connected to a system it is seen in
> /proc/bus/pci/devices but is not accessible.
> 
> This is seen in the above file:
> 
> T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=04b0 ProdID=041a Rev= 1.03
> S:  Manufacturer=NIKON
> S:  Product=NIKON DSC D300
> S:  SerialNumber=000008014379
> C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

This is not a helpful listing.  It shows the camera in still-image 
mode, not in mass-storage mode.

> Cc: Greg KH <greg@kroah.com>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
> 
>  drivers/usb/storage/unusual_devs.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
> drivers/usb/storage/unusual_devs.h
> ---
> a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
> +++ a/drivers/usb/storage/unusual_devs.h
> @@ -383,6 +383,13 @@ UNUSUAL_DEV(  0x04b0, 0x040f, 0x0100, 0x
>               US_SC_DEVICE, US_PR_DEVICE, NULL,
>               US_FL_FIX_CAPACITY),
>  
> +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> +             "NIKON",
> +             "NIKON DSC D300",
> +             US_SC_DEVICE, US_PR_DEVICE, NULL,
> +             US_FL_FIX_CAPACITY),
> +
>  /* Reported by Emil Larsson <emil@swip.net> */
>  UNUSUAL_DEV(  0x04b0, 0x0411, 0x0100, 0x0111,
>               "NIKON",

The new entry is in the wrong place.  Entries are supposed to be sorted
by Vendor ID and then Product ID: 0x0419 comes after 0x0411.

Alan Stern
Comment 16 Anonymous Emailer 2008-10-10 19:53:57 UTC
Reply-To: akpm@linux-foundation.org

On Sat, 4 Oct 2008 14:15:15 -0400 (EDT) Alan Stern <stern@rowland.harvard.edu> wrote:

> On Fri, 3 Oct 2008, Andrew Morton wrote:
> 
> > On Fri, 03 Oct 2008 23:40:57 +0100
> > Pkr <lxtwin@homecall.co.uk> wrote:
> > 
> > > I have changed the entry to:
> > > 
> > > /* Reported by paul ready <lxtwin@homecall.co.uk> */
> > > UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> > >                 "NIKON",
> > >                 "NIKON DSC D300",
> > >                 US_SC_DEVICE, US_PR_DEVICE, NULL,
> > >                 US_FL_FIX_CAPACITY),
> > > 
> > > 
> > > US_FL_FIX_CAPACITY and US_FL_FIX_INQUIRY both work but it is best to
> > > stick to what Alan recommends.
> > 
> > That entry is the same as the one for the Nikon D200, which is encouraging.
> > 
> > Here's what I have:
> > 
> > 
> > 
> > From: Paul Ready <lxtwin@homecall.co.uk>
> > 
> > Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685
> > 
> > When A Nikon D300 camera is connected to a system it is seen in
> > /proc/bus/pci/devices but is not accessible.
> > 
> > This is seen in the above file:
> > 
> > T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
> > D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> > P:  Vendor=04b0 ProdID=041a Rev= 1.03
> > S:  Manufacturer=NIKON
> > S:  Product=NIKON DSC D300
> > S:  SerialNumber=000008014379
> > C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
> > I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
> > E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> > E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
> 
> This is not a helpful listing.  It shows the camera in still-image 
> mode, not in mass-storage mode.
> 
> > Cc: Greg KH <greg@kroah.com>
> > Cc: Alan Stern <stern@rowland.harvard.edu>
> > Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> > ---
> > 
> >  drivers/usb/storage/unusual_devs.h |    7 +++++++
> >  1 file changed, 7 insertions(+)
> > 
> > diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
> drivers/usb/storage/unusual_devs.h
> > ---
> a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
> > +++ a/drivers/usb/storage/unusual_devs.h
> > @@ -383,6 +383,13 @@ UNUSUAL_DEV(  0x04b0, 0x040f, 0x0100, 0x
> >             US_SC_DEVICE, US_PR_DEVICE, NULL,
> >             US_FL_FIX_CAPACITY),
> >  
> > +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> > +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> > +           "NIKON",
> > +           "NIKON DSC D300",
> > +           US_SC_DEVICE, US_PR_DEVICE, NULL,
> > +           US_FL_FIX_CAPACITY),
> > +
> >  /* Reported by Emil Larsson <emil@swip.net> */
> >  UNUSUAL_DEV(  0x04b0, 0x0411, 0x0100, 0x0111,
> >             "NIKON",
> 
> The new entry is in the wrong place.  Entries are supposed to be sorted
> by Vendor ID and then Product ID: 0x0419 comes after 0x0411.


ho hum.


From: Paul Ready <lxtwin@homecall.co.uk>

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11685

When A Nikon D300 camera is connected to a system it is seen in
/proc/bus/pci/devices but is not accessible.

This is seen in the above file:

T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 11 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=041a Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=06(still) Sub=01 Prot=01 Driver=usbfs
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=83(I) Atr=03(Int.) MxPS=   8 Ivl=32ms

Cc: Greg KH <greg@kroah.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs drivers/usb/storage/unusual_devs.h
--- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-camera-to-unusual_devs
+++ a/drivers/usb/storage/unusual_devs.h
@@ -411,6 +411,13 @@ UNUSUAL_DEV(  0x04b0, 0x0417, 0x0100, 0x
 		US_SC_DEVICE, US_PR_DEVICE, NULL,
 		US_FL_FIX_CAPACITY),
 
+/* Reported by paul ready <lxtwin@homecall.co.uk> */
+UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
+		"NIKON",
+		"NIKON DSC D300",
+		US_SC_DEVICE, US_PR_DEVICE, NULL,
+		US_FL_FIX_CAPACITY),
+
 /* Reported by Doug Maxey (dwm@austin.ibm.com) */
 UNUSUAL_DEV(  0x04b3, 0x4001, 0x0110, 0x0110,
 		"IBM",
_
Comment 17 Phil Dibowitz 2008-10-11 09:29:43 UTC
Andrew Morton wrote:
> 
> diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> drivers/usb/storage/unusual_devs.h
> --- a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> +++ a/drivers/usb/storage/unusual_devs.h
> @@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
>               US_SC_DEVICE, US_PR_DEVICE, NULL,
>               US_FL_FIX_INQUIRY ),
>  
> +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,

Do you have any reason to believe that this affects any other bcd than 200?
The device looks to be 200... starting at 100 confuses me a bit. It's not
0-200, and it's not 200-200, so I'm wondering if there was some reason you
wrote the patch this way.

-- 
Phil Dibowitz                             phil@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
Comment 18 Paul Ready 2008-10-11 12:52:17 UTC
I did look at that, and I kept it similar to the D200. I beleive that
the original D200 patch was:

UNUSUAL_DEV(  0x04b0, 0x040f, 0x0200, 0x0200,
        "NIKON",
        "NIKON DSC D200",
        US_SC_DEVICE, US_PR_DEVICE, NULL,
        US_FL_FIX_CAPACITY), 


A while ago I had a D200 that did not work so I changed it to:

UNUSUAL_DEV( 0x04b0, 0x040f, 0x0100, 0x0200,
"NIKON",
"NIKON DSC D200",
US_SC_DEVICE, US_PR_DEVICE, NULL,
        US_FL_FIX_CAPACITY), 

Then all was OK, I upgraded the D200 firmware and it still worked.


Then My D300 was using version A1.01 / B1.00 of the firmware, initially
I had various problems, although it was new it looks like it was looked
at as some of the settings had been changed which affected the D300s
behaviour. I then upgraded the firmware to A1.03 / B1.03 reset
everything to factory default to start with a clean slate; I then
started with the same settings that had worked with my D200:


UNUSUAL_DEV( 0x04b0, 0x0419, 0x0100, 0x0200,
	"NIKON",
	"NIKON DSC D300",
	US_SC_DEVICE, US_PR_DEVICE, NULL,
        US_FL_FIX_CAPACITY),

I am currently downloading Mandriva 2009 64bit, Once I have it I will test
it to see if I need the patch at all, if I do I will try 0-200, 200-200
and the 100-200 to see what happens.




On Sat, 2008-10-11 at 18:29 +0200, Phil Dibowitz wrote:
> Andrew Morton wrote:
> > 
> > diff -puN
> drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> drivers/usb/storage/unusual_devs.h
> > ---
> a/drivers/usb/storage/unusual_devs.h~usb-add-nikon-d300-to-unusual_devsh
> > +++ a/drivers/usb/storage/unusual_devs.h
> > @@ -120,6 +120,13 @@ UNUSUAL_DEV(  0x0411, 0x001c, 0x0113, 0x
> >             US_SC_DEVICE, US_PR_DEVICE, NULL,
> >             US_FL_FIX_INQUIRY ),
> >  
> > +/* Reported by paul ready <lxtwin@homecall.co.uk> */
> > +UNUSUAL_DEV(  0x04b0, 0x0419, 0x0100, 0x0200,
> 
> Do you have any reason to believe that this affects any other bcd than 200?
> The device looks to be 200... starting at 100 confuses me a bit. It's not
> 0-200, and it's not 200-200, so I'm wondering if there was some reason you
> wrote the patch this way.
> 
Comment 19 Phil Dibowitz 2008-10-11 13:55:52 UTC
Pkr wrote:
<SNIP>
> everything to factory default to start with a clean slate; I then
> started with the same settings that had worked with my D200:

OK, I misread the output, whoops. In your case you (maybe) need 103 - 103.

  P:  Vendor=04b0 ProdID=041a Rev= 1.03

That last number is the bcdDevice number - 103. I say "maybe" because the
output you provided is from when the device is in still camera mode and not
in mass-storage mode as Alan Stern previously mentioned.

Can we get a copy of that file when the device is in mass-storage mode?

I'm not too worried about the bcdDevice range. I generally like to keep it
as narrow as possible because it's easier to add numbers than to remove them.

Trying a newer version isn't going to make a difference unless your on a
painfully old kernel that had some serious brokeness. It certainly won't
change FIX_CAPACITY.

Something like this should work for you, all the time. Confirm this and
enclose a copy of /proc/bus/usb/devices with the device in usb-storage and
we'll get this merged for you.

/* Reported by Paul Ready <lxtwin@homecall.co.uk> */
UNUSUAL_DEV( 0x04b0, 0x0419, 0x0103, 0x0102,
	"NIKON",
	"NIKON DSC D300",
	US_SC_DEVICE, US_PR_DEVICE, NULL,
        US_FL_FIX_CAPACITY),

-- 
Phil Dibowitz                             phil@ipom.com
Open Source software and tech docs        Insanity Palace of Metallica
http://www.phildev.net/                   http://www.ipom.com/

"Never write it in C if you can do it in 'awk';
 Never do it in 'awk' if 'sed' can handle it;
 Never use 'sed' when 'tr' can do the job;
 Never invoke 'tr' when 'cat' is sufficient;
 Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
Comment 20 Paul Ready 2008-10-11 14:05:24 UTC
The still camera mode is how I knew that it had been out of the box
before I had it....


Comment 5 and 10 show it in mass storage mode, he is is again.


T:  Bus=01 Lev=01 Prnt=01 Port=05 Cnt=03 Dev#= 10 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=04b0 ProdID=0419 Rev= 1.03
S:  Manufacturer=NIKON
S:  Product=NIKON DSC D300
S:  SerialNumber=000008014379
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms


The reason I picked 0x200 instead of 0x103 is because I did not know if
it would stop working if version 1.04+ and I would have to do it again.


On Sat, 2008-10-11 at 13:55 -0700, bugme-daemon@bugzilla.kernel.org
wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=11685
> 
> 
> 
> 
> 
> ------- Comment #19 from phil@ipom.com  2008-10-11 13:55 -------
> Pkr wrote:
> <SNIP>
> > everything to factory default to start with a clean slate; I then
> > started with the same settings that had worked with my D200:
> 
> OK, I misread the output, whoops. In your case you (maybe) need 103 - 103.
> 
>   P:  Vendor=04b0 ProdID=041a Rev= 1.03
> 
> That last number is the bcdDevice number - 103. I say "maybe" because the
> output you provided is from when the device is in still camera mode and not
> in mass-storage mode as Alan Stern previously mentioned.
> 
> Can we get a copy of that file when the device is in mass-storage mode?
> 
> I'm not too worried about the bcdDevice range. I generally like to keep it
> as narrow as possible because it's easier to add numbers than to remove them.
> 
> Trying a newer version isn't going to make a difference unless your on a
> painfully old kernel that had some serious brokeness. It certainly won't
> change FIX_CAPACITY.
> 
> Something like this should work for you, all the time. Confirm this and
> enclose a copy of /proc/bus/usb/devices with the device in usb-storage and
> we'll get this merged for you.
> 
> /* Reported by Paul Ready <lxtwin@homecall.co.uk> */
> UNUSUAL_DEV( 0x04b0, 0x0419, 0x0103, 0x0102,
>         "NIKON",
>         "NIKON DSC D300",
>         US_SC_DEVICE, US_PR_DEVICE, NULL,
>         US_FL_FIX_CAPACITY),
> 
> -- 
> Phil Dibowitz                             phil@ipom.com
> Open Source software and tech docs        Insanity Palace of Metallica
> http://www.phildev.net/                   http://www.ipom.com/
> 
> "Never write it in C if you can do it in 'awk';
>  Never do it in 'awk' if 'sed' can handle it;
>  Never use 'sed' when 'tr' can do the job;
>  Never invoke 'tr' when 'cat' is sufficient;
>  Avoid using 'cat' whenever possible" -- Taylor's Laws of Programming
> 
> 
Comment 21 Greg Kroah-Hartman 2009-07-28 16:53:00 UTC
Should be fixed in 2.6.30.  If not, please let the developers at linux-usb@vger.kernel.org know about it.