Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2023-03-30 03:10:42 +08:00
commit 0e967b37fe
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
5 changed files with 73 additions and 8 deletions

View File

@ -41,6 +41,7 @@
#include <linux/atm.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/version.h>
#ifdef CONFIG_XFRM
#include <net/xfrm.h>
#endif
@ -199,7 +200,12 @@ static inline void mailbox_aal_rx_handler(void);
static irqreturn_t mailbox_irq_handler(int, void *);
static inline void mailbox_signal(unsigned int, int);
static void do_ppe_tasklet(unsigned long);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
DECLARE_TASKLET(g_dma_tasklet, do_ppe_tasklet, 0);
#else
DECLARE_TASKLET_OLD(g_dma_tasklet, do_ppe_tasklet);
#endif
/*
* QSB & HTU setting functions

View File

@ -127,7 +127,11 @@ static int ptm_stop(struct net_device *);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *);
#else
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
#endif
/*
* DSL Data LED
@ -511,7 +515,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *dev)
#else
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
#endif
{
int ndev;

View File

@ -77,7 +77,11 @@ static int ptm_stop(struct net_device *);
static int ptm_napi_poll(struct napi_struct *, int);
static int ptm_hard_start_xmit(struct sk_buff *, struct net_device *);
static int ptm_ioctl(struct net_device *, struct ifreq *, int);
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *);
#else
static void ptm_tx_timeout(struct net_device *, unsigned int txqueue);
#endif
static inline struct sk_buff* alloc_skb_rx(void);
static inline struct sk_buff* alloc_skb_tx(unsigned int);
@ -125,7 +129,12 @@ static char *g_net_dev_name[1] = {"dsl0"};
static int g_ptm_prio_queue_map[8];
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
!(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
static DECLARE_TASKLET(g_swap_desc_tasklet, do_swap_desc_tasklet, 0);
#else
static DECLARE_TASKLET_OLD(g_swap_desc_tasklet, do_swap_desc_tasklet);
#endif
unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
@ -451,7 +460,11 @@ static int ptm_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
return 0;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
static void ptm_tx_timeout(struct net_device *dev)
#else
static void ptm_tx_timeout(struct net_device *dev, unsigned int txqueue)
#endif
{
ASSERT(dev == g_net_dev[0], "incorrect device");

View File

@ -1,11 +1,51 @@
--- a/src/drv_tapi_linux.c
+++ b/src/drv_tapi_linux.c
@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
*/
static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
struct sched_param sched_params;
-
sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
sched_setscheduler(current, SCHED_FIFO, &sched_params);
+#else
+ sched_set_fifo_low(current);
+#endif
}
#endif /* LINUX_2_6 */
@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
*/
IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
{
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
struct sched_param sched_params;
IFX_int32_t ret;
@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
}
return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
+#else
+ sched_set_fifo_low(current);
+ return IFX_SUCCESS;
+#endif
}
--- a/src/drv_tapi_kpi.c
+++ b/src/drv_tapi_kpi.c
@@ -134,7 +134,7 @@ extern IFX_int32_t block_ingre
@@ -134,7 +134,12 @@ extern IFX_int32_t block_ingre
/* ========================================================================== */
static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
#ifdef KPI_TASKLET
-DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0) && \
+ !(LINUX_VERSION_CODE < KERNEL_VERSION(5,5,0) && LINUX_VERSION_CODE > KERNEL_VERSION(5,4,235))
DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
+#else
+DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
+#endif
#endif /* KPI_TASKLET */
static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);

View File

@ -225,17 +225,15 @@ Signed-off-by: John Crispin <blogic@openwrt.org>
for_each_uvc_urb(uvc_urb, stream) {
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -200,7 +200,9 @@
@@ -200,6 +200,8 @@
#define UVC_QUIRK_FORCE_Y8 0x00000800
#define UVC_QUIRK_FORCE_BPP 0x00001000
#define UVC_QUIRK_WAKE_AUTOSUSPEND 0x00002000
-
+#define UVC_QUIRK_MOTION 0x00001000
+#define UVC_QUIRK_SINGLE_ISO 0x00002000
+
+#define UVC_QUIRK_MOTION 0x00004000
+#define UVC_QUIRK_SINGLE_ISO 0x00008000
/* Format flags */
#define UVC_FMT_FLAG_COMPRESSED 0x00000001
#define UVC_FMT_FLAG_STREAM 0x00000002
@@ -668,6 +670,7 @@ struct uvc_device {
u8 *status;
struct input_dev *input;