Bug 75764 - [umass] [patch] "umass0: Phase Error" - no device for USB HP DVD Writer 300c
Summary: [umass] [patch] "umass0: Phase Error" - no device for USB HP DVD Writer 300c
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 5.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-03 21:20 UTC by Raimund Huemmer
Modified: 2019-01-09 06:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raimund Huemmer 2005-01-03 21:20:03 UTC
      Hardware: HP DVD Writer dc300
Interface: USB
relevant output from dmesg: 
usb0: <Intel 82371AB/EB (PIIX4) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhub1: Hewlett Packard product 0x0a07, class 9/0, rev 2.00/0.00, addr 2
uhub1: 3 ports with 1 removable, self powered
ugen0: Hewlett Packard product 0x0907, rev 2.00/0.00, addr 3
umass0: Hewlett-Packard dc3000, rev 3.00/0.00, addr 4
umass0: Get Max Lun not supported (STALLED)
[...]
At the time, when the Hardware should get the "cd0" device, dmesg 
shows only the following output:
umass0: Phase Error, residue = 0
umass0: Phase Error, residue = 0
umass0: Phase Error, residue = 0
umass0: Phase Error, residue = 0

Summary:
There is no "cd0" device and the USB DVD-RW is unusable.

Fix: Edit or patch the File /usr/src/sys/dev/usb/umass.c at line 1627 with the
new line:
#if 0 /* XXX */  
and at line 1630 with the new line 
#endif 

Here is the diff:
------------------------------



+#if 0 /* XXX */
                        umass_bbb_reset(sc, STATUS_WIRE_FAILED);
                        return;

+#endif
                } else if (sc->transfer_actlen > sc->transfer_datalen) {
                        /* Buffer overrun! Don't let this go by unnoticed */
                        panic("%s: transferred %db instead of %db",

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

After patching, recompiling the kernel and reboot, I've got this dmesg output:
cd0 at umass-sim0 bus 0 target 0 lun 0
cd0: <HP DVD Writer 300c 9k04> Removable CD-ROM SCSI-0 device 
cd0: 1.000MB/s transfers

and all works perfectly for me. 

Maybe only a workaround for my hardware and not a regular patch.--QeRmcCaH53OjTOSb1OczMcD9ZrQhLOGp6AtD4KwFcQ82hZbP
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- umass.c     Thu Oct 28 09:01:15 2004
+++ umass.c_new Sun Jan  2 23:27:32 2005
@@ -1624,10 +1624,10 @@
                } else if (sc->csw.bCSWStatus == CSWSTATUS_PHASE) {
                        printf("%s: Phase Error, residue = %d\n",
                                USBDEVNAME(sc->sc_dev), Residue);
How-To-Repeat: By reboot or plug out/in there is always no success and the same error
message. Also by "camcontrol -rescan" the problem is repeatable.
Comment 1 Remko Lodder freebsd_committer freebsd_triage 2007-01-27 10:36:46 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-usb

Hello USB team, this looks like a perfect task for you ;-)
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:30 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 3 Warner Losh freebsd_committer freebsd_triage 2019-01-09 06:03:45 UTC
Many of the phase errors in the USB code have been fixed. If this is still a problem with FreeBSD 11 or 12, please open a new bug and CC me so we can get to the bottom of it.