- updated to 3.0.20 auto/th/lin_tape-3.0.20-1
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 1 Aug 2017 13:13:27 +0000 (15:13 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 1 Aug 2017 13:13:27 +0000 (15:13 +0200)
clean-ifdefs.patch
lin_tape.fixlist
lin_tape.spec
linux-4.10.patch
linux-4.11.patch
linux-4.12.patch [new file with mode: 0644]
linux-4.9.patch

index 1a4f8fd377bf88f92437e35064f7bc0879852d86..3d6382a6f7d31c04aca5c3ae47ce71453d060614 100644 (file)
@@ -20,7 +20,7 @@ diff -ur lin_tape-3.0.18/Makefile lin_tape-3.0.18-ifdefs/Makefile
 diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 --- lin_tape-3.0.18/pfo.h      2017-02-23 19:14:41.000000000 +0100
 +++ lin_tape-3.0.18-ifdefs/pfo.h       2017-05-09 21:06:34.117699008 +0200
-@@ -26,97 +26,6 @@
+@@ -26,109 +26,6 @@
   * will build for various releases of Linux.  This is how
   * we track different versions using ifdef in the source.
   */
@@ -89,6 +89,7 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 -#define AFTER_RH_64 1
 -#define AFTER_RH_65 1
 -#define AFTER_RH_66 1
+-#define AFTER_RH_67 1
 -#define BEFORE_RH_70 1
 -#define BEFORE_RH_71 1
 -#define BEFORE_RH_72 1
@@ -115,13 +116,24 @@ diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
 -#define BEFORE_RH_72 1
 -#endif
 -#ifdef KERNELVERSION_3_10_0_327
+-#define AFTER_RH_62 1
+-#define AFTER_RH_63 1
+-#define AFTER_RH_64 1
+-#define AFTER_RH_65 1
+-#define AFTER_RH_66 1
+-#define AFTER_RH_67 1
+-#define AFTER_RH_6x 1
+-#define AFTER_RH_70 1
+-#define AFTER_RH_71 1
+-#endif
+-#ifdef KERNELVERSION_3_10_0_514
  #define AFTER_RH_62 1
  #define AFTER_RH_63 1
  #define AFTER_RH_64 1
 @@ -126,7 +35,6 @@
- #define AFTER_RH_6x 1
  #define AFTER_RH_70 1
  #define AFTER_RH_71 1
+ #define AFTER_RH_72 1
 -#endif
  
  /* Misc defines needed so source is same for all versions of Linux */
@@ -170,8 +182,8 @@ diff -ur lin_tape-3.0.18/sgmp.c lin_tape-3.0.18-ifdefs/sgmp.c
                if ((sdp->sgdebug > 0) &&
                    ((CHECK_CONDITION == srp->header.masked_status) ||
                     (COMMAND_TERMINATED == srp->header.masked_status)))
--#ifdef AFTER_RH_71
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+-#if defined(AFTER_RH_71) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
                        __scsi_print_sense(sdp->device, "sg_cmd_done", sense, SCSI_SENSE_BUFFERSIZE);
  
  #else
@@ -200,17 +212,17 @@ diff -ur lin_tape-3.0.18/stmp.c lin_tape-3.0.18-ifdefs/stmp.c
                       SRpnt->cmd[0], SRpnt->cmd[1], SRpnt->cmd[2],
                       SRpnt->cmd[3], SRpnt->cmd[4], SRpnt->cmd[5]);
                if (cmdstatp->have_sense)
--#ifdef AFTER_RH_70
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+-#if defined(AFTER_RH_70) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
                        __scsi_print_sense(STp->device, name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
  
  #else
 @@ -475,7 +475,7 @@
-                        scode != VOLUME_OVERFLOW &&
                         SRpnt->cmd[0] != MODE_SENSE &&
                         SRpnt->cmd[0] != TEST_UNIT_READY) {
--#ifdef AFTER_RH_71
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0)
+-#if defined(AFTER_RH_71) || LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
                        __scsi_print_sense(STp->device, name, SRpnt->sense, SCSI_SENSE_BUFFERSIZE);
  
  #else
index 41ad2c9facca9932f7c3ad3e5af56464e2769901..8d5af8e9d40aeb5c6cd587bd5603fcab967e793b 100644 (file)
@@ -4,9 +4,22 @@ Fixlist for Linux IBM Tape Device Driver (lin_tape)
 \r
  Level      Date                   Description\r
 ---------------------------------------------------------------\r
+3.0.20 06/09/2017   - Reincorporated join driver (lin_tape_as_sfmp) with new build flag: -with sfmp\r
+                    - Work around for wrong SN reported by Inq. page 80h after failback\r
+                    - Fix for crash when HBA driver removed before lin_tape\r
+                    - Fix for mismatching device SN on failback\r
+                    - Fix for busy waits\r
+                    - Fix for file systems removals\r
+                    - Fix for file systems attributes names\r
+                    - Fix for column width at /proc/IBM for SN\r
+                    - Initial support for SLES 12 SP2 (min. kernel version 4.4.21-69)\r
+                    - Initial support for RHEL 7.3 (min. kernel version 3.10.0-514)\r
+                    - Initial support for RHEL 7.3 Power LE (min. kernel version 3.10.0-514)\r
+                    - Initial support for TS1155\r
 3.0.18 03/08/2017   - Prevent crash from double delete objects on removal during wait scenarios (introduced at 2.2.0)\r
                     - lin_tape_as_sfmp not supported in this version\r
                     - Installation for blacklist.conf enhancements\r
+                    - Support for TS1155\r
 3.0.16 01/06/2017   - Prevent crash introduced at 1.75.0 cleaning buffern and length on WRA during open\r
                     - Prevent lock/crash introduced at 1.75.0 when device removal during open\r
                     - Added dualaccesor_cpf for TSLM usage\r
index 52db0eac88d762ed4f99f66bf605253f7afa8889..dd98a864dc029d7b0671ff10a9406c7149907def 100644 (file)
@@ -9,18 +9,19 @@
 %define                pname   lin_tape
 Summary:       IBM Tape SCSI Device Driver for Linux
 Name:          %{pname}%{_alt_kernel}
-Version:       3.0.18
+Version:       3.0.20
 Release:       %{rel}%{?_pld_builder:@%{_kernel_ver_str}}
 License:       GPL v2/LGPL
 Group:         Base/Kernel
 Source0:       %{pname}-%{version}.tgz
-# Source0-md5: c82336b8402f1eeadf440e7173895f17
+# Source0-md5: e9780677ade7969498032f10611a3bb6
 Source1:       %{pname}.fixlist
 Patch0:                use-module-dir.patch
 Patch1:                clean-ifdefs.patch
 Patch2:                linux-4.9.patch
 Patch3:                linux-4.10.patch
 Patch4:                linux-4.11.patch
+Patch5:                linux-4.12.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
@@ -73,6 +74,7 @@ compatible platforms.\
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 install -p %{SOURCE1} .
 
index bb1b367cac469fb8087d091388785f41be2f816b..0e90019c74e783ed80e48996e0c248f1aab2f6c2 100644 (file)
@@ -17,9 +17,9 @@ 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;
+ #else
        req->cmd_type = REQ_TYPE_BLOCK_PC;
+ #endif
 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
        req->cmd_flags |= REQ_QUIET;
 +#else
index cfd63469f7be74b5e51414c72dc18f552c33610b..d3639d5ad5ede7fcf30ea23aa2b4f3c7a0856afb 100644 (file)
@@ -69,21 +69,6 @@ diff -ur lin_tape-3.0.18/lin_tape_ioctl_tape.c lin_tape-3.0.18-4.11/lin_tape_ioc
        status_code = req->errors;
  
        if(buf_len && !use_sg) {
-diff -ur lin_tape-3.0.18/lin_tape_ioctl_tape.c.orig lin_tape-3.0.18-4.11/lin_tape_ioctl_tape.c.orig
---- lin_tape-3.0.18/lin_tape_ioctl_tape.c.orig 2017-02-23 19:14:41.000000000 +0100
-+++ lin_tape-3.0.18-4.11/lin_tape_ioctl_tape.c.orig    2017-05-09 21:45:14.232900215 +0200
-@@ -6465,7 +6465,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.18/lin_tape_tape.h lin_tape-3.0.18-4.11/lin_tape_tape.h
 --- lin_tape-3.0.18/lin_tape_tape.h    2017-02-23 19:14:41.000000000 +0100
 +++ lin_tape-3.0.18-4.11/lin_tape_tape.h       2017-05-09 21:45:14.236233622 +0200
@@ -195,18 +180,3 @@ diff -ur lin_tape-3.0.18/lower.c lin_tape-3.0.18-4.11/lower.c
        pfo_cmd->errors = rq->errors;
  
        blk_put_request(rq);
-diff -ur lin_tape-3.0.18/stmp.c lin_tape-3.0.18-4.11/stmp.c
---- lin_tape-3.0.18/stmp.c     2017-05-10 00:36:01.955619894 +0200
-+++ lin_tape-3.0.18-4.11/stmp.c        2017-05-09 21:45:14.236233622 +0200
-@@ -611,7 +611,11 @@
-       if (!req)
-               return DRIVER_ERROR << 24;
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
-+      scsi_req_init(req);
-+#else
-       req->cmd_type = REQ_TYPE_BLOCK_PC;
-+#endif
- #if LINUX_VERSION_CODE < KERNEL_VERSION(4,10,0)
-       req->cmd_flags |= REQ_QUIET;
- #else
diff --git a/linux-4.12.patch b/linux-4.12.patch
new file mode 100644 (file)
index 0000000..7699c7b
--- /dev/null
@@ -0,0 +1,52 @@
+--- lin_tape-3.0.20/lin_tape_ioctl_tape.c.orig 2017-08-01 15:02:29.400676838 +0200
++++ lin_tape-3.0.20/lin_tape_ioctl_tape.c      2017-08-01 15:08:53.208605776 +0200
+@@ -6554,7 +6554,11 @@
+       req->sense_len = 0;
+ #endif
+       req->timeout = timeout;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++      scsi_req(req)->retries = 0;
++#else
+       req->retries = 0;
++#endif
+       blk_execute_rq(req->q, NULL, req, 1);
+@@ -6563,7 +6567,11 @@
+ #else
+       *resid = req->resid_len;
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++      status_code = scsi_req(req)->result;
++#else
+       status_code = req->errors;
++#endif
+       if(buf_len && !use_sg) {
+               buf_ptr = (char*)buffer;
+--- lin_tape-3.0.20/lower.c.orig       2017-08-01 15:09:52.565988839 +0200
++++ lin_tape-3.0.20/lower.c    2017-08-01 15:11:23.877092947 +0200
+@@ -568,7 +568,11 @@
+       rq->sense_len = 0;
+ #endif
+       rq->timeout = pfo_cmd->timeout;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++      scsi_req(rq)->retries = pfo_cmd->retries;
++#else
+       rq->retries = pfo_cmd->retries;
++#endif
+       rq->end_io_data = pfo_cmd;
+       blk_execute_rq(rq->q, NULL, rq, 1);
+@@ -589,7 +593,11 @@
+       pfo_cmd->resid_len = rq->resid_len;
+       pfo_cmd->sense_len = rq->sense_len;
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++      pfo_cmd->errors = scsi_req(rq)->result;
++#else
+       pfo_cmd->errors = rq->errors;
++#endif
+       blk_put_request(rq);
+       return pfo_cmd->errors;
index 4fb0e433657ef835525ce640344b5476f1639373..78e28b4a49e62d2894232fe6cdbc43c948e56fcd 100644 (file)
 --- lin_tape-3.0.18/stmp.c~    2017-05-09 21:25:12.000000000 +0200
 +++ lin_tape-3.0.18/stmp.c     2017-05-09 21:29:19.121101188 +0200
 @@ -5205,7 +5205,14 @@
-         /* Try to fault in all of the necessary pages */
-       down_read(&current->mm->mmap_sem);
-         /* rw==READ means read from drive, write into memory area */
--#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+       if ((pages = kmalloc(max_pages * sizeof(*pages), GFP_KERNEL)) == NULL)
+               return -ENOMEM;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
-+      res = get_user_pages(
++      res = get_user_pages_unlocked(
 +              uaddr,
 +              nr_pages,
 +              rw == READ ? FOLL_WRITE : 0,
 +              pages,
 +              NULL);
-+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
-       res = get_user_pages(
-               uaddr,
-               nr_pages,
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,21)
+     /* Try to fault in all of the necessary pages */
+     /* rw==READ means read from drive, write into memory area */
+       res = get_user_pages_unlocked(
This page took 1.123217 seconds and 4 git commands to generate.