[packages/lin_tape] - fix building with linux 4.10 - rel 3

baggins baggins at pld-linux.org
Sat Mar 25 21:15:28 CET 2017


commit 5a0083187ab4bdc60e2039193f1eca9987517c10
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Mar 25 21:15:11 2017 +0100

    - fix building with linux 4.10
    - rel 3

 lin_tape.spec    |   4 ++-
 linux-4.10.patch | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 1 deletion(-)
---
diff --git a/lin_tape.spec b/lin_tape.spec
index 4a7909a..50289a2 100644
--- a/lin_tape.spec
+++ b/lin_tape.spec
@@ -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
index 0000000..bb1b367
--- /dev/null
+++ b/linux-4.10.patch
@@ -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;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/lin_tape.git/commitdiff/5a0083187ab4bdc60e2039193f1eca9987517c10



More information about the pld-cvs-commit mailing list