Lines Matching refs:result
229 int result; in usb_stor_clear_halt() local
235 result = usb_stor_control_msg(us, us->send_ctrl_pipe, in usb_stor_clear_halt()
240 if (result >= 0) in usb_stor_clear_halt()
243 usb_stor_dbg(us, "result = %d\n", result); in usb_stor_clear_halt()
244 return result; in usb_stor_clear_halt()
257 unsigned int length, int result, unsigned int partial) in interpret_urb_result() argument
260 result, partial, length); in interpret_urb_result()
261 switch (result) { in interpret_urb_result()
326 int result; in usb_stor_ctrl_transfer() local
342 result = usb_stor_msg_common(us, 0); in usb_stor_ctrl_transfer()
344 return interpret_urb_result(us, pipe, size, result, in usb_stor_ctrl_transfer()
359 int result; in usb_stor_intr_transfer() local
374 result = usb_stor_msg_common(us, 0); in usb_stor_intr_transfer()
376 return interpret_urb_result(us, pipe, length, result, in usb_stor_intr_transfer()
388 int result; in usb_stor_bulk_transfer_buf() local
395 result = usb_stor_msg_common(us, 0); in usb_stor_bulk_transfer_buf()
400 return interpret_urb_result(us, pipe, length, result, in usb_stor_bulk_transfer_buf()
415 int result; in usb_stor_bulk_transfer_sglist() local
423 result = usb_sg_init(&us->current_sg, us->pusb_dev, pipe, 0, in usb_stor_bulk_transfer_sglist()
425 if (result) { in usb_stor_bulk_transfer_sglist()
426 usb_stor_dbg(us, "usb_sg_init returned %d\n", result); in usb_stor_bulk_transfer_sglist()
450 result = us->current_sg.status; in usb_stor_bulk_transfer_sglist()
453 return interpret_urb_result(us, pipe, length, result, in usb_stor_bulk_transfer_sglist()
470 int result = usb_stor_bulk_transfer_sglist(us, pipe, scsi_sglist(srb), in usb_stor_bulk_srb() local
475 return result; in usb_stor_bulk_srb()
491 int result; in usb_stor_bulk_transfer_sg() local
497 result = usb_stor_bulk_transfer_sglist(us, pipe, in usb_stor_bulk_transfer_sg()
503 result = usb_stor_bulk_transfer_buf(us, pipe, buf, in usb_stor_bulk_transfer_sg()
511 return result; in usb_stor_bulk_transfer_sg()
563 if (srb->result == SAM_STAT_GOOD && scsi_get_resid(srb) == 0) { in last_sector_hacks()
583 srb->result = SAM_STAT_CHECK_CONDITION; in last_sector_hacks()
607 int result; in usb_stor_invoke_transport() local
611 result = us->transport(srb, us); in usb_stor_invoke_transport()
619 srb->result = DID_ABORT << 16; in usb_stor_invoke_transport()
624 if (result == USB_STOR_TRANSPORT_ERROR) { in usb_stor_invoke_transport()
626 srb->result = DID_ERROR << 16; in usb_stor_invoke_transport()
631 if (result == USB_STOR_TRANSPORT_NO_SENSE) { in usb_stor_invoke_transport()
632 srb->result = SAM_STAT_CHECK_CONDITION; in usb_stor_invoke_transport()
637 srb->result = SAM_STAT_GOOD; in usb_stor_invoke_transport()
671 if (result == USB_STOR_TRANSPORT_FAILED) { in usb_stor_invoke_transport()
683 result == USB_STOR_TRANSPORT_GOOD && in usb_stor_invoke_transport()
737 srb->result = DID_ABORT << 16; in usb_stor_invoke_transport()
771 srb->result = DID_ERROR << 16; in usb_stor_invoke_transport()
812 srb->result = SAM_STAT_CHECK_CONDITION; in usb_stor_invoke_transport()
830 if (result == USB_STOR_TRANSPORT_GOOD) { in usb_stor_invoke_transport()
831 srb->result = SAM_STAT_GOOD; in usb_stor_invoke_transport()
852 srb->result = DID_ERROR << 16; in usb_stor_invoke_transport()
871 if (srb->result == SAM_STAT_GOOD) { in usb_stor_invoke_transport()
885 srb->result = DID_IMM_RETRY << 16; in usb_stor_invoke_transport()
891 if ((srb->result == SAM_STAT_GOOD || srb->sense_buffer[2] == 0) && in usb_stor_invoke_transport()
893 srb->result = DID_ERROR << 16; in usb_stor_invoke_transport()
919 result = usb_stor_port_reset(us); in usb_stor_invoke_transport()
922 if (result < 0) { in usb_stor_invoke_transport()
961 int result; in usb_stor_CB_transport() local
970 result = usb_stor_ctrl_transfer(us, us->send_ctrl_pipe, in usb_stor_CB_transport()
977 result); in usb_stor_CB_transport()
980 if (result == USB_STOR_XFER_STALLED) { in usb_stor_CB_transport()
985 if (result != USB_STOR_XFER_GOOD) { in usb_stor_CB_transport()
994 result = usb_stor_bulk_srb(us, pipe, srb); in usb_stor_CB_transport()
995 usb_stor_dbg(us, "CBI data stage result is 0x%x\n", result); in usb_stor_CB_transport()
998 if (result == USB_STOR_XFER_STALLED) in usb_stor_CB_transport()
1000 if (result > USB_STOR_XFER_STALLED) in usb_stor_CB_transport()
1013 result = usb_stor_intr_transfer(us, us->iobuf, 2); in usb_stor_CB_transport()
1016 if (result != USB_STOR_XFER_GOOD) in usb_stor_CB_transport()
1077 int result; in usb_stor_Bulk_max_lun() local
1081 result = usb_stor_control_msg(us, us->recv_ctrl_pipe, in usb_stor_Bulk_max_lun()
1088 result, us->iobuf[0]); in usb_stor_Bulk_max_lun()
1095 if (result > 0) { in usb_stor_Bulk_max_lun()
1121 int result; in usb_stor_Bulk_transport() local
1153 result = usb_stor_bulk_transfer_buf(us, us->send_bulk_pipe, in usb_stor_Bulk_transport()
1155 usb_stor_dbg(us, "Bulk command transfer result=%d\n", result); in usb_stor_Bulk_transport()
1156 if (result != USB_STOR_XFER_GOOD) in usb_stor_Bulk_transport()
1173 result = usb_stor_bulk_srb(us, pipe, srb); in usb_stor_Bulk_transport()
1174 usb_stor_dbg(us, "Bulk data transfer result 0x%x\n", result); in usb_stor_Bulk_transport()
1175 if (result == USB_STOR_XFER_ERROR) in usb_stor_Bulk_transport()
1185 if (result == USB_STOR_XFER_LONG) in usb_stor_Bulk_transport()
1194 if (result == USB_STOR_XFER_SHORT && in usb_stor_Bulk_transport()
1221 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in usb_stor_Bulk_transport()
1229 if (result == USB_STOR_XFER_SHORT && cswlen == 0) { in usb_stor_Bulk_transport()
1231 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in usb_stor_Bulk_transport()
1236 if (result == USB_STOR_XFER_STALLED) { in usb_stor_Bulk_transport()
1240 result = usb_stor_bulk_transfer_buf(us, us->recv_bulk_pipe, in usb_stor_Bulk_transport()
1245 usb_stor_dbg(us, "Bulk status result = %d\n", result); in usb_stor_Bulk_transport()
1246 if (result != USB_STOR_XFER_GOOD) in usb_stor_Bulk_transport()
1351 int result; in usb_stor_reset_common() local
1359 result = usb_stor_control_msg(us, us->send_ctrl_pipe, in usb_stor_reset_common()
1362 if (result < 0) { in usb_stor_reset_common()
1363 usb_stor_dbg(us, "Soft reset failed: %d\n", result); in usb_stor_reset_common()
1364 return result; in usb_stor_reset_common()
1380 result = usb_stor_clear_halt(us, us->recv_bulk_pipe); in usb_stor_reset_common()
1386 if (result >= 0) in usb_stor_reset_common()
1387 result = result2; in usb_stor_reset_common()
1388 if (result < 0) in usb_stor_reset_common()
1392 return result; in usb_stor_reset_common()
1427 int result; in usb_stor_port_reset() local
1433 result = usb_lock_device_for_reset(us->pusb_dev, us->pusb_intf); in usb_stor_port_reset()
1434 if (result < 0) in usb_stor_port_reset()
1436 result); in usb_stor_port_reset()
1440 result = -EIO; in usb_stor_port_reset()
1443 result = usb_reset_device(us->pusb_dev); in usb_stor_port_reset()
1445 result); in usb_stor_port_reset()
1449 return result; in usb_stor_port_reset()