diff options
| author | Remko Lodder <remko@FreeBSD.org> | 2008-03-07 15:54:41 +0000 |
|---|---|---|
| committer | Remko Lodder <remko@FreeBSD.org> | 2008-03-07 15:54:41 +0000 |
| commit | b361cca3ec342804b67791ecb70a45aa83efa715 (patch) | |
| tree | 55147736937c00ce0d2ce595f63bf23b4a6d3726 /sys | |
| parent | 4dfc482b6d5cd0638dc650854518a8c2b7e3f732 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/dev/usb/umass.c | 19 | ||||
| -rw-r--r-- | sys/dev/usb/usbdevs | 3 |
2 files changed, 22 insertions, 0 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 5cef737bd378..8ced55668da3 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[] = { @@ -804,6 +810,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 @@ -2878,6 +2888,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 247c4191383b..6f1299a3eadd 100644 --- a/sys/dev/usb/usbdevs +++ b/sys/dev/usb/usbdevs @@ -2235,6 +2235,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 |
