1 --- lin_tape-3.0.20/lin_tape_ioctl_tape.c.orig 2017-08-01 15:02:29.400676838 +0200
2 +++ lin_tape-3.0.20/lin_tape_ioctl_tape.c 2017-08-01 15:08:53.208605776 +0200
6 req->timeout = timeout;
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
8 + scsi_req(req)->retries = 0;
12 blk_execute_rq(req->q, NULL, req, 1);
13 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
14 *resid = scsi_req(req)->resid_len;
15 @@ -6563,7 +6567,11 @@
17 *resid = req->resid_len;
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
20 + status_code = scsi_req(req)->result;
22 status_code = req->errors;
25 if(buf_len && !use_sg) {
26 buf_ptr = (char*)buffer;
27 --- lin_tape-3.0.20/lower.c.orig 2017-08-01 15:09:52.565988839 +0200
28 +++ lin_tape-3.0.20/lower.c 2017-08-01 15:11:23.877092947 +0200
32 rq->timeout = pfo_cmd->timeout;
33 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
34 + scsi_req(rq)->retries = pfo_cmd->retries;
36 rq->retries = pfo_cmd->retries;
38 rq->end_io_data = pfo_cmd;
40 blk_execute_rq(rq->q, NULL, rq, 1);
42 pfo_cmd->resid_len = rq->resid_len;
43 pfo_cmd->sense_len = rq->sense_len;
45 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
46 + pfo_cmd->errors = scsi_req(rq)->result;
48 pfo_cmd->errors = rq->errors;
52 return pfo_cmd->errors;