diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2005-11-26 17:11:31 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2005-11-26 17:11:31 +0000 |
| commit | c20e7ce621ad61c8c37b19d8fc6ddedc007d2599 (patch) | |
| tree | a1f8a19cc453669d3f7a2be10a2f37e8d96c79f8 /sys/dev | |
| parent | 98fd65daa5ea78b77ddd6fb7beb79160fade187d (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/usb/umass.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c index 71b9f6410c8f9..b13a047ee68c5 100644 --- a/sys/dev/usb/umass.c +++ b/sys/dev/usb/umass.c @@ -314,6 +314,8 @@ struct umass_devdescr_t { # define NO_INQUIRY 0x0400 /* Device cannot handle INQUIRY EVPD, return CHECK CONDITION */ # define NO_INQUIRY_EVPD 0x0800 + /* Pad all RBC requests to 12 bytes. */ +# define RBC_PAD_TO_12 0x1000 }; Static struct umass_devdescr_t umass_devdescrs[] = { @@ -435,6 +437,10 @@ Static struct umass_devdescr_t umass_devdescrs[] = { UMASS_PROTO_SCSI | UMASS_PROTO_BBB, IGNORE_RESIDUE }, + { USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC, 0x0500, + UMASS_PROTO_RBC | UMASS_PROTO_CBI, + RBC_PAD_TO_12 + }, { USB_VENDOR_SONY, USB_PRODUCT_SONY_DSC, RID_WILDCARD, UMASS_PROTO_RBC | UMASS_PROTO_CBI, NO_QUIRKS @@ -2907,8 +2913,14 @@ umass_rbc_transform(struct umass_softc *sc, unsigned char *cmd, int cmdlen, * appears to support those as well */ case REQUEST_SENSE: case PREVENT_ALLOW: - *rcmd = cmd; /* We don't need to copy it */ - *rcmdlen = cmdlen; + if ((sc->quirks & RBC_PAD_TO_12) && cmdlen < 12) { + *rcmdlen = 12; + bcopy(cmd, *rcmd, cmdlen); + bzero(*rcmd + cmdlen, 12 - cmdlen); + } else { + *rcmd = cmd; /* We don't need to copy it */ + *rcmdlen = cmdlen; + } return 1; /* All other commands are not legal in RBC */ default: |
