aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2019-03-24 23:00:54 +0100
committerThomas Deutschmann <whissi@gentoo.org>2019-03-25 00:05:24 +0100
commitb2b148e90850f0e172995c2012cfd2e9e96c9232 (patch)
tree9c824667fd4d4f2aaec67a4ee952f5987ee9cb46 /patches
parentcompile_lvm(): No need to call compile_libaio() when LVM_BINCACHE is valid (diff)
downloadgenkernel-b2b148e90850f0e172995c2012cfd2e9e96c9232.tar.gz
genkernel-b2b148e90850f0e172995c2012cfd2e9e96c9232.tar.bz2
genkernel-b2b148e90850f0e172995c2012cfd2e9e96c9232.zip
Fix iSCSI support
Bump to open-scsi-2.0.875 & open-isns-0.99. Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'patches')
-rw-r--r--patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch11
-rw-r--r--patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-ethtool-compat.patch69
-rw-r--r--patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-fixes.patch51
-rw-r--r--patches/iscsi/2.0.875/open-iscsi-2.0.875-declare-inline-best_match_bufcmp-as-static.patch24
-rw-r--r--patches/iscsi/2.0.875/open-iscsi-2.0.875-include-sysmacros.patch21
-rw-r--r--patches/iscsi/2.0.875/open-iscsi-2.0.875-static-iscsistart.patch13
6 files changed, 178 insertions, 11 deletions
diff --git a/patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch b/patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch
deleted file mode 100644
index 185f1ac..0000000
--- a/patches/iscsi/2.0-872/open-iscsi-2.0.872-omg-calling-configure.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- open-iscsi-2.0-872.orig/Makefile
-+++ open-iscsi-2.0-872/Makefile
-@@ -27,7 +27,7 @@ IFACEFILES = etc/iface.example
- all: user kernel
-
- user: ;
-- cd utils/open-isns; ./configure; $(MAKE)
-+ cd utils/open-isns; $(MAKE)
- $(MAKE) -C utils/sysdeps
- $(MAKE) -C utils/fwparam_ibft
- $(MAKE) -C usr
diff --git a/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-ethtool-compat.patch b/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-ethtool-compat.patch
new file mode 100644
index 0000000..12b82c7
--- /dev/null
+++ b/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-ethtool-compat.patch
@@ -0,0 +1,69 @@
+From: Anthony G. Basiel <blueness@gentoo.org>
+
+diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c
+--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/bnx2x.c 2016-09-29 18:33:24.000000000 +0000
++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/bnx2x.c 2017-01-03 21:45:47.504035833 +0000
+@@ -42,7 +42,7 @@
+ #include <arpa/inet.h>
+ #include <linux/types.h> /* Needed for linux/ethtool.h on RHEL 5.x */
+ #include <linux/sockios.h>
+-#include <linux/ethtool.h>
++#include "ethtool-compat.h"
+ #include <sys/mman.h>
+ #include <sys/ioctl.h>
+ #include <sys/types.h>
+diff -Naur open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h
+--- open-iscsi-2.0.874.orig/iscsiuio/src/unix/libs/ethtool-compat.h 1970-01-01 00:00:00.000000000 +0000
++++ open-iscsi-2.0.874/iscsiuio/src/unix/libs/ethtool-compat.h 2017-01-03 21:45:23.016034980 +0000
+@@ -0,0 +1,51 @@
++/*
++ * ethtool-compat.h: adopted from
++ # ethtool.h: Defines for Linux ethtool.
++ *
++ * Copyright (C) 1998 David S. Miller (davem@redhat.com)
++ * Copyright 2001 Jeff Garzik <jgarzik@pobox.com>
++ * Portions Copyright 2001 Sun Microsystems (thockin@sun.com)
++ * Portions Copyright 2002 Intel (eli.kupermann@intel.com,
++ * christopher.leech@intel.com,
++ * scott.feldman@intel.com)
++ * Portions Copyright (C) Sun Microsystems 2008
++ */
++
++#include <linux/types.h>
++#include <netinet/if_ether.h>
++
++#define ETHTOOL_FWVERS_LEN 32
++#define ETHTOOL_BUSINFO_LEN 32
++#define ETHTOOL_EROMVERS_LEN 32
++
++struct ethtool_drvinfo {
++ __u32 cmd;
++ char driver[32];
++ char version[32];
++ char fw_version[ETHTOOL_FWVERS_LEN];
++ char bus_info[ETHTOOL_BUSINFO_LEN];
++ char erom_version[ETHTOOL_EROMVERS_LEN];
++ char reserved2[12];
++ __u32 n_priv_flags;
++ __u32 n_stats;
++ __u32 testinfo_len;
++ __u32 eedump_len;
++ __u32 regdump_len;
++};
++
++struct ethtool_tcpip4_spec {
++ __be32 ip4src;
++ __be32 ip4dst;
++ __be16 psrc;
++ __be16 pdst;
++ __u8 tos;
++};
++
++struct ethtool_ah_espip4_spec {
++ __be32 ip4src;
++ __be32 ip4dst;
++ __be32 spi;
++ __u8 tos;
++};
++
++#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
diff --git a/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-fixes.patch b/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-fixes.patch
new file mode 100644
index 0000000..cf8b762
--- /dev/null
+++ b/patches/iscsi/2.0.875/open-iscsi-2.0.874-musl-fixes.patch
@@ -0,0 +1,51 @@
+--- ./utils/fwparam_ibft/fwparam_ppc.c 2016-09-29 13:33:24.000000000 -0500
++++ ./utils/fwparam_ibft/fwparam_ppc.c 2017-01-02 11:37:32.738351217 -0600
+@@ -356,7 +356,7 @@
+ * Sort the nics into "natural" order. The proc fs
+ * device-tree has them in somewhat random, or reversed order.
+ */
+- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp);
++ qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp);
+
+ snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases");
+ dev_count = 0;
+--- ./usr/idbm.c.orig
++++ ./usr/idbm.c
+@@ -25,6 +25,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <dirent.h>
+ #include <limits.h>
+ #include <sys/stat.h>
+--- a/usr/iscsiadm.c 2016-09-29 13:33:24.000000000 -0500
++++ b/usr/iscsiadm.c 2017-01-02 11:46:37.643506953 -0600
+@@ -3262,6 +3262,7 @@
+ int tpgt = PORTAL_GROUP_TAG_UNKNOWN, killiscsid=-1, do_show=0;
+ int packet_size=32, ping_count=1, ping_interval=0;
+ int do_discover = 0, sub_mode = -1;
++ int argerror = 0;
+ int portal_type = -1;
+ struct sigaction sa_old;
+ struct sigaction sa_new;
+@@ -3426,6 +3427,9 @@
+ break;
+ case 'h':
+ usage(0);
++ case '?':
++ log_error("unrecognized character '%c'", optopt);
++ argerror = 1;
+ }
+
+ if (name && value) {
+@@ -3441,8 +3445,7 @@
+ }
+ }
+
+- if (optopt) {
+- log_error("unrecognized character '%c'", optopt);
++ if (argerror) {
+ rc = ISCSI_ERR_INVAL;
+ goto free_ifaces;
+ }
diff --git a/patches/iscsi/2.0.875/open-iscsi-2.0.875-declare-inline-best_match_bufcmp-as-static.patch b/patches/iscsi/2.0.875/open-iscsi-2.0.875-declare-inline-best_match_bufcmp-as-static.patch
new file mode 100644
index 0000000..7bd7f9a
--- /dev/null
+++ b/patches/iscsi/2.0.875/open-iscsi-2.0.875-declare-inline-best_match_bufcmp-as-static.patch
@@ -0,0 +1,24 @@
+From ec9865c5b2a05908dff774eda352d84d6a001e1a Mon Sep 17 00:00:00 2001
+From: Lee Duncan <lduncan@suse.com>
+Date: Sat, 2 Dec 2017 14:24:52 -0800
+Subject: [PATCH] Declare inline best_match_bufcmp() as static.
+
+The 7.2.1 version of gcc seems to be more strict
+about this. See https://gcc.gnu.org/onlinedocs/gcc/Inline.html
+---
+ iscsiuio/src/uip/ipv6.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iscsiuio/src/uip/ipv6.c b/iscsiuio/src/uip/ipv6.c
+index ced98a67..05efa73f 100644
+--- a/iscsiuio/src/uip/ipv6.c
++++ b/iscsiuio/src/uip/ipv6.c
+@@ -49,7 +49,7 @@
+ #include "dhcpv6.h"
+ #include "ping.h"
+
+-inline int best_match_bufcmp(u8_t *a, u8_t *b, int len)
++static inline int best_match_bufcmp(u8_t *a, u8_t *b, int len)
+ {
+ int i;
+
diff --git a/patches/iscsi/2.0.875/open-iscsi-2.0.875-include-sysmacros.patch b/patches/iscsi/2.0.875/open-iscsi-2.0.875-include-sysmacros.patch
new file mode 100644
index 0000000..7c19a1e
--- /dev/null
+++ b/patches/iscsi/2.0.875/open-iscsi-2.0.875-include-sysmacros.patch
@@ -0,0 +1,21 @@
+From 6d68ef5871c94c6ebbbe6e6b1fe0bc2dce711052 Mon Sep 17 00:00:00 2001
+From: Lee Duncan <lduncan@suse.com>
+Date: Sat, 2 Dec 2017 14:19:26 -0800
+Subject: [PATCH] Include <sys/sysmacros.h> to properly define minor()
+
+---
+ iscsiuio/src/unix/libs/qedi.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c
+index c6ff6e77..b81fecdf 100644
+--- a/iscsiuio/src/unix/libs/qedi.c
++++ b/iscsiuio/src/unix/libs/qedi.c
+@@ -58,6 +58,7 @@
+ #include <sys/user.h>
+ #include <fcntl.h>
+ #include <unistd.h>
++#include <sys/sysmacros.h>
+
+ #include "config.h"
+
diff --git a/patches/iscsi/2.0.875/open-iscsi-2.0.875-static-iscsistart.patch b/patches/iscsi/2.0.875/open-iscsi-2.0.875-static-iscsistart.patch
new file mode 100644
index 0000000..c190627
--- /dev/null
+++ b/patches/iscsi/2.0.875/open-iscsi-2.0.875-static-iscsistart.patch
@@ -0,0 +1,13 @@
+diff --git a/usr/Makefile b/usr/Makefile
+index c1866b6..2990060 100644
+--- a/usr/Makefile
++++ b/usr/Makefile
+@@ -61,7 +61,7 @@ iscsiadm: $(ISCSI_LIB_SRCS) $(DISCOVERY_SRCS) iscsiadm.o session_mgmt.o mntcheck
+
+ iscsistart: $(ISCSI_LIB_SRCS) $(INITIATOR_SRCS) $(FW_BOOT_SRCS) \
+ iscsistart.o statics.o
+- $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -lrt
++ $(CC) $(CFLAGS) $(LDFLAGS) $^ -o $@ -static -lrt
+ clean:
+ rm -f *.o $(PROGRAMS) .depend $(LIBSYS)
+