kern/56095: Apacer Pen Drive fails to work
Hal Burch
hburch at lumeta.com
Thu Aug 28 13:00:38 PDT 2003
>Number: 56095
>Category: kern
>Synopsis: Apacer Pen Drive fails to work
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Aug 28 13:00:36 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Hal Burch
>Release: FreeBSD 4.9-PRERELEASE i386
>Organization:
Lumeta Corporation
>Environment:
FreeBSD hburch-lap.hburch.com 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #23: Thu Aug 28 15:03:26 EDT 2003 root at hburch-lap.hburch.com:/usr/src/sys/compile/LOCAL i386
>Description:
I bought a 128 MB "Pen Drive lite 2.0". The vendor (0x0d7d) identifies
the manufacturer as Apacer. When I plug it in, it does not work. I
get the following messages:
umass0: USB DISK 2.0, rev 1.10/0.50, addr 2, SCSI over Bulk-Only
umass0:0:0:-1: Attached to scbus0 as device 0
(da0:umass-sim0:0:0:0): got CAM status 0x4
(da0:umass-sim0:0:0:0): fatal error, failed to attach to device
(da0:umass-sim0:0:0:0): lost device
(da0:umass-sim0:0:0:0): removing device entry
$ usbdevs -v
hburch-lap:~/kern-save $ cat /tmp/devs
Controller /dev/usb0:
addr 1: self powered, config 1, UHCI root hub(0x0000), Intel(0x0000), rev 1.00
port 1 addr 2: power 500 mA, config 1, USB DISK 2.0(0x1300), (0x0d7d), rev 0.50
port 2 powered
PRs on same device: kern/43627 and kern/50297
>How-To-Repeat:
Buy device, plug in, and hope version matches.
>Fix:
The problem appears to be that umass_match_proto is noticing that
bInterfaceProtocol is UIPROTO_MASS_BBB, and decides that it's a ZIP
drive. I can fix this by commenting out lines 736 and 739 (about) of
umass.c, so that the case reads:
case UIPROTO_MASS_BBB:
/* sc->drive = ZIP_100; */
sc->proto |= UMASS_PROTO_BBB;
sc->transfer_speed = UMASS_ZIP100_TRANSFER_SPEED;
/* sc->quirks |= NO_TEST_UNIT_READY; */
break;
However, this is clearly the wrong way to fix this. The proper fix
is not clear to me.
This fix makes the device work. However, when I unplug it after
running, I get:
umass0: Phase Error, residue = 0
(da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
Although this error does not appear to be causing functional issues,
this is fixable by adding the following quirk to cam/scsi_da.c:
{
/*
* Apacer USB drive
*/
{T_DIRECT, SIP_MEDIA_REMOVABLE, "", "USB DISK 2.0", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE
},
The empty vendor will be the subject of other PRs, as it's fix is two
changes unrelated to this issue.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list