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
This commit is contained in:
remko 2008-02-21 19:07:08 +00:00
parent 8c2ca3d81c
commit bc029f4b27
2 changed files with 22 additions and 0 deletions

View File

@ -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;

View File

@ -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