]> git.pld-linux.org Git - packages/lin_tape.git/blob - linux-4.12.patch
- rel 3
[packages/lin_tape.git] / linux-4.12.patch
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
3 @@ -6554,7 +6554,11 @@
4         req->sense_len = 0;
5  #endif
6         req->timeout = timeout;
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
8 +       scsi_req(req)->retries = 0;
9 +#else
10         req->retries = 0;
11 +#endif
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 @@
16  #else
17         *resid = req->resid_len;
18  #endif
19 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
20 +       status_code = scsi_req(req)->result;
21 +#else
22         status_code = req->errors;
23 +#endif
24  
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
29 @@ -568,7 +568,11 @@
30         rq->sense_len = 0;
31  #endif
32         rq->timeout = pfo_cmd->timeout;
33 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
34 +       scsi_req(rq)->retries = pfo_cmd->retries;
35 +#else
36         rq->retries = pfo_cmd->retries;
37 +#endif
38         rq->end_io_data = pfo_cmd;
39  
40         blk_execute_rq(rq->q, NULL, rq, 1);
41 @@ -589,7 +593,11 @@
42         pfo_cmd->resid_len = rq->resid_len;
43         pfo_cmd->sense_len = rq->sense_len;
44  #endif
45 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
46 +       pfo_cmd->errors = scsi_req(rq)->result;
47 +#else
48         pfo_cmd->errors = rq->errors;
49 +#endif
50  
51         blk_put_request(rq);
52         return pfo_cmd->errors;
This page took 0.033728 seconds and 3 git commands to generate.