Bug 78984

Summary: [umass] [patch] Creative MUVO umass failure
Product: Base System Reporter: Michael Wesemeyer <bofh>
Component: usbAssignee: Warner Losh <imp>
Status: Closed FIXED    
Severity: Affects Only Me CC: imp
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
scsi_da.c.patch none

Description Michael Wesemeyer 2005-03-18 13:50:02 UTC
My Creative MUVO can´ t be mounted since 5.3 With 5.2.1 there was no Problem

umass0: Creative Tech NOMAD MuVo, rev 1.10/0.01, addr 2
usbd_setup_pipe: failed to start endpoint, IOERROR
device_attach: umass0 attach returned 6
Comment 1 Hans Petter Selasky 2005-03-19 12:38:49 UTC
Could you try: In the file /sys/dev/usb/usb_subr.c, in the function=20
"usbd_setup_pipe" comment out the following lines:

                if (err && err !=3D USBD_STALLED && err !=3D USBD_TIMEOUT) {
                        printf("usbd_setup_pipe: failed to start "
                            "endpoint, %s\n", usbd_errstr(err));
                        return (err);
                }

Or download the three files below into a new directory and type
"make install"  (to uninstall type "make deinstall")
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/Makefile
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.diff.bz2
http://home.c2i.net/hselasky/isdn4bsd/privat/usb/new_usb_1_5_4.tar.bz2

Then recompile your kernel or USB module (/sys/modules/usb) depending on wh=
at=20
you are using.


I have seen a similar problem with my umass device. These devices expect=20
clearstall in combination with the reset command, and if one tries to=20
clearstall besides from that, device access will fail ! This suggests that=
=20
clearstall shouldn't be run by default, but rather be optional.


Yours
=2D-HPS
Comment 2 iedowse freebsd_committer freebsd_triage 2006-02-25 03:34:42 UTC
State Changed
From-To: open->feedback


Could you try a recent 6-stable to see if this had been improved?
Comment 3 Henrik Gulbrandsen 2006-09-25 19:27:44 UTC
Since this bug is still open, I guess I'd better give an update. I seem
to have exactly the same device as in the original bug report, and it
gives this result on the current 6.2-PRERELEASE (basically 6.2-BETA1):

umass0: Creative Tech NOMAD MuVo, rev 1.10/0.01, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <CREATIVE NOMAD_MUVO 0001> Removable Direct Access SCSI-4 device
da0: 1.000MB/s transfers
da0: 125MB (256001 512 byte sectors: 64H 32S/T 125C)
umass0: BBB reset failed, TIMEOUT
umass0: BBB bulk-in clear stall failed, STALLED
umass0: BBB bulk-out clear stall failed, STALLED
(da0:umass-sim0:0:0:0): AutoSense Failed
umass0: BBB reset failed, STALLED
umass0: BBB bulk-in clear stall failed, STALLED
umass0: BBB bulk-out clear stall failed, STALLED

Fortunately, this is a known problem that I analyzed back in 2004 for
FreeBSD 5.3, but somehow I forgot to deliver the patch. Basically, the
128 MB MuVo device incorrectly reports its capacity using the number of
sectors instead of reporting the highest sector number as expected.

This problem may be shared with other umass devices, but the attached
patch should get rid of the bug once and for all. At least, it still
works for me in the 6.2 branch, so I think this bug can be closed once
the patch has been applied.

/Henrik
Comment 4 Mark Linimon 2008-01-05 20:47:57 UTC
[bugmeister note: the following initially appeared in
http://lists.freebsd.org/pipermail/freebsd-usb/2007-December/004285.html.
The preferred method would have been for this message to be cross-posted
to bug-followup@FreeBSD, fwiw.]

From: Henrik Gulbrandsen (henrik at gulbra.net)
Date: Sun Dec 30 16:54:45 PST 2007

I hate when reality interferes with a clean design! :-)

OK. I'm convinced. We might still use heuristics as a hint for future
bug hunters, but I'm not going to worry about that for the moment.

This is the quirk patch needed for the 128 MB Creative MuVo device
(where "MB" seems to be 1024000 bytes...). I hope email formatting
works. PR usb/78984 can hopefully be closed once this is applied.

/Henrik

===============================================================================
--- sys/dev/usb/umass.c.orig	2007-12-29 11:13:06.000000000 +0100
+++ sys/dev/usb/umass.c	2007-12-29 14:37:57.000000000 +0100
@@ -374,6 +374,10 @@
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE
 	},
+	{ USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, 0x001,
+	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+	  READ_CAPACITY_OFFBY1
+	},
 	{ USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD,
 	  UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
 	  NO_QUIRKS
===============================================================================
Comment 5 Mark Linimon freebsd_committer freebsd_triage 2008-01-28 12:15:05 UTC
State Changed
From-To: feedback->open

Note that feedback was received quite some time ago.
Comment 6 Mark Kirkwood 2008-04-21 11:11:17 UTC
I ran into this with 7-STABLE and a 128MB creatiev muvo. This slightly 
updated patch seems to fix.
================================================================================
*** sys/dev/usb/umass.c.orig    Mon Apr 21 18:17:08 2008
--- sys/dev/usb/umass.c Mon Apr 21 18:20:31 2008
***************
*** 374,379 ****
--- 374,383 ----
      UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
      FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE
    },
+   { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, RID_WILDCARD,
+     UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+     READ_CAPACITY_OFFBY1
+   },
    { USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD,
      UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
      NO_QUIRKS
================================================================================
Comment 7 Mark Kirkwood 2008-04-22 02:24:07 UTC
I neglected to change RID_WILDCARD to the id of the 128MB nomad (we 
don't want *all* creative nomads to get this quirk).
===============================================================================
*** sys/dev/usb/umass.c.orig    Mon Apr 21 18:17:08 2008
--- sys/dev/usb/umass.c Tue Apr 22 11:39:02 2008
***************
*** 374,379 ****
--- 374,384 ----
      UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
      FORCE_SHORT_INQUIRY | NO_START_STOP | IGNORE_RESIDUE
    },
+   { USB_VENDOR_CREATIVE, USB_PRODUCT_CREATIVE_NOMAD, 0x001,
+     /* Only the 128MB Nomad needs off by 1 */
+     UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+     READ_CAPACITY_OFFBY1
+   },
    { USB_VENDOR_DESKNOTE, USB_PRODUCT_DESKNOTE_UCR_61S2B, RID_WILDCARD,
      UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
      NO_QUIRKS
===============================================================================
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:36 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 9 commit-hook freebsd_committer freebsd_triage 2019-01-09 06:22:05 UTC
A commit references this bug:

Author: imp
Date: Wed Jan  9 06:21:50 UTC 2019
New revision: 342878
URL: https://svnweb.freebsd.org/changeset/base/342878

Log:
  Add quirk for 128MB Creative Nomad.

  PR: 78984
  Submitted by: Mark Kirkwood

Changes:
  head/sys/dev/usb/quirk/usb_quirk.c
Comment 10 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:34:44 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>
Comment 11 Mark Linimon freebsd_committer freebsd_triage 2024-01-05 22:42:59 UTC
^Triage: committed back in 2019.