Lines Matching refs:result
253 int result;
259 result = usb_stor_control_msg(us, us->send_ctrl_pipe,
264 if (result >= 0)
267 US_DEBUGP("%s: result = %d\n", __func__, result);
268 return result;
281 unsigned int length, int result, unsigned int partial)
284 result, partial, length);
285 switch (result) {
347 int result;
364 result = usb_stor_msg_common(us, 0);
366 return interpret_urb_result(us, pipe, size, result,
381 int result;
396 result = usb_stor_msg_common(us, 0);
398 return interpret_urb_result(us, pipe, length, result,
410 int result;
417 result = usb_stor_msg_common(us, 0);
422 return interpret_urb_result(us, pipe, length, result,
437 int result;
478 result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0,
480 if (result) {
481 US_DEBUGP("usb_sg_init returned %d\n", result);
503 result = us->current_sg.status;
506 return interpret_urb_result(us, pipe, length, result,
518 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb),
523 return result;
539 int result;
545 result = usb_stor_bulk_transfer_sglist(us, pipe,
551 result = usb_stor_bulk_transfer_buf(us, pipe, buf,
559 return result;
609 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) {
620 * beyond the end. Replace the result code and sense data
627 srb->result = SAM_STAT_CHECK_CONDITION;
649 int result;
653 result = us->transport(srb, us);
660 srb->result = DID_ABORT << 16;
665 if (result == USB_STOR_TRANSPORT_ERROR) {
667 srb->result = DID_ERROR << 16;
672 if (result == USB_STOR_TRANSPORT_NO_SENSE) {
673 srb->result = SAM_STAT_CHECK_CONDITION;
678 srb->result = SAM_STAT_GOOD;
704 if (result == USB_STOR_TRANSPORT_FAILED) {
716 result == USB_STOR_TRANSPORT_GOOD &&
766 srb->result = DID_ABORT << 16;
798 srb->result = DID_ERROR << 16;
837 /* set the result so the higher layers expect this data */
838 srb->result = SAM_STAT_CHECK_CONDITION;
854 if (result == USB_STOR_TRANSPORT_GOOD) {
855 srb->result = SAM_STAT_GOOD;
863 srb->result = DID_ERROR << 16;
870 if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) &&
872 srb->result = DID_ERROR << 16;
892 result = usb_stor_port_reset(us);
895 if (result < 0) {
934 int result;
938 result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe,
944 US_DEBUGP("Call to usb_stor_ctrl_transfer() returned %d\n", result);
947 if (result == USB_STOR_XFER_STALLED) {
952 if (result != USB_STOR_XFER_GOOD) {
961 result = usb_stor_bulk_srb(us, pipe, srb);
962 US_DEBUGP("CBI data stage result is 0x%x\n", result);
965 if (result == USB_STOR_XFER_STALLED)
967 if (result > USB_STOR_XFER_STALLED)
979 result = usb_stor_intr_transfer(us, us->iobuf, 2);
982 if (result != USB_STOR_XFER_GOOD)
1001 /* If not UFI, we interpret the data as a result code
1040 int result;
1044 result = usb_stor_control_msg(us, us->recv_ctrl_pipe,
1050 US_DEBUGP("GetMaxLUN command result is %d, data is %d\n",
1051 result, us->iobuf[0]);
1053 /* if we have a successful request, return the result */
1054 if (result > 0)
1059 * pipe, they may return a zero-length result, they may do nothing at
1073 int result;
1107 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe,
1109 US_DEBUGP("Bulk command transfer result=%d\n", result);
1110 if (result != USB_STOR_XFER_GOOD)
1125 result = usb_stor_bulk_srb(us, pipe, srb);
1126 US_DEBUGP("Bulk data transfer result 0x%x\n", result);
1127 if (result == USB_STOR_XFER_ERROR)
1136 if (result == USB_STOR_XFER_LONG)
1150 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
1157 if (result == USB_STOR_XFER_SHORT && cswlen == 0) {
1159 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
1164 if (result == USB_STOR_XFER_STALLED) {
1168 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe,
1173 US_DEBUGP("Bulk status result = %d\n", result);
1174 if (result != USB_STOR_XFER_GOOD)
1292 int result;
1300 result = usb_stor_control_msg(us, us->send_ctrl_pipe,
1303 if (result < 0) {
1304 US_DEBUGP("Soft reset failed: %d\n", result);
1305 return result;
1319 result = usb_stor_clear_halt(us, us->recv_bulk_pipe);
1324 /* return a result code based on the result of the clear-halts */
1325 if (result >= 0)
1326 result = result2;
1327 if (result < 0)
1331 return result;
1369 int result;
1375 result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf);
1376 if (result < 0)
1377 US_DEBUGP("unable to lock device for reset: %d\n", result);
1381 result = -EIO;
1384 result = usb_reset_device(us->pusb_dev);
1386 result);
1390 return result;