summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorremko <remko@FreeBSD.org>2008-02-21 19:07:08 +0000
committerremko <remko@FreeBSD.org>2008-02-21 19:07:08 +0000
commitbc029f4b2767b625736bce9a032b74c0907782f2 (patch)
tree91719b231676940719ec4befa31bc23eb9cbd406 /sys
parent8c2ca3d81c6b073827028b05c86dd97836c64938 (diff)
downloadFreeBSD-src-bc029f4b2767b625736bce9a032b74c0907782f2.zip
FreeBSD-src-bc029f4b2767b625736bce9a032b74c0907782f2.tar.gz
Add support for the VIA USB2IDE bridge [1].
PR: usb/95173 Submitted by: Goegele Hannes <diazepam@gmx.net> Ben Kelly <bkelly at vadev dot org> Tested by: blackend Approved by: imp (mentor, blanket for simple patches) X-MFC-After: 1 week
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/umass.c19
-rw-r--r--sys/dev/usb/usbdevs3
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index fabb327..be33e01 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -323,6 +323,12 @@ struct umass_devdescr_t {
* sector number.
*/
# define READ_CAPACITY_OFFBY1 0x2000
+ /* Device cannot handle a SCSI synchronize cache command. Normally
+ * this quirk would be handled in the cam layer, but for IDE bridges
+ * we need to associate the quirk with the bridge and not the
+ * underlying disk device. This is handled by faking a success result.
+ */
+# define NO_SYNCHRONIZE_CACHE 0x4000
};
static struct umass_devdescr_t umass_devdescrs[] = {
@@ -808,6 +814,10 @@ static struct umass_devdescr_t umass_devdescrs[] = {
UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
NO_QUIRKS
},
+ { USB_VENDOR_VIA, USB_PRODUCT_VIA_USB2IDEBRIDGE, RID_WILDCARD,
+ UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
+ NO_SYNCHRONIZE_CACHE
+ },
{ USB_VENDOR_VIVITAR, USB_PRODUCT_VIVITAR_35XX, RID_WILDCARD,
UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
NO_INQUIRY
@@ -2882,6 +2892,15 @@ umass_cam_action(struct cam_sim *sim, union ccb *ccb)
xpt_done(ccb);
return;
}
+ if ((sc->quirks & NO_SYNCHRONIZE_CACHE) &&
+ rcmd[0] == SYNCHRONIZE_CACHE) {
+ struct ccb_scsiio *csio = &ccb->csio;
+
+ csio->scsi_status = SCSI_STATUS_OK;
+ ccb->ccb_h.status = CAM_REQ_CMP;
+ xpt_done(ccb);
+ return;
+ }
if ((sc->quirks & FORCE_SHORT_INQUIRY) &&
rcmd[0] == INQUIRY) {
csio->dxfer_len = SHORT_INQUIRY_LENGTH;
diff --git a/sys/dev/usb/usbdevs b/sys/dev/usb/usbdevs
index 59bd7ba..b9b53fa 100644
--- a/sys/dev/usb/usbdevs
+++ b/sys/dev/usb/usbdevs
@@ -2241,6 +2241,9 @@ product UNIACCESS PANACHE 0x0101 Panache Surf USB ISDN Adapter
/* U.S. Robotics products */
product USR USR5423 0x0121 USR5423 WLAN
+/* VIA Technologies products */
+product VIA USB2IDEBRIDGE 0x6204 USB 2.0 IDE Bridge
+
/* VidzMedia products */
product VIDZMEDIA MONSTERTV 0x4fb1 MonsterTV P2H
OpenPOWER on IntegriCloud