You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
666 memcpy(srb->cmnd, old_cmnd, MAX_COMMAND_SIZE);<br />
667<br />
668 if (test_bit(US_FLIDX_TIMED_OUT, &us->flags)) {<br />
669 US_DEBUGP("-- auto-sense aborted\n");<br />
670 goto Handle_Abort;<br />
671 }<br />
672 if (temp_result != USB_STOR_TRANSPORT_GOOD) {<br />
673 US_DEBUGP("-- auto-sense failure\n");<br />
674<br />
675 /* we skip the reset if this happens to be a<br />
676 * multi-target device, since failure <strong>of</strong> an<br />
677 * auto-sense is perfectly valid<br />
678 */<br />
679 if (!(us->flags & US_FL_SCM_MULT_TARG))<br />
680 us->transport_reset(us);<br />
681 srb->result = DID_ERROR sense_buffer[0],<br />
688 srb->sense_buffer[2] & 0xf,<br />
149<br />
689 srb->sense_buffer[12],<br />
690 srb->sense_buffer[13]);<br />
691 #ifdef CONFIG_USB_STORAGE_DEBUG<br />
692 usb_stor_show_sense(<br />
693 srb->sense_buffer[2] & 0xf,<br />
694 srb->sense_buffer[12],<br />
695 srb->sense_buffer[13]);<br />
696 #endif<br />
697<br />
698 /* set the result so the higher layers expect this data */<br />
699 srb->result = SAM_STAT_CHECK_CONDITION;<br />
700<br />
701 /* If things are really okay, then let's show that. Zero<br />
702 * out the sense buffer so the higher layers won't realize<br />
703 * we did an unsolicited auto-sense. */<br />
704 if (result == USB_STOR_TRANSPORT_GOOD &&<br />
705 /* Filemark 0, ignore EOM, ILI 0, no sense */<br />
706 (srb->sense_buffer[2] & 0xaf) == 0 &&<br />
707 /* No ASC or ASCQ */