kern/65436: [patch] to add support for PNY Attache 256MB USB 2.0
Flash Drive
Peter D. Quilty
pdquilty at adelphia.net
Sun Apr 11 06:40:08 PDT 2004
>Number: 65436
>Category: kern
>Synopsis: [patch] to add support for PNY Attache 256MB USB 2.0 Flash Drive
>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: Sun Apr 11 06:40:08 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator: Peter D. Quilty <pdquilty at adelphia.net>
>Release: FreeBSD 4.10-BETA i386
>Organization:
>Environment:
System: FreeBSD pdq-laptop 4.10-BETA FreeBSD 4.10-BETA #7: Sat Apr 10 10:16:29 EDT 2004 root at pdq-laptop:/usr/obj/usr/src/sys/PDQ.8200 i386
>Description:
I recently purchased a 256MB PNY Attache USB 2.0 Flash Drive and it was not recognized by 4.9-RELEASE-p4. The
problem persisted after upgrading to 4-STABLE with the following error messages:
/kernel: umass0: PNY USB DISK 12X, rev 2.00/0.02, addr 2
/kernel: (da0:umass-sim0:0:0:0): got CAM status 0x4
/kernel: (da0:umass-sim0:0:0:0): fatal error, failed to attach to device
/kernel: (da0:umass-sim0:0:0:0): lost device
/kernel: (da0:umass-sim0:0:0:0): removing device entry
After running "/usr/sbin/usbd -d" I found the following information.
usbd: device-attach event at 1081687215.371542000, USB DISK 12X, PNY:
vndr=0x0d7d prdct=0x1400 rlse=0x0002 clss=0x0000 subclss=0x0000 prtcl=0x0000
device names: umass0
/usr/src/sys/dev/usb/usbdevs only lists product 0x1300 from PNY. The patches below seemed to fix everything and
I am able to use the drive properly. The kernel now recognizes and attaches it correctly.
umass0: PNY USB DISK 12X, rev 2.00/0.02, addr 2
da0 at umass-sim0 bus 0 target 0 lun 0
da0: < USB DISK 12X 1.09> Removable Direct Access SCSI-0 device
da0: 650KB/s transfers
da0: 238MB (487424 512 byte sectors: 64H 32S/T 238C)
The patch in scsi_da.c seems to fix this error message:
/kernel: umass0: Phase Error, residue = 0
/kernel: (da0:umass-sim0:0:0:0): Synchronize cache failed, status == 0x4, scsi status == 0x0
>How-To-Repeat:
The 4-STABLE code as of Apr 10, 2004 still lacks support for this device. Simply plug in the drive with a
kernel with USB, SCSI and umass support and the problem should be readily apparent.
>Fix:
--- patch-scsi_da.c begins here ---
--- sys/cam/scsi/scsi_da.c.orig Wed Apr 7 16:31:57 2004
+++ sys/cam/scsi/scsi_da.c Sun Apr 11 08:54:10 2004
@@ -390,6 +390,13 @@
{T_DIRECT, SIP_MEDIA_REMOVABLE, "CREATIVE", "NOMAD_MUVO", "*"},
/*quirks*/ DA_Q_NO_SYNC_CACHE|DA_Q_NO_PREVENT
},
+ {
+ /*
+ * PNY Attache 256MB USB 2.0 Flash Drive
+ */
+ {T_DIRECT, SIP_MEDIA_REMOVABLE, "*", "*USB DISK*", "*"},
+ /*quirks*/ DA_Q_NO_SYNC_CACHE
+ },
};
static d_open_t daopen;
--- patch-scsi_da.c ends here ---
--- patch-umass.c begins here ---
--- sys/dev/usb/umass.c.orig Wed Apr 7 16:32:08 2004
+++ sys/dev/usb/umass.c Sun Apr 11 08:53:22 2004
@@ -726,7 +726,8 @@
sc->quirks |= NO_TEST_UNIT_READY;
}
if (UGETW(dd->idVendor) == USB_VENDOR_PNY &&
- UGETW(dd->idProduct) == USB_PRODUCT_PNY_ATTACHE) {
+ (UGETW(dd->idProduct) == USB_PRODUCT_PNY_ATTACHE ||
+ UGETW(dd->idProduct) == USB_PRODUCT_PNY_A256MB)) {
sc->proto = UMASS_PROTO_SCSI | UMASS_PROTO_BBB;
sc->quirks |= IGNORE_RESIDUE;
}
--- patch-umass.c ends here ---
--- patch-usbdevs begins here ---
--- sys/dev/usb/usbdevs.orig Wed Apr 7 16:32:20 2004
+++ sys/dev/usb/usbdevs Sun Apr 11 08:54:35 2004
@@ -1073,6 +1073,7 @@
/* PNY products */
product PNY ATTACHE 0x1300 USB 2.0 Flash Drive
+product PNY A256MB 0x1400 Attache 256MB USB 2.0 Flash Drive
/* Primax products */
product PRIMAX G2X300 0x0300 G2-200 scanner
--- patch-usbdevs ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list