From 7a3de3c5c18a27dbf46783ad9240019c49f62f03 Mon Sep 17 00:00:00 2001 From: John Thomson Date: Sun, 28 Jul 2024 16:02:07 +0800 Subject: [PATCH] xr_usb_serial_common: bump to 2023-03-31 Fix 6.1 and 6.6 kernel compile Fixes: https://github.com/coolsnowwolf/lede/issues/12362 Signed-off-by: John Thomson --- libs/xr_usb_serial_common/Makefile | 8 +-- .../patches/0001-fix-kernel-6.6-builds.patch | 52 +++++++++++++++++++ 2 files changed, 56 insertions(+), 4 deletions(-) create mode 100644 libs/xr_usb_serial_common/patches/0001-fix-kernel-6.6-builds.patch diff --git a/libs/xr_usb_serial_common/Makefile b/libs/xr_usb_serial_common/Makefile index d8f46e9f..a40590be 100644 --- a/libs/xr_usb_serial_common/Makefile +++ b/libs/xr_usb_serial_common/Makefile @@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=usb-serial-xr_usb_serial_common -PKG_SOURCE_DATE:=2022-03-30 -PKG_SOURCE_VERSION:=ecc6ebe0141b97942d774e6c6be37a330cc11a74 -PKG_RELEASE:=$(AUTORELEASE) +PKG_SOURCE_DATE:=2023-03-21 +PKG_SOURCE_VERSION:=90ad530166f096347a5a57b6f9eb21c422a40fd9 +PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/kasbert/epsolar-tracer -PKG_MIRROR_HASH:=487c4259211411d3c435284016f90c6770539c0a6f904f3327f18381a33c23e3 +PKG_MIRROR_HASH:=f8572929a66d2eeadc80ef68fb26d5b7a824b87b7959352ff44ad4b3a29dfb78 PKG_MAINTAINER:=Daniel Golle PKG_LICENSE:=GPL-2.0-or-later diff --git a/libs/xr_usb_serial_common/patches/0001-fix-kernel-6.6-builds.patch b/libs/xr_usb_serial_common/patches/0001-fix-kernel-6.6-builds.patch new file mode 100644 index 00000000..beb3188a --- /dev/null +++ b/libs/xr_usb_serial_common/patches/0001-fix-kernel-6.6-builds.patch @@ -0,0 +1,52 @@ +From 5115918c11cc99e93586cef7f33d8d3907b7258a Mon Sep 17 00:00:00 2001 +From: Adam Duskett +Date: Wed, 3 Apr 2024 12:45:41 -0600 +Subject: [PATCH] Support Linux >= 6.2.0 + +FROM: https://github.com/kasbert/epsolar-tracer/pull/61 + +Signed-off-by: Adam Duskett +--- + xr_usb_serial_common-1a/xr_usb_serial_common.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/xr_usb_serial_common-1a/xr_usb_serial_common.c ++++ b/xr_usb_serial_common-1a/xr_usb_serial_common.c +@@ -643,8 +643,13 @@ static void xr_usb_serial_tty_close(stru + tty_port_close(&xr_usb_serial->port, tty, filp); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0) ++static ssize_t xr_usb_serial_tty_write(struct tty_struct *tty, ++ const unsigned char *buf, size_t count) ++#else + static int xr_usb_serial_tty_write(struct tty_struct *tty, + const unsigned char *buf, int count) ++#endif + { + struct xr_usb_serial *xr_usb_serial = tty->driver_data; + int stat; +@@ -655,7 +660,11 @@ static int xr_usb_serial_tty_write(struc + if (!count) + return 0; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0) ++ dev_vdbg(&xr_usb_serial->data->dev, "%s - count %zd\n", __func__, count); ++#else + dev_vdbg(&xr_usb_serial->data->dev, "%s - count %d\n", __func__, count); ++#endif + + spin_lock_irqsave(&xr_usb_serial->write_lock, flags); + wbn = xr_usb_serial_wb_alloc(xr_usb_serial); +@@ -672,7 +681,11 @@ static int xr_usb_serial_tty_write(struc + } + + count = (count > xr_usb_serial->writesize) ? xr_usb_serial->writesize : count; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 2, 0) ++ dev_vdbg(&xr_usb_serial->data->dev, "%s - write %zd\n", __func__, count); ++#else + dev_vdbg(&xr_usb_serial->data->dev, "%s - write %d\n", __func__, count); ++#endif + memcpy(wb->buf, buf, count); + wb->len = count; +