From 8a95ee42b900fabe47ddfc997a1682f167e21681 Mon Sep 17 00:00:00 2001 From: Matthew Dharm Date: Sun, 10 Nov 2002 21:13:45 -0800 Subject: [PATCH] usb storage: remove unneeded workaround for START_STOP This patch removes the special-case code for START_STOP. It can be safely removed now because the higher SCSI layers won't send this command unless the device indicates that it needs it to allow media access. --- drivers/usb/storage/usb.c | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 445cb612db2a..ff5a153ad3d6 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c @@ -437,41 +437,6 @@ static int usb_stor_control_thread(void * __us) us->srb->result = GOOD << 1; } - /* Most USB devices can't handle START_STOP. But we - * need something for media-change, so we'll use TUR - * instead. - * - * We specifically allow this command through if either: - * (a) it's a load/eject command (cmnd[4] & 2) - * (b) it's a multi-target unit (i.e. legacy SCSI adaptor) - */ - else if (us->srb->cmnd[0] == START_STOP && - !(us->srb->cmnd[4] & 2) && - !(us->flags & US_FL_SCM_MULT_TARG)) { - unsigned char saved_cdb[16]; /* largest SCSI-III cmd */ - __u8 old_cmd_len; - - US_DEBUGP("Converting START_STOP to TUR\n"); - - /* save old command */ - memcpy(saved_cdb, us->srb->cmnd, us->srb->cmd_len); - old_cmd_len = us->srb->cmd_len; - - /* set up new command -- preserve LUN */ - us->srb->cmd_len = 6; - memset(us->srb->cmnd, 0, us->srb->cmd_len); - us->srb->cmnd[0] = TEST_UNIT_READY; - us->srb->cmnd[1] = saved_cdb[1] & 0xE0; - - /* do command */ - US_DEBUG(usb_stor_show_command(us->srb)); - us->proto_handler(us->srb, us); - - /* restore original command */ - us->srb->cmd_len = old_cmd_len; - memcpy(us->srb->cmnd, saved_cdb, us->srb->cmd_len); - } - /* we've got a command, let's do it! */ else { US_DEBUG(usb_stor_show_command(us->srb)); -- cgit v1.2.3