- fix building with linux 4.10 auto/th/lin_tape-3.0.8-3
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Mar 2017 20:15:11 +0000 (21:15 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 25 Mar 2017 20:15:11 +0000 (21:15 +0100)
- rel 3

lin_tape.spec
linux-4.10.patch [new file with mode: 0644]

index 4a7909a6dacf08d7ed407f228dd1e977aa9613a0..50289a2b74467e6386e28e91de5e49614c4b8732 100644 (file)
@@ -5,7 +5,7 @@
 # nothing to be placed to debuginfo package
 %define                _enable_debug_packages  0
 
-%define                rel     2
+%define                rel     3
 %define                pname   lin_tape
 Summary:       IBM Tape SCSI Device Driver for Linux
 Name:          %{pname}%{_alt_kernel}
@@ -25,6 +25,7 @@ Patch5:               linux-4.0.patch
 Patch6:                linux-4.6.patch
 Patch7:                no-uname.patch
 Patch8:                linux-4.9.patch
+Patch9:                linux-4.10.patch
 # System Storage, Tape systems, Tape drivers and software, Tape device drivers (Linux)
 URL:           http://www.ibm.com/support/fixcentral/
 BuildRequires: rpmbuild(macros) >= 1.701
@@ -81,6 +82,7 @@ compatible platforms.\
 %patch6 -p1
 %patch7 -p1
 %patch8 -p1
+%patch9 -p1
 
 install -p %{SOURCE1} .
 
diff --git a/linux-4.10.patch b/linux-4.10.patch
new file mode 100644 (file)
index 0000000..bb1b367
--- /dev/null
@@ -0,0 +1,105 @@
+diff -ur lin_tape-3.0.8/lin_tape_ioctl_tape.c lin_tape-3.0.8-4.10/lin_tape_ioctl_tape.c
+--- lin_tape-3.0.8/lin_tape_ioctl_tape.c       2016-02-23 20:57:52.000000000 +0100
++++ lin_tape-3.0.8-4.10/lin_tape_ioctl_tape.c  2017-03-25 21:10:22.094478668 +0100
+@@ -6456,7 +6456,11 @@
+       tmp_rq = (void*)sdev->request_queue;
+       req->cmd_type = REQ_TYPE_BLOCK_PC;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       req->cmd_flags |= REQ_QUIET;
++#else
++      req->cmd_flags |= RQF_QUIET;
++#endif
+       if(buf_len) {
+               mdata = kmalloc(sizeof(struct rq_map_data), GFP_KERNEL);
+diff -ur lin_tape-3.0.8/stmp.c lin_tape-3.0.8-4.10/stmp.c
+--- lin_tape-3.0.8/stmp.c      2017-03-25 21:11:10.039325377 +0100
++++ lin_tape-3.0.8-4.10/stmp.c 2017-03-25 21:10:48.338642620 +0100
+@@ -624,7 +624,11 @@
+               return DRIVER_ERROR << 24;
+       req->cmd_type = REQ_TYPE_BLOCK_PC;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       req->cmd_flags |= REQ_QUIET;
++#else
++      req->cmd_flags |= RQF_QUIET;
++#endif
+       mdata->null_mapped = 1;
+diff -ur lin_tape-3.0.8/upper.c lin_tape-3.0.8-4.10/upper.c
+--- lin_tape-3.0.8/upper.c     2017-03-25 21:11:10.022658187 +0100
++++ lin_tape-3.0.8-4.10/upper.c        2017-03-25 21:09:10.232174474 +0100
+@@ -89,7 +89,11 @@
+       pfo_cmd.timeout = timeout;
+       pfo_cmd.retries = retries;
+       pfo_cmd.iov_count = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = flags | REQ_QUIET;
++#else
++      pfo_cmd.flags = flags | RQF_QUIET;
++#endif
+       pfo_cmd.mdata = NULL;
+       pfo_cmd.raw_sense = sense;
+       pfo_cmd.sense_len = 0;
+@@ -338,7 +342,11 @@
+       pfo_cmd.cmd_len = hdr->cmd_len;
+       pfo_cmd.buffer = NULL;
+       pfo_cmd.bufflen = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = REQ_QUIET;
++#else
++      pfo_cmd.flags = RQF_QUIET;
++#endif
+       pfo_cmd.source = PFO_SOURCE_IOCTL;
+       pfo_cmd.iov_count = 0;
+       pfo_cmd.mdata = NULL;
+@@ -453,7 +461,11 @@
+       pfo_cmd.cmd_len = hdr->cmd_len;
+       pfo_cmd.buffer = NULL;
+       pfo_cmd.bufflen = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = REQ_QUIET;
++#else
++      pfo_cmd.flags = RQF_QUIET;
++#endif
+       pfo_cmd.source = PFO_SOURCE_IOCTL;
+       pfo_cmd.iov_count = 0;
+       pfo_cmd.mdata = NULL;
+@@ -658,7 +670,11 @@
+       pfo_cmd.timeout = timeout;
+       pfo_cmd.retries = retries;
+       pfo_cmd.iov_count = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = REQ_QUIET;
++#else
++      pfo_cmd.flags = RQF_QUIET;
++#endif
+       pfo_cmd.mdata = NULL;
+       pfo_cmd.raw_sense = sense;
+       pfo_cmd.sense_len = 0;
+@@ -915,7 +931,11 @@
+       pfo_cmd.buffer = buffer;
+       pfo_cmd.bufflen = bufflen;
+       pfo_cmd.retries = retries;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = REQ_QUIET;
++#else
++      pfo_cmd.flags = RQF_QUIET;
++#endif
+       pfo_cmd.source = PFO_SOURCE_SG;
+       pfo_cmd.iov_count = iov_count;
+       pfo_cmd.mdata = mdata;
+@@ -954,7 +974,11 @@
+       pfo_cmd.buffer = buffer;
+       pfo_cmd.bufflen = bufflen;
+       pfo_cmd.retries = retries;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
+       pfo_cmd.flags = REQ_QUIET;
++#else
++      pfo_cmd.flags = RQF_QUIET;
++#endif
+       pfo_cmd.source = PFO_SOURCE_ST;
+       pfo_cmd.iov_count = 0;
+       pfo_cmd.mdata = mdata;
This page took 0.092403 seconds and 4 git commands to generate.