[gentoo-commits] repo/gentoo:master commit in: sys-block/rts_pstor/files/, sys-block/rts_pstor/

2019-04-09 Thread Patrice Clement
commit: e435be88f7d4567f89a3f2158b62336cda0801a5
Author: Martin Dummer  ts  fujitsu  com>
AuthorDate: Sun Mar 24 10:36:22 2019 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Tue Apr  9 12:06:03 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e435be88

sys-block/rts_pstor: fix compilation issue.

fix compile issue with kernel >=5.0.

Package-Manager: Portage-2.3.62, Repoman-2.3.12
Closes: https://bugs.gentoo.org/680478
Closes: https://github.com/gentoo/gentoo/pull/11476
Signed-off-by: Martin Dummer  gmx.net>
Signed-off-by: Patrice Clement  gentoo.org>

 .../rts_pstor/files/fix-compile-kernel-5.0.0.patch | 36 ++
 .../rts_pstor/rts_pstor-1.10_p20160103.ebuild  |  3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch 
b/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch
new file mode 100644
index 000..7ea6ba6fd26
--- /dev/null
+++ b/sys-block/rts_pstor/files/fix-compile-kernel-5.0.0.patch
@@ -0,0 +1,36 @@
+--- a/rtsx.h
 b/rtsx.h
+@@ -81,6 +81,17 @@
+   pci_get_domain_bus_and_slot(0, (bus), (devfn))
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
++static void do_gettimeofday(struct timeval *tv)
++{
++  struct timespec64 now;
++
++  ktime_get_real_ts64();
++  tv->tv_sec = now.tv_sec;
++  tv->tv_usec = now.tv_nsec / 1000;
++}
++#endif
++
+ /*
+  * macros for easy use
+  */
+--- a/rtsx.c
 b/rtsx.c
+@@ -300,11 +300,13 @@
+   
+   .max_sectors =  240,
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
+   /* merge commands... this seems to help performance, but
+* periodically someone should test to see which setting is more
+* optimal.
+*/
+   .use_clustering =   1,
++#endif
+ 
+   
+   .emulated = 1,

diff --git a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild 
b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
index 73c7c69315d..e9b31fc3584 100644
--- a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
+++ b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2018 Gentoo Authors
+# Copyright 2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -18,6 +18,7 @@ KEYWORDS="~amd64 ~x86"
 DEPEND="virtual/linux-sources"
 PATCHES=(
"${FILESDIR}/rts_pstor-makefile.patch"
+   "${FILESDIR}/fix-compile-kernel-5.0.0.patch"
 )
 S="${WORKDIR}/RTS5209-linux-driver-${GIT_COMMIT}"
 



[gentoo-commits] repo/gentoo:master commit in: sys-block/rts_pstor/files/, sys-block/rts_pstor/

2019-03-26 Thread Patrice Clement
commit: ff44f32b886dfbbffda02ffe148ce08c739d1329
Author: Martin Dummer  ts  fujitsu  com>
AuthorDate: Sun Mar 24 10:54:27 2019 +
Commit: Patrice Clement  gentoo  org>
CommitDate: Tue Mar 26 16:45:39 2019 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ff44f32b

sys-block/rts_pstor: remove old version.

remove old rts_pstor-1.10-r5
uses deprecated EAPI=4

Signed-off-by: Martin Dummer  gmx.net>
Package-Manager: Portage-2.3.62, Repoman-2.3.12
Closes: https://github.com/gentoo/gentoo/pull/11477
Signed-off-by: Patrice Clement  gentoo.org>

 sys-block/rts_pstor/Manifest   |  1 -
 .../rts_pstor/files/rts_pstor-linux-3.10.patch | 53 --
 .../rts_pstor/files/rts_pstor-linux-3.8.patch  | 29 
 sys-block/rts_pstor/files/rts_pstor-vmalloc.patch  | 44 --
 sys-block/rts_pstor/rts_pstor-1.10-r5.ebuild   | 38 
 5 files changed, 165 deletions(-)

diff --git a/sys-block/rts_pstor/Manifest b/sys-block/rts_pstor/Manifest
index 640713b749b..283cf39a523 100644
--- a/sys-block/rts_pstor/Manifest
+++ b/sys-block/rts_pstor/Manifest
@@ -1,2 +1 @@
-DIST rts_pstor-1.10.tar.bz2 79549 BLAKE2B 
6ed1a31c46920f30b16c3cd4bda9978bffe40c2f88fdd2d63ef128d3a4ce22a6850846e4f5f1bf55200ed03a227a61bfcaefec4abdf598a43c8a7d8ca2991280
 SHA512 
26d29ccda55672adab8b96a8318e240d0c9d50ebf614853284cf218058c5788cc83b818ce118ac313c0ce6a67aef8ad13d93ed26212db7e05db51b8a7860b48d
 DIST rts_pstor-1.10_p20160103.tar.gz 108102 BLAKE2B 
9cbca345211f7c99c6d9cf71b0ed207a4c911569eee6c63bfbe15c094be08f64c4550f04d9df688969f43564b2ff6a91d5cc72b8ab281cfdffb6884688b354de
 SHA512 
d802a52b1e2da447a218472e77ca6ecc56e3b3767e3eb8daf634152675171c79c86e3b5ca9654b67cf32f63740c347bf7ecee5a1d20eb1c15a3a2ad3e9774311

diff --git a/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch 
b/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch
deleted file mode 100644
index 0070549b88d..000
--- a/sys-block/rts_pstor/files/rts_pstor-linux-3.10.patch
+++ /dev/null
@@ -1,53 +0,0 @@
 rts_pstor.a/rtsx.c 2013-07-03 05:39:26.316723407 +0530
-+++ rts_pstor.b/rtsx.c 2013-07-03 05:28:28.584882761 +0530
-@@ -135,38 +135,18 @@
- 
- 
- #undef SPRINTF
--#define SPRINTF(args...) \
--  do { if (pos < buffer+length) pos += sprintf(pos, ## args); } while (0)
-+#define SPRINTF(args...) seq_printf(m, ##args)
- 
--static int proc_info (struct Scsi_Host *host, char *buffer,
--  char **start, off_t offset, int length, int inout)
-+static int show_info(struct seq_file *m, struct Scsi_Host *host)
- {
--  char *pos = buffer;
--
--  
--  if (inout)
--  return length;
--
-   
-   SPRINTF("   Host scsi%d: %s\n", host->host_no, CR_DRIVER_NAME);
--
-   
-   SPRINTF("   Vendor: Realtek Corp.\n");
-   SPRINTF("  Product: PCIE Card Reader\n");
-   SPRINTF("  Version: %s\n", DRIVER_VERSION);
-   SPRINTF("Build: %s\n", DRIVER_MAKE_TIME);
--
--  /*
--   * Calculate start of next buffer, and return value.
--   */
--  *start = buffer + offset;
--
--  if ((pos - buffer) < offset)
--  return (0);
--  else if ((pos - buffer - offset) < length)
--  return (pos - buffer - offset);
--  else
--  return (length);
-+return 0;
- }
- 
- 
-@@ -272,7 +252,7 @@
-   
-   .name = CR_DRIVER_NAME,
-   .proc_name =CR_DRIVER_NAME,
--  .proc_info =proc_info,
-+  .show_info =show_info,
-   .info = host_info,
- 
-   

diff --git a/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch 
b/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch
deleted file mode 100644
index 797b1088f31..000
--- a/sys-block/rts_pstor/files/rts_pstor-linux-3.8.patch
+++ /dev/null
@@ -1,29 +0,0 @@
 rts_pstor.a/rtsx.c 2011-01-11 14:41:07.0 +0530
-+++ rts_pstor.b/rtsx.c 2013-05-29 00:39:11.319267655 +0530
-@@ -913,7 +913,7 @@
-   chip->s3_pwr_off_delay = 1000;
- }
- 
--static int __devinit rtsx_probe(struct pci_dev *pci, const struct 
pci_device_id *pci_id)
-+static int rtsx_probe(struct pci_dev *pci, const struct pci_device_id *pci_id)
- {
-   struct Scsi_Host *host;
-   struct rtsx_dev *dev;
-@@ -1077,7 +1077,7 @@
- }
- 
- 
--static void __devexit rtsx_remove(struct pci_dev *pci)
-+static void rtsx_remove(struct pci_dev *pci)
- {
-   struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
- 
-@@ -1104,7 +1104,7 @@
-   .name = CR_DRIVER_NAME,
-   .id_table = rtsx_ids,
-   .probe = rtsx_probe,
--  .remove = __devexit_p(rtsx_remove),
-+  .remove = rtsx_remove,
- #ifdef CONFIG_PM
-   .suspend = rtsx_suspend,
-   .resume = rtsx_resume,

diff --git a/sys-block/rts_pstor/files/rts_pstor-vmalloc.patch 
b/sys-block/rts_pstor/files/rts_pstor-vmalloc.patch
deleted file mode 100644
index 

[gentoo-commits] repo/gentoo:master commit in: sys-block/rts_pstor/files/, sys-block/rts_pstor/

2018-12-13 Thread Michał Górny
commit: 7d2f68e4b18a84a666b625edc18d8fe3de2b3008
Author: Martin Dummer  gmx  net>
AuthorDate: Sun Dec  9 22:53:18 2018 +
Commit: Michał Górny  gentoo  org>
CommitDate: Thu Dec 13 15:40:14 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d2f68e4

sys-block/rts_pstor: version bump to 1.10_p20160103

change upstream source to github
https://github.com/gexplorer/RTS5209-linux-driver
change to EAPI7

Closes: https://bugs.gentoo.org/662000
Package-Manager: Portage-2.3.51, Repoman-2.3.12
Signed-off-by: Martin Dummer  gmx.net>
Closes: https://github.com/gentoo/gentoo/pull/10602
Signed-off-by: Michał Górny  gentoo.org>

 sys-block/rts_pstor/Manifest   |  1 +
 sys-block/rts_pstor/files/rts_pstor-makefile.patch |  8 +
 sys-block/rts_pstor/metadata.xml   | 10 --
 .../rts_pstor/rts_pstor-1.10_p20160103.ebuild  | 37 ++
 4 files changed, 54 insertions(+), 2 deletions(-)

diff --git a/sys-block/rts_pstor/Manifest b/sys-block/rts_pstor/Manifest
index 7918bce8e9f..640713b749b 100644
--- a/sys-block/rts_pstor/Manifest
+++ b/sys-block/rts_pstor/Manifest
@@ -1 +1,2 @@
 DIST rts_pstor-1.10.tar.bz2 79549 BLAKE2B 
6ed1a31c46920f30b16c3cd4bda9978bffe40c2f88fdd2d63ef128d3a4ce22a6850846e4f5f1bf55200ed03a227a61bfcaefec4abdf598a43c8a7d8ca2991280
 SHA512 
26d29ccda55672adab8b96a8318e240d0c9d50ebf614853284cf218058c5788cc83b818ce118ac313c0ce6a67aef8ad13d93ed26212db7e05db51b8a7860b48d
+DIST rts_pstor-1.10_p20160103.tar.gz 108102 BLAKE2B 
9cbca345211f7c99c6d9cf71b0ed207a4c911569eee6c63bfbe15c094be08f64c4550f04d9df688969f43564b2ff6a91d5cc72b8ab281cfdffb6884688b354de
 SHA512 
d802a52b1e2da447a218472e77ca6ecc56e3b3767e3eb8daf634152675171c79c86e3b5ca9654b67cf32f63740c347bf7ecee5a1d20eb1c15a3a2ad3e9774311

diff --git a/sys-block/rts_pstor/files/rts_pstor-makefile.patch 
b/sys-block/rts_pstor/files/rts_pstor-makefile.patch
new file mode 100644
index 000..dc12cd68f52
--- /dev/null
+++ b/sys-block/rts_pstor/files/rts_pstor-makefile.patch
@@ -0,0 +1,8 @@
+diff -N -a -u1 a/Makefile b/Makefile
+--- a/Makefile 2016-01-03 14:41:40.0 +0100
 b/Makefile 2018-12-11 23:47:44.942218496 +0100
+@@ -36,3 +36,3 @@
+   cp -f ./define.release ./define.h
+-  make -C /lib/modules/$(shell uname -r)/build/ SUBDIRS=$(PWD) modules
++  +make -C $(KERNELDIR) SUBDIRS=$(PWD) modules
+ debug:

diff --git a/sys-block/rts_pstor/metadata.xml b/sys-block/rts_pstor/metadata.xml
index 85472974072..ab7993355b8 100644
--- a/sys-block/rts_pstor/metadata.xml
+++ b/sys-block/rts_pstor/metadata.xml
@@ -1,8 +1,14 @@
 
 http://www.gentoo.org/dtd/metadata.dtd;>
 
-   
+   
+   martin.dum...@gmx.net
+   
+   
+   proxy-ma...@gentoo.org
+   Proxy Maintainers
+   

-   PCIE RTS5209 card reader driver for Linux.
+   PCI-E RTS5209 card reader driver for Linux.

 

diff --git a/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild 
b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
new file mode 100644
index 000..73c7c69315d
--- /dev/null
+++ b/sys-block/rts_pstor/rts_pstor-1.10_p20160103.ebuild
@@ -0,0 +1,37 @@
+# Copyright 2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-mod
+
+GIT_COMMIT="c8313abffe083ac63bf76d2cc90d3edf5b2d1188"
+
+DESCRIPTION="PCI-E RTS5209 card reader driver for Linux"
+HOMEPAGE="https://github.com/gexplorer/RTS5209-linux-driver;
+SRC_URI="https://github.com/gexplorer/RTS5209-linux-driver/archive/${GIT_COMMIT}.tar.gz
 -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+DEPEND="virtual/linux-sources"
+PATCHES=(
+   "${FILESDIR}/rts_pstor-makefile.patch"
+)
+S="${WORKDIR}/RTS5209-linux-driver-${GIT_COMMIT}"
+
+MODULE_NAMES="rts_pstor(misc/drivers/scsi)"
+MODULESD_RTS_PSTOR_ADDITIONS=(
+   "# when rts_pstor is installed, blacklist in-kernel driver rtsx_pci"
+   "blacklist rtsx_pci"
+)
+BUILD_TARGETS="default"
+BUILD_PARAMS="KERNELDIR=${KERNEL_DIR}"
+CONFIG_CHECK="~!MISC_RTSX_PCI"
+ERROR_MISC_RTSX_PCI="CONFIG_MISC_RTSX_PCI: The in-kernel driver rtsx_pci is 
configured, which may have the same functionality than this driver. To make 
sure that your kernel loads only rts_pstor, the rtsx_pci module will be 
blacklisted."
+
+pkg_postinst() {
+   elog "This driver is based on code published by Realtek. There is a 
driver in the kernel named rtsx_pci which"
+   elog "should be preferred over this driver - but on some hardware only 
this driver is functional and rtsx_pci is not."
+}