As I am the original person who posted the patch, I would like to use this opertunity to fix a few things. I have looked at the windows driver .inf, and according to it, we should have the following: -

UNUSUAL_DEV( 0x0a17, 0x0004, 0x0000, 0xFFFF,
                "Pentax",
                "USB DISK Device",
                US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY),

As you can see, the windows driver just uses the standard USB driver that comes with Window2000/NT. Windows states CB instead of CBI but the camera functions perfectly ok using either US_PR_CB or US_PR_CBI.

The US_SC_8070 comes from a simple lsusb -v for the camera.
bInterfaceClass         8 Mass Storage
bInterfaceSubClass      5 SFF-8070i

I think it would be sensible to change the description to "Pentax USB DISK Device", rather that the camera name, because so many camera's use the same USB chips and the Windows driver does that.
The windows driver does not seem to need "FIX_INQUIRY", so from that I conclude that we are doing something wrong in the kernel, because in linux one cannot access the device at all without FIX_INQUIRY set.
Someone will have to do a windows2000 usbsnoopy to really find out why.


For info, I have a Pentax Optio 430RS camera, and a friend of mine has the 430 (Without RS) and they both work fine with the above entry.

I attach a copy of lsusb -v for those interested.
Note that the lsusb command thinks I have a "Pentax Corp. Pentax Optio 330" but I actually have a 430RS.
I think that wherever the "Pentax Corp. Pentax Optio 330" comes from, it should be replaced by "Pentax Corp. USB DISK Device".



From the windows .inf file: - ;------------------- Windows2000 section ----------------------;


[PENUSBC1.Dev.NT] Include=usbstor.inf Needs=USBSTOR_CB.NT CopyFiles=USBSTOR.CopyList AddReg=USBSTOR.AddReg


[PENUSBC1.Dev.NT.Services] Include=usbstor.inf Needs=USBSTOR_CB.NT.Services


;---------------------------------------------------------------;



[Strings] MSFT="Asahi Optical Co., Ltd." MfgName="Asahi Optical Co., Ltd."


USB\VID_0A17&PID_0004.DeviceDesc="PENTAX USB DISK Device" PENUSBC1.SvcDesc="PENTAX USB DISK Device"







Christian Strauf wrote:
Dear list,

I would like to quickly drop in this patch against the vanilla linux
2.4.23 source tree which enabled the use of a Pentax Optio 330/430 RS
digital camera as a mass storage device for me.

I've been using this patch for quite some time now with a Pentax Optio
430 RS and it has never given me any trouble.

Note: This patch does (according to other people) not work for the older
non-RS-versions of the Pentax Optio series (Optio 330/430). It only
works for the RS series.

Please let me know if the patch is ok or if I need to change anything.

Cheers,
Christian


------------------------------------------------------------------------


--- linux-2.4.23/drivers/usb/storage/unusual_devs.h     2003-11-28 19:26:20.000000000 
+0100
+++ linux-2.4.23-new/drivers/usb/storage/unusual_devs.h 2003-12-08 13:47:36.000000000 
+0100
@@ -609,6 +609,14 @@
                 US_SC_8070, US_PR_CBI, NULL,
                 US_FL_FIX_INQUIRY ),
                
+/* From Christian Strauf <[EMAIL PROTECTED]>
+ * Pentax Optio 330/430RS digital still cameras
+ */
+UNUSUAL_DEV( 0x0a17, 0x04, 0x0000, 0xFFFF,
+               "Pentax",
+               "Optio 330/430 RS",
+               US_SC_8070, US_PR_CB, NULL, US_FL_FIX_INQUIRY),
+
 #ifdef CONFIG_USB_STORAGE_ISD200
 UNUSUAL_DEV(  0x0bf6, 0xa001, 0x0100, 0x0110,
                "ATI",

Bus 001 Device 014: ID 0a17:0004 Pentax Corp. Pentax Optio 330  <--- I think this 
should instead say "USB Disk Device".
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.00
  bDeviceClass            0 Interface
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0         8
  idVendor           0x0a17 Pentax Corp.
  idProduct          0x0004 Pentax Optio 330      <--- I think this should instead say 
"USB Disk Device".
  bcdDevice           10.00
  iManufacturer           1 ASAHI PENTAX
  iProduct                2 PENTAX OPTIO 430RS
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x40
      Self Powered
    MaxPower                0mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      5 SFF-8070i
      bInterfaceProtocol      1 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               none
        wMaxPacketSize         64
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               none
        wMaxPacketSize          8
        bInterval               1
  Language IDs: (length=4)
     0409 English(US)

Reply via email to