Page MenuHomeFreeBSD

D49474.diff
No OneTemporary

D49474.diff

diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c
--- a/sys/dev/usb/storage/umass.c
+++ b/sys/dev/usb/storage/umass.c
@@ -2625,11 +2625,14 @@
DPRINTF(sc, UDMASS_SCSI, "Doing a sneaky"
"TEST_UNIT_READY\n");
- /* the rest of the command was filled in at attach */
-
- if ((sc->sc_transform)(sc,
+ /*
+ * Transform the TUR and if successful, send it. Pass
+ * NULL for the ccb so we don't override the above
+ * status.
+ */
+ if (umass_std_transform(sc, NULL,
&sc->cam_scsi_test_unit_ready.opcode,
- sizeof(sc->cam_scsi_test_unit_ready)) == 1) {
+ sizeof(sc->cam_scsi_test_unit_ready))) {
umass_command_start(sc, DIR_NONE, NULL, 0,
ccb->ccb_h.timeout,
&umass_cam_quirk_cb, ccb);
@@ -2890,7 +2893,8 @@
}
if (sc->sc_transform(sc, cmd, cmd_len))
return (true); /* Execute command */
- umass_cam_illegal_request(ccb);
+ if (ccb)
+ umass_cam_illegal_request(ccb);
return (false); /* Already failed -- don't submit */
}

File Metadata

Mime Type
text/plain
Expires
Mon, Aug 31, 1:37 AM (3 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37641564
Default Alt Text
D49474.diff (1 KB)

Event Timeline