mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 13:51:44 +00:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/can/usb/kvaser_usb/kvaser_usb_leaf.c2871edb32f
("can: kvaser_usb: Fix possible completions during init_completion")abb8670938
("can: kvaser_usb_leaf: Ignore stale bus-off after start")8d21f5927a
("can: kvaser_usb_leaf: Fix improved state not being reported") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
31f1aa4f74
@ -1318,7 +1318,7 @@ instance. This setup would require the following commands:
|
|||||||
$ v4l2-ctl -d2 -i2
|
$ v4l2-ctl -d2 -i2
|
||||||
$ v4l2-ctl -d2 -c horizontal_movement=4
|
$ v4l2-ctl -d2 -c horizontal_movement=4
|
||||||
$ v4l2-ctl -d1 --overlay=1
|
$ v4l2-ctl -d1 --overlay=1
|
||||||
$ v4l2-ctl -d1 -c loop_video=1
|
$ v4l2-ctl -d0 -c loop_video=1
|
||||||
$ v4l2-ctl -d2 --stream-mmap --overlay=1
|
$ v4l2-ctl -d2 --stream-mmap --overlay=1
|
||||||
|
|
||||||
And from another console:
|
And from another console:
|
||||||
|
@ -118,6 +118,12 @@ Text Searching
|
|||||||
CRC and Math Functions in Linux
|
CRC and Math Functions in Linux
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
|
Arithmetic Overflow Checking
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
.. kernel-doc:: include/linux/overflow.h
|
||||||
|
:internal:
|
||||||
|
|
||||||
CRC Functions
|
CRC Functions
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -107,9 +107,6 @@ Kernel utility functions
|
|||||||
.. kernel-doc:: kernel/panic.c
|
.. kernel-doc:: kernel/panic.c
|
||||||
:export:
|
:export:
|
||||||
|
|
||||||
.. kernel-doc:: include/linux/overflow.h
|
|
||||||
:internal:
|
|
||||||
|
|
||||||
Device Resource Management
|
Device Resource Management
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
||||||
|
@ -15438,6 +15438,7 @@ S: Maintained
|
|||||||
W: http://openvswitch.org
|
W: http://openvswitch.org
|
||||||
F: include/uapi/linux/openvswitch.h
|
F: include/uapi/linux/openvswitch.h
|
||||||
F: net/openvswitch/
|
F: net/openvswitch/
|
||||||
|
F: tools/testing/selftests/net/openvswitch/
|
||||||
|
|
||||||
OPERATING PERFORMANCE POINTS (OPP)
|
OPERATING PERFORMANCE POINTS (OPP)
|
||||||
M: Viresh Kumar <vireshk@kernel.org>
|
M: Viresh Kumar <vireshk@kernel.org>
|
||||||
|
@ -103,11 +103,11 @@
|
|||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
usb@40000 {
|
||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ohci@60000 {
|
usb@60000 {
|
||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,11 +110,11 @@
|
|||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
usb@40000 {
|
||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ohci@60000 {
|
usb@60000 {
|
||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -87,13 +87,13 @@
|
|||||||
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
|
mac-address = [00 00 00 00 00 00]; /* Filled in by U-Boot */
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
usb@40000 {
|
||||||
compatible = "generic-ehci";
|
compatible = "generic-ehci";
|
||||||
reg = < 0x40000 0x100 >;
|
reg = < 0x40000 0x100 >;
|
||||||
interrupts = < 8 >;
|
interrupts = < 8 >;
|
||||||
};
|
};
|
||||||
|
|
||||||
ohci@60000 {
|
usb@60000 {
|
||||||
compatible = "generic-ohci";
|
compatible = "generic-ohci";
|
||||||
reg = < 0x60000 0x100 >;
|
reg = < 0x60000 0x100 >;
|
||||||
interrupts = < 8 >;
|
interrupts = < 8 >;
|
||||||
|
@ -234,7 +234,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ohci@60000 {
|
usb@60000 {
|
||||||
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
|
compatible = "snps,hsdk-v1.0-ohci", "generic-ohci";
|
||||||
reg = <0x60000 0x100>;
|
reg = <0x60000 0x100>;
|
||||||
interrupts = <15>;
|
interrupts = <15>;
|
||||||
@ -242,7 +242,7 @@
|
|||||||
dma-coherent;
|
dma-coherent;
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
usb@40000 {
|
||||||
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
|
compatible = "snps,hsdk-v1.0-ehci", "generic-ehci";
|
||||||
reg = <0x40000 0x100>;
|
reg = <0x40000 0x100>;
|
||||||
interrupts = <15>;
|
interrupts = <15>;
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
clock-names = "stmmaceth";
|
clock-names = "stmmaceth";
|
||||||
};
|
};
|
||||||
|
|
||||||
ehci@40000 {
|
usb@40000 {
|
||||||
compatible = "generic-ehci";
|
compatible = "generic-ehci";
|
||||||
reg = < 0x40000 0x100 >;
|
reg = < 0x40000 0x100 >;
|
||||||
interrupts = < 8 >;
|
interrupts = < 8 >;
|
||||||
|
@ -35,9 +35,6 @@ CONFIG_IP_PNP=y
|
|||||||
CONFIG_IP_PNP_DHCP=y
|
CONFIG_IP_PNP_DHCP=y
|
||||||
CONFIG_IP_PNP_BOOTP=y
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
CONFIG_IP_PNP_RARP=y
|
CONFIG_IP_PNP_RARP=y
|
||||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
# CONFIG_STANDALONE is not set
|
# CONFIG_STANDALONE is not set
|
||||||
@ -99,7 +96,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
||||||
|
@ -34,9 +34,6 @@ CONFIG_IP_PNP=y
|
|||||||
CONFIG_IP_PNP_DHCP=y
|
CONFIG_IP_PNP_DHCP=y
|
||||||
CONFIG_IP_PNP_BOOTP=y
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
CONFIG_IP_PNP_RARP=y
|
CONFIG_IP_PNP_RARP=y
|
||||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
# CONFIG_STANDALONE is not set
|
# CONFIG_STANDALONE is not set
|
||||||
@ -97,7 +94,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
||||||
|
@ -35,9 +35,6 @@ CONFIG_IP_PNP=y
|
|||||||
CONFIG_IP_PNP_DHCP=y
|
CONFIG_IP_PNP_DHCP=y
|
||||||
CONFIG_IP_PNP_BOOTP=y
|
CONFIG_IP_PNP_BOOTP=y
|
||||||
CONFIG_IP_PNP_RARP=y
|
CONFIG_IP_PNP_RARP=y
|
||||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
# CONFIG_STANDALONE is not set
|
# CONFIG_STANDALONE is not set
|
||||||
@ -100,7 +97,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
||||||
|
@ -59,6 +59,5 @@ CONFIG_EXT2_FS_XATTR=y
|
|||||||
CONFIG_TMPFS=y
|
CONFIG_TMPFS=y
|
||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_DEBUG_MEMORY_INIT=y
|
CONFIG_DEBUG_MEMORY_INIT=y
|
||||||
# CONFIG_DEBUG_PREEMPT is not set
|
# CONFIG_DEBUG_PREEMPT is not set
|
||||||
|
@ -59,6 +59,5 @@ CONFIG_EXT2_FS_XATTR=y
|
|||||||
CONFIG_TMPFS=y
|
CONFIG_TMPFS=y
|
||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
# CONFIG_DEBUG_PREEMPT is not set
|
# CONFIG_DEBUG_PREEMPT is not set
|
||||||
|
@ -85,7 +85,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=10
|
||||||
|
@ -56,5 +56,4 @@ CONFIG_EXT2_FS_XATTR=y
|
|||||||
CONFIG_TMPFS=y
|
CONFIG_TMPFS=y
|
||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
# CONFIG_DEBUG_PREEMPT is not set
|
# CONFIG_DEBUG_PREEMPT is not set
|
||||||
|
@ -65,4 +65,3 @@ CONFIG_TMPFS=y
|
|||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
|
@ -63,4 +63,3 @@ CONFIG_TMPFS=y
|
|||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
|
@ -26,9 +26,6 @@ CONFIG_UNIX=y
|
|||||||
CONFIG_UNIX_DIAG=y
|
CONFIG_UNIX_DIAG=y
|
||||||
CONFIG_NET_KEY=y
|
CONFIG_NET_KEY=y
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
@ -37,7 +34,6 @@ CONFIG_DEVTMPFS=y
|
|||||||
# CONFIG_BLK_DEV is not set
|
# CONFIG_BLK_DEV is not set
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
# CONFIG_NET_VENDOR_ARC is not set
|
# CONFIG_NET_VENDOR_ARC is not set
|
||||||
# CONFIG_NET_CADENCE is not set
|
|
||||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||||
CONFIG_EZCHIP_NPS_MANAGEMENT_ENET=y
|
CONFIG_EZCHIP_NPS_MANAGEMENT_ENET=y
|
||||||
# CONFIG_NET_VENDOR_INTEL is not set
|
# CONFIG_NET_VENDOR_INTEL is not set
|
||||||
@ -74,5 +70,5 @@ CONFIG_TMPFS=y
|
|||||||
# CONFIG_MISC_FILESYSTEMS is not set
|
# CONFIG_MISC_FILESYSTEMS is not set
|
||||||
CONFIG_NFS_FS=y
|
CONFIG_NFS_FS=y
|
||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_FTRACE=y
|
CONFIG_FTRACE=y
|
||||||
|
# CONFIG_NET_VENDOR_CADENCE is not set
|
||||||
|
@ -35,15 +35,11 @@ CONFIG_PACKET=y
|
|||||||
CONFIG_UNIX=y
|
CONFIG_UNIX=y
|
||||||
CONFIG_INET=y
|
CONFIG_INET=y
|
||||||
CONFIG_IP_MULTICAST=y
|
CONFIG_IP_MULTICAST=y
|
||||||
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
|
|
||||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
|
||||||
# CONFIG_INET_DIAG is not set
|
# CONFIG_INET_DIAG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
# CONFIG_WIRELESS is not set
|
# CONFIG_WIRELESS is not set
|
||||||
CONFIG_DEVTMPFS=y
|
CONFIG_DEVTMPFS=y
|
||||||
CONFIG_NETDEVICES=y
|
CONFIG_NETDEVICES=y
|
||||||
# CONFIG_NET_CADENCE is not set
|
|
||||||
# CONFIG_NET_VENDOR_BROADCOM is not set
|
# CONFIG_NET_VENDOR_BROADCOM is not set
|
||||||
# CONFIG_NET_VENDOR_INTEL is not set
|
# CONFIG_NET_VENDOR_INTEL is not set
|
||||||
# CONFIG_NET_VENDOR_MARVELL is not set
|
# CONFIG_NET_VENDOR_MARVELL is not set
|
||||||
@ -94,12 +90,11 @@ CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y
|
|||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_DEBUG_FS=y
|
CONFIG_DEBUG_FS=y
|
||||||
CONFIG_HEADERS_INSTALL=y
|
CONFIG_HEADERS_INSTALL=y
|
||||||
CONFIG_HEADERS_CHECK=y
|
|
||||||
CONFIG_DEBUG_SECTION_MISMATCH=y
|
CONFIG_DEBUG_SECTION_MISMATCH=y
|
||||||
CONFIG_MAGIC_SYSRQ=y
|
CONFIG_MAGIC_SYSRQ=y
|
||||||
CONFIG_DEBUG_MEMORY_INIT=y
|
CONFIG_DEBUG_MEMORY_INIT=y
|
||||||
CONFIG_DEBUG_STACKOVERFLOW=y
|
CONFIG_DEBUG_STACKOVERFLOW=y
|
||||||
CONFIG_DETECT_HUNG_TASK=y
|
CONFIG_DETECT_HUNG_TASK=y
|
||||||
CONFIG_SCHEDSTATS=y
|
CONFIG_SCHEDSTATS=y
|
||||||
CONFIG_TIMER_STATS=y
|
|
||||||
# CONFIG_CRYPTO_HW is not set
|
# CONFIG_CRYPTO_HW is not set
|
||||||
|
# CONFIG_NET_VENDOR_CADENCE is not set
|
||||||
|
@ -58,8 +58,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
|
|||||||
# CONFIG_HW_RANDOM is not set
|
# CONFIG_HW_RANDOM is not set
|
||||||
# CONFIG_HWMON is not set
|
# CONFIG_HWMON is not set
|
||||||
CONFIG_FB=y
|
CONFIG_FB=y
|
||||||
CONFIG_ARCPGU_RGB888=y
|
|
||||||
CONFIG_ARCPGU_DISPTYPE=0
|
|
||||||
# CONFIG_VGA_CONSOLE is not set
|
# CONFIG_VGA_CONSOLE is not set
|
||||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||||
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
|
||||||
@ -87,7 +85,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_DEBUG_SHIRQ=y
|
CONFIG_DEBUG_SHIRQ=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
|
@ -91,7 +91,6 @@ CONFIG_NFS_FS=y
|
|||||||
CONFIG_NFS_V3_ACL=y
|
CONFIG_NFS_V3_ACL=y
|
||||||
CONFIG_NLS_CODEPAGE_437=y
|
CONFIG_NLS_CODEPAGE_437=y
|
||||||
CONFIG_NLS_ISO8859_1=y
|
CONFIG_NLS_ISO8859_1=y
|
||||||
# CONFIG_ENABLE_MUST_CHECK is not set
|
|
||||||
CONFIG_STRIP_ASM_SYMS=y
|
CONFIG_STRIP_ASM_SYMS=y
|
||||||
CONFIG_DEBUG_SHIRQ=y
|
CONFIG_DEBUG_SHIRQ=y
|
||||||
CONFIG_SOFTLOCKUP_DETECTOR=y
|
CONFIG_SOFTLOCKUP_DETECTOR=y
|
||||||
|
@ -82,7 +82,7 @@ static inline __attribute__ ((const)) int fls(unsigned int x)
|
|||||||
/*
|
/*
|
||||||
* __fls: Similar to fls, but zero based (0-31)
|
* __fls: Similar to fls, but zero based (0-31)
|
||||||
*/
|
*/
|
||||||
static inline __attribute__ ((const)) int __fls(unsigned long x)
|
static inline __attribute__ ((const)) unsigned long __fls(unsigned long x)
|
||||||
{
|
{
|
||||||
if (!x)
|
if (!x)
|
||||||
return 0;
|
return 0;
|
||||||
@ -131,7 +131,7 @@ static inline __attribute__ ((const)) int fls(unsigned int x)
|
|||||||
/*
|
/*
|
||||||
* __fls: Similar to fls, but zero based (0-31). Also 0 if no bit set
|
* __fls: Similar to fls, but zero based (0-31). Also 0 if no bit set
|
||||||
*/
|
*/
|
||||||
static inline __attribute__ ((const)) int __fls(unsigned long x)
|
static inline __attribute__ ((const)) unsigned long __fls(unsigned long x)
|
||||||
{
|
{
|
||||||
/* FLS insn has exactly same semantics as the API */
|
/* FLS insn has exactly same semantics as the API */
|
||||||
return __builtin_arc_fls(x);
|
return __builtin_arc_fls(x);
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
* r25 contains the kernel current task ptr
|
* r25 contains the kernel current task ptr
|
||||||
* - Defined Stack Switching Macro to be reused in all intr/excp hdlrs
|
* - Defined Stack Switching Macro to be reused in all intr/excp hdlrs
|
||||||
* - Shaved off 11 instructions from RESTORE_ALL_INT1 by using the
|
* - Shaved off 11 instructions from RESTORE_ALL_INT1 by using the
|
||||||
* address Write back load ld.ab instead of seperate ld/add instn
|
* address Write back load ld.ab instead of separate ld/add instn
|
||||||
*
|
*
|
||||||
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
|
* Amit Bhor, Sameer Dhavale: Codito Technologies 2004
|
||||||
*/
|
*/
|
||||||
|
@ -32,7 +32,7 @@ static inline void ioport_unmap(void __iomem *addr)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
extern void iounmap(const void __iomem *addr);
|
extern void iounmap(const volatile void __iomem *addr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* io{read,write}{16,32}be() macros
|
* io{read,write}{16,32}be() macros
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
#define pmd_pfn(pmd) ((pmd_val(pmd) & PAGE_MASK) >> PAGE_SHIFT)
|
#define pmd_pfn(pmd) ((pmd_val(pmd) & PAGE_MASK) >> PAGE_SHIFT)
|
||||||
#define pmd_page(pmd) virt_to_page(pmd_page_vaddr(pmd))
|
#define pmd_page(pmd) virt_to_page(pmd_page_vaddr(pmd))
|
||||||
#define set_pmd(pmdp, pmd) (*(pmdp) = pmd)
|
#define set_pmd(pmdp, pmd) (*(pmdp) = pmd)
|
||||||
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page_vaddr(pmd))
|
#define pmd_pgtable(pmd) ((pgtable_t) pmd_page(pmd))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 4th level paging: pte
|
* 4th level paging: pte
|
||||||
|
@ -385,7 +385,7 @@ irqreturn_t do_IPI(int irq, void *dev_id)
|
|||||||
* API called by platform code to hookup arch-common ISR to their IPI IRQ
|
* API called by platform code to hookup arch-common ISR to their IPI IRQ
|
||||||
*
|
*
|
||||||
* Note: If IPI is provided by platform (vs. say ARC MCIP), their intc setup/map
|
* Note: If IPI is provided by platform (vs. say ARC MCIP), their intc setup/map
|
||||||
* function needs to call call irq_set_percpu_devid() for IPI IRQ, otherwise
|
* function needs to call irq_set_percpu_devid() for IPI IRQ, otherwise
|
||||||
* request_percpu_irq() below will fail
|
* request_percpu_irq() below will fail
|
||||||
*/
|
*/
|
||||||
static DEFINE_PER_CPU(int, ipi_dev);
|
static DEFINE_PER_CPU(int, ipi_dev);
|
||||||
|
@ -750,7 +750,7 @@ static inline void arc_slc_enable(void)
|
|||||||
* -In SMP, if hardware caches are coherent
|
* -In SMP, if hardware caches are coherent
|
||||||
*
|
*
|
||||||
* There's a corollary case, where kernel READs from a userspace mapped page.
|
* There's a corollary case, where kernel READs from a userspace mapped page.
|
||||||
* If the U-mapping is not congruent to to K-mapping, former needs flushing.
|
* If the U-mapping is not congruent to K-mapping, former needs flushing.
|
||||||
*/
|
*/
|
||||||
void flush_dcache_page(struct page *page)
|
void flush_dcache_page(struct page *page)
|
||||||
{
|
{
|
||||||
@ -910,7 +910,7 @@ EXPORT_SYMBOL(flush_icache_range);
|
|||||||
* @vaddr is typically user vaddr (breakpoint) or kernel vaddr (vmalloc)
|
* @vaddr is typically user vaddr (breakpoint) or kernel vaddr (vmalloc)
|
||||||
* However in one instance, when called by kprobe (for a breakpt in
|
* However in one instance, when called by kprobe (for a breakpt in
|
||||||
* builtin kernel code) @vaddr will be paddr only, meaning CDU operation will
|
* builtin kernel code) @vaddr will be paddr only, meaning CDU operation will
|
||||||
* use a paddr to index the cache (despite VIPT). This is fine since since a
|
* use a paddr to index the cache (despite VIPT). This is fine since a
|
||||||
* builtin kernel page will not have any virtual mappings.
|
* builtin kernel page will not have any virtual mappings.
|
||||||
* kprobe on loadable module will be kernel vaddr.
|
* kprobe on loadable module will be kernel vaddr.
|
||||||
*/
|
*/
|
||||||
|
@ -94,7 +94,7 @@ void __iomem *ioremap_prot(phys_addr_t paddr, unsigned long size,
|
|||||||
EXPORT_SYMBOL(ioremap_prot);
|
EXPORT_SYMBOL(ioremap_prot);
|
||||||
|
|
||||||
|
|
||||||
void iounmap(const void __iomem *addr)
|
void iounmap(const volatile void __iomem *addr)
|
||||||
{
|
{
|
||||||
/* weird double cast to handle phys_addr_t > 32 bits */
|
/* weird double cast to handle phys_addr_t > 32 bits */
|
||||||
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
|
if (arc_uncached_addr_space((phys_addr_t)(u32)addr))
|
||||||
|
@ -587,6 +587,10 @@ static inline pgprot_t verify_rwx(pgprot_t old, pgprot_t new, unsigned long star
|
|||||||
{
|
{
|
||||||
unsigned long end;
|
unsigned long end;
|
||||||
|
|
||||||
|
/* Kernel text is rw at boot up */
|
||||||
|
if (system_state == SYSTEM_BOOTING)
|
||||||
|
return new;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 32-bit has some unfixable W+X issues, like EFI code
|
* 32-bit has some unfixable W+X issues, like EFI code
|
||||||
* and writeable data being in the same page. Disable
|
* and writeable data being in the same page. Disable
|
||||||
|
@ -668,6 +668,11 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
|
|||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static bool google_cros_ec_present(void)
|
||||||
|
{
|
||||||
|
return acpi_dev_found("GOOG0004");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Determine which type of backlight interface to use on this system,
|
* Determine which type of backlight interface to use on this system,
|
||||||
* First check cmdline, then dmi quirks, then do autodetect.
|
* First check cmdline, then dmi quirks, then do autodetect.
|
||||||
@ -730,6 +735,13 @@ static enum acpi_backlight_type __acpi_video_get_backlight_type(bool native)
|
|||||||
return acpi_backlight_video;
|
return acpi_backlight_video;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chromebooks that don't have backlight handle in ACPI table
|
||||||
|
* are supposed to use native backlight if it's available.
|
||||||
|
*/
|
||||||
|
if (google_cros_ec_present() && native_available)
|
||||||
|
return acpi_backlight_native;
|
||||||
|
|
||||||
/* No ACPI video (old hw), use vendor specific fw methods. */
|
/* No ACPI video (old hw), use vendor specific fw methods. */
|
||||||
return acpi_backlight_vendor;
|
return acpi_backlight_vendor;
|
||||||
}
|
}
|
||||||
|
@ -20,12 +20,12 @@ static struct gpiod_lookup_table *simatic_ipc_led_gpio_table;
|
|||||||
static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = {
|
static struct gpiod_lookup_table simatic_ipc_led_gpio_table_127e = {
|
||||||
.dev_id = "leds-gpio",
|
.dev_id = "leds-gpio",
|
||||||
.table = {
|
.table = {
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 52, NULL, 1, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 52, NULL, 0, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 53, NULL, 2, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 53, NULL, 1, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 57, NULL, 3, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 57, NULL, 2, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 58, NULL, 4, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 58, NULL, 3, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 60, NULL, 5, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 60, NULL, 4, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 0, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 51, NULL, 5, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 56, NULL, 6, GPIO_ACTIVE_LOW),
|
||||||
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH),
|
GPIO_LOOKUP_IDX("apollolake-pinctrl.0", 59, NULL, 7, GPIO_ACTIVE_HIGH),
|
||||||
},
|
},
|
||||||
|
@ -339,6 +339,28 @@ static int vidioc_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *a
|
|||||||
return vivid_vid_out_g_fbuf(file, fh, a);
|
return vivid_vid_out_g_fbuf(file, fh, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Only support the framebuffer of one of the vivid instances.
|
||||||
|
* Anything else is rejected.
|
||||||
|
*/
|
||||||
|
bool vivid_validate_fb(const struct v4l2_framebuffer *a)
|
||||||
|
{
|
||||||
|
struct vivid_dev *dev;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < n_devs; i++) {
|
||||||
|
dev = vivid_devs[i];
|
||||||
|
if (!dev || !dev->video_pbase)
|
||||||
|
continue;
|
||||||
|
if ((unsigned long)a->base == dev->video_pbase &&
|
||||||
|
a->fmt.width <= dev->display_width &&
|
||||||
|
a->fmt.height <= dev->display_height &&
|
||||||
|
a->fmt.bytesperline <= dev->display_byte_stride)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
static int vidioc_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffer *a)
|
static int vidioc_s_fbuf(struct file *file, void *fh, const struct v4l2_framebuffer *a)
|
||||||
{
|
{
|
||||||
struct video_device *vdev = video_devdata(file);
|
struct video_device *vdev = video_devdata(file);
|
||||||
@ -920,8 +942,12 @@ static int vivid_detect_feature_set(struct vivid_dev *dev, int inst,
|
|||||||
|
|
||||||
/* how many inputs do we have and of what type? */
|
/* how many inputs do we have and of what type? */
|
||||||
dev->num_inputs = num_inputs[inst];
|
dev->num_inputs = num_inputs[inst];
|
||||||
if (dev->num_inputs < 1)
|
if (node_type & 0x20007) {
|
||||||
dev->num_inputs = 1;
|
if (dev->num_inputs < 1)
|
||||||
|
dev->num_inputs = 1;
|
||||||
|
} else {
|
||||||
|
dev->num_inputs = 0;
|
||||||
|
}
|
||||||
if (dev->num_inputs >= MAX_INPUTS)
|
if (dev->num_inputs >= MAX_INPUTS)
|
||||||
dev->num_inputs = MAX_INPUTS;
|
dev->num_inputs = MAX_INPUTS;
|
||||||
for (i = 0; i < dev->num_inputs; i++) {
|
for (i = 0; i < dev->num_inputs; i++) {
|
||||||
@ -938,8 +964,12 @@ static int vivid_detect_feature_set(struct vivid_dev *dev, int inst,
|
|||||||
|
|
||||||
/* how many outputs do we have and of what type? */
|
/* how many outputs do we have and of what type? */
|
||||||
dev->num_outputs = num_outputs[inst];
|
dev->num_outputs = num_outputs[inst];
|
||||||
if (dev->num_outputs < 1)
|
if (node_type & 0x40300) {
|
||||||
dev->num_outputs = 1;
|
if (dev->num_outputs < 1)
|
||||||
|
dev->num_outputs = 1;
|
||||||
|
} else {
|
||||||
|
dev->num_outputs = 0;
|
||||||
|
}
|
||||||
if (dev->num_outputs >= MAX_OUTPUTS)
|
if (dev->num_outputs >= MAX_OUTPUTS)
|
||||||
dev->num_outputs = MAX_OUTPUTS;
|
dev->num_outputs = MAX_OUTPUTS;
|
||||||
for (i = 0; i < dev->num_outputs; i++) {
|
for (i = 0; i < dev->num_outputs; i++) {
|
||||||
|
@ -613,4 +613,6 @@ static inline bool vivid_is_hdmi_out(const struct vivid_dev *dev)
|
|||||||
return dev->output_type[dev->output] == HDMI;
|
return dev->output_type[dev->output] == HDMI;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool vivid_validate_fb(const struct v4l2_framebuffer *a);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -357,7 +357,7 @@ int vivid_fb_init(struct vivid_dev *dev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dev->video_buffer_size = MAX_OSD_HEIGHT * MAX_OSD_WIDTH * 2;
|
dev->video_buffer_size = MAX_OSD_HEIGHT * MAX_OSD_WIDTH * 2;
|
||||||
dev->video_vbase = kzalloc(dev->video_buffer_size, GFP_KERNEL | GFP_DMA32);
|
dev->video_vbase = kzalloc(dev->video_buffer_size, GFP_KERNEL);
|
||||||
if (dev->video_vbase == NULL)
|
if (dev->video_vbase == NULL)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
dev->video_pbase = virt_to_phys(dev->video_vbase);
|
dev->video_pbase = virt_to_phys(dev->video_vbase);
|
||||||
|
@ -453,6 +453,12 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)
|
|||||||
tpg_reset_source(&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap);
|
tpg_reset_source(&dev->tpg, dev->src_rect.width, dev->src_rect.height, dev->field_cap);
|
||||||
dev->crop_cap = dev->src_rect;
|
dev->crop_cap = dev->src_rect;
|
||||||
dev->crop_bounds_cap = dev->src_rect;
|
dev->crop_bounds_cap = dev->src_rect;
|
||||||
|
if (dev->bitmap_cap &&
|
||||||
|
(dev->compose_cap.width != dev->crop_cap.width ||
|
||||||
|
dev->compose_cap.height != dev->crop_cap.height)) {
|
||||||
|
vfree(dev->bitmap_cap);
|
||||||
|
dev->bitmap_cap = NULL;
|
||||||
|
}
|
||||||
dev->compose_cap = dev->crop_cap;
|
dev->compose_cap = dev->crop_cap;
|
||||||
if (V4L2_FIELD_HAS_T_OR_B(dev->field_cap))
|
if (V4L2_FIELD_HAS_T_OR_B(dev->field_cap))
|
||||||
dev->compose_cap.height /= 2;
|
dev->compose_cap.height /= 2;
|
||||||
@ -460,6 +466,14 @@ void vivid_update_format_cap(struct vivid_dev *dev, bool keep_controls)
|
|||||||
tpg_s_video_aspect(&dev->tpg, vivid_get_video_aspect(dev));
|
tpg_s_video_aspect(&dev->tpg, vivid_get_video_aspect(dev));
|
||||||
tpg_s_pixel_aspect(&dev->tpg, vivid_get_pixel_aspect(dev));
|
tpg_s_pixel_aspect(&dev->tpg, vivid_get_pixel_aspect(dev));
|
||||||
tpg_update_mv_step(&dev->tpg);
|
tpg_update_mv_step(&dev->tpg);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* We can be called from within s_ctrl, in that case we can't
|
||||||
|
* modify controls. Luckily we don't need to in that case.
|
||||||
|
*/
|
||||||
|
if (keep_controls)
|
||||||
|
return;
|
||||||
|
|
||||||
dims[0] = roundup(dev->src_rect.width, PIXEL_ARRAY_DIV);
|
dims[0] = roundup(dev->src_rect.width, PIXEL_ARRAY_DIV);
|
||||||
dims[1] = roundup(dev->src_rect.height, PIXEL_ARRAY_DIV);
|
dims[1] = roundup(dev->src_rect.height, PIXEL_ARRAY_DIV);
|
||||||
v4l2_ctrl_modify_dimensions(dev->pixel_array, dims);
|
v4l2_ctrl_modify_dimensions(dev->pixel_array, dims);
|
||||||
@ -913,6 +927,8 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
|||||||
struct vivid_dev *dev = video_drvdata(file);
|
struct vivid_dev *dev = video_drvdata(file);
|
||||||
struct v4l2_rect *crop = &dev->crop_cap;
|
struct v4l2_rect *crop = &dev->crop_cap;
|
||||||
struct v4l2_rect *compose = &dev->compose_cap;
|
struct v4l2_rect *compose = &dev->compose_cap;
|
||||||
|
unsigned orig_compose_w = compose->width;
|
||||||
|
unsigned orig_compose_h = compose->height;
|
||||||
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
|
unsigned factor = V4L2_FIELD_HAS_T_OR_B(dev->field_cap) ? 2 : 1;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1029,17 +1045,17 @@ int vivid_vid_cap_s_selection(struct file *file, void *fh, struct v4l2_selection
|
|||||||
s->r.height /= factor;
|
s->r.height /= factor;
|
||||||
}
|
}
|
||||||
v4l2_rect_map_inside(&s->r, &dev->fmt_cap_rect);
|
v4l2_rect_map_inside(&s->r, &dev->fmt_cap_rect);
|
||||||
if (dev->bitmap_cap && (compose->width != s->r.width ||
|
|
||||||
compose->height != s->r.height)) {
|
|
||||||
vfree(dev->bitmap_cap);
|
|
||||||
dev->bitmap_cap = NULL;
|
|
||||||
}
|
|
||||||
*compose = s->r;
|
*compose = s->r;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dev->bitmap_cap && (compose->width != orig_compose_w ||
|
||||||
|
compose->height != orig_compose_h)) {
|
||||||
|
vfree(dev->bitmap_cap);
|
||||||
|
dev->bitmap_cap = NULL;
|
||||||
|
}
|
||||||
tpg_s_crop_compose(&dev->tpg, crop, compose);
|
tpg_s_crop_compose(&dev->tpg, crop, compose);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1276,7 +1292,14 @@ int vivid_vid_cap_s_fbuf(struct file *file, void *fh,
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (a->fmt.bytesperline < (a->fmt.width * fmt->bit_depth[0]) / 8)
|
if (a->fmt.bytesperline < (a->fmt.width * fmt->bit_depth[0]) / 8)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
if (a->fmt.height * a->fmt.bytesperline < a->fmt.sizeimage)
|
if (a->fmt.bytesperline > a->fmt.sizeimage / a->fmt.height)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Only support the framebuffer of one of the vivid instances.
|
||||||
|
* Anything else is rejected.
|
||||||
|
*/
|
||||||
|
if (!vivid_validate_fb(a))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dev->fb_vbase_cap = phys_to_virt((unsigned long)a->base);
|
dev->fb_vbase_cap = phys_to_virt((unsigned long)a->base);
|
||||||
|
@ -161,6 +161,20 @@ bool v4l2_valid_dv_timings(const struct v4l2_dv_timings *t,
|
|||||||
(bt->interlaced && !(caps & V4L2_DV_BT_CAP_INTERLACED)) ||
|
(bt->interlaced && !(caps & V4L2_DV_BT_CAP_INTERLACED)) ||
|
||||||
(!bt->interlaced && !(caps & V4L2_DV_BT_CAP_PROGRESSIVE)))
|
(!bt->interlaced && !(caps & V4L2_DV_BT_CAP_PROGRESSIVE)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
/* sanity checks for the blanking timings */
|
||||||
|
if (!bt->interlaced &&
|
||||||
|
(bt->il_vbackporch || bt->il_vsync || bt->il_vfrontporch))
|
||||||
|
return false;
|
||||||
|
if (bt->hfrontporch > 2 * bt->width ||
|
||||||
|
bt->hsync > 1024 || bt->hbackporch > 1024)
|
||||||
|
return false;
|
||||||
|
if (bt->vfrontporch > 4096 ||
|
||||||
|
bt->vsync > 128 || bt->vbackporch > 4096)
|
||||||
|
return false;
|
||||||
|
if (bt->interlaced && (bt->il_vfrontporch > 4096 ||
|
||||||
|
bt->il_vsync > 128 || bt->il_vbackporch > 4096))
|
||||||
|
return false;
|
||||||
return fnc == NULL || fnc(t, fnc_handle);
|
return fnc == NULL || fnc(t, fnc_handle);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(v4l2_valid_dv_timings);
|
EXPORT_SYMBOL_GPL(v4l2_valid_dv_timings);
|
||||||
|
@ -322,14 +322,14 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
|
|||||||
&mscan_clksrc);
|
&mscan_clksrc);
|
||||||
if (!priv->can.clock.freq) {
|
if (!priv->can.clock.freq) {
|
||||||
dev_err(&ofdev->dev, "couldn't get MSCAN clock properties\n");
|
dev_err(&ofdev->dev, "couldn't get MSCAN clock properties\n");
|
||||||
goto exit_free_mscan;
|
goto exit_put_clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = register_mscandev(dev, mscan_clksrc);
|
err = register_mscandev(dev, mscan_clksrc);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&ofdev->dev, "registering %s failed (err=%d)\n",
|
dev_err(&ofdev->dev, "registering %s failed (err=%d)\n",
|
||||||
DRV_NAME, err);
|
DRV_NAME, err);
|
||||||
goto exit_free_mscan;
|
goto exit_put_clock;
|
||||||
}
|
}
|
||||||
|
|
||||||
dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
|
dev_info(&ofdev->dev, "MSCAN at 0x%p, irq %d, clock %d Hz\n",
|
||||||
@ -337,7 +337,9 @@ static int mpc5xxx_can_probe(struct platform_device *ofdev)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
exit_free_mscan:
|
exit_put_clock:
|
||||||
|
if (data->put_clock)
|
||||||
|
data->put_clock(ofdev);
|
||||||
free_candev(dev);
|
free_candev(dev);
|
||||||
exit_dispose_irq:
|
exit_dispose_irq:
|
||||||
irq_dispose_mapping(irq);
|
irq_dispose_mapping(irq);
|
||||||
|
@ -1157,11 +1157,13 @@ static void rcar_canfd_handle_global_receive(struct rcar_canfd_global *gpriv, u3
|
|||||||
{
|
{
|
||||||
struct rcar_canfd_channel *priv = gpriv->ch[ch];
|
struct rcar_canfd_channel *priv = gpriv->ch[ch];
|
||||||
u32 ridx = ch + RCANFD_RFFIFO_IDX;
|
u32 ridx = ch + RCANFD_RFFIFO_IDX;
|
||||||
u32 sts;
|
u32 sts, cc;
|
||||||
|
|
||||||
/* Handle Rx interrupts */
|
/* Handle Rx interrupts */
|
||||||
sts = rcar_canfd_read(priv->base, RCANFD_RFSTS(gpriv, ridx));
|
sts = rcar_canfd_read(priv->base, RCANFD_RFSTS(gpriv, ridx));
|
||||||
if (likely(sts & RCANFD_RFSTS_RFIF)) {
|
cc = rcar_canfd_read(priv->base, RCANFD_RFCC(gpriv, ridx));
|
||||||
|
if (likely(sts & RCANFD_RFSTS_RFIF &&
|
||||||
|
cc & RCANFD_RFCC_RFIE)) {
|
||||||
if (napi_schedule_prep(&priv->napi)) {
|
if (napi_schedule_prep(&priv->napi)) {
|
||||||
/* Disable Rx FIFO interrupts */
|
/* Disable Rx FIFO interrupts */
|
||||||
rcar_canfd_clear_bit(priv->base,
|
rcar_canfd_clear_bit(priv->base,
|
||||||
@ -1244,11 +1246,9 @@ static void rcar_canfd_handle_channel_tx(struct rcar_canfd_global *gpriv, u32 ch
|
|||||||
|
|
||||||
static irqreturn_t rcar_canfd_channel_tx_interrupt(int irq, void *dev_id)
|
static irqreturn_t rcar_canfd_channel_tx_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct rcar_canfd_global *gpriv = dev_id;
|
struct rcar_canfd_channel *priv = dev_id;
|
||||||
u32 ch;
|
|
||||||
|
|
||||||
for_each_set_bit(ch, &gpriv->channels_mask, gpriv->max_channels)
|
rcar_canfd_handle_channel_tx(priv->gpriv, priv->channel);
|
||||||
rcar_canfd_handle_channel_tx(gpriv, ch);
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@ -1276,11 +1276,9 @@ static void rcar_canfd_handle_channel_err(struct rcar_canfd_global *gpriv, u32 c
|
|||||||
|
|
||||||
static irqreturn_t rcar_canfd_channel_err_interrupt(int irq, void *dev_id)
|
static irqreturn_t rcar_canfd_channel_err_interrupt(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
struct rcar_canfd_global *gpriv = dev_id;
|
struct rcar_canfd_channel *priv = dev_id;
|
||||||
u32 ch;
|
|
||||||
|
|
||||||
for_each_set_bit(ch, &gpriv->channels_mask, gpriv->max_channels)
|
rcar_canfd_handle_channel_err(priv->gpriv, priv->channel);
|
||||||
rcar_canfd_handle_channel_err(gpriv, ch);
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
@ -1721,6 +1719,7 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||||||
priv->ndev = ndev;
|
priv->ndev = ndev;
|
||||||
priv->base = gpriv->base;
|
priv->base = gpriv->base;
|
||||||
priv->channel = ch;
|
priv->channel = ch;
|
||||||
|
priv->gpriv = gpriv;
|
||||||
priv->can.clock.freq = fcan_freq;
|
priv->can.clock.freq = fcan_freq;
|
||||||
dev_info(&pdev->dev, "can_clk rate is %u\n", priv->can.clock.freq);
|
dev_info(&pdev->dev, "can_clk rate is %u\n", priv->can.clock.freq);
|
||||||
|
|
||||||
@ -1749,7 +1748,7 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||||||
}
|
}
|
||||||
err = devm_request_irq(&pdev->dev, err_irq,
|
err = devm_request_irq(&pdev->dev, err_irq,
|
||||||
rcar_canfd_channel_err_interrupt, 0,
|
rcar_canfd_channel_err_interrupt, 0,
|
||||||
irq_name, gpriv);
|
irq_name, priv);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "devm_request_irq CH Err(%d) failed, error %d\n",
|
dev_err(&pdev->dev, "devm_request_irq CH Err(%d) failed, error %d\n",
|
||||||
err_irq, err);
|
err_irq, err);
|
||||||
@ -1763,7 +1762,7 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||||||
}
|
}
|
||||||
err = devm_request_irq(&pdev->dev, tx_irq,
|
err = devm_request_irq(&pdev->dev, tx_irq,
|
||||||
rcar_canfd_channel_tx_interrupt, 0,
|
rcar_canfd_channel_tx_interrupt, 0,
|
||||||
irq_name, gpriv);
|
irq_name, priv);
|
||||||
if (err) {
|
if (err) {
|
||||||
dev_err(&pdev->dev, "devm_request_irq Tx (%d) failed, error %d\n",
|
dev_err(&pdev->dev, "devm_request_irq Tx (%d) failed, error %d\n",
|
||||||
tx_irq, err);
|
tx_irq, err);
|
||||||
@ -1789,7 +1788,6 @@ static int rcar_canfd_channel_probe(struct rcar_canfd_global *gpriv, u32 ch,
|
|||||||
|
|
||||||
priv->can.do_set_mode = rcar_canfd_do_set_mode;
|
priv->can.do_set_mode = rcar_canfd_do_set_mode;
|
||||||
priv->can.do_get_berr_counter = rcar_canfd_get_berr_counter;
|
priv->can.do_get_berr_counter = rcar_canfd_get_berr_counter;
|
||||||
priv->gpriv = gpriv;
|
|
||||||
SET_NETDEV_DEV(ndev, &pdev->dev);
|
SET_NETDEV_DEV(ndev, &pdev->dev);
|
||||||
|
|
||||||
netif_napi_add_weight(ndev, &priv->napi, rcar_canfd_rx_poll,
|
netif_napi_add_weight(ndev, &priv->napi, rcar_canfd_rx_poll,
|
||||||
|
@ -1415,11 +1415,14 @@ static int mcp251x_can_probe(struct spi_device *spi)
|
|||||||
|
|
||||||
ret = mcp251x_gpio_setup(priv);
|
ret = mcp251x_gpio_setup(priv);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error_probe;
|
goto out_unregister_candev;
|
||||||
|
|
||||||
netdev_info(net, "MCP%x successfully initialized.\n", priv->model);
|
netdev_info(net, "MCP%x successfully initialized.\n", priv->model);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
out_unregister_candev:
|
||||||
|
unregister_candev(net);
|
||||||
|
|
||||||
error_probe:
|
error_probe:
|
||||||
destroy_workqueue(priv->wq);
|
destroy_workqueue(priv->wq);
|
||||||
priv->wq = NULL;
|
priv->wq = NULL;
|
||||||
|
@ -1972,7 +1972,7 @@ static int kvaser_usb_hydra_start_chip(struct kvaser_usb_net_priv *priv)
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
init_completion(&priv->start_comp);
|
reinit_completion(&priv->start_comp);
|
||||||
|
|
||||||
err = kvaser_usb_hydra_send_simple_cmd(priv->dev, CMD_START_CHIP_REQ,
|
err = kvaser_usb_hydra_send_simple_cmd(priv->dev, CMD_START_CHIP_REQ,
|
||||||
priv->channel);
|
priv->channel);
|
||||||
@ -1990,7 +1990,7 @@ static int kvaser_usb_hydra_stop_chip(struct kvaser_usb_net_priv *priv)
|
|||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
init_completion(&priv->stop_comp);
|
reinit_completion(&priv->stop_comp);
|
||||||
|
|
||||||
/* Make sure we do not report invalid BUS_OFF from CMD_CHIP_STATE_EVENT
|
/* Make sure we do not report invalid BUS_OFF from CMD_CHIP_STATE_EVENT
|
||||||
* see comment in kvaser_usb_hydra_update_state()
|
* see comment in kvaser_usb_hydra_update_state()
|
||||||
|
@ -1637,7 +1637,7 @@ static int kvaser_usb_leaf_start_chip(struct kvaser_usb_net_priv *priv)
|
|||||||
|
|
||||||
leaf->joining_bus = true;
|
leaf->joining_bus = true;
|
||||||
|
|
||||||
init_completion(&priv->start_comp);
|
reinit_completion(&priv->start_comp);
|
||||||
|
|
||||||
err = kvaser_usb_leaf_send_simple_cmd(priv->dev, CMD_START_CHIP,
|
err = kvaser_usb_leaf_send_simple_cmd(priv->dev, CMD_START_CHIP,
|
||||||
priv->channel);
|
priv->channel);
|
||||||
@ -1656,7 +1656,7 @@ static int kvaser_usb_leaf_stop_chip(struct kvaser_usb_net_priv *priv)
|
|||||||
struct kvaser_usb_net_leaf_priv *leaf = priv->sub_priv;
|
struct kvaser_usb_net_leaf_priv *leaf = priv->sub_priv;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
init_completion(&priv->stop_comp);
|
reinit_completion(&priv->stop_comp);
|
||||||
|
|
||||||
cancel_delayed_work(&leaf->chip_state_req_work);
|
cancel_delayed_work(&leaf->chip_state_req_work);
|
||||||
|
|
||||||
|
@ -571,8 +571,6 @@ static netdev_tx_t bcm4908_enet_start_xmit(struct sk_buff *skb, struct net_devic
|
|||||||
|
|
||||||
if (++ring->write_idx == ring->length - 1)
|
if (++ring->write_idx == ring->length - 1)
|
||||||
ring->write_idx = 0;
|
ring->write_idx = 0;
|
||||||
enet->netdev->stats.tx_bytes += skb->len;
|
|
||||||
enet->netdev->stats.tx_packets++;
|
|
||||||
|
|
||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
@ -654,6 +652,7 @@ static int bcm4908_enet_poll_tx(struct napi_struct *napi, int weight)
|
|||||||
struct bcm4908_enet_dma_ring_bd *buf_desc;
|
struct bcm4908_enet_dma_ring_bd *buf_desc;
|
||||||
struct bcm4908_enet_dma_ring_slot *slot;
|
struct bcm4908_enet_dma_ring_slot *slot;
|
||||||
struct device *dev = enet->dev;
|
struct device *dev = enet->dev;
|
||||||
|
unsigned int bytes = 0;
|
||||||
int handled = 0;
|
int handled = 0;
|
||||||
|
|
||||||
while (handled < weight && tx_ring->read_idx != tx_ring->write_idx) {
|
while (handled < weight && tx_ring->read_idx != tx_ring->write_idx) {
|
||||||
@ -664,12 +663,17 @@ static int bcm4908_enet_poll_tx(struct napi_struct *napi, int weight)
|
|||||||
|
|
||||||
dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_TO_DEVICE);
|
dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_TO_DEVICE);
|
||||||
dev_kfree_skb(slot->skb);
|
dev_kfree_skb(slot->skb);
|
||||||
if (++tx_ring->read_idx == tx_ring->length)
|
|
||||||
tx_ring->read_idx = 0;
|
|
||||||
|
|
||||||
handled++;
|
handled++;
|
||||||
|
bytes += slot->len;
|
||||||
|
|
||||||
|
if (++tx_ring->read_idx == tx_ring->length)
|
||||||
|
tx_ring->read_idx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enet->netdev->stats.tx_packets += handled;
|
||||||
|
enet->netdev->stats.tx_bytes += bytes;
|
||||||
|
|
||||||
if (handled < weight) {
|
if (handled < weight) {
|
||||||
napi_complete_done(napi, handled);
|
napi_complete_done(napi, handled);
|
||||||
bcm4908_enet_dma_ring_intrs_on(enet, tx_ring);
|
bcm4908_enet_dma_ring_intrs_on(enet, tx_ring);
|
||||||
|
@ -1991,6 +1991,9 @@ static int bcm_sysport_open(struct net_device *dev)
|
|||||||
goto out_clk_disable;
|
goto out_clk_disable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Indicate that the MAC is responsible for PHY PM */
|
||||||
|
phydev->mac_managed_pm = true;
|
||||||
|
|
||||||
/* Reset house keeping link status */
|
/* Reset house keeping link status */
|
||||||
priv->old_duplex = -1;
|
priv->old_duplex = -1;
|
||||||
priv->old_link = -1;
|
priv->old_link = -1;
|
||||||
|
@ -2090,7 +2090,12 @@ static void enetc_setup_rxbdr(struct enetc_hw *hw, struct enetc_bdr *rx_ring)
|
|||||||
else
|
else
|
||||||
enetc_rxbdr_wr(hw, idx, ENETC_RBBSR, ENETC_RXB_DMA_SIZE);
|
enetc_rxbdr_wr(hw, idx, ENETC_RBBSR, ENETC_RXB_DMA_SIZE);
|
||||||
|
|
||||||
|
/* Also prepare the consumer index in case page allocation never
|
||||||
|
* succeeds. In that case, hardware will never advance producer index
|
||||||
|
* to match consumer index, and will drop all frames.
|
||||||
|
*/
|
||||||
enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
|
enetc_rxbdr_wr(hw, idx, ENETC_RBPIR, 0);
|
||||||
|
enetc_rxbdr_wr(hw, idx, ENETC_RBCIR, 1);
|
||||||
|
|
||||||
/* enable Rx ints by setting pkt thr to 1 */
|
/* enable Rx ints by setting pkt thr to 1 */
|
||||||
enetc_rxbdr_wr(hw, idx, ENETC_RBICR0, ENETC_RBICR0_ICEN | 0x1);
|
enetc_rxbdr_wr(hw, idx, ENETC_RBICR0, ENETC_RBICR0_ICEN | 0x1);
|
||||||
|
@ -2375,6 +2375,31 @@ static u32 fec_enet_register_offset[] = {
|
|||||||
IEEE_R_DROP, IEEE_R_FRAME_OK, IEEE_R_CRC, IEEE_R_ALIGN, IEEE_R_MACERR,
|
IEEE_R_DROP, IEEE_R_FRAME_OK, IEEE_R_CRC, IEEE_R_ALIGN, IEEE_R_MACERR,
|
||||||
IEEE_R_FDXFC, IEEE_R_OCTETS_OK
|
IEEE_R_FDXFC, IEEE_R_OCTETS_OK
|
||||||
};
|
};
|
||||||
|
/* for i.MX6ul */
|
||||||
|
static u32 fec_enet_register_offset_6ul[] = {
|
||||||
|
FEC_IEVENT, FEC_IMASK, FEC_R_DES_ACTIVE_0, FEC_X_DES_ACTIVE_0,
|
||||||
|
FEC_ECNTRL, FEC_MII_DATA, FEC_MII_SPEED, FEC_MIB_CTRLSTAT, FEC_R_CNTRL,
|
||||||
|
FEC_X_CNTRL, FEC_ADDR_LOW, FEC_ADDR_HIGH, FEC_OPD, FEC_TXIC0, FEC_RXIC0,
|
||||||
|
FEC_HASH_TABLE_HIGH, FEC_HASH_TABLE_LOW, FEC_GRP_HASH_TABLE_HIGH,
|
||||||
|
FEC_GRP_HASH_TABLE_LOW, FEC_X_WMRK, FEC_R_DES_START_0,
|
||||||
|
FEC_X_DES_START_0, FEC_R_BUFF_SIZE_0, FEC_R_FIFO_RSFL, FEC_R_FIFO_RSEM,
|
||||||
|
FEC_R_FIFO_RAEM, FEC_R_FIFO_RAFL, FEC_RACC,
|
||||||
|
RMON_T_DROP, RMON_T_PACKETS, RMON_T_BC_PKT, RMON_T_MC_PKT,
|
||||||
|
RMON_T_CRC_ALIGN, RMON_T_UNDERSIZE, RMON_T_OVERSIZE, RMON_T_FRAG,
|
||||||
|
RMON_T_JAB, RMON_T_COL, RMON_T_P64, RMON_T_P65TO127, RMON_T_P128TO255,
|
||||||
|
RMON_T_P256TO511, RMON_T_P512TO1023, RMON_T_P1024TO2047,
|
||||||
|
RMON_T_P_GTE2048, RMON_T_OCTETS,
|
||||||
|
IEEE_T_DROP, IEEE_T_FRAME_OK, IEEE_T_1COL, IEEE_T_MCOL, IEEE_T_DEF,
|
||||||
|
IEEE_T_LCOL, IEEE_T_EXCOL, IEEE_T_MACERR, IEEE_T_CSERR, IEEE_T_SQE,
|
||||||
|
IEEE_T_FDXFC, IEEE_T_OCTETS_OK,
|
||||||
|
RMON_R_PACKETS, RMON_R_BC_PKT, RMON_R_MC_PKT, RMON_R_CRC_ALIGN,
|
||||||
|
RMON_R_UNDERSIZE, RMON_R_OVERSIZE, RMON_R_FRAG, RMON_R_JAB,
|
||||||
|
RMON_R_RESVD_O, RMON_R_P64, RMON_R_P65TO127, RMON_R_P128TO255,
|
||||||
|
RMON_R_P256TO511, RMON_R_P512TO1023, RMON_R_P1024TO2047,
|
||||||
|
RMON_R_P_GTE2048, RMON_R_OCTETS,
|
||||||
|
IEEE_R_DROP, IEEE_R_FRAME_OK, IEEE_R_CRC, IEEE_R_ALIGN, IEEE_R_MACERR,
|
||||||
|
IEEE_R_FDXFC, IEEE_R_OCTETS_OK
|
||||||
|
};
|
||||||
#else
|
#else
|
||||||
static __u32 fec_enet_register_version = 1;
|
static __u32 fec_enet_register_version = 1;
|
||||||
static u32 fec_enet_register_offset[] = {
|
static u32 fec_enet_register_offset[] = {
|
||||||
@ -2399,7 +2424,24 @@ static void fec_enet_get_regs(struct net_device *ndev,
|
|||||||
u32 *buf = (u32 *)regbuf;
|
u32 *buf = (u32 *)regbuf;
|
||||||
u32 i, off;
|
u32 i, off;
|
||||||
int ret;
|
int ret;
|
||||||
|
#if defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x) || \
|
||||||
|
defined(CONFIG_M520x) || defined(CONFIG_M532x) || defined(CONFIG_ARM) || \
|
||||||
|
defined(CONFIG_ARM64) || defined(CONFIG_COMPILE_TEST)
|
||||||
|
u32 *reg_list;
|
||||||
|
u32 reg_cnt;
|
||||||
|
|
||||||
|
if (!of_machine_is_compatible("fsl,imx6ul")) {
|
||||||
|
reg_list = fec_enet_register_offset;
|
||||||
|
reg_cnt = ARRAY_SIZE(fec_enet_register_offset);
|
||||||
|
} else {
|
||||||
|
reg_list = fec_enet_register_offset_6ul;
|
||||||
|
reg_cnt = ARRAY_SIZE(fec_enet_register_offset_6ul);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
/* coldfire */
|
||||||
|
static u32 *reg_list = fec_enet_register_offset;
|
||||||
|
static const u32 reg_cnt = ARRAY_SIZE(fec_enet_register_offset);
|
||||||
|
#endif
|
||||||
ret = pm_runtime_resume_and_get(dev);
|
ret = pm_runtime_resume_and_get(dev);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return;
|
return;
|
||||||
@ -2408,8 +2450,8 @@ static void fec_enet_get_regs(struct net_device *ndev,
|
|||||||
|
|
||||||
memset(buf, 0, regs->len);
|
memset(buf, 0, regs->len);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(fec_enet_register_offset); i++) {
|
for (i = 0; i < reg_cnt; i++) {
|
||||||
off = fec_enet_register_offset[i];
|
off = reg_list[i];
|
||||||
|
|
||||||
if ((off == FEC_R_BOUND || off == FEC_R_FSTART) &&
|
if ((off == FEC_R_BOUND || off == FEC_R_FSTART) &&
|
||||||
!(fep->quirks & FEC_QUIRK_HAS_FRREG))
|
!(fep->quirks & FEC_QUIRK_HAS_FRREG))
|
||||||
|
@ -2900,6 +2900,7 @@ static struct device *ehea_register_port(struct ehea_port *port,
|
|||||||
ret = of_device_register(&port->ofdev);
|
ret = of_device_register(&port->ofdev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
pr_err("failed to register device. ret=%d\n", ret);
|
pr_err("failed to register device. ret=%d\n", ret);
|
||||||
|
put_device(&port->ofdev.dev);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3185,10 +3185,17 @@ static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd)
|
|||||||
|
|
||||||
if (cmd->flow_type == TCP_V4_FLOW ||
|
if (cmd->flow_type == TCP_V4_FLOW ||
|
||||||
cmd->flow_type == UDP_V4_FLOW) {
|
cmd->flow_type == UDP_V4_FLOW) {
|
||||||
if (i_set & I40E_L3_SRC_MASK)
|
if (hw->mac.type == I40E_MAC_X722) {
|
||||||
cmd->data |= RXH_IP_SRC;
|
if (i_set & I40E_X722_L3_SRC_MASK)
|
||||||
if (i_set & I40E_L3_DST_MASK)
|
cmd->data |= RXH_IP_SRC;
|
||||||
cmd->data |= RXH_IP_DST;
|
if (i_set & I40E_X722_L3_DST_MASK)
|
||||||
|
cmd->data |= RXH_IP_DST;
|
||||||
|
} else {
|
||||||
|
if (i_set & I40E_L3_SRC_MASK)
|
||||||
|
cmd->data |= RXH_IP_SRC;
|
||||||
|
if (i_set & I40E_L3_DST_MASK)
|
||||||
|
cmd->data |= RXH_IP_DST;
|
||||||
|
}
|
||||||
} else if (cmd->flow_type == TCP_V6_FLOW ||
|
} else if (cmd->flow_type == TCP_V6_FLOW ||
|
||||||
cmd->flow_type == UDP_V6_FLOW) {
|
cmd->flow_type == UDP_V6_FLOW) {
|
||||||
if (i_set & I40E_L3_V6_SRC_MASK)
|
if (i_set & I40E_L3_V6_SRC_MASK)
|
||||||
@ -3546,12 +3553,15 @@ static int i40e_get_rxnfc(struct net_device *netdev, struct ethtool_rxnfc *cmd,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* i40e_get_rss_hash_bits - Read RSS Hash bits from register
|
* i40e_get_rss_hash_bits - Read RSS Hash bits from register
|
||||||
|
* @hw: hw structure
|
||||||
* @nfc: pointer to user request
|
* @nfc: pointer to user request
|
||||||
* @i_setc: bits currently set
|
* @i_setc: bits currently set
|
||||||
*
|
*
|
||||||
* Returns value of bits to be set per user request
|
* Returns value of bits to be set per user request
|
||||||
**/
|
**/
|
||||||
static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc)
|
static u64 i40e_get_rss_hash_bits(struct i40e_hw *hw,
|
||||||
|
struct ethtool_rxnfc *nfc,
|
||||||
|
u64 i_setc)
|
||||||
{
|
{
|
||||||
u64 i_set = i_setc;
|
u64 i_set = i_setc;
|
||||||
u64 src_l3 = 0, dst_l3 = 0;
|
u64 src_l3 = 0, dst_l3 = 0;
|
||||||
@ -3570,8 +3580,13 @@ static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc)
|
|||||||
dst_l3 = I40E_L3_V6_DST_MASK;
|
dst_l3 = I40E_L3_V6_DST_MASK;
|
||||||
} else if (nfc->flow_type == TCP_V4_FLOW ||
|
} else if (nfc->flow_type == TCP_V4_FLOW ||
|
||||||
nfc->flow_type == UDP_V4_FLOW) {
|
nfc->flow_type == UDP_V4_FLOW) {
|
||||||
src_l3 = I40E_L3_SRC_MASK;
|
if (hw->mac.type == I40E_MAC_X722) {
|
||||||
dst_l3 = I40E_L3_DST_MASK;
|
src_l3 = I40E_X722_L3_SRC_MASK;
|
||||||
|
dst_l3 = I40E_X722_L3_DST_MASK;
|
||||||
|
} else {
|
||||||
|
src_l3 = I40E_L3_SRC_MASK;
|
||||||
|
dst_l3 = I40E_L3_DST_MASK;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Any other flow type are not supported here */
|
/* Any other flow type are not supported here */
|
||||||
return i_set;
|
return i_set;
|
||||||
@ -3589,6 +3604,7 @@ static u64 i40e_get_rss_hash_bits(struct ethtool_rxnfc *nfc, u64 i_setc)
|
|||||||
return i_set;
|
return i_set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define FLOW_PCTYPES_SIZE 64
|
||||||
/**
|
/**
|
||||||
* i40e_set_rss_hash_opt - Enable/Disable flow types for RSS hash
|
* i40e_set_rss_hash_opt - Enable/Disable flow types for RSS hash
|
||||||
* @pf: pointer to the physical function struct
|
* @pf: pointer to the physical function struct
|
||||||
@ -3601,9 +3617,11 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
|||||||
struct i40e_hw *hw = &pf->hw;
|
struct i40e_hw *hw = &pf->hw;
|
||||||
u64 hena = (u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0)) |
|
u64 hena = (u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(0)) |
|
||||||
((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32);
|
((u64)i40e_read_rx_ctl(hw, I40E_PFQF_HENA(1)) << 32);
|
||||||
u8 flow_pctype = 0;
|
DECLARE_BITMAP(flow_pctypes, FLOW_PCTYPES_SIZE);
|
||||||
u64 i_set, i_setc;
|
u64 i_set, i_setc;
|
||||||
|
|
||||||
|
bitmap_zero(flow_pctypes, FLOW_PCTYPES_SIZE);
|
||||||
|
|
||||||
if (pf->flags & I40E_FLAG_MFP_ENABLED) {
|
if (pf->flags & I40E_FLAG_MFP_ENABLED) {
|
||||||
dev_err(&pf->pdev->dev,
|
dev_err(&pf->pdev->dev,
|
||||||
"Change of RSS hash input set is not supported when MFP mode is enabled\n");
|
"Change of RSS hash input set is not supported when MFP mode is enabled\n");
|
||||||
@ -3619,36 +3637,35 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
|||||||
|
|
||||||
switch (nfc->flow_type) {
|
switch (nfc->flow_type) {
|
||||||
case TCP_V4_FLOW:
|
case TCP_V4_FLOW:
|
||||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_TCP;
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_TCP, flow_pctypes);
|
||||||
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
||||||
hena |=
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK,
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
|
flow_pctypes);
|
||||||
break;
|
break;
|
||||||
case TCP_V6_FLOW:
|
case TCP_V6_FLOW:
|
||||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_TCP;
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_TCP, flow_pctypes);
|
||||||
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
||||||
hena |=
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK,
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK);
|
flow_pctypes);
|
||||||
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
|
||||||
hena |=
|
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK);
|
|
||||||
break;
|
break;
|
||||||
case UDP_V4_FLOW:
|
case UDP_V4_FLOW:
|
||||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP;
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV4_UDP, flow_pctypes);
|
||||||
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) {
|
||||||
hena |=
|
set_bit(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP,
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP) |
|
flow_pctypes);
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP);
|
set_bit(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP,
|
||||||
|
flow_pctypes);
|
||||||
|
}
|
||||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4);
|
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV4);
|
||||||
break;
|
break;
|
||||||
case UDP_V6_FLOW:
|
case UDP_V6_FLOW:
|
||||||
flow_pctype = I40E_FILTER_PCTYPE_NONF_IPV6_UDP;
|
set_bit(I40E_FILTER_PCTYPE_NONF_IPV6_UDP, flow_pctypes);
|
||||||
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE)
|
if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) {
|
||||||
hena |=
|
set_bit(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP,
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP) |
|
flow_pctypes);
|
||||||
BIT_ULL(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP);
|
set_bit(I40E_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP,
|
||||||
|
flow_pctypes);
|
||||||
|
}
|
||||||
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6);
|
hena |= BIT_ULL(I40E_FILTER_PCTYPE_FRAG_IPV6);
|
||||||
break;
|
break;
|
||||||
case AH_ESP_V4_FLOW:
|
case AH_ESP_V4_FLOW:
|
||||||
@ -3681,17 +3698,20 @@ static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flow_pctype) {
|
if (bitmap_weight(flow_pctypes, FLOW_PCTYPES_SIZE)) {
|
||||||
i_setc = (u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0,
|
u8 flow_id;
|
||||||
flow_pctype)) |
|
|
||||||
((u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1,
|
for_each_set_bit(flow_id, flow_pctypes, FLOW_PCTYPES_SIZE) {
|
||||||
flow_pctype)) << 32);
|
i_setc = (u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, flow_id)) |
|
||||||
i_set = i40e_get_rss_hash_bits(nfc, i_setc);
|
((u64)i40e_read_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_id)) << 32);
|
||||||
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, flow_pctype),
|
i_set = i40e_get_rss_hash_bits(&pf->hw, nfc, i_setc);
|
||||||
(u32)i_set);
|
|
||||||
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_pctype),
|
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(0, flow_id),
|
||||||
(u32)(i_set >> 32));
|
(u32)i_set);
|
||||||
hena |= BIT_ULL(flow_pctype);
|
i40e_write_rx_ctl(hw, I40E_GLQF_HASH_INSET(1, flow_id),
|
||||||
|
(u32)(i_set >> 32));
|
||||||
|
hena |= BIT_ULL(flow_id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena);
|
i40e_write_rx_ctl(hw, I40E_PFQF_HENA(0), (u32)hena);
|
||||||
|
@ -1404,6 +1404,10 @@ struct i40e_lldp_variables {
|
|||||||
#define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000
|
#define I40E_PFQF_CTL_0_HASHLUTSIZE_512 0x00010000
|
||||||
|
|
||||||
/* INPUT SET MASK for RSS, flow director, and flexible payload */
|
/* INPUT SET MASK for RSS, flow director, and flexible payload */
|
||||||
|
#define I40E_X722_L3_SRC_SHIFT 49
|
||||||
|
#define I40E_X722_L3_SRC_MASK (0x3ULL << I40E_X722_L3_SRC_SHIFT)
|
||||||
|
#define I40E_X722_L3_DST_SHIFT 41
|
||||||
|
#define I40E_X722_L3_DST_MASK (0x3ULL << I40E_X722_L3_DST_SHIFT)
|
||||||
#define I40E_L3_SRC_SHIFT 47
|
#define I40E_L3_SRC_SHIFT 47
|
||||||
#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT)
|
#define I40E_L3_SRC_MASK (0x3ULL << I40E_L3_SRC_SHIFT)
|
||||||
#define I40E_L3_V6_SRC_SHIFT 43
|
#define I40E_L3_V6_SRC_SHIFT 43
|
||||||
|
@ -1536,10 +1536,12 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
|||||||
if (test_bit(__I40E_VF_RESETS_DISABLED, pf->state))
|
if (test_bit(__I40E_VF_RESETS_DISABLED, pf->state))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
/* If the VFs have been disabled, this means something else is
|
/* Bail out if VFs are disabled. */
|
||||||
* resetting the VF, so we shouldn't continue.
|
if (test_bit(__I40E_VF_DISABLE, pf->state))
|
||||||
*/
|
return true;
|
||||||
if (test_and_set_bit(__I40E_VF_DISABLE, pf->state))
|
|
||||||
|
/* If VF is being reset already we don't need to continue. */
|
||||||
|
if (test_and_set_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
i40e_trigger_vf_reset(vf, flr);
|
i40e_trigger_vf_reset(vf, flr);
|
||||||
@ -1576,7 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
|
|||||||
i40e_cleanup_reset_vf(vf);
|
i40e_cleanup_reset_vf(vf);
|
||||||
|
|
||||||
i40e_flush(hw);
|
i40e_flush(hw);
|
||||||
clear_bit(__I40E_VF_DISABLE, pf->state);
|
clear_bit(I40E_VF_STATE_RESETTING, &vf->vf_states);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -1609,8 +1611,12 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* Begin reset on all VFs at once */
|
/* Begin reset on all VFs at once */
|
||||||
for (v = 0; v < pf->num_alloc_vfs; v++)
|
for (v = 0; v < pf->num_alloc_vfs; v++) {
|
||||||
i40e_trigger_vf_reset(&pf->vf[v], flr);
|
vf = &pf->vf[v];
|
||||||
|
/* If VF is being reset no need to trigger reset again */
|
||||||
|
if (!test_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||||
|
i40e_trigger_vf_reset(&pf->vf[v], flr);
|
||||||
|
}
|
||||||
|
|
||||||
/* HW requires some time to make sure it can flush the FIFO for a VF
|
/* HW requires some time to make sure it can flush the FIFO for a VF
|
||||||
* when it resets it. Poll the VPGEN_VFRSTAT register for each VF in
|
* when it resets it. Poll the VPGEN_VFRSTAT register for each VF in
|
||||||
@ -1626,9 +1632,11 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
|
|||||||
*/
|
*/
|
||||||
while (v < pf->num_alloc_vfs) {
|
while (v < pf->num_alloc_vfs) {
|
||||||
vf = &pf->vf[v];
|
vf = &pf->vf[v];
|
||||||
reg = rd32(hw, I40E_VPGEN_VFRSTAT(vf->vf_id));
|
if (!test_bit(I40E_VF_STATE_RESETTING, &vf->vf_states)) {
|
||||||
if (!(reg & I40E_VPGEN_VFRSTAT_VFRD_MASK))
|
reg = rd32(hw, I40E_VPGEN_VFRSTAT(vf->vf_id));
|
||||||
break;
|
if (!(reg & I40E_VPGEN_VFRSTAT_VFRD_MASK))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* If the current VF has finished resetting, move on
|
/* If the current VF has finished resetting, move on
|
||||||
* to the next VF in sequence.
|
* to the next VF in sequence.
|
||||||
@ -1656,6 +1664,10 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
|
|||||||
if (pf->vf[v].lan_vsi_idx == 0)
|
if (pf->vf[v].lan_vsi_idx == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* If VF is reset in another thread just continue */
|
||||||
|
if (test_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||||
|
continue;
|
||||||
|
|
||||||
i40e_vsi_stop_rings_no_wait(pf->vsi[pf->vf[v].lan_vsi_idx]);
|
i40e_vsi_stop_rings_no_wait(pf->vsi[pf->vf[v].lan_vsi_idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1667,6 +1679,10 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
|
|||||||
if (pf->vf[v].lan_vsi_idx == 0)
|
if (pf->vf[v].lan_vsi_idx == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
/* If VF is reset in another thread just continue */
|
||||||
|
if (test_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||||
|
continue;
|
||||||
|
|
||||||
i40e_vsi_wait_queues_disabled(pf->vsi[pf->vf[v].lan_vsi_idx]);
|
i40e_vsi_wait_queues_disabled(pf->vsi[pf->vf[v].lan_vsi_idx]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1676,8 +1692,13 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
|
|||||||
mdelay(50);
|
mdelay(50);
|
||||||
|
|
||||||
/* Finish the reset on each VF */
|
/* Finish the reset on each VF */
|
||||||
for (v = 0; v < pf->num_alloc_vfs; v++)
|
for (v = 0; v < pf->num_alloc_vfs; v++) {
|
||||||
|
/* If VF is reset in another thread just continue */
|
||||||
|
if (test_bit(I40E_VF_STATE_RESETTING, &vf->vf_states))
|
||||||
|
continue;
|
||||||
|
|
||||||
i40e_cleanup_reset_vf(&pf->vf[v]);
|
i40e_cleanup_reset_vf(&pf->vf[v]);
|
||||||
|
}
|
||||||
|
|
||||||
i40e_flush(hw);
|
i40e_flush(hw);
|
||||||
clear_bit(__I40E_VF_DISABLE, pf->state);
|
clear_bit(__I40E_VF_DISABLE, pf->state);
|
||||||
|
@ -39,6 +39,7 @@ enum i40e_vf_states {
|
|||||||
I40E_VF_STATE_MC_PROMISC,
|
I40E_VF_STATE_MC_PROMISC,
|
||||||
I40E_VF_STATE_UC_PROMISC,
|
I40E_VF_STATE_UC_PROMISC,
|
||||||
I40E_VF_STATE_PRE_ENABLE,
|
I40E_VF_STATE_PRE_ENABLE,
|
||||||
|
I40E_VF_STATE_RESETTING
|
||||||
};
|
};
|
||||||
|
|
||||||
/* VF capabilities */
|
/* VF capabilities */
|
||||||
|
@ -2004,7 +2004,7 @@ void mlx5_cmd_init_async_ctx(struct mlx5_core_dev *dev,
|
|||||||
ctx->dev = dev;
|
ctx->dev = dev;
|
||||||
/* Starts at 1 to avoid doing wake_up if we are not cleaning up */
|
/* Starts at 1 to avoid doing wake_up if we are not cleaning up */
|
||||||
atomic_set(&ctx->num_inflight, 1);
|
atomic_set(&ctx->num_inflight, 1);
|
||||||
init_waitqueue_head(&ctx->wait);
|
init_completion(&ctx->inflight_done);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mlx5_cmd_init_async_ctx);
|
EXPORT_SYMBOL(mlx5_cmd_init_async_ctx);
|
||||||
|
|
||||||
@ -2018,8 +2018,8 @@ EXPORT_SYMBOL(mlx5_cmd_init_async_ctx);
|
|||||||
*/
|
*/
|
||||||
void mlx5_cmd_cleanup_async_ctx(struct mlx5_async_ctx *ctx)
|
void mlx5_cmd_cleanup_async_ctx(struct mlx5_async_ctx *ctx)
|
||||||
{
|
{
|
||||||
atomic_dec(&ctx->num_inflight);
|
if (!atomic_dec_and_test(&ctx->num_inflight))
|
||||||
wait_event(ctx->wait, atomic_read(&ctx->num_inflight) == 0);
|
wait_for_completion(&ctx->inflight_done);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(mlx5_cmd_cleanup_async_ctx);
|
EXPORT_SYMBOL(mlx5_cmd_cleanup_async_ctx);
|
||||||
|
|
||||||
@ -2032,7 +2032,7 @@ static void mlx5_cmd_exec_cb_handler(int status, void *_work)
|
|||||||
status = cmd_status_err(ctx->dev, status, work->opcode, work->out);
|
status = cmd_status_err(ctx->dev, status, work->opcode, work->out);
|
||||||
work->user_callback(status, work);
|
work->user_callback(status, work);
|
||||||
if (atomic_dec_and_test(&ctx->num_inflight))
|
if (atomic_dec_and_test(&ctx->num_inflight))
|
||||||
wake_up(&ctx->wait);
|
complete(&ctx->inflight_done);
|
||||||
}
|
}
|
||||||
|
|
||||||
int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size,
|
int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size,
|
||||||
@ -2050,7 +2050,7 @@ int mlx5_cmd_exec_cb(struct mlx5_async_ctx *ctx, void *in, int in_size,
|
|||||||
ret = cmd_exec(ctx->dev, in, in_size, out, out_size,
|
ret = cmd_exec(ctx->dev, in, in_size, out, out_size,
|
||||||
mlx5_cmd_exec_cb_handler, work, false);
|
mlx5_cmd_exec_cb_handler, work, false);
|
||||||
if (ret && atomic_dec_and_test(&ctx->num_inflight))
|
if (ret && atomic_dec_and_test(&ctx->num_inflight))
|
||||||
wake_up(&ctx->wait);
|
complete(&ctx->inflight_done);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "en.h"
|
#include "en.h"
|
||||||
#include "en_stats.h"
|
#include "en_stats.h"
|
||||||
|
#include "en/txrx.h"
|
||||||
#include <linux/ptp_classify.h>
|
#include <linux/ptp_classify.h>
|
||||||
|
|
||||||
#define MLX5E_PTP_CHANNEL_IX 0
|
#define MLX5E_PTP_CHANNEL_IX 0
|
||||||
@ -68,6 +69,14 @@ static inline bool mlx5e_use_ptpsq(struct sk_buff *skb)
|
|||||||
fk.ports.dst == htons(PTP_EV_PORT));
|
fk.ports.dst == htons(PTP_EV_PORT));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline bool mlx5e_ptpsq_fifo_has_room(struct mlx5e_txqsq *sq)
|
||||||
|
{
|
||||||
|
if (!sq->ptpsq)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return mlx5e_skb_fifo_has_room(&sq->ptpsq->skb_fifo);
|
||||||
|
}
|
||||||
|
|
||||||
int mlx5e_ptp_open(struct mlx5e_priv *priv, struct mlx5e_params *params,
|
int mlx5e_ptp_open(struct mlx5e_priv *priv, struct mlx5e_params *params,
|
||||||
u8 lag_port, struct mlx5e_ptp **cp);
|
u8 lag_port, struct mlx5e_ptp **cp);
|
||||||
void mlx5e_ptp_close(struct mlx5e_ptp *c);
|
void mlx5e_ptp_close(struct mlx5e_ptp *c);
|
||||||
|
@ -96,6 +96,7 @@ struct mlx5e_tc_flow {
|
|||||||
struct encap_flow_item encaps[MLX5_MAX_FLOW_FWD_VPORTS];
|
struct encap_flow_item encaps[MLX5_MAX_FLOW_FWD_VPORTS];
|
||||||
struct mlx5e_tc_flow *peer_flow;
|
struct mlx5e_tc_flow *peer_flow;
|
||||||
struct mlx5e_mod_hdr_handle *mh; /* attached mod header instance */
|
struct mlx5e_mod_hdr_handle *mh; /* attached mod header instance */
|
||||||
|
struct mlx5e_mod_hdr_handle *slow_mh; /* attached mod header instance for slow path */
|
||||||
struct mlx5e_hairpin_entry *hpe; /* attached hairpin instance */
|
struct mlx5e_hairpin_entry *hpe; /* attached hairpin instance */
|
||||||
struct list_head hairpin; /* flows sharing the same hairpin */
|
struct list_head hairpin; /* flows sharing the same hairpin */
|
||||||
struct list_head peer; /* flows with peer flow */
|
struct list_head peer; /* flows with peer flow */
|
||||||
@ -111,6 +112,7 @@ struct mlx5e_tc_flow {
|
|||||||
struct completion del_hw_done;
|
struct completion del_hw_done;
|
||||||
struct mlx5_flow_attr *attr;
|
struct mlx5_flow_attr *attr;
|
||||||
struct list_head attrs;
|
struct list_head attrs;
|
||||||
|
u32 chain_mapping;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mlx5_flow_handle *
|
struct mlx5_flow_handle *
|
||||||
|
@ -57,6 +57,12 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev);
|
|||||||
bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget);
|
bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget);
|
||||||
void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq);
|
void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq);
|
||||||
|
|
||||||
|
static inline bool
|
||||||
|
mlx5e_skb_fifo_has_room(struct mlx5e_skb_fifo *fifo)
|
||||||
|
{
|
||||||
|
return (*fifo->pc - *fifo->cc) < fifo->mask;
|
||||||
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n)
|
mlx5e_wqc_has_room_for(struct mlx5_wq_cyc *wq, u16 cc, u16 pc, u16 n)
|
||||||
{
|
{
|
||||||
|
@ -101,7 +101,6 @@ static bool mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry)
|
|||||||
struct xfrm_replay_state_esn *replay_esn;
|
struct xfrm_replay_state_esn *replay_esn;
|
||||||
u32 seq_bottom = 0;
|
u32 seq_bottom = 0;
|
||||||
u8 overlap;
|
u8 overlap;
|
||||||
u32 *esn;
|
|
||||||
|
|
||||||
if (!(sa_entry->x->props.flags & XFRM_STATE_ESN)) {
|
if (!(sa_entry->x->props.flags & XFRM_STATE_ESN)) {
|
||||||
sa_entry->esn_state.trigger = 0;
|
sa_entry->esn_state.trigger = 0;
|
||||||
@ -116,11 +115,9 @@ static bool mlx5e_ipsec_update_esn_state(struct mlx5e_ipsec_sa_entry *sa_entry)
|
|||||||
|
|
||||||
sa_entry->esn_state.esn = xfrm_replay_seqhi(sa_entry->x,
|
sa_entry->esn_state.esn = xfrm_replay_seqhi(sa_entry->x,
|
||||||
htonl(seq_bottom));
|
htonl(seq_bottom));
|
||||||
esn = &sa_entry->esn_state.esn;
|
|
||||||
|
|
||||||
sa_entry->esn_state.trigger = 1;
|
sa_entry->esn_state.trigger = 1;
|
||||||
if (unlikely(overlap && seq_bottom < MLX5E_IPSEC_ESN_SCOPE_MID)) {
|
if (unlikely(overlap && seq_bottom < MLX5E_IPSEC_ESN_SCOPE_MID)) {
|
||||||
++(*esn);
|
|
||||||
sa_entry->esn_state.overlap = 0;
|
sa_entry->esn_state.overlap = 0;
|
||||||
return true;
|
return true;
|
||||||
} else if (unlikely(!overlap &&
|
} else if (unlikely(!overlap &&
|
||||||
|
@ -432,7 +432,7 @@ static int mlx5e_macsec_update_rx_sa(struct mlx5e_macsec *macsec,
|
|||||||
bool active)
|
bool active)
|
||||||
{
|
{
|
||||||
struct mlx5_core_dev *mdev = macsec->mdev;
|
struct mlx5_core_dev *mdev = macsec->mdev;
|
||||||
struct mlx5_macsec_obj_attrs attrs;
|
struct mlx5_macsec_obj_attrs attrs = {};
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if (rx_sa->active != active)
|
if (rx_sa->active != active)
|
||||||
@ -444,7 +444,7 @@ static int mlx5e_macsec_update_rx_sa(struct mlx5e_macsec *macsec,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
attrs.sci = rx_sa->sci;
|
attrs.sci = cpu_to_be64((__force u64)rx_sa->sci);
|
||||||
attrs.enc_key_id = rx_sa->enc_key_id;
|
attrs.enc_key_id = rx_sa->enc_key_id;
|
||||||
err = mlx5e_macsec_create_object(mdev, &attrs, false, &rx_sa->macsec_obj_id);
|
err = mlx5e_macsec_create_object(mdev, &attrs, false, &rx_sa->macsec_obj_id);
|
||||||
if (err)
|
if (err)
|
||||||
@ -999,11 +999,11 @@ static int mlx5e_macsec_upd_rxsa(struct macsec_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rx_sa = rx_sc->rx_sa[assoc_num];
|
rx_sa = rx_sc->rx_sa[assoc_num];
|
||||||
if (rx_sa) {
|
if (!rx_sa) {
|
||||||
netdev_err(ctx->netdev,
|
netdev_err(ctx->netdev,
|
||||||
"MACsec offload rx_sc sci %lld rx_sa %d already exist\n",
|
"MACsec offload rx_sc sci %lld rx_sa %d doesn't exist\n",
|
||||||
sci, assoc_num);
|
sci, assoc_num);
|
||||||
err = -EEXIST;
|
err = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1055,11 +1055,11 @@ static int mlx5e_macsec_del_rxsa(struct macsec_context *ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
rx_sa = rx_sc->rx_sa[assoc_num];
|
rx_sa = rx_sc->rx_sa[assoc_num];
|
||||||
if (rx_sa) {
|
if (!rx_sa) {
|
||||||
netdev_err(ctx->netdev,
|
netdev_err(ctx->netdev,
|
||||||
"MACsec offload rx_sc sci %lld rx_sa %d already exist\n",
|
"MACsec offload rx_sc sci %lld rx_sa %d doesn't exist\n",
|
||||||
sci, assoc_num);
|
sci, assoc_num);
|
||||||
err = -EEXIST;
|
err = -EINVAL;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1180,7 +1180,7 @@ macsec_fs_rx_add_rule(struct mlx5e_macsec_fs *macsec_fs,
|
|||||||
rx_rule->rule[0] = rule;
|
rx_rule->rule[0] = rule;
|
||||||
|
|
||||||
/* Rx crypto table without SCI rule */
|
/* Rx crypto table without SCI rule */
|
||||||
if (cpu_to_be64((__force u64)attrs->sci) & ntohs(MACSEC_PORT_ES)) {
|
if ((cpu_to_be64((__force u64)attrs->sci) & 0xFFFF) == ntohs(MACSEC_PORT_ES)) {
|
||||||
memset(spec, 0, sizeof(struct mlx5_flow_spec));
|
memset(spec, 0, sizeof(struct mlx5_flow_spec));
|
||||||
memset(&dest, 0, sizeof(struct mlx5_flow_destination));
|
memset(&dest, 0, sizeof(struct mlx5_flow_destination));
|
||||||
memset(&flow_act, 0, sizeof(flow_act));
|
memset(&flow_act, 0, sizeof(flow_act));
|
||||||
|
@ -1405,8 +1405,13 @@ mlx5e_tc_offload_to_slow_path(struct mlx5_eswitch *esw,
|
|||||||
struct mlx5e_tc_flow *flow,
|
struct mlx5e_tc_flow *flow,
|
||||||
struct mlx5_flow_spec *spec)
|
struct mlx5_flow_spec *spec)
|
||||||
{
|
{
|
||||||
|
struct mlx5e_tc_mod_hdr_acts mod_acts = {};
|
||||||
|
struct mlx5e_mod_hdr_handle *mh = NULL;
|
||||||
struct mlx5_flow_attr *slow_attr;
|
struct mlx5_flow_attr *slow_attr;
|
||||||
struct mlx5_flow_handle *rule;
|
struct mlx5_flow_handle *rule;
|
||||||
|
bool fwd_and_modify_cap;
|
||||||
|
u32 chain_mapping = 0;
|
||||||
|
int err;
|
||||||
|
|
||||||
slow_attr = mlx5_alloc_flow_attr(MLX5_FLOW_NAMESPACE_FDB);
|
slow_attr = mlx5_alloc_flow_attr(MLX5_FLOW_NAMESPACE_FDB);
|
||||||
if (!slow_attr)
|
if (!slow_attr)
|
||||||
@ -1417,13 +1422,56 @@ mlx5e_tc_offload_to_slow_path(struct mlx5_eswitch *esw,
|
|||||||
slow_attr->esw_attr->split_count = 0;
|
slow_attr->esw_attr->split_count = 0;
|
||||||
slow_attr->flags |= MLX5_ATTR_FLAG_SLOW_PATH;
|
slow_attr->flags |= MLX5_ATTR_FLAG_SLOW_PATH;
|
||||||
|
|
||||||
rule = mlx5e_tc_offload_fdb_rules(esw, flow, spec, slow_attr);
|
fwd_and_modify_cap = MLX5_CAP_ESW_FLOWTABLE((esw)->dev, fdb_modify_header_fwd_to_table);
|
||||||
if (!IS_ERR(rule))
|
if (!fwd_and_modify_cap)
|
||||||
flow_flag_set(flow, SLOW);
|
goto skip_restore;
|
||||||
|
|
||||||
|
err = mlx5_chains_get_chain_mapping(esw_chains(esw), flow->attr->chain, &chain_mapping);
|
||||||
|
if (err)
|
||||||
|
goto err_get_chain;
|
||||||
|
|
||||||
|
err = mlx5e_tc_match_to_reg_set(esw->dev, &mod_acts, MLX5_FLOW_NAMESPACE_FDB,
|
||||||
|
CHAIN_TO_REG, chain_mapping);
|
||||||
|
if (err)
|
||||||
|
goto err_reg_set;
|
||||||
|
|
||||||
|
mh = mlx5e_mod_hdr_attach(esw->dev, get_mod_hdr_table(flow->priv, flow),
|
||||||
|
MLX5_FLOW_NAMESPACE_FDB, &mod_acts);
|
||||||
|
if (IS_ERR(mh)) {
|
||||||
|
err = PTR_ERR(mh);
|
||||||
|
goto err_attach;
|
||||||
|
}
|
||||||
|
|
||||||
|
slow_attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
|
||||||
|
slow_attr->modify_hdr = mlx5e_mod_hdr_get(mh);
|
||||||
|
|
||||||
|
skip_restore:
|
||||||
|
rule = mlx5e_tc_offload_fdb_rules(esw, flow, spec, slow_attr);
|
||||||
|
if (IS_ERR(rule)) {
|
||||||
|
err = PTR_ERR(rule);
|
||||||
|
goto err_offload;
|
||||||
|
}
|
||||||
|
|
||||||
|
flow->slow_mh = mh;
|
||||||
|
flow->chain_mapping = chain_mapping;
|
||||||
|
flow_flag_set(flow, SLOW);
|
||||||
|
|
||||||
|
mlx5e_mod_hdr_dealloc(&mod_acts);
|
||||||
kfree(slow_attr);
|
kfree(slow_attr);
|
||||||
|
|
||||||
return rule;
|
return rule;
|
||||||
|
|
||||||
|
err_offload:
|
||||||
|
if (fwd_and_modify_cap)
|
||||||
|
mlx5e_mod_hdr_detach(esw->dev, get_mod_hdr_table(flow->priv, flow), mh);
|
||||||
|
err_attach:
|
||||||
|
err_reg_set:
|
||||||
|
if (fwd_and_modify_cap)
|
||||||
|
mlx5_chains_put_chain_mapping(esw_chains(esw), chain_mapping);
|
||||||
|
err_get_chain:
|
||||||
|
mlx5e_mod_hdr_dealloc(&mod_acts);
|
||||||
|
kfree(slow_attr);
|
||||||
|
return ERR_PTR(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
void mlx5e_tc_unoffload_from_slow_path(struct mlx5_eswitch *esw,
|
void mlx5e_tc_unoffload_from_slow_path(struct mlx5_eswitch *esw,
|
||||||
@ -1441,7 +1489,17 @@ void mlx5e_tc_unoffload_from_slow_path(struct mlx5_eswitch *esw,
|
|||||||
slow_attr->action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
|
slow_attr->action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST;
|
||||||
slow_attr->esw_attr->split_count = 0;
|
slow_attr->esw_attr->split_count = 0;
|
||||||
slow_attr->flags |= MLX5_ATTR_FLAG_SLOW_PATH;
|
slow_attr->flags |= MLX5_ATTR_FLAG_SLOW_PATH;
|
||||||
|
if (flow->slow_mh) {
|
||||||
|
slow_attr->action |= MLX5_FLOW_CONTEXT_ACTION_MOD_HDR;
|
||||||
|
slow_attr->modify_hdr = mlx5e_mod_hdr_get(flow->slow_mh);
|
||||||
|
}
|
||||||
mlx5e_tc_unoffload_fdb_rules(esw, flow, slow_attr);
|
mlx5e_tc_unoffload_fdb_rules(esw, flow, slow_attr);
|
||||||
|
if (flow->slow_mh) {
|
||||||
|
mlx5e_mod_hdr_detach(esw->dev, get_mod_hdr_table(flow->priv, flow), flow->slow_mh);
|
||||||
|
mlx5_chains_put_chain_mapping(esw_chains(esw), flow->chain_mapping);
|
||||||
|
flow->chain_mapping = 0;
|
||||||
|
flow->slow_mh = NULL;
|
||||||
|
}
|
||||||
flow_flag_clear(flow, SLOW);
|
flow_flag_clear(flow, SLOW);
|
||||||
kfree(slow_attr);
|
kfree(slow_attr);
|
||||||
}
|
}
|
||||||
@ -3575,6 +3633,10 @@ mlx5e_clone_flow_attr_for_post_act(struct mlx5_flow_attr *attr,
|
|||||||
attr2->action = 0;
|
attr2->action = 0;
|
||||||
attr2->flags = 0;
|
attr2->flags = 0;
|
||||||
attr2->parse_attr = parse_attr;
|
attr2->parse_attr = parse_attr;
|
||||||
|
attr2->esw_attr->out_count = 0;
|
||||||
|
attr2->esw_attr->split_count = 0;
|
||||||
|
attr2->dest_chain = 0;
|
||||||
|
attr2->dest_ft = NULL;
|
||||||
return attr2;
|
return attr2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4008,6 +4070,7 @@ parse_tc_fdb_actions(struct mlx5e_priv *priv,
|
|||||||
struct mlx5e_tc_flow_parse_attr *parse_attr;
|
struct mlx5e_tc_flow_parse_attr *parse_attr;
|
||||||
struct mlx5_flow_attr *attr = flow->attr;
|
struct mlx5_flow_attr *attr = flow->attr;
|
||||||
struct mlx5_esw_flow_attr *esw_attr;
|
struct mlx5_esw_flow_attr *esw_attr;
|
||||||
|
struct net_device *filter_dev;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
err = flow_action_supported(flow_action, extack);
|
err = flow_action_supported(flow_action, extack);
|
||||||
@ -4016,6 +4079,7 @@ parse_tc_fdb_actions(struct mlx5e_priv *priv,
|
|||||||
|
|
||||||
esw_attr = attr->esw_attr;
|
esw_attr = attr->esw_attr;
|
||||||
parse_attr = attr->parse_attr;
|
parse_attr = attr->parse_attr;
|
||||||
|
filter_dev = parse_attr->filter_dev;
|
||||||
parse_state = &parse_attr->parse_state;
|
parse_state = &parse_attr->parse_state;
|
||||||
mlx5e_tc_act_init_parse_state(parse_state, flow, flow_action, extack);
|
mlx5e_tc_act_init_parse_state(parse_state, flow, flow_action, extack);
|
||||||
parse_state->ct_priv = get_ct_priv(priv);
|
parse_state->ct_priv = get_ct_priv(priv);
|
||||||
@ -4025,13 +4089,21 @@ parse_tc_fdb_actions(struct mlx5e_priv *priv,
|
|||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* Forward to/from internal port can only have 1 dest */
|
/* Forward to/from internal port can only have 1 dest */
|
||||||
if ((netif_is_ovs_master(parse_attr->filter_dev) || esw_attr->dest_int_port) &&
|
if ((netif_is_ovs_master(filter_dev) || esw_attr->dest_int_port) &&
|
||||||
esw_attr->out_count > 1) {
|
esw_attr->out_count > 1) {
|
||||||
NL_SET_ERR_MSG_MOD(extack,
|
NL_SET_ERR_MSG_MOD(extack,
|
||||||
"Rules with internal port can have only one destination");
|
"Rules with internal port can have only one destination");
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Forward from tunnel/internal port to internal port is not supported */
|
||||||
|
if ((mlx5e_get_tc_tun(filter_dev) || netif_is_ovs_master(filter_dev)) &&
|
||||||
|
esw_attr->dest_int_port) {
|
||||||
|
NL_SET_ERR_MSG_MOD(extack,
|
||||||
|
"Forwarding from tunnel/internal port to internal port is not supported");
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
|
||||||
err = actions_prepare_mod_hdr_actions(priv, flow, attr, extack);
|
err = actions_prepare_mod_hdr_actions(priv, flow, attr, extack);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@ -392,6 +392,11 @@ mlx5e_txwqe_complete(struct mlx5e_txqsq *sq, struct sk_buff *skb,
|
|||||||
if (unlikely(sq->ptpsq)) {
|
if (unlikely(sq->ptpsq)) {
|
||||||
mlx5e_skb_cb_hwtstamp_init(skb);
|
mlx5e_skb_cb_hwtstamp_init(skb);
|
||||||
mlx5e_skb_fifo_push(&sq->ptpsq->skb_fifo, skb);
|
mlx5e_skb_fifo_push(&sq->ptpsq->skb_fifo, skb);
|
||||||
|
if (!netif_tx_queue_stopped(sq->txq) &&
|
||||||
|
!mlx5e_skb_fifo_has_room(&sq->ptpsq->skb_fifo)) {
|
||||||
|
netif_tx_stop_queue(sq->txq);
|
||||||
|
sq->stats->stopped++;
|
||||||
|
}
|
||||||
skb_get(skb);
|
skb_get(skb);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -868,6 +873,7 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget)
|
|||||||
|
|
||||||
if (netif_tx_queue_stopped(sq->txq) &&
|
if (netif_tx_queue_stopped(sq->txq) &&
|
||||||
mlx5e_wqc_has_room_for(&sq->wq, sq->cc, sq->pc, sq->stop_room) &&
|
mlx5e_wqc_has_room_for(&sq->wq, sq->cc, sq->pc, sq->stop_room) &&
|
||||||
|
mlx5e_ptpsq_fifo_has_room(sq) &&
|
||||||
!test_bit(MLX5E_SQ_STATE_RECOVERING, &sq->state)) {
|
!test_bit(MLX5E_SQ_STATE_RECOVERING, &sq->state)) {
|
||||||
netif_tx_wake_queue(sq->txq);
|
netif_tx_wake_queue(sq->txq);
|
||||||
stats->wake++;
|
stats->wake++;
|
||||||
|
@ -358,6 +358,23 @@ static int mlx5_pci_link_toggle(struct mlx5_core_dev *dev)
|
|||||||
err = -ETIMEDOUT;
|
err = -ETIMEDOUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
err = pci_read_config_word(dev->pdev, PCI_DEVICE_ID, ®16);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
if (reg16 == dev_id)
|
||||||
|
break;
|
||||||
|
msleep(20);
|
||||||
|
} while (!time_after(jiffies, timeout));
|
||||||
|
|
||||||
|
if (reg16 == dev_id) {
|
||||||
|
mlx5_core_info(dev, "Firmware responds to PCI config cycles again\n");
|
||||||
|
} else {
|
||||||
|
mlx5_core_err(dev, "Firmware is not responsive (0x%04x) after %llu ms\n",
|
||||||
|
reg16, mlx5_tout_ms(dev, PCI_TOGGLE));
|
||||||
|
err = -ETIMEDOUT;
|
||||||
|
}
|
||||||
|
|
||||||
restore:
|
restore:
|
||||||
list_for_each_entry(sdev, &bridge_bus->devices, bus_list) {
|
list_for_each_entry(sdev, &bridge_bus->devices, bus_list) {
|
||||||
pci_cfg_access_unlock(sdev);
|
pci_cfg_access_unlock(sdev);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
#include <linux/mlx5/device.h>
|
#include <linux/mlx5/device.h>
|
||||||
#include <linux/mlx5/transobj.h>
|
#include <linux/mlx5/transobj.h>
|
||||||
|
#include "clock.h"
|
||||||
#include "aso.h"
|
#include "aso.h"
|
||||||
#include "wq.h"
|
#include "wq.h"
|
||||||
|
|
||||||
@ -179,6 +180,7 @@ static int create_aso_sq(struct mlx5_core_dev *mdev, int pdn,
|
|||||||
{
|
{
|
||||||
void *in, *sqc, *wq;
|
void *in, *sqc, *wq;
|
||||||
int inlen, err;
|
int inlen, err;
|
||||||
|
u8 ts_format;
|
||||||
|
|
||||||
inlen = MLX5_ST_SZ_BYTES(create_sq_in) +
|
inlen = MLX5_ST_SZ_BYTES(create_sq_in) +
|
||||||
sizeof(u64) * sq->wq_ctrl.buf.npages;
|
sizeof(u64) * sq->wq_ctrl.buf.npages;
|
||||||
@ -195,6 +197,11 @@ static int create_aso_sq(struct mlx5_core_dev *mdev, int pdn,
|
|||||||
MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST);
|
MLX5_SET(sqc, sqc, state, MLX5_SQC_STATE_RST);
|
||||||
MLX5_SET(sqc, sqc, flush_in_error_en, 1);
|
MLX5_SET(sqc, sqc, flush_in_error_en, 1);
|
||||||
|
|
||||||
|
ts_format = mlx5_is_real_time_sq(mdev) ?
|
||||||
|
MLX5_TIMESTAMP_FORMAT_REAL_TIME :
|
||||||
|
MLX5_TIMESTAMP_FORMAT_FREE_RUNNING;
|
||||||
|
MLX5_SET(sqc, sqc, ts_format, ts_format);
|
||||||
|
|
||||||
MLX5_SET(wq, wq, wq_type, MLX5_WQ_TYPE_CYCLIC);
|
MLX5_SET(wq, wq, wq_type, MLX5_WQ_TYPE_CYCLIC);
|
||||||
MLX5_SET(wq, wq, uar_page, mdev->mlx5e_res.hw_objs.bfreg.index);
|
MLX5_SET(wq, wq, uar_page, mdev->mlx5e_res.hw_objs.bfreg.index);
|
||||||
MLX5_SET(wq, wq, log_wq_pg_sz, sq->wq_ctrl.buf.page_shift -
|
MLX5_SET(wq, wq, log_wq_pg_sz, sq->wq_ctrl.buf.page_shift -
|
||||||
|
@ -122,7 +122,7 @@ void mlx5_mpfs_cleanup(struct mlx5_core_dev *dev)
|
|||||||
{
|
{
|
||||||
struct mlx5_mpfs *mpfs = dev->priv.mpfs;
|
struct mlx5_mpfs *mpfs = dev->priv.mpfs;
|
||||||
|
|
||||||
if (!MLX5_ESWITCH_MANAGER(dev))
|
if (!mpfs)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
WARN_ON(!hlist_empty(mpfs->hash));
|
WARN_ON(!hlist_empty(mpfs->hash));
|
||||||
@ -137,7 +137,7 @@ int mlx5_mpfs_add_mac(struct mlx5_core_dev *dev, u8 *mac)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
u32 index;
|
u32 index;
|
||||||
|
|
||||||
if (!MLX5_ESWITCH_MANAGER(dev))
|
if (!mpfs)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mutex_lock(&mpfs->lock);
|
mutex_lock(&mpfs->lock);
|
||||||
@ -185,7 +185,7 @@ int mlx5_mpfs_del_mac(struct mlx5_core_dev *dev, u8 *mac)
|
|||||||
int err = 0;
|
int err = 0;
|
||||||
u32 index;
|
u32 index;
|
||||||
|
|
||||||
if (!MLX5_ESWITCH_MANAGER(dev))
|
if (!mpfs)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
mutex_lock(&mpfs->lock);
|
mutex_lock(&mpfs->lock);
|
||||||
|
@ -1872,6 +1872,10 @@ static void mlx5_pci_resume(struct pci_dev *pdev)
|
|||||||
|
|
||||||
err = mlx5_load_one(dev, false);
|
err = mlx5_load_one(dev, false);
|
||||||
|
|
||||||
|
if (!err)
|
||||||
|
devlink_health_reporter_state_update(dev->priv.health.fw_fatal_reporter,
|
||||||
|
DEVLINK_HEALTH_REPORTER_STATE_HEALTHY);
|
||||||
|
|
||||||
mlx5_pci_trace(dev, "Done, err = %d, device %s\n", err,
|
mlx5_pci_trace(dev, "Done, err = %d, device %s\n", err,
|
||||||
!err ? "recovered" : "Failed");
|
!err ? "recovered" : "Failed");
|
||||||
}
|
}
|
||||||
|
@ -1200,7 +1200,8 @@ free_rule:
|
|||||||
}
|
}
|
||||||
|
|
||||||
remove_from_nic_tbl:
|
remove_from_nic_tbl:
|
||||||
mlx5dr_matcher_remove_from_tbl_nic(dmn, nic_matcher);
|
if (!nic_matcher->rules)
|
||||||
|
mlx5dr_matcher_remove_from_tbl_nic(dmn, nic_matcher);
|
||||||
|
|
||||||
free_hw_ste:
|
free_hw_ste:
|
||||||
mlx5dr_domain_nic_unlock(nic_dmn);
|
mlx5dr_domain_nic_unlock(nic_dmn);
|
||||||
|
@ -6851,7 +6851,7 @@ static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||||||
char banner[sizeof(version)];
|
char banner[sizeof(version)];
|
||||||
struct ksz_switch *sw = NULL;
|
struct ksz_switch *sw = NULL;
|
||||||
|
|
||||||
result = pci_enable_device(pdev);
|
result = pcim_enable_device(pdev);
|
||||||
if (result)
|
if (result)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
@ -309,6 +309,7 @@ static void lan966x_fdma_tx_disable(struct lan966x_tx *tx)
|
|||||||
lan966x, FDMA_CH_DB_DISCARD);
|
lan966x, FDMA_CH_DB_DISCARD);
|
||||||
|
|
||||||
tx->activated = false;
|
tx->activated = false;
|
||||||
|
tx->last_in_use = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void lan966x_fdma_tx_reload(struct lan966x_tx *tx)
|
static void lan966x_fdma_tx_reload(struct lan966x_tx *tx)
|
||||||
@ -687,17 +688,14 @@ static int lan966x_qsys_sw_status(struct lan966x *lan966x)
|
|||||||
|
|
||||||
static int lan966x_fdma_reload(struct lan966x *lan966x, int new_mtu)
|
static int lan966x_fdma_reload(struct lan966x *lan966x, int new_mtu)
|
||||||
{
|
{
|
||||||
void *rx_dcbs, *tx_dcbs, *tx_dcbs_buf;
|
dma_addr_t rx_dma;
|
||||||
dma_addr_t rx_dma, tx_dma;
|
void *rx_dcbs;
|
||||||
u32 size;
|
u32 size;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
/* Store these for later to free them */
|
/* Store these for later to free them */
|
||||||
rx_dma = lan966x->rx.dma;
|
rx_dma = lan966x->rx.dma;
|
||||||
tx_dma = lan966x->tx.dma;
|
|
||||||
rx_dcbs = lan966x->rx.dcbs;
|
rx_dcbs = lan966x->rx.dcbs;
|
||||||
tx_dcbs = lan966x->tx.dcbs;
|
|
||||||
tx_dcbs_buf = lan966x->tx.dcbs_buf;
|
|
||||||
|
|
||||||
napi_synchronize(&lan966x->napi);
|
napi_synchronize(&lan966x->napi);
|
||||||
napi_disable(&lan966x->napi);
|
napi_disable(&lan966x->napi);
|
||||||
@ -715,17 +713,6 @@ static int lan966x_fdma_reload(struct lan966x *lan966x, int new_mtu)
|
|||||||
size = ALIGN(size, PAGE_SIZE);
|
size = ALIGN(size, PAGE_SIZE);
|
||||||
dma_free_coherent(lan966x->dev, size, rx_dcbs, rx_dma);
|
dma_free_coherent(lan966x->dev, size, rx_dcbs, rx_dma);
|
||||||
|
|
||||||
lan966x_fdma_tx_disable(&lan966x->tx);
|
|
||||||
err = lan966x_fdma_tx_alloc(&lan966x->tx);
|
|
||||||
if (err)
|
|
||||||
goto restore_tx;
|
|
||||||
|
|
||||||
size = sizeof(struct lan966x_tx_dcb) * FDMA_DCB_MAX;
|
|
||||||
size = ALIGN(size, PAGE_SIZE);
|
|
||||||
dma_free_coherent(lan966x->dev, size, tx_dcbs, tx_dma);
|
|
||||||
|
|
||||||
kfree(tx_dcbs_buf);
|
|
||||||
|
|
||||||
lan966x_fdma_wakeup_netdev(lan966x);
|
lan966x_fdma_wakeup_netdev(lan966x);
|
||||||
napi_enable(&lan966x->napi);
|
napi_enable(&lan966x->napi);
|
||||||
|
|
||||||
@ -735,11 +722,6 @@ restore:
|
|||||||
lan966x->rx.dcbs = rx_dcbs;
|
lan966x->rx.dcbs = rx_dcbs;
|
||||||
lan966x_fdma_rx_start(&lan966x->rx);
|
lan966x_fdma_rx_start(&lan966x->rx);
|
||||||
|
|
||||||
restore_tx:
|
|
||||||
lan966x->tx.dma = tx_dma;
|
|
||||||
lan966x->tx.dcbs = tx_dcbs;
|
|
||||||
lan966x->tx.dcbs_buf = tx_dcbs_buf;
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1229,6 +1229,8 @@ static int ave_init(struct net_device *ndev)
|
|||||||
|
|
||||||
phy_support_asym_pause(phydev);
|
phy_support_asym_pause(phydev);
|
||||||
|
|
||||||
|
phydev->mac_managed_pm = true;
|
||||||
|
|
||||||
phy_attached_info(phydev);
|
phy_attached_info(phydev);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1756,6 +1758,10 @@ static int ave_resume(struct device *dev)
|
|||||||
|
|
||||||
ave_global_reset(ndev);
|
ave_global_reset(ndev);
|
||||||
|
|
||||||
|
ret = phy_init_hw(ndev->phydev);
|
||||||
|
if (ret)
|
||||||
|
return ret;
|
||||||
|
|
||||||
ave_ethtool_get_wol(ndev, &wol);
|
ave_ethtool_get_wol(ndev, &wol);
|
||||||
wol.wolopts = priv->wolopts;
|
wol.wolopts = priv->wolopts;
|
||||||
__ave_ethtool_set_wol(ndev, &wol);
|
__ave_ethtool_set_wol(ndev, &wol);
|
||||||
|
@ -1243,6 +1243,12 @@ static const struct rk_gmac_ops rk3588_ops = {
|
|||||||
.set_rgmii_speed = rk3588_set_gmac_speed,
|
.set_rgmii_speed = rk3588_set_gmac_speed,
|
||||||
.set_rmii_speed = rk3588_set_gmac_speed,
|
.set_rmii_speed = rk3588_set_gmac_speed,
|
||||||
.set_clock_selection = rk3588_set_clock_selection,
|
.set_clock_selection = rk3588_set_clock_selection,
|
||||||
|
.regs_valid = true,
|
||||||
|
.regs = {
|
||||||
|
0xfe1b0000, /* gmac0 */
|
||||||
|
0xfe1c0000, /* gmac1 */
|
||||||
|
0x0, /* sentinel */
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define RV1108_GRF_GMAC_CON0 0X0900
|
#define RV1108_GRF_GMAC_CON0 0X0900
|
||||||
|
@ -179,10 +179,10 @@ static const struct ipa_gsi_endpoint_data ipa_gsi_endpoint_data[] = {
|
|||||||
static const struct ipa_resource ipa_resource_src[] = {
|
static const struct ipa_resource ipa_resource_src[] = {
|
||||||
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
|
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
|
||||||
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
|
||||||
.min = 1, .max = 255,
|
.min = 1, .max = 63,
|
||||||
},
|
},
|
||||||
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
|
||||||
.min = 1, .max = 255,
|
.min = 1, .max = 63,
|
||||||
},
|
},
|
||||||
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
|
||||||
.min = 1, .max = 63,
|
.min = 1, .max = 63,
|
||||||
|
@ -434,6 +434,9 @@ static void ipa_idle_indication_cfg(struct ipa *ipa,
|
|||||||
const struct ipa_reg *reg;
|
const struct ipa_reg *reg;
|
||||||
u32 val;
|
u32 val;
|
||||||
|
|
||||||
|
if (ipa->version < IPA_VERSION_3_5_1)
|
||||||
|
return;
|
||||||
|
|
||||||
reg = ipa_reg(ipa, IDLE_INDICATION_CFG);
|
reg = ipa_reg(ipa, IDLE_INDICATION_CFG);
|
||||||
val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH,
|
val = ipa_reg_encode(reg, ENTER_IDLE_DEBOUNCE_THRESH,
|
||||||
enter_idle_debounce_thresh);
|
enter_idle_debounce_thresh);
|
||||||
|
@ -127,112 +127,80 @@ static const u32 ipa_reg_counter_cfg_fmask[] = {
|
|||||||
IPA_REG_FIELDS(COUNTER_CFG, counter_cfg, 0x000001f0);
|
IPA_REG_FIELDS(COUNTER_CFG, counter_cfg, 0x000001f0);
|
||||||
|
|
||||||
static const u32 ipa_reg_src_rsrc_grp_01_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_src_rsrc_grp_01_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_01_RSRC_TYPE, src_rsrc_grp_01_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_01_RSRC_TYPE, src_rsrc_grp_01_rsrc_type,
|
||||||
0x00000400, 0x0020);
|
0x00000400, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_src_rsrc_grp_23_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_src_rsrc_grp_23_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_23_RSRC_TYPE, src_rsrc_grp_23_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_23_RSRC_TYPE, src_rsrc_grp_23_rsrc_type,
|
||||||
0x00000404, 0x0020);
|
0x00000404, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_src_rsrc_grp_45_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_src_rsrc_grp_45_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_45_RSRC_TYPE, src_rsrc_grp_45_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_45_RSRC_TYPE, src_rsrc_grp_45_rsrc_type,
|
||||||
0x00000408, 0x0020);
|
0x00000408, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_src_rsrc_grp_67_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_src_rsrc_grp_67_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_67_RSRC_TYPE, src_rsrc_grp_67_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(SRC_RSRC_GRP_67_RSRC_TYPE, src_rsrc_grp_67_rsrc_type,
|
||||||
0x0000040c, 0x0020);
|
0x0000040c, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_dst_rsrc_grp_01_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_dst_rsrc_grp_01_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_01_RSRC_TYPE, dst_rsrc_grp_01_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_01_RSRC_TYPE, dst_rsrc_grp_01_rsrc_type,
|
||||||
0x00000500, 0x0020);
|
0x00000500, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_dst_rsrc_grp_23_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_dst_rsrc_grp_23_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_23_RSRC_TYPE, dst_rsrc_grp_23_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_23_RSRC_TYPE, dst_rsrc_grp_23_rsrc_type,
|
||||||
0x00000504, 0x0020);
|
0x00000504, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_dst_rsrc_grp_45_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_dst_rsrc_grp_45_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_45_RSRC_TYPE, dst_rsrc_grp_45_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_45_RSRC_TYPE, dst_rsrc_grp_45_rsrc_type,
|
||||||
0x00000508, 0x0020);
|
0x00000508, 0x0020);
|
||||||
|
|
||||||
static const u32 ipa_reg_dst_rsrc_grp_67_rsrc_type_fmask[] = {
|
static const u32 ipa_reg_dst_rsrc_grp_67_rsrc_type_fmask[] = {
|
||||||
[X_MIN_LIM] = GENMASK(5, 0),
|
[X_MIN_LIM] = GENMASK(7, 0),
|
||||||
/* Bits 6-7 reserved */
|
[X_MAX_LIM] = GENMASK(15, 8),
|
||||||
[X_MAX_LIM] = GENMASK(13, 8),
|
[Y_MIN_LIM] = GENMASK(23, 16),
|
||||||
/* Bits 14-15 reserved */
|
[Y_MAX_LIM] = GENMASK(31, 24),
|
||||||
[Y_MIN_LIM] = GENMASK(21, 16),
|
|
||||||
/* Bits 22-23 reserved */
|
|
||||||
[Y_MAX_LIM] = GENMASK(29, 24),
|
|
||||||
/* Bits 30-31 reserved */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_67_RSRC_TYPE, dst_rsrc_grp_67_rsrc_type,
|
IPA_REG_STRIDE_FIELDS(DST_RSRC_GRP_67_RSRC_TYPE, dst_rsrc_grp_67_rsrc_type,
|
||||||
|
@ -117,6 +117,10 @@ static const struct attribute_group *nsim_bus_dev_attr_groups[] = {
|
|||||||
|
|
||||||
static void nsim_bus_dev_release(struct device *dev)
|
static void nsim_bus_dev_release(struct device *dev)
|
||||||
{
|
{
|
||||||
|
struct nsim_bus_dev *nsim_bus_dev;
|
||||||
|
|
||||||
|
nsim_bus_dev = container_of(dev, struct nsim_bus_dev, dev);
|
||||||
|
kfree(nsim_bus_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct device_type nsim_bus_dev_type = {
|
static struct device_type nsim_bus_dev_type = {
|
||||||
@ -291,6 +295,8 @@ nsim_bus_dev_new(unsigned int id, unsigned int port_count, unsigned int num_queu
|
|||||||
|
|
||||||
err_nsim_bus_dev_id_free:
|
err_nsim_bus_dev_id_free:
|
||||||
ida_free(&nsim_bus_dev_ids, nsim_bus_dev->dev.id);
|
ida_free(&nsim_bus_dev_ids, nsim_bus_dev->dev.id);
|
||||||
|
put_device(&nsim_bus_dev->dev);
|
||||||
|
nsim_bus_dev = NULL;
|
||||||
err_nsim_bus_dev_free:
|
err_nsim_bus_dev_free:
|
||||||
kfree(nsim_bus_dev);
|
kfree(nsim_bus_dev);
|
||||||
return ERR_PTR(err);
|
return ERR_PTR(err);
|
||||||
@ -300,9 +306,8 @@ static void nsim_bus_dev_del(struct nsim_bus_dev *nsim_bus_dev)
|
|||||||
{
|
{
|
||||||
/* Disallow using nsim_bus_dev */
|
/* Disallow using nsim_bus_dev */
|
||||||
smp_store_release(&nsim_bus_dev->init, false);
|
smp_store_release(&nsim_bus_dev->init, false);
|
||||||
device_unregister(&nsim_bus_dev->dev);
|
|
||||||
ida_free(&nsim_bus_dev_ids, nsim_bus_dev->dev.id);
|
ida_free(&nsim_bus_dev_ids, nsim_bus_dev->dev.id);
|
||||||
kfree(nsim_bus_dev);
|
device_unregister(&nsim_bus_dev->dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct device_driver nsim_driver = {
|
static struct device_driver nsim_driver = {
|
||||||
|
@ -309,8 +309,10 @@ static int nsim_dev_debugfs_init(struct nsim_dev *nsim_dev)
|
|||||||
if (IS_ERR(nsim_dev->ddir))
|
if (IS_ERR(nsim_dev->ddir))
|
||||||
return PTR_ERR(nsim_dev->ddir);
|
return PTR_ERR(nsim_dev->ddir);
|
||||||
nsim_dev->ports_ddir = debugfs_create_dir("ports", nsim_dev->ddir);
|
nsim_dev->ports_ddir = debugfs_create_dir("ports", nsim_dev->ddir);
|
||||||
if (IS_ERR(nsim_dev->ports_ddir))
|
if (IS_ERR(nsim_dev->ports_ddir)) {
|
||||||
return PTR_ERR(nsim_dev->ports_ddir);
|
err = PTR_ERR(nsim_dev->ports_ddir);
|
||||||
|
goto err_ddir;
|
||||||
|
}
|
||||||
debugfs_create_bool("fw_update_status", 0600, nsim_dev->ddir,
|
debugfs_create_bool("fw_update_status", 0600, nsim_dev->ddir,
|
||||||
&nsim_dev->fw_update_status);
|
&nsim_dev->fw_update_status);
|
||||||
debugfs_create_u32("fw_update_overwrite_mask", 0600, nsim_dev->ddir,
|
debugfs_create_u32("fw_update_overwrite_mask", 0600, nsim_dev->ddir,
|
||||||
@ -346,7 +348,7 @@ static int nsim_dev_debugfs_init(struct nsim_dev *nsim_dev)
|
|||||||
nsim_dev->nodes_ddir = debugfs_create_dir("rate_nodes", nsim_dev->ddir);
|
nsim_dev->nodes_ddir = debugfs_create_dir("rate_nodes", nsim_dev->ddir);
|
||||||
if (IS_ERR(nsim_dev->nodes_ddir)) {
|
if (IS_ERR(nsim_dev->nodes_ddir)) {
|
||||||
err = PTR_ERR(nsim_dev->nodes_ddir);
|
err = PTR_ERR(nsim_dev->nodes_ddir);
|
||||||
goto err_out;
|
goto err_ports_ddir;
|
||||||
}
|
}
|
||||||
debugfs_create_bool("fail_trap_drop_counter_get", 0600,
|
debugfs_create_bool("fail_trap_drop_counter_get", 0600,
|
||||||
nsim_dev->ddir,
|
nsim_dev->ddir,
|
||||||
@ -354,8 +356,9 @@ static int nsim_dev_debugfs_init(struct nsim_dev *nsim_dev)
|
|||||||
nsim_udp_tunnels_debugfs_create(nsim_dev);
|
nsim_udp_tunnels_debugfs_create(nsim_dev);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_out:
|
err_ports_ddir:
|
||||||
debugfs_remove_recursive(nsim_dev->ports_ddir);
|
debugfs_remove_recursive(nsim_dev->ports_ddir);
|
||||||
|
err_ddir:
|
||||||
debugfs_remove_recursive(nsim_dev->ddir);
|
debugfs_remove_recursive(nsim_dev->ddir);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
@ -442,7 +445,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
¶ms);
|
¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv4 top resource\n");
|
pr_err("Failed to register IPv4 top resource\n");
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = devl_resource_register(devlink, "fib", (u64)-1,
|
err = devl_resource_register(devlink, "fib", (u64)-1,
|
||||||
@ -450,7 +453,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
NSIM_RESOURCE_IPV4, ¶ms);
|
NSIM_RESOURCE_IPV4, ¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv4 FIB resource\n");
|
pr_err("Failed to register IPv4 FIB resource\n");
|
||||||
return err;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = devl_resource_register(devlink, "fib-rules", (u64)-1,
|
err = devl_resource_register(devlink, "fib-rules", (u64)-1,
|
||||||
@ -458,7 +461,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
NSIM_RESOURCE_IPV4, ¶ms);
|
NSIM_RESOURCE_IPV4, ¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv4 FIB rules resource\n");
|
pr_err("Failed to register IPv4 FIB rules resource\n");
|
||||||
return err;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resources for IPv6 */
|
/* Resources for IPv6 */
|
||||||
@ -468,7 +471,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
¶ms);
|
¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv6 top resource\n");
|
pr_err("Failed to register IPv6 top resource\n");
|
||||||
goto out;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = devl_resource_register(devlink, "fib", (u64)-1,
|
err = devl_resource_register(devlink, "fib", (u64)-1,
|
||||||
@ -476,7 +479,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
NSIM_RESOURCE_IPV6, ¶ms);
|
NSIM_RESOURCE_IPV6, ¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv6 FIB resource\n");
|
pr_err("Failed to register IPv6 FIB resource\n");
|
||||||
return err;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = devl_resource_register(devlink, "fib-rules", (u64)-1,
|
err = devl_resource_register(devlink, "fib-rules", (u64)-1,
|
||||||
@ -484,7 +487,7 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
NSIM_RESOURCE_IPV6, ¶ms);
|
NSIM_RESOURCE_IPV6, ¶ms);
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_err("Failed to register IPv6 FIB rules resource\n");
|
pr_err("Failed to register IPv6 FIB rules resource\n");
|
||||||
return err;
|
goto err_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Resources for nexthops */
|
/* Resources for nexthops */
|
||||||
@ -492,8 +495,14 @@ static int nsim_dev_resources_register(struct devlink *devlink)
|
|||||||
NSIM_RESOURCE_NEXTHOPS,
|
NSIM_RESOURCE_NEXTHOPS,
|
||||||
DEVLINK_RESOURCE_ID_PARENT_TOP,
|
DEVLINK_RESOURCE_ID_PARENT_TOP,
|
||||||
¶ms);
|
¶ms);
|
||||||
|
if (err) {
|
||||||
|
pr_err("Failed to register NEXTHOPS resource\n");
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
|
||||||
out:
|
err_out:
|
||||||
|
devl_resources_unregister(devlink);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,6 +663,13 @@ static int amd_pmc_verify_czn_rtc(struct amd_pmc_dev *pdev, u32 *arg)
|
|||||||
struct rtc_time tm;
|
struct rtc_time tm;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
/* we haven't yet read SMU version */
|
||||||
|
if (!pdev->major) {
|
||||||
|
rc = amd_pmc_get_smu_version(pdev);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
|
if (pdev->major < 64 || (pdev->major == 64 && pdev->minor < 53))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -464,6 +464,15 @@ static const struct dmi_system_id asus_quirks[] = {
|
|||||||
},
|
},
|
||||||
.driver_data = &quirk_asus_tablet_mode,
|
.driver_data = &quirk_asus_tablet_mode,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.callback = dmi_matched,
|
||||||
|
.ident = "ASUS ROG FLOW X16",
|
||||||
|
.matches = {
|
||||||
|
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
|
||||||
|
DMI_MATCH(DMI_PRODUCT_NAME, "GV601R"),
|
||||||
|
},
|
||||||
|
.driver_data = &quirk_asus_tablet_mode,
|
||||||
|
},
|
||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1914,6 +1914,8 @@ static const struct x86_cpu_id intel_pmc_core_ids[] = {
|
|||||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &tgl_reg_map),
|
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE_N, &tgl_reg_map),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &adl_reg_map),
|
X86_MATCH_INTEL_FAM6_MODEL(ALDERLAKE, &adl_reg_map),
|
||||||
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &tgl_reg_map),
|
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_P, &tgl_reg_map),
|
||||||
|
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE, &adl_reg_map),
|
||||||
|
X86_MATCH_INTEL_FAM6_MODEL(RAPTORLAKE_S, &adl_reg_map),
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -263,6 +263,8 @@ enum tpacpi_hkey_event_t {
|
|||||||
#define TPACPI_DBG_BRGHT 0x0020
|
#define TPACPI_DBG_BRGHT 0x0020
|
||||||
#define TPACPI_DBG_MIXER 0x0040
|
#define TPACPI_DBG_MIXER 0x0040
|
||||||
|
|
||||||
|
#define FAN_NOT_PRESENT 65535
|
||||||
|
|
||||||
#define strlencmp(a, b) (strncmp((a), (b), strlen(b)))
|
#define strlencmp(a, b) (strncmp((a), (b), strlen(b)))
|
||||||
|
|
||||||
|
|
||||||
@ -8876,7 +8878,7 @@ static int __init fan_init(struct ibm_init_struct *iibm)
|
|||||||
/* Try and probe the 2nd fan */
|
/* Try and probe the 2nd fan */
|
||||||
tp_features.second_fan = 1; /* needed for get_speed to work */
|
tp_features.second_fan = 1; /* needed for get_speed to work */
|
||||||
res = fan2_get_speed(&speed);
|
res = fan2_get_speed(&speed);
|
||||||
if (res >= 0) {
|
if (res >= 0 && speed != FAN_NOT_PRESENT) {
|
||||||
/* It responded - so let's assume it's there */
|
/* It responded - so let's assume it's there */
|
||||||
tp_features.second_fan = 1;
|
tp_features.second_fan = 1;
|
||||||
tp_features.second_fan_ctl = 1;
|
tp_features.second_fan_ctl = 1;
|
||||||
|
@ -2993,7 +2993,7 @@ _base_config_dma_addressing(struct MPT3SAS_ADAPTER *ioc, struct pci_dev *pdev)
|
|||||||
u64 coherent_dma_mask, dma_mask;
|
u64 coherent_dma_mask, dma_mask;
|
||||||
|
|
||||||
if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 ||
|
if (ioc->is_mcpu_endpoint || sizeof(dma_addr_t) == 4 ||
|
||||||
dma_get_required_mask(&pdev->dev) <= 32) {
|
dma_get_required_mask(&pdev->dev) <= DMA_BIT_MASK(32)) {
|
||||||
ioc->dma_mask = 32;
|
ioc->dma_mask = 32;
|
||||||
coherent_dma_mask = dma_mask = DMA_BIT_MASK(32);
|
coherent_dma_mask = dma_mask = DMA_BIT_MASK(32);
|
||||||
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
|
/* Set 63 bit DMA mask for all SAS3 and SAS35 controllers */
|
||||||
|
@ -398,7 +398,7 @@ static void aspeed_spi_get_windows(struct aspeed_spi *aspi,
|
|||||||
windows[cs].cs = cs;
|
windows[cs].cs = cs;
|
||||||
windows[cs].size = data->segment_end(aspi, reg_val) -
|
windows[cs].size = data->segment_end(aspi, reg_val) -
|
||||||
data->segment_start(aspi, reg_val);
|
data->segment_start(aspi, reg_val);
|
||||||
windows[cs].offset = cs ? windows[cs - 1].offset + windows[cs - 1].size : 0;
|
windows[cs].offset = data->segment_start(aspi, reg_val) - aspi->ahb_base_phy;
|
||||||
dev_vdbg(aspi->dev, "CE%d offset=0x%.8x size=0x%x\n", cs,
|
dev_vdbg(aspi->dev, "CE%d offset=0x%.8x size=0x%x\n", cs,
|
||||||
windows[cs].offset, windows[cs].size);
|
windows[cs].offset, windows[cs].size);
|
||||||
}
|
}
|
||||||
@ -1163,7 +1163,7 @@ static const struct aspeed_spi_data ast2500_spi_data = {
|
|||||||
static const struct aspeed_spi_data ast2600_fmc_data = {
|
static const struct aspeed_spi_data ast2600_fmc_data = {
|
||||||
.max_cs = 3,
|
.max_cs = 3,
|
||||||
.hastype = false,
|
.hastype = false,
|
||||||
.mode_bits = SPI_RX_QUAD | SPI_RX_QUAD,
|
.mode_bits = SPI_RX_QUAD | SPI_TX_QUAD,
|
||||||
.we0 = 16,
|
.we0 = 16,
|
||||||
.ctl0 = CE0_CTRL_REG,
|
.ctl0 = CE0_CTRL_REG,
|
||||||
.timing = CE0_TIMING_COMPENSATION_REG,
|
.timing = CE0_TIMING_COMPENSATION_REG,
|
||||||
@ -1178,7 +1178,7 @@ static const struct aspeed_spi_data ast2600_fmc_data = {
|
|||||||
static const struct aspeed_spi_data ast2600_spi_data = {
|
static const struct aspeed_spi_data ast2600_spi_data = {
|
||||||
.max_cs = 2,
|
.max_cs = 2,
|
||||||
.hastype = false,
|
.hastype = false,
|
||||||
.mode_bits = SPI_RX_QUAD | SPI_RX_QUAD,
|
.mode_bits = SPI_RX_QUAD | SPI_TX_QUAD,
|
||||||
.we0 = 16,
|
.we0 = 16,
|
||||||
.ctl0 = CE0_CTRL_REG,
|
.ctl0 = CE0_CTRL_REG,
|
||||||
.timing = CE0_TIMING_COMPENSATION_REG,
|
.timing = CE0_TIMING_COMPENSATION_REG,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0=or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
/* Copyright (C) 2022 Hewlett-Packard Development Company, L.P. */
|
/* Copyright (C) 2022 Hewlett-Packard Development Company, L.P. */
|
||||||
|
|
||||||
#include <linux/iopoll.h>
|
#include <linux/iopoll.h>
|
||||||
|
@ -114,7 +114,7 @@
|
|||||||
#define ERASE_OPCODE_SHIFT 8
|
#define ERASE_OPCODE_SHIFT 8
|
||||||
#define ERASE_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)
|
#define ERASE_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)
|
||||||
#define ERASE_64K_OPCODE_SHIFT 16
|
#define ERASE_64K_OPCODE_SHIFT 16
|
||||||
#define ERASE_64K_OPCODE_MASK (0xff << ERASE_OPCODE_SHIFT)
|
#define ERASE_64K_OPCODE_MASK (0xff << ERASE_64K_OPCODE_SHIFT)
|
||||||
|
|
||||||
/* Flash descriptor fields */
|
/* Flash descriptor fields */
|
||||||
#define FLVALSIG_MAGIC 0x0ff0a55a
|
#define FLVALSIG_MAGIC 0x0ff0a55a
|
||||||
|
@ -151,7 +151,7 @@ mpc52xx_spi_fsmstate_idle(int irq, struct mpc52xx_spi *ms, u8 status, u8 data)
|
|||||||
int spr, sppr;
|
int spr, sppr;
|
||||||
u8 ctrl1;
|
u8 ctrl1;
|
||||||
|
|
||||||
if (status && (irq != NO_IRQ))
|
if (status && irq)
|
||||||
dev_err(&ms->master->dev, "spurious irq, status=0x%.2x\n",
|
dev_err(&ms->master->dev, "spurious irq, status=0x%.2x\n",
|
||||||
status);
|
status);
|
||||||
|
|
||||||
|
@ -1057,6 +1057,8 @@ static int spi_qup_probe(struct platform_device *pdev)
|
|||||||
else
|
else
|
||||||
master->num_chipselect = num_cs;
|
master->num_chipselect = num_cs;
|
||||||
|
|
||||||
|
master->use_gpio_descriptors = true;
|
||||||
|
master->max_native_cs = SPI_NUM_CHIPSELECTS;
|
||||||
master->bus_num = pdev->id;
|
master->bus_num = pdev->id;
|
||||||
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
|
master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH | SPI_LOOP;
|
||||||
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
|
master->bits_per_word_mask = SPI_BPW_RANGE_MASK(4, 32);
|
||||||
|
@ -1157,6 +1157,11 @@ static int tegra_qspi_combined_seq_xfer(struct tegra_qspi *tqspi,
|
|||||||
msg->actual_length += xfer->len;
|
msg->actual_length += xfer->len;
|
||||||
transfer_phase++;
|
transfer_phase++;
|
||||||
}
|
}
|
||||||
|
if (!xfer->cs_change) {
|
||||||
|
tegra_qspi_transfer_end(spi);
|
||||||
|
spi_transfer_delay_exec(xfer);
|
||||||
|
}
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
msg->status = ret;
|
msg->status = ret;
|
||||||
|
@ -911,7 +911,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
|
|||||||
interp_elf_ex = kmalloc(sizeof(*interp_elf_ex), GFP_KERNEL);
|
interp_elf_ex = kmalloc(sizeof(*interp_elf_ex), GFP_KERNEL);
|
||||||
if (!interp_elf_ex) {
|
if (!interp_elf_ex) {
|
||||||
retval = -ENOMEM;
|
retval = -ENOMEM;
|
||||||
goto out_free_ph;
|
goto out_free_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the exec headers */
|
/* Get the exec headers */
|
||||||
@ -1354,6 +1354,7 @@ out:
|
|||||||
out_free_dentry:
|
out_free_dentry:
|
||||||
kfree(interp_elf_ex);
|
kfree(interp_elf_ex);
|
||||||
kfree(interp_elf_phdata);
|
kfree(interp_elf_phdata);
|
||||||
|
out_free_file:
|
||||||
allow_write_access(interpreter);
|
allow_write_access(interpreter);
|
||||||
if (interpreter)
|
if (interpreter)
|
||||||
fput(interpreter);
|
fput(interpreter);
|
||||||
|
@ -205,14 +205,19 @@ static int allocate_filesystem_keyring(struct super_block *sb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is called at unmount time to release all encryption keys that have been
|
* Release all encryption keys that have been added to the filesystem, along
|
||||||
* added to the filesystem, along with the keyring that contains them.
|
* with the keyring that contains them.
|
||||||
*
|
*
|
||||||
* Note that besides clearing and freeing memory, this might need to evict keys
|
* This is called at unmount time. The filesystem's underlying block device(s)
|
||||||
* from the keyslots of an inline crypto engine. Therefore, this must be called
|
* are still available at this time; this is important because after user file
|
||||||
* while the filesystem's underlying block device(s) are still available.
|
* accesses have been allowed, this function may need to evict keys from the
|
||||||
|
* keyslots of an inline crypto engine, which requires the block device(s).
|
||||||
|
*
|
||||||
|
* This is also called when the super_block is being freed. This is needed to
|
||||||
|
* avoid a memory leak if mounting fails after the "test_dummy_encryption"
|
||||||
|
* option was processed, as in that case the unmount-time call isn't made.
|
||||||
*/
|
*/
|
||||||
void fscrypt_sb_delete(struct super_block *sb)
|
void fscrypt_destroy_keyring(struct super_block *sb)
|
||||||
{
|
{
|
||||||
struct fscrypt_keyring *keyring = sb->s_master_keys;
|
struct fscrypt_keyring *keyring = sb->s_master_keys;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -1197,11 +1197,11 @@ static int unshare_sighand(struct task_struct *me)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
refcount_set(&newsighand->count, 1);
|
refcount_set(&newsighand->count, 1);
|
||||||
memcpy(newsighand->action, oldsighand->action,
|
|
||||||
sizeof(newsighand->action));
|
|
||||||
|
|
||||||
write_lock_irq(&tasklist_lock);
|
write_lock_irq(&tasklist_lock);
|
||||||
spin_lock(&oldsighand->siglock);
|
spin_lock(&oldsighand->siglock);
|
||||||
|
memcpy(newsighand->action, oldsighand->action,
|
||||||
|
sizeof(newsighand->action));
|
||||||
rcu_assign_pointer(me->sighand, newsighand);
|
rcu_assign_pointer(me->sighand, newsighand);
|
||||||
spin_unlock(&oldsighand->siglock);
|
spin_unlock(&oldsighand->siglock);
|
||||||
write_unlock_irq(&tasklist_lock);
|
write_unlock_irq(&tasklist_lock);
|
||||||
|
@ -291,6 +291,7 @@ static void __put_super(struct super_block *s)
|
|||||||
WARN_ON(s->s_inode_lru.node);
|
WARN_ON(s->s_inode_lru.node);
|
||||||
WARN_ON(!list_empty(&s->s_mounts));
|
WARN_ON(!list_empty(&s->s_mounts));
|
||||||
security_sb_free(s);
|
security_sb_free(s);
|
||||||
|
fscrypt_destroy_keyring(s);
|
||||||
put_user_ns(s->s_user_ns);
|
put_user_ns(s->s_user_ns);
|
||||||
kfree(s->s_subtype);
|
kfree(s->s_subtype);
|
||||||
call_rcu(&s->rcu, destroy_super_rcu);
|
call_rcu(&s->rcu, destroy_super_rcu);
|
||||||
@ -479,7 +480,7 @@ void generic_shutdown_super(struct super_block *sb)
|
|||||||
evict_inodes(sb);
|
evict_inodes(sb);
|
||||||
/* only nonzero refcount inodes can have marks */
|
/* only nonzero refcount inodes can have marks */
|
||||||
fsnotify_sb_delete(sb);
|
fsnotify_sb_delete(sb);
|
||||||
fscrypt_sb_delete(sb);
|
fscrypt_destroy_keyring(sb);
|
||||||
security_sb_delete(sb);
|
security_sb_delete(sb);
|
||||||
|
|
||||||
if (sb->s_dio_done_wq) {
|
if (sb->s_dio_done_wq) {
|
||||||
|
@ -307,7 +307,7 @@ fscrypt_free_dummy_policy(struct fscrypt_dummy_policy *dummy_policy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* keyring.c */
|
/* keyring.c */
|
||||||
void fscrypt_sb_delete(struct super_block *sb);
|
void fscrypt_destroy_keyring(struct super_block *sb);
|
||||||
int fscrypt_ioctl_add_key(struct file *filp, void __user *arg);
|
int fscrypt_ioctl_add_key(struct file *filp, void __user *arg);
|
||||||
int fscrypt_add_test_dummy_key(struct super_block *sb,
|
int fscrypt_add_test_dummy_key(struct super_block *sb,
|
||||||
const struct fscrypt_dummy_policy *dummy_policy);
|
const struct fscrypt_dummy_policy *dummy_policy);
|
||||||
@ -521,7 +521,7 @@ fscrypt_free_dummy_policy(struct fscrypt_dummy_policy *dummy_policy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* keyring.c */
|
/* keyring.c */
|
||||||
static inline void fscrypt_sb_delete(struct super_block *sb)
|
static inline void fscrypt_destroy_keyring(struct super_block *sb)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -970,7 +970,7 @@ void mlx5_cmd_allowed_opcode(struct mlx5_core_dev *dev, u16 opcode);
|
|||||||
struct mlx5_async_ctx {
|
struct mlx5_async_ctx {
|
||||||
struct mlx5_core_dev *dev;
|
struct mlx5_core_dev *dev;
|
||||||
atomic_t num_inflight;
|
atomic_t num_inflight;
|
||||||
struct wait_queue_head wait;
|
struct completion inflight_done;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mlx5_async_work;
|
struct mlx5_async_work;
|
||||||
|
@ -51,8 +51,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
|
|||||||
return unlikely(overflow);
|
return unlikely(overflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** check_add_overflow() - Calculate addition with overflow checking
|
/**
|
||||||
*
|
* check_add_overflow() - Calculate addition with overflow checking
|
||||||
* @a: first addend
|
* @a: first addend
|
||||||
* @b: second addend
|
* @b: second addend
|
||||||
* @d: pointer to store sum
|
* @d: pointer to store sum
|
||||||
@ -66,8 +66,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
|
|||||||
#define check_add_overflow(a, b, d) \
|
#define check_add_overflow(a, b, d) \
|
||||||
__must_check_overflow(__builtin_add_overflow(a, b, d))
|
__must_check_overflow(__builtin_add_overflow(a, b, d))
|
||||||
|
|
||||||
/** check_sub_overflow() - Calculate subtraction with overflow checking
|
/**
|
||||||
*
|
* check_sub_overflow() - Calculate subtraction with overflow checking
|
||||||
* @a: minuend; value to subtract from
|
* @a: minuend; value to subtract from
|
||||||
* @b: subtrahend; value to subtract from @a
|
* @b: subtrahend; value to subtract from @a
|
||||||
* @d: pointer to store difference
|
* @d: pointer to store difference
|
||||||
@ -81,8 +81,8 @@ static inline bool __must_check __must_check_overflow(bool overflow)
|
|||||||
#define check_sub_overflow(a, b, d) \
|
#define check_sub_overflow(a, b, d) \
|
||||||
__must_check_overflow(__builtin_sub_overflow(a, b, d))
|
__must_check_overflow(__builtin_sub_overflow(a, b, d))
|
||||||
|
|
||||||
/** check_mul_overflow() - Calculate multiplication with overflow checking
|
/**
|
||||||
*
|
* check_mul_overflow() - Calculate multiplication with overflow checking
|
||||||
* @a: first factor
|
* @a: first factor
|
||||||
* @b: second factor
|
* @b: second factor
|
||||||
* @d: pointer to store product
|
* @d: pointer to store product
|
||||||
@ -96,23 +96,24 @@ static inline bool __must_check __must_check_overflow(bool overflow)
|
|||||||
#define check_mul_overflow(a, b, d) \
|
#define check_mul_overflow(a, b, d) \
|
||||||
__must_check_overflow(__builtin_mul_overflow(a, b, d))
|
__must_check_overflow(__builtin_mul_overflow(a, b, d))
|
||||||
|
|
||||||
/** check_shl_overflow() - Calculate a left-shifted value and check overflow
|
/**
|
||||||
*
|
* check_shl_overflow() - Calculate a left-shifted value and check overflow
|
||||||
* @a: Value to be shifted
|
* @a: Value to be shifted
|
||||||
* @s: How many bits left to shift
|
* @s: How many bits left to shift
|
||||||
* @d: Pointer to where to store the result
|
* @d: Pointer to where to store the result
|
||||||
*
|
*
|
||||||
* Computes *@d = (@a << @s)
|
* Computes *@d = (@a << @s)
|
||||||
*
|
*
|
||||||
* Returns true if '*d' cannot hold the result or when 'a << s' doesn't
|
* Returns true if '*@d' cannot hold the result or when '@a << @s' doesn't
|
||||||
* make sense. Example conditions:
|
* make sense. Example conditions:
|
||||||
* - 'a << s' causes bits to be lost when stored in *d.
|
|
||||||
* - 's' is garbage (e.g. negative) or so large that the result of
|
|
||||||
* 'a << s' is guaranteed to be 0.
|
|
||||||
* - 'a' is negative.
|
|
||||||
* - 'a << s' sets the sign bit, if any, in '*d'.
|
|
||||||
*
|
*
|
||||||
* '*d' will hold the results of the attempted shift, but is not
|
* - '@a << @s' causes bits to be lost when stored in *@d.
|
||||||
|
* - '@s' is garbage (e.g. negative) or so large that the result of
|
||||||
|
* '@a << @s' is guaranteed to be 0.
|
||||||
|
* - '@a' is negative.
|
||||||
|
* - '@a << @s' sets the sign bit, if any, in '*@d'.
|
||||||
|
*
|
||||||
|
* '*@d' will hold the results of the attempted shift, but is not
|
||||||
* considered "safe for use" if true is returned.
|
* considered "safe for use" if true is returned.
|
||||||
*/
|
*/
|
||||||
#define check_shl_overflow(a, s, d) __must_check_overflow(({ \
|
#define check_shl_overflow(a, s, d) __must_check_overflow(({ \
|
||||||
@ -129,7 +130,6 @@ static inline bool __must_check __must_check_overflow(bool overflow)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* size_mul() - Calculate size_t multiplication with saturation at SIZE_MAX
|
* size_mul() - Calculate size_t multiplication with saturation at SIZE_MAX
|
||||||
*
|
|
||||||
* @factor1: first factor
|
* @factor1: first factor
|
||||||
* @factor2: second factor
|
* @factor2: second factor
|
||||||
*
|
*
|
||||||
@ -149,7 +149,6 @@ static inline size_t __must_check size_mul(size_t factor1, size_t factor2)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* size_add() - Calculate size_t addition with saturation at SIZE_MAX
|
* size_add() - Calculate size_t addition with saturation at SIZE_MAX
|
||||||
*
|
|
||||||
* @addend1: first addend
|
* @addend1: first addend
|
||||||
* @addend2: second addend
|
* @addend2: second addend
|
||||||
*
|
*
|
||||||
@ -169,7 +168,6 @@ static inline size_t __must_check size_add(size_t addend1, size_t addend2)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* size_sub() - Calculate size_t subtraction with saturation at SIZE_MAX
|
* size_sub() - Calculate size_t subtraction with saturation at SIZE_MAX
|
||||||
*
|
|
||||||
* @minuend: value to subtract from
|
* @minuend: value to subtract from
|
||||||
* @subtrahend: value to subtract from @minuend
|
* @subtrahend: value to subtract from @minuend
|
||||||
*
|
*
|
||||||
@ -192,7 +190,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* array_size() - Calculate size of 2-dimensional array.
|
* array_size() - Calculate size of 2-dimensional array.
|
||||||
*
|
|
||||||
* @a: dimension one
|
* @a: dimension one
|
||||||
* @b: dimension two
|
* @b: dimension two
|
||||||
*
|
*
|
||||||
@ -205,7 +202,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* array3_size() - Calculate size of 3-dimensional array.
|
* array3_size() - Calculate size of 3-dimensional array.
|
||||||
*
|
|
||||||
* @a: dimension one
|
* @a: dimension one
|
||||||
* @b: dimension two
|
* @b: dimension two
|
||||||
* @c: dimension three
|
* @c: dimension three
|
||||||
@ -220,7 +216,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
|||||||
/**
|
/**
|
||||||
* flex_array_size() - Calculate size of a flexible array member
|
* flex_array_size() - Calculate size of a flexible array member
|
||||||
* within an enclosing structure.
|
* within an enclosing structure.
|
||||||
*
|
|
||||||
* @p: Pointer to the structure.
|
* @p: Pointer to the structure.
|
||||||
* @member: Name of the flexible array member.
|
* @member: Name of the flexible array member.
|
||||||
* @count: Number of elements in the array.
|
* @count: Number of elements in the array.
|
||||||
@ -237,7 +232,6 @@ static inline size_t __must_check size_sub(size_t minuend, size_t subtrahend)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* struct_size() - Calculate size of structure with trailing flexible array.
|
* struct_size() - Calculate size of structure with trailing flexible array.
|
||||||
*
|
|
||||||
* @p: Pointer to the structure.
|
* @p: Pointer to the structure.
|
||||||
* @member: Name of the array member.
|
* @member: Name of the array member.
|
||||||
* @count: Number of elements in the array.
|
* @count: Number of elements in the array.
|
||||||
|
@ -225,7 +225,7 @@ static inline void *spi_mem_get_drvdata(struct spi_mem *mem)
|
|||||||
/**
|
/**
|
||||||
* struct spi_controller_mem_ops - SPI memory operations
|
* struct spi_controller_mem_ops - SPI memory operations
|
||||||
* @adjust_op_size: shrink the data xfer of an operation to match controller's
|
* @adjust_op_size: shrink the data xfer of an operation to match controller's
|
||||||
* limitations (can be alignment of max RX/TX size
|
* limitations (can be alignment or max RX/TX size
|
||||||
* limitations)
|
* limitations)
|
||||||
* @supports_op: check if an operation is supported by the controller
|
* @supports_op: check if an operation is supported by the controller
|
||||||
* @exec_op: execute a SPI memory operation
|
* @exec_op: execute a SPI memory operation
|
||||||
|
@ -41,13 +41,21 @@ struct genl_info;
|
|||||||
* @mcgrps: multicast groups used by this family
|
* @mcgrps: multicast groups used by this family
|
||||||
* @n_mcgrps: number of multicast groups
|
* @n_mcgrps: number of multicast groups
|
||||||
* @resv_start_op: first operation for which reserved fields of the header
|
* @resv_start_op: first operation for which reserved fields of the header
|
||||||
* can be validated, new families should leave this field at zero
|
* can be validated and policies are required (see below);
|
||||||
|
* new families should leave this field at zero
|
||||||
* @mcgrp_offset: starting number of multicast group IDs in this family
|
* @mcgrp_offset: starting number of multicast group IDs in this family
|
||||||
* (private)
|
* (private)
|
||||||
* @ops: the operations supported by this family
|
* @ops: the operations supported by this family
|
||||||
* @n_ops: number of operations supported by this family
|
* @n_ops: number of operations supported by this family
|
||||||
* @small_ops: the small-struct operations supported by this family
|
* @small_ops: the small-struct operations supported by this family
|
||||||
* @n_small_ops: number of small-struct operations supported by this family
|
* @n_small_ops: number of small-struct operations supported by this family
|
||||||
|
*
|
||||||
|
* Attribute policies (the combination of @policy and @maxattr fields)
|
||||||
|
* can be attached at the family level or at the operation level.
|
||||||
|
* If both are present the per-operation policy takes precedence.
|
||||||
|
* For operations before @resv_start_op lack of policy means that the core
|
||||||
|
* will perform no attribute parsing or validation. For newer operations
|
||||||
|
* if policy is not provided core will reject all TLV attributes.
|
||||||
*/
|
*/
|
||||||
struct genl_family {
|
struct genl_family {
|
||||||
int id; /* private */
|
int id; /* private */
|
||||||
|
@ -1601,7 +1601,8 @@ struct v4l2_bt_timings {
|
|||||||
((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
|
((bt)->width + V4L2_DV_BT_BLANKING_WIDTH(bt))
|
||||||
#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \
|
#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \
|
||||||
((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \
|
((bt)->vfrontporch + (bt)->vsync + (bt)->vbackporch + \
|
||||||
(bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch)
|
((bt)->interlaced ? \
|
||||||
|
((bt)->il_vfrontporch + (bt)->il_vsync + (bt)->il_vbackporch) : 0))
|
||||||
#define V4L2_DV_BT_FRAME_HEIGHT(bt) \
|
#define V4L2_DV_BT_FRAME_HEIGHT(bt) \
|
||||||
((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
|
((bt)->height + V4L2_DV_BT_BLANKING_HEIGHT(bt))
|
||||||
|
|
||||||
|
@ -16,6 +16,34 @@
|
|||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/vmalloc.h>
|
#include <linux/vmalloc.h>
|
||||||
|
|
||||||
|
#define SKIP(cond, reason) do { \
|
||||||
|
if (cond) { \
|
||||||
|
kunit_skip(test, reason); \
|
||||||
|
return; \
|
||||||
|
} \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clang 11 and earlier generate unwanted libcalls for signed output
|
||||||
|
* on unsigned input.
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_CC_IS_CLANG) && __clang_major__ <= 11
|
||||||
|
# define SKIP_SIGN_MISMATCH(t) SKIP(t, "Clang 11 unwanted libcalls")
|
||||||
|
#else
|
||||||
|
# define SKIP_SIGN_MISMATCH(t) do { } while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Clang 13 and earlier generate unwanted libcalls for 64-bit tests on
|
||||||
|
* 32-bit hosts.
|
||||||
|
*/
|
||||||
|
#if defined(CONFIG_CC_IS_CLANG) && __clang_major__ <= 13 && \
|
||||||
|
BITS_PER_LONG != 64
|
||||||
|
# define SKIP_64_ON_32(t) SKIP(t, "Clang 13 unwanted libcalls")
|
||||||
|
#else
|
||||||
|
# define SKIP_64_ON_32(t) do { } while (0)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFINE_TEST_ARRAY_TYPED(t1, t2, t) \
|
#define DEFINE_TEST_ARRAY_TYPED(t1, t2, t) \
|
||||||
static const struct test_ ## t1 ## _ ## t2 ## __ ## t { \
|
static const struct test_ ## t1 ## _ ## t2 ## __ ## t { \
|
||||||
t1 a; \
|
t1 a; \
|
||||||
@ -94,7 +122,6 @@ DEFINE_TEST_ARRAY(u32) = {
|
|||||||
{-4U, 5U, 1U, -9U, -20U, true, false, true},
|
{-4U, 5U, 1U, -9U, -20U, true, false, true},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BITS_PER_LONG == 64
|
|
||||||
DEFINE_TEST_ARRAY(u64) = {
|
DEFINE_TEST_ARRAY(u64) = {
|
||||||
{0, 0, 0, 0, 0, false, false, false},
|
{0, 0, 0, 0, 0, false, false, false},
|
||||||
{1, 1, 2, 0, 1, false, false, false},
|
{1, 1, 2, 0, 1, false, false, false},
|
||||||
@ -118,7 +145,6 @@ DEFINE_TEST_ARRAY(u64) = {
|
|||||||
false, true, false},
|
false, true, false},
|
||||||
{-15ULL, 10ULL, -5ULL, -25ULL, -150ULL, false, false, true},
|
{-15ULL, 10ULL, -5ULL, -25ULL, -150ULL, false, false, true},
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
DEFINE_TEST_ARRAY(s8) = {
|
DEFINE_TEST_ARRAY(s8) = {
|
||||||
{0, 0, 0, 0, 0, false, false, false},
|
{0, 0, 0, 0, 0, false, false, false},
|
||||||
@ -194,7 +220,6 @@ DEFINE_TEST_ARRAY(s32) = {
|
|||||||
{S32_MAX, S32_MAX, -2, 0, 1, true, false, true},
|
{S32_MAX, S32_MAX, -2, 0, 1, true, false, true},
|
||||||
};
|
};
|
||||||
|
|
||||||
#if BITS_PER_LONG == 64
|
|
||||||
DEFINE_TEST_ARRAY(s64) = {
|
DEFINE_TEST_ARRAY(s64) = {
|
||||||
{0, 0, 0, 0, 0, false, false, false},
|
{0, 0, 0, 0, 0, false, false, false},
|
||||||
|
|
||||||
@ -223,7 +248,6 @@ DEFINE_TEST_ARRAY(s64) = {
|
|||||||
{-128, -1, -129, -127, 128, false, false, false},
|
{-128, -1, -129, -127, 128, false, false, false},
|
||||||
{0, -S64_MAX, -S64_MAX, S64_MAX, 0, false, false, false},
|
{0, -S64_MAX, -S64_MAX, S64_MAX, 0, false, false, false},
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
#define check_one_op(t, fmt, op, sym, a, b, r, of) do { \
|
#define check_one_op(t, fmt, op, sym, a, b, r, of) do { \
|
||||||
int _a_orig = a, _a_bump = a + 1; \
|
int _a_orig = a, _a_bump = a + 1; \
|
||||||
@ -246,7 +270,7 @@ DEFINE_TEST_ARRAY(s64) = {
|
|||||||
|
|
||||||
#define DEFINE_TEST_FUNC_TYPED(n, t, fmt) \
|
#define DEFINE_TEST_FUNC_TYPED(n, t, fmt) \
|
||||||
static void do_test_ ## n(struct kunit *test, const struct test_ ## n *p) \
|
static void do_test_ ## n(struct kunit *test, const struct test_ ## n *p) \
|
||||||
{ \
|
{ \
|
||||||
check_one_op(t, fmt, add, "+", p->a, p->b, p->sum, p->s_of); \
|
check_one_op(t, fmt, add, "+", p->a, p->b, p->sum, p->s_of); \
|
||||||
check_one_op(t, fmt, add, "+", p->b, p->a, p->sum, p->s_of); \
|
check_one_op(t, fmt, add, "+", p->b, p->a, p->sum, p->s_of); \
|
||||||
check_one_op(t, fmt, sub, "-", p->a, p->b, p->diff, p->d_of); \
|
check_one_op(t, fmt, sub, "-", p->a, p->b, p->diff, p->d_of); \
|
||||||
@ -257,6 +281,12 @@ static void do_test_ ## n(struct kunit *test, const struct test_ ## n *p) \
|
|||||||
static void n ## _overflow_test(struct kunit *test) { \
|
static void n ## _overflow_test(struct kunit *test) { \
|
||||||
unsigned i; \
|
unsigned i; \
|
||||||
\
|
\
|
||||||
|
SKIP_64_ON_32(__same_type(t, u64)); \
|
||||||
|
SKIP_64_ON_32(__same_type(t, s64)); \
|
||||||
|
SKIP_SIGN_MISMATCH(__same_type(n ## _tests[0].a, u32) && \
|
||||||
|
__same_type(n ## _tests[0].b, u32) && \
|
||||||
|
__same_type(n ## _tests[0].sum, int)); \
|
||||||
|
\
|
||||||
for (i = 0; i < ARRAY_SIZE(n ## _tests); ++i) \
|
for (i = 0; i < ARRAY_SIZE(n ## _tests); ++i) \
|
||||||
do_test_ ## n(test, &n ## _tests[i]); \
|
do_test_ ## n(test, &n ## _tests[i]); \
|
||||||
kunit_info(test, "%zu %s arithmetic tests finished\n", \
|
kunit_info(test, "%zu %s arithmetic tests finished\n", \
|
||||||
@ -272,10 +302,8 @@ DEFINE_TEST_FUNC(u16, "%d");
|
|||||||
DEFINE_TEST_FUNC(s16, "%d");
|
DEFINE_TEST_FUNC(s16, "%d");
|
||||||
DEFINE_TEST_FUNC(u32, "%u");
|
DEFINE_TEST_FUNC(u32, "%u");
|
||||||
DEFINE_TEST_FUNC(s32, "%d");
|
DEFINE_TEST_FUNC(s32, "%d");
|
||||||
#if BITS_PER_LONG == 64
|
|
||||||
DEFINE_TEST_FUNC(u64, "%llu");
|
DEFINE_TEST_FUNC(u64, "%llu");
|
||||||
DEFINE_TEST_FUNC(s64, "%lld");
|
DEFINE_TEST_FUNC(s64, "%lld");
|
||||||
#endif
|
|
||||||
|
|
||||||
DEFINE_TEST_ARRAY_TYPED(u32, u32, u8) = {
|
DEFINE_TEST_ARRAY_TYPED(u32, u32, u8) = {
|
||||||
{0, 0, 0, 0, 0, false, false, false},
|
{0, 0, 0, 0, 0, false, false, false},
|
||||||
@ -715,13 +743,10 @@ static struct kunit_case overflow_test_cases[] = {
|
|||||||
KUNIT_CASE(s16_s16__s16_overflow_test),
|
KUNIT_CASE(s16_s16__s16_overflow_test),
|
||||||
KUNIT_CASE(u32_u32__u32_overflow_test),
|
KUNIT_CASE(u32_u32__u32_overflow_test),
|
||||||
KUNIT_CASE(s32_s32__s32_overflow_test),
|
KUNIT_CASE(s32_s32__s32_overflow_test),
|
||||||
/* Clang 13 and earlier generate unwanted libcalls on 32-bit. */
|
|
||||||
#if BITS_PER_LONG == 64
|
|
||||||
KUNIT_CASE(u64_u64__u64_overflow_test),
|
KUNIT_CASE(u64_u64__u64_overflow_test),
|
||||||
KUNIT_CASE(s64_s64__s64_overflow_test),
|
KUNIT_CASE(s64_s64__s64_overflow_test),
|
||||||
#endif
|
|
||||||
KUNIT_CASE(u32_u32__u8_overflow_test),
|
|
||||||
KUNIT_CASE(u32_u32__int_overflow_test),
|
KUNIT_CASE(u32_u32__int_overflow_test),
|
||||||
|
KUNIT_CASE(u32_u32__u8_overflow_test),
|
||||||
KUNIT_CASE(u8_u8__int_overflow_test),
|
KUNIT_CASE(u8_u8__int_overflow_test),
|
||||||
KUNIT_CASE(int_int__u8_overflow_test),
|
KUNIT_CASE(int_int__u8_overflow_test),
|
||||||
KUNIT_CASE(shift_sane_test),
|
KUNIT_CASE(shift_sane_test),
|
||||||
|
@ -369,18 +369,10 @@ static int __init test_rhltable(unsigned int entries)
|
|||||||
pr_info("test %d random rhlist add/delete operations\n", entries);
|
pr_info("test %d random rhlist add/delete operations\n", entries);
|
||||||
for (j = 0; j < entries; j++) {
|
for (j = 0; j < entries; j++) {
|
||||||
u32 i = prandom_u32_max(entries);
|
u32 i = prandom_u32_max(entries);
|
||||||
u32 prand = get_random_u32();
|
u32 prand = prandom_u32_max(4);
|
||||||
|
|
||||||
cond_resched();
|
cond_resched();
|
||||||
|
|
||||||
if (prand == 0)
|
|
||||||
prand = get_random_u32();
|
|
||||||
|
|
||||||
if (prand & 1) {
|
|
||||||
prand >>= 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
||||||
if (test_bit(i, obj_in_table)) {
|
if (test_bit(i, obj_in_table)) {
|
||||||
clear_bit(i, obj_in_table);
|
clear_bit(i, obj_in_table);
|
||||||
@ -393,35 +385,29 @@ static int __init test_rhltable(unsigned int entries)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prand & 1) {
|
if (prand & 1) {
|
||||||
prand >>= 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
err = rhltable_insert(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
|
||||||
if (err == 0) {
|
|
||||||
if (WARN(test_and_set_bit(i, obj_in_table), "succeeded to insert same object %d", i))
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
if (WARN(!test_bit(i, obj_in_table), "failed to insert object %d", i))
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (prand & 1) {
|
|
||||||
prand >>= 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
i = prandom_u32_max(entries);
|
|
||||||
if (test_bit(i, obj_in_table)) {
|
|
||||||
err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
|
||||||
WARN(err, "cannot remove element at slot %d", i);
|
|
||||||
if (err == 0)
|
|
||||||
clear_bit(i, obj_in_table);
|
|
||||||
} else {
|
|
||||||
err = rhltable_insert(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
err = rhltable_insert(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
||||||
WARN(err, "failed to insert object %d", i);
|
if (err == 0) {
|
||||||
if (err == 0)
|
if (WARN(test_and_set_bit(i, obj_in_table), "succeeded to insert same object %d", i))
|
||||||
set_bit(i, obj_in_table);
|
continue;
|
||||||
|
} else {
|
||||||
|
if (WARN(!test_bit(i, obj_in_table), "failed to insert object %d", i))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prand & 2) {
|
||||||
|
i = prandom_u32_max(entries);
|
||||||
|
if (test_bit(i, obj_in_table)) {
|
||||||
|
err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
||||||
|
WARN(err, "cannot remove element at slot %d", i);
|
||||||
|
if (err == 0)
|
||||||
|
clear_bit(i, obj_in_table);
|
||||||
|
} else {
|
||||||
|
err = rhltable_insert(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
|
||||||
|
WARN(err, "failed to insert object %d", i);
|
||||||
|
if (err == 0)
|
||||||
|
set_bit(i, obj_in_table);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,10 +342,12 @@ static void j1939_session_skb_drop_old(struct j1939_session *session)
|
|||||||
__skb_unlink(do_skb, &session->skb_queue);
|
__skb_unlink(do_skb, &session->skb_queue);
|
||||||
/* drop ref taken in j1939_session_skb_queue() */
|
/* drop ref taken in j1939_session_skb_queue() */
|
||||||
skb_unref(do_skb);
|
skb_unref(do_skb);
|
||||||
|
spin_unlock_irqrestore(&session->skb_queue.lock, flags);
|
||||||
|
|
||||||
kfree_skb(do_skb);
|
kfree_skb(do_skb);
|
||||||
|
} else {
|
||||||
|
spin_unlock_irqrestore(&session->skb_queue.lock, flags);
|
||||||
}
|
}
|
||||||
spin_unlock_irqrestore(&session->skb_queue.lock, flags);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void j1939_session_skb_queue(struct j1939_session *session,
|
void j1939_session_skb_queue(struct j1939_session *session,
|
||||||
|
@ -3980,7 +3980,7 @@ int skb_append_pagefrags(struct sk_buff *skb, struct page *page,
|
|||||||
} else if (i < MAX_SKB_FRAGS) {
|
} else if (i < MAX_SKB_FRAGS) {
|
||||||
skb_zcopy_downgrade_managed(skb);
|
skb_zcopy_downgrade_managed(skb);
|
||||||
get_page(page);
|
get_page(page);
|
||||||
skb_fill_page_desc(skb, i, page, offset, size);
|
skb_fill_page_desc_noacc(skb, i, page, offset, size);
|
||||||
} else {
|
} else {
|
||||||
return -EMSGSIZE;
|
return -EMSGSIZE;
|
||||||
}
|
}
|
||||||
|
@ -124,7 +124,7 @@ static int eeprom_prepare_data(const struct ethnl_req_info *req_base,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
|
||||||
ret = get_module_eeprom_by_page(dev, &page_data, info->extack);
|
ret = get_module_eeprom_by_page(dev, &page_data, info ? info->extack : NULL);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto err_ops;
|
goto err_ops;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user