Bug 93389 - [umass] [patch] Digital Camera Pentax S60 don't work
Summary: [umass] [patch] Digital Camera Pentax S60 don't work
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 5.5-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Warner Losh
URL:
Keywords:
: 76653 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-15 13:40 UTC by Demin Alexander
Modified: 2019-01-09 18:42 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Demin Alexander 2006-02-15 13:40:04 UTC
This message is displayed after connection digital camera:
umass0: PENTAX product 0x0047, rev 1.10/0.00, addr 2
umass0: 8070i (ATAPI) over CBI with CCI (using CBI); quirks = 0x0002
umass0:2:0:-1: Attached to scbus2
umass0: CBI reset failed, STALLED
umass0: CBI bulk-in stall clear failed, STALLED
umass0: CBI bulk-out stall clear failed, STALLED
(probe0:umass-sim0:0:0:0): INQUIRY. CDB: 12 0 0 0 24 0
(probe0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe0:umass-sim0:0:0:0): NOT READY asc:3a,0
(probe0:umass-sim0:0:0:0): Medium not present sks:0x80,0xffff
(probe0:umass-sim0:0:0:0): Unretryable error
Comment 1 Ganbold 2006-08-08 05:16:26 UTC
Hi,

I have Pentax Optio S60 and I got it working in Dell D620 under
FreeBSD-6.1-STABLE by patching umass.c and scsi_da.c.

# uname -an
FreeBSD devil.micom.mng.net 6.1-STABLE FreeBSD 6.1-STABLE #7: Tue Aug  8
12:52:48 ULAST 2006
tsgan@devil.micom.mng.net:/usr/obj/usr/src/sys/DEVIL  i386

Aug  8 12:59:39 devil kernel: umass0: PENTAX product 0x0047, rev
1.10/0.00, addr 2
Aug  8 12:59:40 devil kernel: da0 at umass-sim0 bus 0 target 0 lun 0
Aug  8 12:59:40 devil kernel: da0: <PENTAX DIGITAL_CAMERA 1.00>
Removable Direct Access SCSI-0 device
Aug  8 12:59:40 devil kernel: da0: 1.000MB/s transfers
Aug  8 12:59:40 devil kernel: da0: 243MB (498176 512 byte sectors: 64H
32S/T 243C)

# usbdevs -v
...
Controller /dev/usb2:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
Intel(0x0000), rev 1.00
port 1 powered
port 2 addr 2: full speed, self powered, config 1, product
0x0047(0x0047), PENTAX(0x0a17), rev 0.00
...

Patches are here:

-----------------------------------------------------------------------------------
--- /usr/src/sys/dev/usb/umass.c-orig   Tue Aug  8 12:54:25 2006
+++ /usr/src/sys/dev/usb/umass.c        Tue Aug  8 12:55:37 2006
@@ -321,7 +321,7 @@

Static struct umass_devdescr_t umass_devdescrs[] = {
        { USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD,
-         UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
+         UMASS_PROTO_ATAPI | UMASS_PROTO_BBB,
          RS_NO_CLEAR_UA
        },
        { USB_VENDOR_ADDON, USB_PRODUCT_ADDON_ATTACHE, RID_WILDCARD,
-----------------------------------------------------------------------------------
--- /usr/src/sys/cam/scsi/scsi_da.c-orig        Tue Aug  8 12:53:37 2006
+++ /usr/src/sys/cam/scsi/scsi_da.c     Tue Aug  8 12:47:15 2006
@@ -436,6 +436,11 @@
                "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
        },
        {
+               /* PENTAX Optio S60. */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "PENTAX",
"DIGITAL_CAMERA", "*"},
+               /*quirks*/ DA_Q_NO_SYNC_CACHE
+       },
+       {
                /*
                 * Genesys 6-in-1 Card Reader
                 * PR: usb/94647

hth,

Ganbold
Comment 2 Demin Alexander 2006-08-15 13:27:57 UTC
Hi.

Thank for you pacth. I have checked this patch on my workstation and my
digital camera Pentax Optio S60 is working now.

uname -a
FreeBSD support.spectrum.ru 5.5-STABLE FreeBSD 5.5-STABLE #26: Tue Aug
15 12:22:00 MSD 2006
oldman@support.spectrum.ru:/usr/obj/usr/src/sys/MYGENERIC  i386

usbdevs -v
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel
(0x0000), rev 1.00 port 1 powered
 port 2 addr 2: full speed, self powered, config 1, product 0x0047
(0x0047), PENTAX(0x0a17), rev 0.00

umass0: PENTAX product 0x0047, rev 1.10/0.00, addr 2
umass0: 8070i (ATAPI) over Bulk-Only; quirks = 0x0002
umass0:2:0:-1: Attached to scbus2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <PENTAX DIGITAL_CAMERA 1.00> Removable Direct Access SCSI-0 device
da0: 1.000MB/s transfers
da0: 11MB (22559 512 byte sectors: 64H 32S/T 11C)

Thank you very much.

On Tue, 08 Aug 2006 13:16:26 +0900
Ganbold <ganbold@micom.mng.net> wrote:

> Hi,
> 
> I have Pentax Optio S60 and I got it working in Dell D620 under
> FreeBSD-6.1-STABLE by patching umass.c and scsi_da.c.
> 
> # uname -an
> FreeBSD devil.micom.mng.net 6.1-STABLE FreeBSD 6.1-STABLE #7: Tue Aug  8
> 12:52:48 ULAST 2006
> tsgan@devil.micom.mng.net:/usr/obj/usr/src/sys/DEVIL  i386
> 
> Aug  8 12:59:39 devil kernel: umass0: PENTAX product 0x0047, rev
> 1.10/0.00, addr 2
> Aug  8 12:59:40 devil kernel: da0 at umass-sim0 bus 0 target 0 lun 0
> Aug  8 12:59:40 devil kernel: da0: <PENTAX DIGITAL_CAMERA 1.00>
> Removable Direct Access SCSI-0 device
> Aug  8 12:59:40 devil kernel: da0: 1.000MB/s transfers
> Aug  8 12:59:40 devil kernel: da0: 243MB (498176 512 byte sectors: 64H
> 32S/T 243C)
> 
> # usbdevs -v
> ...
> Controller /dev/usb2:
> addr 1: full speed, self powered, config 1, UHCI root hub(0x0000),
> Intel(0x0000), rev 1.00
> port 1 powered
> port 2 addr 2: full speed, self powered, config 1, product
> 0x0047(0x0047), PENTAX(0x0a17), rev 0.00
> ...
> 
> Patches are here:
> 
> -----------------------------------------------------------------------------------
> --- /usr/src/sys/dev/usb/umass.c-orig   Tue Aug  8 12:54:25 2006
> +++ /usr/src/sys/dev/usb/umass.c        Tue Aug  8 12:55:37 2006
> @@ -321,7 +321,7 @@
> 
> Static struct umass_devdescr_t umass_devdescrs[] = {
>         { USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD,
> -         UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
> +         UMASS_PROTO_ATAPI | UMASS_PROTO_BBB,
>           RS_NO_CLEAR_UA
>         },
>         { USB_VENDOR_ADDON, USB_PRODUCT_ADDON_ATTACHE, RID_WILDCARD,
> -----------------------------------------------------------------------------------
> --- /usr/src/sys/cam/scsi/scsi_da.c-orig        Tue Aug  8 12:53:37 2006
> +++ /usr/src/sys/cam/scsi/scsi_da.c     Tue Aug  8 12:47:15 2006
> @@ -436,6 +436,11 @@
>                 "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
>         },
>         {
> +               /* PENTAX Optio S60. */
> +               {T_DIRECT, SIP_MEDIA_REMOVABLE, "PENTAX",
> "DIGITAL_CAMERA", "*"},
> +               /*quirks*/ DA_Q_NO_SYNC_CACHE
> +       },
> +       {
>                 /*
>                  * Genesys 6-in-1 Card Reader
>                  * PR: usb/94647
> 
> hth,
> 
> Ganbold
> 
> 
> 


-- 
=======================================================
Demin Alexander / Network Administarator
Group of companies Spectrum / tel. (+7 495) 995-8999
Moscow, 103009, Strastnoy blvr. 8
=======================================================
Comment 3 Demin Alexander 2006-09-22 16:13:32 UTC
Hello.

Please test my patch for addition of support for Pentax Digital Camera Optio S60.

uname -a
FreeBSD support.spectrum.ru 5.5-STABLE FreeBSD 5.5-STABLE #34: Fri Sep 22 18:09:11 MSD 2006 oldman@support.spectrum.ru:/usr/obj/usr/src/sys/MYGENERIC  i386

umass0: PENTAX Digital Camera Optio S60, rev 1.10/0.00, addr 2
umass0: SCSI over Bulk-Only; quirks = 0x0200
umass0:2:0:-1: Attached to scbus2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <PENTAX DIGITAL CAMERA 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: 954MB (1953792 512 byte sectors: 64H 32S/T 954C)

Patchs:

--- /usr/src/sys/cam/scsi/scsi_da.c.orig	Wed Jul 26 11:49:37 2006
+++ /usr/src/sys/cam/scsi/scsi_da.c	Fri Sep 22 18:54:31 2006
@@ -438,6 +438,14 @@
 		{T_DIRECT, SIP_MEDIA_REMOVABLE, "Generic*", "STORAGE DEVICE*",
 		"*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
 	},
+	{
+		/*
+		* Pentax Digital Camera
+		* PR: usb/93389
+		*/
+		{T_DIRECT, SIP_MEDIA_REMOVABLE, "PENTAX", "DIGITAL CAMERA",
+		"*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
+	},
 };
 
 static	disk_strategy_t	dastrategy;

--- /usr/src/sys/dev/usb/umass.c.orig	Sat Mar 18 23:43:50 2006
+++ /usr/src/sys/dev/usb/umass.c	Fri Sep 22 18:05:19 2006
@@ -319,8 +319,8 @@
 
 Static struct umass_devdescr_t umass_devdescrs[] = {
 	{ USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD,
-	  UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
-	  RS_NO_CLEAR_UA
+	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+	  WRONG_CSWSIG
 	},
 	{ USB_VENDOR_FUJIPHOTO, USB_PRODUCT_FUJIPHOTO_MASS0100, RID_WILDCARD,
 	  UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,

--- /usr/src/sys/dev/usb/usbdevs.orig	Sun Mar 19 04:12:31 2006
+++ /usr/src/sys/dev/usb/usbdevs	Fri Sep 22 17:18:19 2006
@@ -492,6 +492,7 @@
 /* Asahi Optical products */
 product ASAHIOPTICAL OPTIO230	0x0004	Digital camera
 product ASAHIOPTICAL OPTIO330	0x0006  Digital camera
+product ASAHIOPTICAL OPTIOS60	0x0047	Digital Camera Pentax Optio S60
 
 /* ASIX Electronics products */
 product ASIX AX88172		0x1720  USB 2.0 10/100 ethernet controller

-- 
=======================================================
Demin Alexander / Network Administarator
Group of companies Spectrum / tel. (+7 495) 995-8999
Moscow, 103009, Strastnoy blvr. 8
=======================================================
Comment 4 Demin Alexander 2006-09-25 12:32:24 UTC
Hello.

This is small correction of patch for usbdevs (to add product id for Pentax Optio S55/S60):

--- /usr/src/sys/dev/usb/usbdevs.orig	Sun Mar 19 04:12:31 2006
+++ /usr/src/sys/dev/usb/usbdevs	Mon Sep 25 15:04:55 2006
@@ -492,6 +492,8 @@
 /* Asahi Optical products */
 product ASAHIOPTICAL OPTIO230	0x0004	Digital camera
 product ASAHIOPTICAL OPTIO330	0x0006  Digital camera
+product ASAHIOPTICAL OPTIOS55	0x003d	Digital Camera Optio S55
+product ASAHIOPTICAL OPTIOS60	0x0047	Digital Camera Optio S60
 
 /* ASIX Electronics products */
 product ASIX AX88172		0x1720  USB 2.0 10/100 ethernet controller


-- 
=======================================================
Demin Alexander / Network Administarator
Group of companies Spectrum / tel. (+7 495) 995-8999
Moscow, 103009, Strastnoy blvr. 8
=======================================================
Comment 5 Taras Korenko 2008-01-12 18:33:07 UTC
Hi, folks.

I had the same problem with this digital camera, but a little bit different solution.
The main idea is to leave the old "wildcards" unchanged, 'cause we've got at least two success stories in the hardware compatibility list (Asahi Optical Optio 230 & 330). And we don't know for sure whether changing proto would have negative impact on devices of those two models.

The patches are following:
--------------------------------------------------------------------
--- usbdevs.orig        2008-01-12 17:18:12.000000000 +0200
+++ usbdevs     2008-01-12 19:22:43.000000000 +0200
@@ -691,6 +691,7 @@
 /* Asahi Optical products */
 product ASAHIOPTICAL OPTIO230  0x0004  Digital camera
 product ASAHIOPTICAL OPTIO330  0x0006  Digital camera
+product ASAHIOPTICAL OPTIOS60  0x0047  Pentax Optio 60
 
 /* ASIX Electronics products */
 product ASIX AX88172           0x1720  10/100 ethernet

--------------------------------------------------------------------
--- umass.orig.c        2008-01-12 12:44:31.000000000 +0200
+++ umass.c     2008-01-12 19:25:51.000000000 +0200
@@ -320,6 +320,12 @@
 };
 
 Static struct umass_devdescr_t umass_devdescrs[] = {
+       { USB_VENDOR_ASAHIOPTICAL, USB_PRODUCT_ASAHIOPTICAL_OPTIOS60,
+         RID_WILDCARD,
+         UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+         IGNORE_RESIDUE
+       },
+
        { USB_VENDOR_ASAHIOPTICAL, PID_WILDCARD, RID_WILDCARD,
          UMASS_PROTO_ATAPI | UMASS_PROTO_CBI_I,
          RS_NO_CLEAR_UA


--------------------------------------------------------------------
--- scsi_da.orig.c      2008-01-12 19:29:07.000000000 +0200
+++ scsi_da.c   2008-01-12 19:30:03.000000000 +0200
@@ -475,6 +475,14 @@
                {T_DIRECT, SIP_MEDIA_REMOVABLE, "EM732X", "MP3 Player*",
                "1.0"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
        },
+       {
+               /*
+                * PENTAX Optio S60 Digital Camera (vendor ASAHIOPTICAL)
+                * PR: usb/93389
+                */
+               {T_DIRECT, SIP_MEDIA_REMOVABLE, "PENTAX", "DIGITAL_CAMERA",
+                "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE
+       },
 };
 
 static disk_strategy_t dastrategy;

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

They were tested with:
FreeBSD notebook.ukrhub.net 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #1: Sat Jan 12 17:45:09 EET 2008     ds@notebook.ukrhub.net:/usr/obj/usr/src/sys/GENERIC  i386

A part of dmesg:
umass0: PENTAX product 0x0047, rev 1.10/0.00, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <PENTAX DIGITAL_CAMERA 1.00> Removable Direct Access SCSI-0 device 
da0: 1.000MB/s transfers
da0: 243MB (498176 512 byte sectors: 64H 32S/T 243C)

#usbdevs -vdf /dev/usb0
Controller /dev/usb0:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), NEC(0x0000), rev 1.00
  uhub0
 port 1 addr 2: full speed, self powered, config 1, product 0x0047(0x0047), PENTAX(0x0a17), rev 0.00
   umass0
 port 2 powered
 port 3 powered

#camcontrol inquiry da0
pass0: <PENTAX DIGITAL_CAMERA 1.00> Removable Direct Access SCSI-0 device 
pass0: Serial Number 
pass0: 1.000MB/s transfers 

-- 
  Best regards,
  Taras Korenko,
  Network Engineer,
  UkrCom ISP
+38 044 205 55 70
+38 044 205 55 76
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:39 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 7 commit-hook freebsd_committer 2019-01-08 20:55:55 UTC
A commit references this bug:

Author: imp
Date: Tue Jan  8 20:55:02 UTC 2019
New revision: 342866
URL: https://svnweb.freebsd.org/changeset/base/342866

Log:
  Add NO_SYNC_CACHE quirk for PENTAX cameras

  PR: 93389
  Submitted by: Demin Alexander

Changes:
  head/sys/cam/scsi/scsi_da.c
Comment 8 Warner Losh freebsd_committer 2019-01-09 06:14:41 UTC
*** Bug 76653 has been marked as a duplicate of this bug. ***