res = usb_submit_urb( transfer, GFP_ATOMIC );
if ( unlikely(res) ) {
MTS_INT_ERROR( "could not submit URB! Error was %d\n",(int)res );
- context->srb->result = DID_ERROR << 16;
+ set_host_byte(context->srb, DID_ERROR);
mts_transfer_cleanup(transfer);
}
}
scsi_set_resid(context->srb, context->data_length -
transfer->actual_length);
} else if ( unlikely(status) ) {
- context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16;
+ set_host_byte(context->srb, (status == -ENOENT ? DID_ABORT : DID_ERROR));
}
mts_get_status(transfer);
if (status == -ENOENT) {
/* We are being killed */
MTS_DEBUG_GOT_HERE();
- context->srb->result = DID_ABORT<<16;
+ set_host_byte(context->srb, DID_ABORT);
} else {
/* A genuine error has occurred */
MTS_DEBUG_GOT_HERE();
- context->srb->result = DID_ERROR<<16;
+ set_host_byte(context->srb, DID_ERROR);
}
mts_transfer_cleanup(transfer);
scsi_sg_count(context->srb));
if (unlikely(status)) {
- context->srb->result = (status == -ENOENT ? DID_ABORT : DID_ERROR)<<16;
+ set_host_byte(context->srb, (status == -ENOENT ? DID_ABORT : DID_ERROR));
mts_transfer_cleanup(transfer);
}
MTS_DEBUG("this device doesn't exist\n");
- srb->result = DID_BAD_TARGET << 16;
+ set_host_byte(srb, DID_BAD_TARGET);
if(likely(callback != NULL))
callback(srb);
if(unlikely(res)){
MTS_ERROR("error %d submitting URB\n",(int)res);
- srb->result = DID_ERROR << 16;
+ set_host_byte(srb, DID_ERROR);
if(likely(callback != NULL))
callback(srb);