This is the 4.9.136 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlvm/IUACgkQONu9yGCS aT6mrw//ctcqOR9aZYTODrVHFZ4puE2xhae5Hr+hwtcE2WSjHWuxJfVkrEuJGlIH 4oQpUfek+eYf3yZy8Iw9WLZH1+P3evGkR0G4gBD/A4f25qCKCcHEXOAPiKgeadnC tj49fEkiJgO3I9vRx8yJnUvhxR/Br5CTOUMdTYsWHbCsdewzCMHWlwpJhLwV053j P9cCrpfJLD55HDdj/jwcn2jfooIVfYsYkut8jP0qTKI04rWEZgOrCSjahN8KHtQ5 GgykDU7db8mmP1IhM+bhGuQReSX7myx/MGx5dS7Mli+5aUtYCMlkqylpL96NuBbe axFpie4nBTny6dIHXodZx59J/T1ERBws9zLzKF1oyxANHEeTiO7q+hbaw9vRLN5G mNWyn0KZ8T0+BWSL1pyA+oVwZkjOcMDil5Gz7Y7A9kE4xj5grrl5IevAtSD6tb9X zwAk5hjvaBmZVVM9NgbG2bGATPNLnv1l57TCRjsx91p9uzReg8gYxNrijIwGqGip HrR/HJvgfI9Df52X8JtGfs+397mXevxl1Lo56Pv1nkagkD1fvhqFLRZgd3y1MoIO DNjdUohw0tBorHqdpvgnZnifuwk3AcPiCMqqfCcGwkcguoM8XFhedTkTPrut5+f4 IPK0Qh25lcT9k+GHJUvDOEzQvx4CGcG8uVj0FgiebWdlS3KZ56s= =0M4P -----END PGP SIGNATURE----- Merge 4.9.136 into android-4.9 Also revert commit b91d532928df ("ipv6: set rt6i_protocol properly in the route when it is installed") as it breaks the test systems. Changes in 4.9.136 xfrm: Validate address prefix lengths in the xfrm selector. xfrm6: call kfree_skb when skb is toobig mac80211: Always report TX status cfg80211: reg: Init wiphy_idx in regulatory_hint_core() mac80211: fix pending queue hang due to TX_DROP cfg80211: Address some corner cases in scan result channel updating mac80211: TDLS: fix skb queue/priority assignment ARM: 8799/1: mm: fix pci_ioremap_io() offset check xfrm: validate template mode ARM: dts: BCM63xx: Fix incorrect interrupt specifiers net: macb: Clean 64b dma addresses if they are not detected soc: fsl: qbman: qman: avoid allocating from non existing gen_pool soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift() nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT mac80211_hwsim: do not omit multicast announce of first added radio Bluetooth: SMP: fix crash in unpairing pxa168fb: prepare the clock qed: Avoid implicit enum conversion in qed_roce_mode_to_flavor qed: Avoid constant logical operation warning in qed_vf_pf_acquire asix: Check for supported Wake-on-LAN modes ax88179_178a: Check for supported Wake-on-LAN modes lan78xx: Check for supported Wake-on-LAN modes sr9800: Check for supported Wake-on-LAN modes r8152: Check for supported Wake-on-LAN Modes smsc75xx: Check for Wake-on-LAN modes smsc95xx: Check for Wake-on-LAN modes perf/ring_buffer: Prevent concurent ring buffer access perf/x86/intel/uncore: Fix PCI BDF address of M3UPI on SKX net: fec: fix rare tx timeout declance: Fix continuation with the adapter identification message net: cxgb3_main: fix a missing-check bug perf symbols: Fix memory corruption because of zero length symbols mm/memory_hotplug.c: fix overflow in test_pages_in_a_zone() MIPS: microMIPS: Fix decoding of swsp16 instruction MIPS: Handle non word sized instructions when examining frame scsi: aacraid: Fix typo in blink status f2fs: fix multiple f2fs_add_link() having same name for inline dentry igb: Remove superfluous reset to PHY and page 0 selection ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs PCI: Disable MSI for HiSilicon Hip06/Hip07 only in Root Port mode i2c: bcm2835: Avoid possible NULL ptr dereference efi/fb: Correct PCI_STD_RESOURCE_END usage ipv6: set rt6i_protocol properly in the route when it is installed platform/x86: acer-wmi: setup accelerometer when ACPI device was found IB/ipoib: Do not warn if IPoIB debugfs doesn't exist IB/core: Fix the validations of a multicast LID in attach or detach operations orangefs: off by ones in xattr size checks rxe: Fix a sleep-in-atomic bug in post_one_send nvme-pci: fix CMB sysfs file removal in reset path net: phy: marvell: Limit 88m1101 autoneg errata to 88E1145 as well. net/mlx5: Fix command completion after timeout access invalid structure tipc: Fix tipc_sk_reinit handling of -EAGAIN tipc: fix a race condition of releasing subscriber object bnxt_en: Don't use rtnl lock to protect link change logic in workqueue. ath10k: fix NAPI enable/disable symmetry for AHB interface ARM: dts: bcm283x: Reserve first page for firmware btrfs: fiemap: Cache and merge fiemap extent before submit it to user ata: sata_rcar: Handle return value of clk_prepare_enable reset: hi6220: Set module license so that it can be loaded ASoC: Intel: Skylake: Fix to parse consecutive string tkns in manifest arch/sparc: increase CONFIG_NODES_SHIFT on SPARC64 to 5 mac80211: fix TX aggregation start/stop callback race libata: fix error checking in in ata_parse_force_one() net: ethernet: stmmac: Fix altr_tse_pcs SGMII Initialization qlcnic: Fix tunnel offload for 82xx adapters x86/cpu/cyrix: Add alternative Device ID of Geode GX1 SoC ARM: 8677/1: boot/compressed: fix decompressor header layout for v7-M gpu: ipu-v3: Fix CSI selection for VDIC elevator: fix truncation of icq_cache_name net: stmmac: ensure jumbo_frm error return is correctly checked for -ve value Btrfs: clear EXTENT_DEFRAG bits in finish_ordered_io ufs: we need to sync inode before freeing it net/mlx5e: Fix fixpoint divide exception in mlx5e_am_stats_compare ip6_tunnel: Correct tos value in collect_md mode net/mlx5: Fix driver load error flow when firmware is stuck perf evsel: Fix probing of precise_ip level for default cycles event perf probe: Fix probe definition for inlined functions net/mlx5: Fix health work queue spin lock to IRQ safe usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock usb: renesas_usbhs: gadget: fix unused-but-set-variable warning usb: dwc3: omap: remove IRQ_NOAUTOEN used with shared irq clk: samsung: Fix m2m scaler clock on Exynos542x ptr_ring: fix up after recent ptr_ring changes staging: wilc1000: Fix problem with wrong vif index rds: ib: Fix missing call to rds_ib_dev_put in rds_ib_setup_qp iio: adc: Revert "axp288: Drop bogus AXP288_ADC_TS_PIN_CTRL register modifications" qed: Warn PTT usage by wrong hw-function ocfs2: fix deadlock caused by recursive locking in xattr net: cdc_ncm: GetNtbFormat endian fix sctp: use right member as the param of list_for_each_entry ALSA: hda - No loopback on ALC299 codec ath10k: convert warning about non-existent OTP board id to debug message ipv6: fix cleanup ordering for ip6_mr failure IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush IB/rxe: put the pool on allocation failure nbd: only set MSG_MORE when we have more to send mm/frame_vector.c: release a semaphore in 'get_vaddr_frames()' IB/mlx5: Avoid passing an invalid QP type to firmware scsi: qla2xxx: Avoid double completion of abort command drm: bochs: Don't remove uninitialized fbdev framebuffer i40e: avoid NVM acquire deadlock during NVM update Revert "IB/ipoib: Update broadcast object if PKey value was changed in index 0" Btrfs: incremental send, fix invalid memory access drm/msm: Fix possible null dereference on failure of get_pages() module: fix DEBUG_SET_MODULE_RONX typo iio: pressure: zpa2326: Remove always-true check which confuses gcc l2tp: remove configurable payload offset macsec: fix memory leaks when skb_to_sgvec fails perf/core: Fix locking for children siblings group read cifs: Use ULL suffix for 64-bit constant futex: futex_wake_op, do not fail on invalid op ALSA: hda - Fix incorrect usage of IS_REACHABLE() test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches xen-netfront: Update features after registering netdev sparc64: Fix regression in pmdp_invalidate(). xen-netfront: Fix mismatched rtnl_unlock enic: do not overwrite error code bonding: ratelimit failed speed/duplex update warning nvmet: fix space padding in serial number iio: buffer: fix the function signature to match implementation x86/paravirt: Fix some warning messages IB/mlx4: Fix an error handling path in 'mlx4_ib_rereg_user_mr()' libertas: call into generic suspend code before turning off power xhci: Fix USB3 NULL pointer dereference at logical disconnect. perf tests: Fix indexing when invoking subtests ARM: dts: imx53-qsb: disable 1.2GHz OPP rxrpc: Don't check RXRPC_CALL_TX_LAST after calling rxrpc_rotate_tx_window() rxrpc: Only take the rwind and mtu values from latest ACK net: ena: fix NULL dereference due to untimely napi initialization fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters() mtd: spi-nor: Add support for is25wp series chips Revert "netfilter: ipv6: nf_defrag: drop skb dst before queueing" perf tools: Disable parallelism for 'make clean' bridge: do not add port to router list when receives query with source 0.0.0.0 net: bridge: remove ipv6 zero address check in mcast queries ipv6: mcast: fix a use-after-free in inet6_mc_check ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called llc: set SOCK_RCU_FREE in llc_sap_add_socket() net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs net: sched: gred: pass the right attribute to gred_change_table_def() net: socket: fix a missing-check bug net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules net: udp: fix handling of CHECKSUM_COMPLETE packets r8169: fix NAPI handling under high load sctp: fix race on sctp_id2asoc vhost: Fix Spectre V1 vulnerability ethtool: fix a privilege escalation bug bonding: fix length of actor system net: drop skb on failure in ip_check_defrag() net: fix pskb_trim_rcsum_slow() with odd trim offset rtnetlink: Disallow FDB configuration for non-Ethernet device ip6_tunnel: Fix encapsulation layout Revert "x86/mm: Expand static page table for fixmap space" crypto: shash - Fix a sleep-in-atomic bug in shash_setkey_unaligned ahci: don't ignore result code of ahci_reset_controller() gpio: mxs: Get rid of external API call xfs: truncate transaction does not modify the inobt cachefiles: fix the race between cachefiles_bury_object() and rmdir(2) ptp: fix Spectre v1 vulnerability drm/edid: Add 6 bpc quirk for BOE panel in HP Pavilion 15-n233sl RDMA/ucma: Fix Spectre v1 vulnerability IB/ucm: Fix Spectre v1 vulnerability cdc-acm: correct counting of UART states in serial state notification usb: gadget: storage: Fix Spectre v1 vulnerability USB: fix the usbfs flag sanitization for control transfers Input: elan_i2c - add ACPI ID for Lenovo IdeaPad 330-15IGM sched/fair: Fix throttle_list starvation with low CFS quota x86/percpu: Fix this_cpu_read() x86/time: Correct the attribute on jiffies' definition net: fs_enet: do not call phy_stop() in interrupts posix-timers: Sanitize overrun handling Linux 4.9.136 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
a0f30ae1d6
|
@ -314,7 +314,6 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
|
|||
This facility can be used to prevent such uncontrolled
|
||||
GPE floodings.
|
||||
Format: <int>
|
||||
Support masking of GPEs numbered from 0x00 to 0x7f.
|
||||
|
||||
acpi_no_auto_serialize [HW,ACPI]
|
||||
Disable auto-serialization of AML methods
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 135
|
||||
SUBLEVEL = 136
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
|
@ -17,14 +17,12 @@
|
|||
@ there.
|
||||
.inst 'M' | ('Z' << 8) | (0x1310 << 16) @ tstne r0, #0x4d000
|
||||
#else
|
||||
mov r0, r0
|
||||
W(mov) r0, r0
|
||||
#endif
|
||||
.endm
|
||||
|
||||
.macro __EFI_HEADER
|
||||
#ifdef CONFIG_EFI_STUB
|
||||
b __efi_start
|
||||
|
||||
.set start_offset, __efi_start - start
|
||||
.org start + 0x3c
|
||||
@
|
||||
|
|
|
@ -130,19 +130,22 @@ start:
|
|||
.rept 7
|
||||
__nop
|
||||
.endr
|
||||
ARM( mov r0, r0 )
|
||||
ARM( b 1f )
|
||||
THUMB( badr r12, 1f )
|
||||
THUMB( bx r12 )
|
||||
#ifndef CONFIG_THUMB2_KERNEL
|
||||
mov r0, r0
|
||||
#else
|
||||
AR_CLASS( sub pc, pc, #3 ) @ A/R: switch to Thumb2 mode
|
||||
M_CLASS( nop.w ) @ M: already in Thumb2 mode
|
||||
.thumb
|
||||
#endif
|
||||
W(b) 1f
|
||||
|
||||
.word _magic_sig @ Magic numbers to help the loader
|
||||
.word _magic_start @ absolute load/run zImage address
|
||||
.word _magic_end @ zImage end address
|
||||
.word 0x04030201 @ endianness flag
|
||||
|
||||
THUMB( .thumb )
|
||||
1: __EFI_HEADER
|
||||
|
||||
__EFI_HEADER
|
||||
1:
|
||||
ARM_BE8( setend be ) @ go BE8 if compiled for BE8
|
||||
AR_CLASS( mrs r9, cpsr )
|
||||
#ifdef CONFIG_ARM_VIRT_EXT
|
||||
|
|
|
@ -3,6 +3,11 @@
|
|||
#include <dt-bindings/clock/bcm2835-aux.h>
|
||||
#include <dt-bindings/gpio/gpio.h>
|
||||
|
||||
/* firmware-provided startup stubs live here, where the secondary CPUs are
|
||||
* spinning.
|
||||
*/
|
||||
/memreserve/ 0x00000000 0x00001000;
|
||||
|
||||
/* This include file covers the common peripherals and configuration between
|
||||
* bcm2835 and bcm2836 implementations, leaving the CPU configuration to
|
||||
* bcm2835.dtsi and bcm2836.dtsi.
|
||||
|
|
|
@ -105,21 +105,23 @@
|
|||
global_timer: timer@1e200 {
|
||||
compatible = "arm,cortex-a9-global-timer";
|
||||
reg = <0x1e200 0x20>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>;
|
||||
clocks = <&axi_clk>;
|
||||
};
|
||||
|
||||
local_timer: local-timer@1e600 {
|
||||
compatible = "arm,cortex-a9-twd-timer";
|
||||
reg = <0x1e600 0x20>;
|
||||
interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) |
|
||||
IRQ_TYPE_EDGE_RISING)>;
|
||||
clocks = <&axi_clk>;
|
||||
};
|
||||
|
||||
twd_watchdog: watchdog@1e620 {
|
||||
compatible = "arm,cortex-a9-twd-wdt";
|
||||
reg = <0x1e620 0x20>;
|
||||
interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) |
|
||||
IRQ_TYPE_LEVEL_HIGH)>;
|
||||
};
|
||||
|
||||
armpll: armpll {
|
||||
|
@ -157,7 +159,7 @@
|
|||
serial0: serial@600 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x600 0x1b>;
|
||||
interrupts = <GIC_SPI 32 0>;
|
||||
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&periph_clk>;
|
||||
clock-names = "periph";
|
||||
status = "disabled";
|
||||
|
@ -166,7 +168,7 @@
|
|||
serial1: serial@620 {
|
||||
compatible = "brcm,bcm6345-uart";
|
||||
reg = <0x620 0x1b>;
|
||||
interrupts = <GIC_SPI 33 0>;
|
||||
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&periph_clk>;
|
||||
clock-names = "periph";
|
||||
status = "disabled";
|
||||
|
@ -179,7 +181,7 @@
|
|||
reg = <0x2000 0x600>, <0xf0 0x10>;
|
||||
reg-names = "nand", "nand-int-base";
|
||||
status = "disabled";
|
||||
interrupts = <GIC_SPI 38 0>;
|
||||
interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "nand";
|
||||
};
|
||||
|
||||
|
|
|
@ -130,6 +130,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
&cpu0 {
|
||||
/* CPU rated to 1GHz, not 1.2GHz as per the default settings */
|
||||
operating-points = <
|
||||
/* kHz uV */
|
||||
166666 850000
|
||||
400000 900000
|
||||
800000 1050000
|
||||
1000000 1200000
|
||||
>;
|
||||
};
|
||||
|
||||
&esdhc1 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_esdhc1>;
|
||||
|
|
|
@ -473,7 +473,7 @@ void pci_ioremap_set_mem_type(int mem_type)
|
|||
|
||||
int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr)
|
||||
{
|
||||
BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT);
|
||||
BUG_ON(offset + SZ_64K - 1 > IO_SPACE_LIMIT);
|
||||
|
||||
return ioremap_page_range(PCI_IO_VIRT_BASE + offset,
|
||||
PCI_IO_VIRT_BASE + offset + SZ_64K,
|
||||
|
|
|
@ -964,7 +964,7 @@ struct mm16_r3_format { /* Load from global pointer format */
|
|||
struct mm16_r5_format { /* Load/store from stack pointer format */
|
||||
__BITFIELD_FIELD(unsigned int opcode : 6,
|
||||
__BITFIELD_FIELD(unsigned int rt : 5,
|
||||
__BITFIELD_FIELD(signed int simmediate : 5,
|
||||
__BITFIELD_FIELD(unsigned int imm : 5,
|
||||
__BITFIELD_FIELD(unsigned int : 16, /* Ignored */
|
||||
;))))
|
||||
};
|
||||
|
|
|
@ -212,7 +212,7 @@ static inline int is_ra_save_ins(union mips_instruction *ip, int *poff)
|
|||
if (ip->mm16_r5_format.rt != 31)
|
||||
return 0;
|
||||
|
||||
*poff = ip->mm16_r5_format.simmediate;
|
||||
*poff = ip->mm16_r5_format.imm;
|
||||
*poff = (*poff << 2) / sizeof(ulong);
|
||||
return 1;
|
||||
|
||||
|
@ -346,6 +346,7 @@ static int get_frame_info(struct mips_frame_info *info)
|
|||
bool is_mmips = IS_ENABLED(CONFIG_CPU_MICROMIPS);
|
||||
union mips_instruction insn, *ip, *ip_end;
|
||||
const unsigned int max_insns = 128;
|
||||
unsigned int last_insn_size = 0;
|
||||
unsigned int i;
|
||||
|
||||
info->pc_offset = -1;
|
||||
|
@ -357,15 +358,19 @@ static int get_frame_info(struct mips_frame_info *info)
|
|||
|
||||
ip_end = (void *)ip + info->func_size;
|
||||
|
||||
for (i = 0; i < max_insns && ip < ip_end; i++, ip++) {
|
||||
for (i = 0; i < max_insns && ip < ip_end; i++) {
|
||||
ip = (void *)ip + last_insn_size;
|
||||
if (is_mmips && mm_insn_16bit(ip->halfword[0])) {
|
||||
insn.halfword[0] = 0;
|
||||
insn.halfword[1] = ip->halfword[0];
|
||||
last_insn_size = 2;
|
||||
} else if (is_mmips) {
|
||||
insn.halfword[0] = ip->halfword[1];
|
||||
insn.halfword[1] = ip->halfword[0];
|
||||
last_insn_size = 4;
|
||||
} else {
|
||||
insn.word = ip->word;
|
||||
last_insn_size = 4;
|
||||
}
|
||||
|
||||
if (is_jump_ins(&insn))
|
||||
|
@ -387,8 +392,6 @@ static int get_frame_info(struct mips_frame_info *info)
|
|||
tmp = (ip->halfword[0] >> 1);
|
||||
info->frame_size = -(signed short)(tmp & 0xf);
|
||||
}
|
||||
ip = (void *) &ip->halfword[1];
|
||||
ip--;
|
||||
} else
|
||||
#endif
|
||||
info->frame_size = - ip->i_format.simmediate;
|
||||
|
|
|
@ -290,9 +290,13 @@ config NUMA
|
|||
depends on SPARC64 && SMP
|
||||
|
||||
config NODES_SHIFT
|
||||
int
|
||||
default "4"
|
||||
int "Maximum NUMA Nodes (as a power of 2)"
|
||||
range 4 5 if SPARC64
|
||||
default "5"
|
||||
depends on NEED_MULTIPLE_NODES
|
||||
help
|
||||
Specify the maximum number of NUMA Nodes available on the target
|
||||
system. Increases memory reserved to accommodate various tables.
|
||||
|
||||
# Some NUMA nodes have memory ranges that span
|
||||
# other nodes. Even though a pfn is valid and
|
||||
|
|
|
@ -163,13 +163,10 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr,
|
|||
pte_unmap(pte);
|
||||
}
|
||||
|
||||
void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp, pmd_t pmd)
|
||||
|
||||
static void __set_pmd_acct(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t orig, pmd_t pmd)
|
||||
{
|
||||
pmd_t orig = *pmdp;
|
||||
|
||||
*pmdp = pmd;
|
||||
|
||||
if (mm == &init_mm)
|
||||
return;
|
||||
|
||||
|
@ -219,6 +216,15 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
|||
}
|
||||
}
|
||||
|
||||
void set_pmd_at(struct mm_struct *mm, unsigned long addr,
|
||||
pmd_t *pmdp, pmd_t pmd)
|
||||
{
|
||||
pmd_t orig = *pmdp;
|
||||
|
||||
*pmdp = pmd;
|
||||
__set_pmd_acct(mm, addr, orig, pmd);
|
||||
}
|
||||
|
||||
static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
|
||||
unsigned long address, pmd_t *pmdp, pmd_t pmd)
|
||||
{
|
||||
|
@ -227,6 +233,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,
|
|||
do {
|
||||
old = *pmdp;
|
||||
} while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd);
|
||||
__set_pmd_acct(vma->vm_mm, address, old, pmd);
|
||||
|
||||
return old;
|
||||
}
|
||||
|
|
|
@ -3767,16 +3767,16 @@ static const struct pci_device_id skx_uncore_pci_ids[] = {
|
|||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(21, 5, SKX_PCI_UNCORE_M2PCIE, 3),
|
||||
},
|
||||
{ /* M3UPI0 Link 0 */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204C),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 0, SKX_PCI_UNCORE_M3UPI, 0),
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204D),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 1, SKX_PCI_UNCORE_M3UPI, 0),
|
||||
},
|
||||
{ /* M3UPI0 Link 1 */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204D),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 1, SKX_PCI_UNCORE_M3UPI, 1),
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204E),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 2, SKX_PCI_UNCORE_M3UPI, 1),
|
||||
},
|
||||
{ /* M3UPI1 Link 2 */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204C),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 4, SKX_PCI_UNCORE_M3UPI, 2),
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204D),
|
||||
.driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 5, SKX_PCI_UNCORE_M3UPI, 2),
|
||||
},
|
||||
{ /* end: all zeroes */ }
|
||||
};
|
||||
|
|
|
@ -14,16 +14,6 @@
|
|||
#ifndef _ASM_X86_FIXMAP_H
|
||||
#define _ASM_X86_FIXMAP_H
|
||||
|
||||
/*
|
||||
* Exposed to assembly code for setting up initial page tables. Cannot be
|
||||
* calculated in assembly code (fixmap entries are an enum), but is sanity
|
||||
* checked in the actual fixmap C code to make sure that the fixmap is
|
||||
* covered fully.
|
||||
*/
|
||||
#define FIXMAP_PMD_NUM 2
|
||||
/* fixmap starts downwards from the 507th entry in level2_fixmap_pgt */
|
||||
#define FIXMAP_PMD_TOP 507
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <linux/kernel.h>
|
||||
#include <asm/acpi.h>
|
||||
|
|
|
@ -184,22 +184,22 @@ do { \
|
|||
typeof(var) pfo_ret__; \
|
||||
switch (sizeof(var)) { \
|
||||
case 1: \
|
||||
asm(op "b "__percpu_arg(1)",%0" \
|
||||
asm volatile(op "b "__percpu_arg(1)",%0"\
|
||||
: "=q" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 2: \
|
||||
asm(op "w "__percpu_arg(1)",%0" \
|
||||
asm volatile(op "w "__percpu_arg(1)",%0"\
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 4: \
|
||||
asm(op "l "__percpu_arg(1)",%0" \
|
||||
asm volatile(op "l "__percpu_arg(1)",%0"\
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
case 8: \
|
||||
asm(op "q "__percpu_arg(1)",%0" \
|
||||
asm volatile(op "q "__percpu_arg(1)",%0"\
|
||||
: "=r" (pfo_ret__) \
|
||||
: "m" (var)); \
|
||||
break; \
|
||||
|
|
|
@ -13,14 +13,13 @@
|
|||
#include <asm/processor.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <linux/threads.h>
|
||||
#include <asm/fixmap.h>
|
||||
|
||||
extern pud_t level3_kernel_pgt[512];
|
||||
extern pud_t level3_ident_pgt[512];
|
||||
extern pmd_t level2_kernel_pgt[512];
|
||||
extern pmd_t level2_fixmap_pgt[512];
|
||||
extern pmd_t level2_ident_pgt[512];
|
||||
extern pte_t level1_fixmap_pgt[512 * FIXMAP_PMD_NUM];
|
||||
extern pte_t level1_fixmap_pgt[512];
|
||||
extern pgd_t init_level4_pgt[];
|
||||
|
||||
#define swapper_pg_dir init_level4_pgt
|
||||
|
|
|
@ -253,6 +253,7 @@ static void init_cyrix(struct cpuinfo_x86 *c)
|
|||
break;
|
||||
|
||||
case 4: /* MediaGX/GXm or Geode GXM/GXLV/GX1 */
|
||||
case 11: /* GX1 with inverted Device ID */
|
||||
#ifdef CONFIG_PCI
|
||||
{
|
||||
u32 vendor, device;
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "../entry/calling.h"
|
||||
#include <asm/export.h>
|
||||
#include <asm/nospec-branch.h>
|
||||
#include <asm/fixmap.h>
|
||||
|
||||
#ifdef CONFIG_PARAVIRT
|
||||
#include <asm/asm-offsets.h>
|
||||
|
@ -494,20 +493,13 @@ NEXT_PAGE(level2_kernel_pgt)
|
|||
KERNEL_IMAGE_SIZE/PMD_SIZE)
|
||||
|
||||
NEXT_PAGE(level2_fixmap_pgt)
|
||||
.fill (512 - 4 - FIXMAP_PMD_NUM),8,0
|
||||
pgtno = 0
|
||||
.rept (FIXMAP_PMD_NUM)
|
||||
.quad level1_fixmap_pgt + (pgtno << PAGE_SHIFT) - __START_KERNEL_map \
|
||||
+ _PAGE_TABLE;
|
||||
pgtno = pgtno + 1
|
||||
.endr
|
||||
/* 6 MB reserved space + a 2MB hole */
|
||||
.fill 4,8,0
|
||||
.fill 506,8,0
|
||||
.quad level1_fixmap_pgt - __START_KERNEL_map + _PAGE_TABLE
|
||||
/* 8MB reserved for vsyscalls + a 2MB hole = 4 + 1 entries */
|
||||
.fill 5,8,0
|
||||
|
||||
NEXT_PAGE(level1_fixmap_pgt)
|
||||
.rept (FIXMAP_PMD_NUM)
|
||||
.fill 512,8,0
|
||||
.endr
|
||||
|
||||
#undef PMDS
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ unsigned paravirt_patch_call(void *insnbuf,
|
|||
|
||||
if (len < 5) {
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
WARN_ONCE("Failing to patch indirect CALL in %ps\n", (void *)addr);
|
||||
WARN_ONCE(1, "Failing to patch indirect CALL in %ps\n", (void *)addr);
|
||||
#endif
|
||||
return len; /* call too long for patch site */
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target,
|
|||
|
||||
if (len < 5) {
|
||||
#ifdef CONFIG_RETPOLINE
|
||||
WARN_ONCE("Failing to patch indirect JMP in %ps\n", (void *)addr);
|
||||
WARN_ONCE(1, "Failing to patch indirect JMP in %ps\n", (void *)addr);
|
||||
#endif
|
||||
return len; /* call too long for patch site */
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <asm/time.h>
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
__visible volatile unsigned long jiffies __cacheline_aligned = INITIAL_JIFFIES;
|
||||
__visible volatile unsigned long jiffies __cacheline_aligned_in_smp = INITIAL_JIFFIES;
|
||||
#endif
|
||||
|
||||
unsigned long profile_pc(struct pt_regs *regs)
|
||||
|
|
|
@ -536,15 +536,6 @@ void __native_set_fixmap(enum fixed_addresses idx, pte_t pte)
|
|||
{
|
||||
unsigned long address = __fix_to_virt(idx);
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
/*
|
||||
* Ensure that the static initial page tables are covering the
|
||||
* fixmap completely.
|
||||
*/
|
||||
BUILD_BUG_ON(__end_of_permanent_fixed_addresses >
|
||||
(FIXMAP_PMD_NUM * PTRS_PER_PTE));
|
||||
#endif
|
||||
|
||||
if (idx >= __end_of_fixed_addresses) {
|
||||
BUG();
|
||||
return;
|
||||
|
|
|
@ -1936,7 +1936,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
|
|||
* L3_k[511] -> level2_fixmap_pgt */
|
||||
convert_pfn_mfn(level3_kernel_pgt);
|
||||
|
||||
/* L3_k[511][508-FIXMAP_PMD_NUM ... 507] -> level1_fixmap_pgt */
|
||||
/* L3_k[511][506] -> level1_fixmap_pgt */
|
||||
convert_pfn_mfn(level2_fixmap_pgt);
|
||||
}
|
||||
/* We get [511][511] and have Xen's version of level2_kernel_pgt */
|
||||
|
@ -1970,11 +1970,7 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn)
|
|||
set_page_prot(level2_ident_pgt, PAGE_KERNEL_RO);
|
||||
set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO);
|
||||
set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO);
|
||||
|
||||
for (i = 0; i < FIXMAP_PMD_NUM; i++) {
|
||||
set_page_prot(level1_fixmap_pgt + i * PTRS_PER_PTE,
|
||||
PAGE_KERNEL_RO);
|
||||
}
|
||||
set_page_prot(level1_fixmap_pgt, PAGE_KERNEL_RO);
|
||||
|
||||
/* Pin down new L4 */
|
||||
pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE,
|
||||
|
|
|
@ -41,7 +41,7 @@ static int shash_setkey_unaligned(struct crypto_shash *tfm, const u8 *key,
|
|||
int err;
|
||||
|
||||
absize = keylen + (alignmask & ~(crypto_tfm_ctx_alignment() - 1));
|
||||
buffer = kmalloc(absize, GFP_KERNEL);
|
||||
buffer = kmalloc(absize, GFP_ATOMIC);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
|
@ -726,14 +726,8 @@ end:
|
|||
* interface:
|
||||
* echo unmask > /sys/firmware/acpi/interrupts/gpe00
|
||||
*/
|
||||
|
||||
/*
|
||||
* Currently, the GPE flooding prevention only supports to mask the GPEs
|
||||
* numbered from 00 to 7f.
|
||||
*/
|
||||
#define ACPI_MASKABLE_GPE_MAX 0x80
|
||||
|
||||
static u64 __initdata acpi_masked_gpes;
|
||||
#define ACPI_MASKABLE_GPE_MAX 0xFF
|
||||
static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
|
||||
|
||||
static int __init acpi_gpe_set_masked_gpes(char *val)
|
||||
{
|
||||
|
@ -741,7 +735,7 @@ static int __init acpi_gpe_set_masked_gpes(char *val)
|
|||
|
||||
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
|
||||
return -EINVAL;
|
||||
acpi_masked_gpes |= ((u64)1<<gpe);
|
||||
set_bit(gpe, acpi_masked_gpes_map);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -753,15 +747,11 @@ void __init acpi_gpe_apply_masked_gpes(void)
|
|||
acpi_status status;
|
||||
u8 gpe;
|
||||
|
||||
for (gpe = 0;
|
||||
gpe < min_t(u8, ACPI_MASKABLE_GPE_MAX, acpi_current_gpe_count);
|
||||
gpe++) {
|
||||
if (acpi_masked_gpes & ((u64)1<<gpe)) {
|
||||
status = acpi_get_gpe_device(gpe, &handle);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
pr_info("Masking GPE 0x%x.\n", gpe);
|
||||
(void)acpi_mask_gpe(handle, gpe, TRUE);
|
||||
}
|
||||
for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
|
||||
status = acpi_get_gpe_device(gpe, &handle);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
pr_info("Masking GPE 0x%x.\n", gpe);
|
||||
(void)acpi_mask_gpe(handle, gpe, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -624,8 +624,11 @@ static void ahci_pci_save_initial_config(struct pci_dev *pdev,
|
|||
static int ahci_pci_reset_controller(struct ata_host *host)
|
||||
{
|
||||
struct pci_dev *pdev = to_pci_dev(host->dev);
|
||||
int rc;
|
||||
|
||||
ahci_reset_controller(host);
|
||||
rc = ahci_reset_controller(host);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
|
||||
struct ahci_host_priv *hpriv = host->private_data;
|
||||
|
|
|
@ -6781,7 +6781,7 @@ static int __init ata_parse_force_one(char **cur,
|
|||
}
|
||||
|
||||
force_ent->port = simple_strtoul(id, &endp, 10);
|
||||
if (p == endp || *endp != '\0') {
|
||||
if (id == endp || *endp != '\0') {
|
||||
*reason = "invalid port/link";
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -890,7 +890,10 @@ static int sata_rcar_probe(struct platform_device *pdev)
|
|||
dev_err(&pdev->dev, "failed to get access to sata clock\n");
|
||||
return PTR_ERR(priv->clk);
|
||||
}
|
||||
clk_prepare_enable(priv->clk);
|
||||
|
||||
ret = clk_prepare_enable(priv->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
host = ata_host_alloc(&pdev->dev, 1);
|
||||
if (!host) {
|
||||
|
@ -970,8 +973,11 @@ static int sata_rcar_resume(struct device *dev)
|
|||
struct ata_host *host = dev_get_drvdata(dev);
|
||||
struct sata_rcar_priv *priv = host->private_data;
|
||||
void __iomem *base = priv->base;
|
||||
int ret;
|
||||
|
||||
clk_prepare_enable(priv->clk);
|
||||
ret = clk_prepare_enable(priv->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* ack and mask */
|
||||
iowrite32(0, base + SATAINTSTAT_REG);
|
||||
|
@ -988,8 +994,11 @@ static int sata_rcar_restore(struct device *dev)
|
|||
{
|
||||
struct ata_host *host = dev_get_drvdata(dev);
|
||||
struct sata_rcar_priv *priv = host->private_data;
|
||||
int ret;
|
||||
|
||||
clk_prepare_enable(priv->clk);
|
||||
ret = clk_prepare_enable(priv->clk);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
sata_rcar_setup_port(host);
|
||||
|
||||
|
|
|
@ -269,7 +269,7 @@ static inline int sock_send_bvec(struct nbd_device *nbd, struct bio_vec *bvec,
|
|||
static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd)
|
||||
{
|
||||
struct request *req = blk_mq_rq_from_pdu(cmd);
|
||||
int result, flags;
|
||||
int result;
|
||||
struct nbd_request request;
|
||||
unsigned long size = blk_rq_bytes(req);
|
||||
struct bio *bio;
|
||||
|
@ -309,7 +309,6 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd)
|
|||
if (type != NBD_CMD_WRITE)
|
||||
return 0;
|
||||
|
||||
flags = 0;
|
||||
bio = req->bio;
|
||||
while (bio) {
|
||||
struct bio *next = bio->bi_next;
|
||||
|
@ -318,9 +317,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd)
|
|||
|
||||
bio_for_each_segment(bvec, bio, iter) {
|
||||
bool is_last = !next && bio_iter_last(bvec, iter);
|
||||
int flags = is_last ? 0 : MSG_MORE;
|
||||
|
||||
if (is_last)
|
||||
flags = MSG_MORE;
|
||||
dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes data\n",
|
||||
cmd, bvec.bv_len);
|
||||
result = sock_send_bvec(nbd, &bvec, flags);
|
||||
|
|
|
@ -987,7 +987,7 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = {
|
|||
GATE(0, "aclk400_isp", "mout_user_aclk400_isp",
|
||||
GATE_BUS_TOP, 16, 0, 0),
|
||||
GATE(0, "aclk400_mscl", "mout_user_aclk400_mscl",
|
||||
GATE_BUS_TOP, 17, 0, 0),
|
||||
GATE_BUS_TOP, 17, CLK_IS_CRITICAL, 0),
|
||||
GATE(0, "aclk200_disp1", "mout_user_aclk200_disp1",
|
||||
GATE_BUS_TOP, 18, CLK_IS_CRITICAL, 0),
|
||||
GATE(CLK_SCLK_MPHY_IXTAL24, "sclk_mphy_ixtal24", "mphy_refclk_ixtal24",
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/gpio/driver.h>
|
||||
/* FIXME: for gpio_get_value(), replace this by direct register read */
|
||||
#include <linux/gpio.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#define MXS_SET 0x4
|
||||
|
@ -94,7 +92,7 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
|
|||
port->both_edges &= ~pin_mask;
|
||||
switch (type) {
|
||||
case IRQ_TYPE_EDGE_BOTH:
|
||||
val = gpio_get_value(port->gc.base + d->hwirq);
|
||||
val = port->gc.get(&port->gc, d->hwirq);
|
||||
if (val)
|
||||
edge = GPIO_INT_FALL_EDGE;
|
||||
else
|
||||
|
|
|
@ -138,6 +138,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
|
|||
info->fix.smem_start = 0;
|
||||
info->fix.smem_len = size;
|
||||
|
||||
bochs->fb.initialized = true;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -155,7 +156,6 @@ static int bochs_fbdev_destroy(struct bochs_device *bochs)
|
|||
gfb->obj = NULL;
|
||||
}
|
||||
|
||||
drm_fb_helper_fini(&bochs->fb.helper);
|
||||
drm_framebuffer_unregister_private(&gfb->base);
|
||||
drm_framebuffer_cleanup(&gfb->base);
|
||||
|
||||
|
@ -188,7 +188,6 @@ int bochs_fbdev_init(struct bochs_device *bochs)
|
|||
if (ret)
|
||||
goto fini;
|
||||
|
||||
bochs->fb.initialized = true;
|
||||
return 0;
|
||||
|
||||
fini:
|
||||
|
@ -198,9 +197,9 @@ fini:
|
|||
|
||||
void bochs_fbdev_fini(struct bochs_device *bochs)
|
||||
{
|
||||
if (!bochs->fb.initialized)
|
||||
return;
|
||||
if (bochs->fb.initialized)
|
||||
bochs_fbdev_destroy(bochs);
|
||||
|
||||
bochs_fbdev_destroy(bochs);
|
||||
drm_fb_helper_fini(&bochs->fb.helper);
|
||||
bochs->fb.initialized = false;
|
||||
}
|
||||
|
|
|
@ -107,6 +107,9 @@ static const struct edid_quirk {
|
|||
/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "AEO", 0, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
/* BOE model on HP Pavilion 15-n233sl reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "BOE", 0x78b, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
/* CPT panel of Asus UX303LA reports 8 bpc, but is a 6 bpc panel */
|
||||
{ "CPT", 0x17df, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
|
|
|
@ -118,17 +118,19 @@ static void put_pages(struct drm_gem_object *obj)
|
|||
struct msm_gem_object *msm_obj = to_msm_bo(obj);
|
||||
|
||||
if (msm_obj->pages) {
|
||||
/* For non-cached buffers, ensure the new pages are clean
|
||||
* because display controller, GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents, DMA_BIDIRECTIONAL);
|
||||
if (msm_obj->sgt) {
|
||||
/* For non-cached buffers, ensure the new
|
||||
* pages are clean because display controller,
|
||||
* GPU, etc. are not coherent:
|
||||
*/
|
||||
if (msm_obj->flags & (MSM_BO_WC|MSM_BO_UNCACHED))
|
||||
dma_unmap_sg(obj->dev->dev, msm_obj->sgt->sgl,
|
||||
msm_obj->sgt->nents,
|
||||
DMA_BIDIRECTIONAL);
|
||||
|
||||
if (msm_obj->sgt)
|
||||
sg_free_table(msm_obj->sgt);
|
||||
|
||||
kfree(msm_obj->sgt);
|
||||
kfree(msm_obj->sgt);
|
||||
}
|
||||
|
||||
if (use_pages(obj))
|
||||
drm_gem_put_pages(obj, msm_obj->pages, true, false);
|
||||
|
|
|
@ -715,15 +715,16 @@ void ipu_set_ic_src_mux(struct ipu_soc *ipu, int csi_id, bool vdi)
|
|||
spin_lock_irqsave(&ipu->lock, flags);
|
||||
|
||||
val = ipu_cm_read(ipu, IPU_CONF);
|
||||
if (vdi) {
|
||||
if (vdi)
|
||||
val |= IPU_CONF_IC_INPUT;
|
||||
} else {
|
||||
else
|
||||
val &= ~IPU_CONF_IC_INPUT;
|
||||
if (csi_id == 1)
|
||||
val |= IPU_CONF_CSI_SEL;
|
||||
else
|
||||
val &= ~IPU_CONF_CSI_SEL;
|
||||
}
|
||||
|
||||
if (csi_id == 1)
|
||||
val |= IPU_CONF_CSI_SEL;
|
||||
else
|
||||
val &= ~IPU_CONF_CSI_SEL;
|
||||
|
||||
ipu_cm_write(ipu, val, IPU_CONF);
|
||||
|
||||
spin_unlock_irqrestore(&ipu->lock, flags);
|
||||
|
|
|
@ -128,7 +128,9 @@ static irqreturn_t bcm2835_i2c_isr(int this_irq, void *data)
|
|||
}
|
||||
|
||||
if (val & BCM2835_I2C_S_DONE) {
|
||||
if (i2c_dev->curr_msg->flags & I2C_M_RD) {
|
||||
if (!i2c_dev->curr_msg) {
|
||||
dev_err(i2c_dev->dev, "Got unexpected interrupt (from firmware?)\n");
|
||||
} else if (i2c_dev->curr_msg->flags & I2C_M_RD) {
|
||||
bcm2835_drain_rxfifo(i2c_dev);
|
||||
val = bcm2835_i2c_readl(i2c_dev, BCM2835_I2C_S);
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@
|
|||
#include <linux/iio/driver.h>
|
||||
|
||||
#define AXP288_ADC_EN_MASK 0xF1
|
||||
#define AXP288_ADC_TS_PIN_GPADC 0xF2
|
||||
#define AXP288_ADC_TS_PIN_ON 0xF3
|
||||
|
||||
enum axp288_adc_id {
|
||||
AXP288_ADC_TS,
|
||||
|
@ -121,6 +123,16 @@ static int axp288_adc_read_channel(int *val, unsigned long address,
|
|||
return IIO_VAL_INT;
|
||||
}
|
||||
|
||||
static int axp288_adc_set_ts(struct regmap *regmap, unsigned int mode,
|
||||
unsigned long address)
|
||||
{
|
||||
/* channels other than GPADC do not need to switch TS pin */
|
||||
if (address != AXP288_GP_ADC_H)
|
||||
return 0;
|
||||
|
||||
return regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, mode);
|
||||
}
|
||||
|
||||
static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
||||
struct iio_chan_spec const *chan,
|
||||
int *val, int *val2, long mask)
|
||||
|
@ -131,7 +143,16 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
|||
mutex_lock(&indio_dev->mlock);
|
||||
switch (mask) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_GPADC,
|
||||
chan->address)) {
|
||||
dev_err(&indio_dev->dev, "GPADC mode\n");
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
ret = axp288_adc_read_channel(val, chan->address, info->regmap);
|
||||
if (axp288_adc_set_ts(info->regmap, AXP288_ADC_TS_PIN_ON,
|
||||
chan->address))
|
||||
dev_err(&indio_dev->dev, "TS pin restore\n");
|
||||
break;
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
|
@ -141,6 +162,15 @@ static int axp288_adc_read_raw(struct iio_dev *indio_dev,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int axp288_adc_set_state(struct regmap *regmap)
|
||||
{
|
||||
/* ADC should be always enabled for internal FG to function */
|
||||
if (regmap_write(regmap, AXP288_ADC_TS_PIN_CTRL, AXP288_ADC_TS_PIN_ON))
|
||||
return -EIO;
|
||||
|
||||
return regmap_write(regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK);
|
||||
}
|
||||
|
||||
static const struct iio_info axp288_adc_iio_info = {
|
||||
.read_raw = &axp288_adc_read_raw,
|
||||
.driver_module = THIS_MODULE,
|
||||
|
@ -169,7 +199,7 @@ static int axp288_adc_probe(struct platform_device *pdev)
|
|||
* Set ADC to enabled state at all time, including system suspend.
|
||||
* otherwise internal fuel gauge functionality may be affected.
|
||||
*/
|
||||
ret = regmap_write(info->regmap, AXP20X_ADC_EN1, AXP288_ADC_EN_MASK);
|
||||
ret = axp288_adc_set_state(axp20x->regmap);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "unable to enable ADC device\n");
|
||||
return ret;
|
||||
|
|
|
@ -869,7 +869,6 @@ complete:
|
|||
static int zpa2326_wait_oneshot_completion(const struct iio_dev *indio_dev,
|
||||
struct zpa2326_private *private)
|
||||
{
|
||||
int ret;
|
||||
unsigned int val;
|
||||
long timeout;
|
||||
|
||||
|
@ -891,14 +890,11 @@ static int zpa2326_wait_oneshot_completion(const struct iio_dev *indio_dev,
|
|||
/* Timed out. */
|
||||
zpa2326_warn(indio_dev, "no one shot interrupt occurred (%ld)",
|
||||
timeout);
|
||||
ret = -ETIME;
|
||||
} else if (timeout < 0) {
|
||||
zpa2326_warn(indio_dev,
|
||||
"wait for one shot interrupt cancelled");
|
||||
ret = -ERESTARTSYS;
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
return ret;
|
||||
zpa2326_warn(indio_dev, "wait for one shot interrupt cancelled");
|
||||
return -ERESTARTSYS;
|
||||
}
|
||||
|
||||
static int zpa2326_init_managed_irq(struct device *parent,
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <linux/mutex.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
#include <rdma/ib.h>
|
||||
|
@ -1115,6 +1117,7 @@ static ssize_t ib_ucm_write(struct file *filp, const char __user *buf,
|
|||
|
||||
if (hdr.cmd >= ARRAY_SIZE(ucm_cmd_table))
|
||||
return -EINVAL;
|
||||
hdr.cmd = array_index_nospec(hdr.cmd, ARRAY_SIZE(ucm_cmd_table));
|
||||
|
||||
if (hdr.in + sizeof(hdr) > len)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -44,6 +44,8 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/nsproxy.h>
|
||||
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include <rdma/rdma_user_cm.h>
|
||||
#include <rdma/ib_marshall.h>
|
||||
#include <rdma/rdma_cm.h>
|
||||
|
@ -1637,6 +1639,7 @@ static ssize_t ucma_write(struct file *filp, const char __user *buf,
|
|||
|
||||
if (hdr.cmd >= ARRAY_SIZE(ucma_cmd_table))
|
||||
return -EINVAL;
|
||||
hdr.cmd = array_index_nospec(hdr.cmd, ARRAY_SIZE(ucma_cmd_table));
|
||||
|
||||
if (hdr.in + sizeof(hdr) > len)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -1510,6 +1510,44 @@ EXPORT_SYMBOL(ib_dealloc_fmr);
|
|||
|
||||
/* Multicast groups */
|
||||
|
||||
static bool is_valid_mcast_lid(struct ib_qp *qp, u16 lid)
|
||||
{
|
||||
struct ib_qp_init_attr init_attr = {};
|
||||
struct ib_qp_attr attr = {};
|
||||
int num_eth_ports = 0;
|
||||
int port;
|
||||
|
||||
/* If QP state >= init, it is assigned to a port and we can check this
|
||||
* port only.
|
||||
*/
|
||||
if (!ib_query_qp(qp, &attr, IB_QP_STATE | IB_QP_PORT, &init_attr)) {
|
||||
if (attr.qp_state >= IB_QPS_INIT) {
|
||||
if (qp->device->get_link_layer(qp->device, attr.port_num) !=
|
||||
IB_LINK_LAYER_INFINIBAND)
|
||||
return true;
|
||||
goto lid_check;
|
||||
}
|
||||
}
|
||||
|
||||
/* Can't get a quick answer, iterate over all ports */
|
||||
for (port = 0; port < qp->device->phys_port_cnt; port++)
|
||||
if (qp->device->get_link_layer(qp->device, port) !=
|
||||
IB_LINK_LAYER_INFINIBAND)
|
||||
num_eth_ports++;
|
||||
|
||||
/* If we have at lease one Ethernet port, RoCE annex declares that
|
||||
* multicast LID should be ignored. We can't tell at this step if the
|
||||
* QP belongs to an IB or Ethernet port.
|
||||
*/
|
||||
if (num_eth_ports)
|
||||
return true;
|
||||
|
||||
/* If all the ports are IB, we can check according to IB spec. */
|
||||
lid_check:
|
||||
return !(lid < be16_to_cpu(IB_MULTICAST_LID_BASE) ||
|
||||
lid == be16_to_cpu(IB_LID_PERMISSIVE));
|
||||
}
|
||||
|
||||
int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
|
||||
{
|
||||
int ret;
|
||||
|
@ -1517,8 +1555,7 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
|
|||
if (!qp->device->attach_mcast)
|
||||
return -ENOSYS;
|
||||
if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD ||
|
||||
lid < be16_to_cpu(IB_MULTICAST_LID_BASE) ||
|
||||
lid == be16_to_cpu(IB_LID_PERMISSIVE))
|
||||
!is_valid_mcast_lid(qp, lid))
|
||||
return -EINVAL;
|
||||
|
||||
ret = qp->device->attach_mcast(qp, gid, lid);
|
||||
|
@ -1535,8 +1572,7 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid)
|
|||
if (!qp->device->detach_mcast)
|
||||
return -ENOSYS;
|
||||
if (gid->raw[0] != 0xff || qp->qp_type != IB_QPT_UD ||
|
||||
lid < be16_to_cpu(IB_MULTICAST_LID_BASE) ||
|
||||
lid == be16_to_cpu(IB_LID_PERMISSIVE))
|
||||
!is_valid_mcast_lid(qp, lid))
|
||||
return -EINVAL;
|
||||
|
||||
ret = qp->device->detach_mcast(qp, gid, lid);
|
||||
|
|
|
@ -247,8 +247,11 @@ int mlx4_ib_rereg_user_mr(struct ib_mr *mr, int flags,
|
|||
}
|
||||
|
||||
if (flags & IB_MR_REREG_ACCESS) {
|
||||
if (ib_access_writable(mr_access_flags) && !mmr->umem->writable)
|
||||
return -EPERM;
|
||||
if (ib_access_writable(mr_access_flags) &&
|
||||
!mmr->umem->writable) {
|
||||
err = -EPERM;
|
||||
goto release_mpt_entry;
|
||||
}
|
||||
|
||||
err = mlx4_mr_hw_change_access(dev->dev, *pmpt_entry,
|
||||
convert_access(mr_access_flags));
|
||||
|
|
|
@ -1523,6 +1523,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|||
u32 uidx = MLX5_IB_DEFAULT_UIDX;
|
||||
struct mlx5_ib_create_qp ucmd;
|
||||
struct mlx5_ib_qp_base *base;
|
||||
int mlx5_st;
|
||||
void *qpc;
|
||||
u32 *in;
|
||||
int err;
|
||||
|
@ -1538,6 +1539,10 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|||
spin_lock_init(&qp->sq.lock);
|
||||
spin_lock_init(&qp->rq.lock);
|
||||
|
||||
mlx5_st = to_mlx5_st(init_attr->qp_type);
|
||||
if (mlx5_st < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (init_attr->rwq_ind_tbl) {
|
||||
if (!udata)
|
||||
return -ENOSYS;
|
||||
|
@ -1665,7 +1670,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,
|
|||
|
||||
qpc = MLX5_ADDR_OF(create_qp_in, in, qpc);
|
||||
|
||||
MLX5_SET(qpc, qpc, st, to_mlx5_st(init_attr->qp_type));
|
||||
MLX5_SET(qpc, qpc, st, mlx5_st);
|
||||
MLX5_SET(qpc, qpc, pm_state, MLX5_QP_PM_MIGRATED);
|
||||
|
||||
if (init_attr->qp_type != MLX5_IB_QPT_REG_UMR)
|
||||
|
|
|
@ -402,23 +402,25 @@ void *rxe_alloc(struct rxe_pool *pool)
|
|||
|
||||
kref_get(&pool->rxe->ref_cnt);
|
||||
|
||||
if (atomic_inc_return(&pool->num_elem) > pool->max_elem) {
|
||||
atomic_dec(&pool->num_elem);
|
||||
rxe_dev_put(pool->rxe);
|
||||
rxe_pool_put(pool);
|
||||
return NULL;
|
||||
}
|
||||
if (atomic_inc_return(&pool->num_elem) > pool->max_elem)
|
||||
goto out_put_pool;
|
||||
|
||||
elem = kmem_cache_zalloc(pool_cache(pool),
|
||||
(pool->flags & RXE_POOL_ATOMIC) ?
|
||||
GFP_ATOMIC : GFP_KERNEL);
|
||||
if (!elem)
|
||||
return NULL;
|
||||
goto out_put_pool;
|
||||
|
||||
elem->pool = pool;
|
||||
kref_init(&elem->ref_cnt);
|
||||
|
||||
return elem;
|
||||
|
||||
out_put_pool:
|
||||
atomic_dec(&pool->num_elem);
|
||||
rxe_dev_put(pool->rxe);
|
||||
rxe_pool_put(pool);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void rxe_elem_release(struct kref *kref)
|
||||
|
|
|
@ -729,13 +729,8 @@ static int init_send_wqe(struct rxe_qp *qp, struct ib_send_wr *ibwr,
|
|||
|
||||
sge = ibwr->sg_list;
|
||||
for (i = 0; i < num_sge; i++, sge++) {
|
||||
if (qp->is_user && copy_from_user(p, (__user void *)
|
||||
(uintptr_t)sge->addr, sge->length))
|
||||
return -EFAULT;
|
||||
|
||||
else if (!qp->is_user)
|
||||
memcpy(p, (void *)(uintptr_t)sge->addr,
|
||||
sge->length);
|
||||
memcpy(p, (void *)(uintptr_t)sge->addr,
|
||||
sge->length);
|
||||
|
||||
p += sge->length;
|
||||
}
|
||||
|
|
|
@ -281,8 +281,6 @@ void ipoib_delete_debug_files(struct net_device *dev)
|
|||
{
|
||||
struct ipoib_dev_priv *priv = netdev_priv(dev);
|
||||
|
||||
WARN_ONCE(!priv->mcg_dentry, "null mcg debug file\n");
|
||||
WARN_ONCE(!priv->path_dentry, "null path debug file\n");
|
||||
debugfs_remove(priv->mcg_dentry);
|
||||
debugfs_remove(priv->path_dentry);
|
||||
priv->mcg_dentry = priv->path_dentry = NULL;
|
||||
|
|
|
@ -974,19 +974,6 @@ static inline int update_parent_pkey(struct ipoib_dev_priv *priv)
|
|||
*/
|
||||
priv->dev->broadcast[8] = priv->pkey >> 8;
|
||||
priv->dev->broadcast[9] = priv->pkey & 0xff;
|
||||
|
||||
/*
|
||||
* Update the broadcast address in the priv->broadcast object,
|
||||
* in case it already exists, otherwise no one will do that.
|
||||
*/
|
||||
if (priv->broadcast) {
|
||||
spin_lock_irq(&priv->lock);
|
||||
memcpy(priv->broadcast->mcmember.mgid.raw,
|
||||
priv->dev->broadcast + 4,
|
||||
sizeof(union ib_gid));
|
||||
spin_unlock_irq(&priv->lock);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1190,13 +1177,10 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,
|
|||
ipoib_ib_dev_down(dev);
|
||||
|
||||
if (level == IPOIB_FLUSH_HEAVY) {
|
||||
rtnl_lock();
|
||||
if (test_bit(IPOIB_FLAG_INITIALIZED, &priv->flags))
|
||||
ipoib_ib_dev_stop(dev);
|
||||
|
||||
result = ipoib_ib_dev_open(dev);
|
||||
rtnl_unlock();
|
||||
if (result)
|
||||
if (ipoib_ib_dev_open(dev))
|
||||
return;
|
||||
|
||||
if (netif_queue_stopped(dev))
|
||||
|
@ -1236,7 +1220,9 @@ void ipoib_ib_dev_flush_heavy(struct work_struct *work)
|
|||
struct ipoib_dev_priv *priv =
|
||||
container_of(work, struct ipoib_dev_priv, flush_heavy);
|
||||
|
||||
rtnl_lock();
|
||||
__ipoib_ib_dev_flush(priv, IPOIB_FLUSH_HEAVY, 0);
|
||||
rtnl_unlock();
|
||||
}
|
||||
|
||||
void ipoib_ib_dev_cleanup(struct net_device *dev)
|
||||
|
|
|
@ -1251,6 +1251,7 @@ static const struct acpi_device_id elan_acpi_id[] = {
|
|||
{ "ELAN0611", 0 },
|
||||
{ "ELAN0612", 0 },
|
||||
{ "ELAN0618", 0 },
|
||||
{ "ELAN061C", 0 },
|
||||
{ "ELAN061D", 0 },
|
||||
{ "ELAN0622", 0 },
|
||||
{ "ELAN1000", 0 },
|
||||
|
|
|
@ -858,6 +858,12 @@ static const struct flash_info spi_nor_ids[] = {
|
|||
|
||||
/* ISSI */
|
||||
{ "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2, SECT_4K) },
|
||||
{ "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64,
|
||||
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128,
|
||||
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
{ "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256,
|
||||
SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
|
||||
|
||||
/* Macronix */
|
||||
{ "mx25l512e", INFO(0xc22010, 0, 64 * 1024, 1, SECT_4K) },
|
||||
|
|
|
@ -2132,9 +2132,10 @@ static void bond_miimon_commit(struct bonding *bond)
|
|||
if (bond_update_speed_duplex(slave) &&
|
||||
bond_needs_speed_duplex(bond)) {
|
||||
slave->link = BOND_LINK_DOWN;
|
||||
netdev_warn(bond->dev,
|
||||
"failed to get link speed/duplex for %s\n",
|
||||
slave->dev->name);
|
||||
if (net_ratelimit())
|
||||
netdev_warn(bond->dev,
|
||||
"failed to get link speed/duplex for %s\n",
|
||||
slave->dev->name);
|
||||
continue;
|
||||
}
|
||||
bond_set_slave_link_state(slave, BOND_LINK_UP,
|
||||
|
|
|
@ -628,8 +628,7 @@ static int bond_fill_info(struct sk_buff *skb,
|
|||
goto nla_put_failure;
|
||||
|
||||
if (nla_put(skb, IFLA_BOND_AD_ACTOR_SYSTEM,
|
||||
sizeof(bond->params.ad_actor_system),
|
||||
&bond->params.ad_actor_system))
|
||||
ETH_ALEN, &bond->params.ad_actor_system))
|
||||
goto nla_put_failure;
|
||||
}
|
||||
if (!bond_3ad_get_active_agg_info(bond, &info)) {
|
||||
|
|
|
@ -1482,8 +1482,6 @@ static int ena_up_complete(struct ena_adapter *adapter)
|
|||
if (rc)
|
||||
return rc;
|
||||
|
||||
ena_init_napi(adapter);
|
||||
|
||||
ena_change_mtu(adapter->netdev, adapter->netdev->mtu);
|
||||
|
||||
ena_refill_all_rx_bufs(adapter);
|
||||
|
@ -1643,6 +1641,13 @@ static int ena_up(struct ena_adapter *adapter)
|
|||
|
||||
ena_setup_io_intr(adapter);
|
||||
|
||||
/* napi poll functions should be initialized before running
|
||||
* request_irq(), to handle a rare condition where there is a pending
|
||||
* interrupt, causing the ISR to fire immediately while the poll
|
||||
* function wasn't set yet, causing a null dereference
|
||||
*/
|
||||
ena_init_napi(adapter);
|
||||
|
||||
rc = ena_request_io_irq(adapter);
|
||||
if (rc)
|
||||
goto err_req_irq;
|
||||
|
|
|
@ -1030,6 +1030,7 @@ static int dec_lance_probe(struct device *bdev, const int type)
|
|||
int i, ret;
|
||||
unsigned long esar_base;
|
||||
unsigned char *esar;
|
||||
const char *desc;
|
||||
|
||||
if (dec_lance_debug && version_printed++ == 0)
|
||||
printk(version);
|
||||
|
@ -1215,19 +1216,20 @@ static int dec_lance_probe(struct device *bdev, const int type)
|
|||
*/
|
||||
switch (type) {
|
||||
case ASIC_LANCE:
|
||||
printk("%s: IOASIC onboard LANCE", name);
|
||||
desc = "IOASIC onboard LANCE";
|
||||
break;
|
||||
case PMAD_LANCE:
|
||||
printk("%s: PMAD-AA", name);
|
||||
desc = "PMAD-AA";
|
||||
break;
|
||||
case PMAX_LANCE:
|
||||
printk("%s: PMAX onboard LANCE", name);
|
||||
desc = "PMAX onboard LANCE";
|
||||
break;
|
||||
}
|
||||
for (i = 0; i < 6; i++)
|
||||
dev->dev_addr[i] = esar[i * 4];
|
||||
|
||||
printk(", addr = %pM, irq = %d\n", dev->dev_addr, dev->irq);
|
||||
printk("%s: %s, addr = %pM, irq = %d\n",
|
||||
name, desc, dev->dev_addr, dev->irq);
|
||||
|
||||
dev->netdev_ops = &lance_netdev_ops;
|
||||
dev->watchdog_timeo = 5*HZ;
|
||||
|
|
|
@ -5580,7 +5580,9 @@ static int __bnxt_open_nic(struct bnxt *bp, bool irq_re_init, bool link_re_init)
|
|||
}
|
||||
|
||||
if (link_re_init) {
|
||||
mutex_lock(&bp->link_lock);
|
||||
rc = bnxt_update_phy_setting(bp);
|
||||
mutex_unlock(&bp->link_lock);
|
||||
if (rc)
|
||||
netdev_warn(bp->dev, "failed to update phy settings\n");
|
||||
}
|
||||
|
@ -6230,30 +6232,28 @@ static void bnxt_sp_task(struct work_struct *work)
|
|||
if (test_and_clear_bit(BNXT_PERIODIC_STATS_SP_EVENT, &bp->sp_event))
|
||||
bnxt_hwrm_port_qstats(bp);
|
||||
|
||||
/* These functions below will clear BNXT_STATE_IN_SP_TASK. They
|
||||
* must be the last functions to be called before exiting.
|
||||
*/
|
||||
if (test_and_clear_bit(BNXT_LINK_CHNG_SP_EVENT, &bp->sp_event)) {
|
||||
int rc = 0;
|
||||
int rc;
|
||||
|
||||
mutex_lock(&bp->link_lock);
|
||||
if (test_and_clear_bit(BNXT_LINK_SPEED_CHNG_SP_EVENT,
|
||||
&bp->sp_event))
|
||||
bnxt_hwrm_phy_qcaps(bp);
|
||||
|
||||
bnxt_rtnl_lock_sp(bp);
|
||||
if (test_bit(BNXT_STATE_OPEN, &bp->state))
|
||||
rc = bnxt_update_link(bp, true);
|
||||
bnxt_rtnl_unlock_sp(bp);
|
||||
rc = bnxt_update_link(bp, true);
|
||||
mutex_unlock(&bp->link_lock);
|
||||
if (rc)
|
||||
netdev_err(bp->dev, "SP task can't update link (rc: %x)\n",
|
||||
rc);
|
||||
}
|
||||
if (test_and_clear_bit(BNXT_HWRM_PORT_MODULE_SP_EVENT, &bp->sp_event)) {
|
||||
bnxt_rtnl_lock_sp(bp);
|
||||
if (test_bit(BNXT_STATE_OPEN, &bp->state))
|
||||
bnxt_get_port_module_status(bp);
|
||||
bnxt_rtnl_unlock_sp(bp);
|
||||
mutex_lock(&bp->link_lock);
|
||||
bnxt_get_port_module_status(bp);
|
||||
mutex_unlock(&bp->link_lock);
|
||||
}
|
||||
/* These functions below will clear BNXT_STATE_IN_SP_TASK. They
|
||||
* must be the last functions to be called before exiting.
|
||||
*/
|
||||
if (test_and_clear_bit(BNXT_RESET_TASK_SP_EVENT, &bp->sp_event))
|
||||
bnxt_reset(bp, false);
|
||||
|
||||
|
@ -6788,6 +6788,7 @@ static int bnxt_probe_phy(struct bnxt *bp)
|
|||
rc);
|
||||
return rc;
|
||||
}
|
||||
mutex_init(&bp->link_lock);
|
||||
|
||||
rc = bnxt_update_link(bp, false);
|
||||
if (rc) {
|
||||
|
|
|
@ -1109,6 +1109,10 @@ struct bnxt {
|
|||
unsigned long *ntp_fltr_bmap;
|
||||
int ntp_fltr_count;
|
||||
|
||||
/* To protect link related settings during link changes and
|
||||
* ethtool settings changes.
|
||||
*/
|
||||
struct mutex link_lock;
|
||||
struct bnxt_link_info link_info;
|
||||
struct ethtool_eee eee;
|
||||
u32 lpi_tmr_lo;
|
||||
|
|
|
@ -793,6 +793,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev,
|
|||
u32 ethtool_speed;
|
||||
|
||||
ethtool_link_ksettings_zero_link_mode(lk_ksettings, supported);
|
||||
mutex_lock(&bp->link_lock);
|
||||
bnxt_fw_to_ethtool_support_spds(link_info, lk_ksettings);
|
||||
|
||||
ethtool_link_ksettings_zero_link_mode(lk_ksettings, advertising);
|
||||
|
@ -840,6 +841,7 @@ static int bnxt_get_link_ksettings(struct net_device *dev,
|
|||
base->port = PORT_FIBRE;
|
||||
}
|
||||
base->phy_address = link_info->phy_addr;
|
||||
mutex_unlock(&bp->link_lock);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -926,6 +928,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev,
|
|||
if (!BNXT_SINGLE_PF(bp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
mutex_lock(&bp->link_lock);
|
||||
if (base->autoneg == AUTONEG_ENABLE) {
|
||||
BNXT_ETHTOOL_TO_FW_SPDS(fw_advertising, lk_ksettings,
|
||||
advertising);
|
||||
|
@ -970,6 +973,7 @@ static int bnxt_set_link_ksettings(struct net_device *dev,
|
|||
rc = bnxt_hwrm_set_link_setting(bp, set_pause, false);
|
||||
|
||||
set_setting_exit:
|
||||
mutex_unlock(&bp->link_lock);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
@ -1737,6 +1737,7 @@ static void macb_configure_dma(struct macb *bp)
|
|||
else
|
||||
dmacfg &= ~GEM_BIT(TXCOEN);
|
||||
|
||||
dmacfg &= ~GEM_BIT(ADDR64);
|
||||
#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
|
||||
dmacfg |= GEM_BIT(ADDR64);
|
||||
#endif
|
||||
|
|
|
@ -2150,6 +2150,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EPERM;
|
||||
if (copy_from_user(&t, useraddr, sizeof(t)))
|
||||
return -EFAULT;
|
||||
if (t.cmd != CHELSIO_SET_QSET_PARAMS)
|
||||
return -EINVAL;
|
||||
if (t.qset_idx >= SGE_QSETS)
|
||||
return -EINVAL;
|
||||
if (!in_range(t.intr_lat, 0, M_NEWTIMER) ||
|
||||
|
@ -2249,6 +2251,9 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
if (copy_from_user(&t, useraddr, sizeof(t)))
|
||||
return -EFAULT;
|
||||
|
||||
if (t.cmd != CHELSIO_GET_QSET_PARAMS)
|
||||
return -EINVAL;
|
||||
|
||||
/* Display qsets for all ports when offload enabled */
|
||||
if (test_bit(OFFLOAD_DEVMAP_BIT, &adapter->open_device_map)) {
|
||||
q1 = 0;
|
||||
|
@ -2294,6 +2299,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EBUSY;
|
||||
if (copy_from_user(&edata, useraddr, sizeof(edata)))
|
||||
return -EFAULT;
|
||||
if (edata.cmd != CHELSIO_SET_QSET_NUM)
|
||||
return -EINVAL;
|
||||
if (edata.val < 1 ||
|
||||
(edata.val > 1 && !(adapter->flags & USING_MSIX)))
|
||||
return -EINVAL;
|
||||
|
@ -2334,6 +2341,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EPERM;
|
||||
if (copy_from_user(&t, useraddr, sizeof(t)))
|
||||
return -EFAULT;
|
||||
if (t.cmd != CHELSIO_LOAD_FW)
|
||||
return -EINVAL;
|
||||
/* Check t.len sanity ? */
|
||||
fw_data = memdup_user(useraddr + sizeof(t), t.len);
|
||||
if (IS_ERR(fw_data))
|
||||
|
@ -2357,6 +2366,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EBUSY;
|
||||
if (copy_from_user(&m, useraddr, sizeof(m)))
|
||||
return -EFAULT;
|
||||
if (m.cmd != CHELSIO_SETMTUTAB)
|
||||
return -EINVAL;
|
||||
if (m.nmtus != NMTUS)
|
||||
return -EINVAL;
|
||||
if (m.mtus[0] < 81) /* accommodate SACK */
|
||||
|
@ -2398,6 +2409,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EBUSY;
|
||||
if (copy_from_user(&m, useraddr, sizeof(m)))
|
||||
return -EFAULT;
|
||||
if (m.cmd != CHELSIO_SET_PM)
|
||||
return -EINVAL;
|
||||
if (!is_power_of_2(m.rx_pg_sz) ||
|
||||
!is_power_of_2(m.tx_pg_sz))
|
||||
return -EINVAL; /* not power of 2 */
|
||||
|
@ -2431,6 +2444,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EIO; /* need the memory controllers */
|
||||
if (copy_from_user(&t, useraddr, sizeof(t)))
|
||||
return -EFAULT;
|
||||
if (t.cmd != CHELSIO_GET_MEM)
|
||||
return -EINVAL;
|
||||
if ((t.addr & 7) || (t.len & 7))
|
||||
return -EINVAL;
|
||||
if (t.mem_id == MEM_CM)
|
||||
|
@ -2483,6 +2498,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)
|
|||
return -EAGAIN;
|
||||
if (copy_from_user(&t, useraddr, sizeof(t)))
|
||||
return -EFAULT;
|
||||
if (t.cmd != CHELSIO_SET_TRACE_FILTER)
|
||||
return -EINVAL;
|
||||
|
||||
tp = (const struct trace_params *)&t.sip;
|
||||
if (t.config_tx)
|
||||
|
|
|
@ -1708,7 +1708,7 @@ static int enic_open(struct net_device *netdev)
|
|||
{
|
||||
struct enic *enic = netdev_priv(netdev);
|
||||
unsigned int i;
|
||||
int err;
|
||||
int err, ret;
|
||||
|
||||
err = enic_request_intr(enic);
|
||||
if (err) {
|
||||
|
@ -1766,10 +1766,9 @@ static int enic_open(struct net_device *netdev)
|
|||
|
||||
err_out_free_rq:
|
||||
for (i = 0; i < enic->rq_count; i++) {
|
||||
err = vnic_rq_disable(&enic->rq[i]);
|
||||
if (err)
|
||||
return err;
|
||||
vnic_rq_clean(&enic->rq[i], enic_free_rq_buf);
|
||||
ret = vnic_rq_disable(&enic->rq[i]);
|
||||
if (!ret)
|
||||
vnic_rq_clean(&enic->rq[i], enic_free_rq_buf);
|
||||
}
|
||||
enic_dev_notify_unset(enic);
|
||||
err_out_free_intr:
|
||||
|
|
|
@ -1152,7 +1152,7 @@ static void fec_enet_timeout_work(struct work_struct *work)
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
@ -1267,7 +1267,7 @@ skb_done:
|
|||
|
||||
/* Since we have freed up a buffer, the ring is no longer full
|
||||
*/
|
||||
if (netif_queue_stopped(ndev)) {
|
||||
if (netif_tx_queue_stopped(nq)) {
|
||||
entries_free = fec_enet_get_free_txdesc_num(txq);
|
||||
if (entries_free >= txq->tx_wake_threshold)
|
||||
netif_tx_wake_queue(nq);
|
||||
|
@ -1744,7 +1744,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
@ -2247,7 +2247,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,
|
|||
napi_disable(&fep->napi);
|
||||
netif_tx_lock_bh(ndev);
|
||||
fec_restart(ndev);
|
||||
netif_wake_queue(ndev);
|
||||
netif_tx_wake_all_queues(ndev);
|
||||
netif_tx_unlock_bh(ndev);
|
||||
napi_enable(&fep->napi);
|
||||
}
|
||||
|
|
|
@ -613,9 +613,11 @@ static int fs_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
static void fs_timeout(struct net_device *dev)
|
||||
static void fs_timeout_work(struct work_struct *work)
|
||||
{
|
||||
struct fs_enet_private *fep = netdev_priv(dev);
|
||||
struct fs_enet_private *fep = container_of(work, struct fs_enet_private,
|
||||
timeout_work);
|
||||
struct net_device *dev = fep->ndev;
|
||||
unsigned long flags;
|
||||
int wake = 0;
|
||||
|
||||
|
@ -627,7 +629,6 @@ static void fs_timeout(struct net_device *dev)
|
|||
phy_stop(dev->phydev);
|
||||
(*fep->ops->stop)(dev);
|
||||
(*fep->ops->restart)(dev);
|
||||
phy_start(dev->phydev);
|
||||
}
|
||||
|
||||
phy_start(dev->phydev);
|
||||
|
@ -639,6 +640,13 @@ static void fs_timeout(struct net_device *dev)
|
|||
netif_wake_queue(dev);
|
||||
}
|
||||
|
||||
static void fs_timeout(struct net_device *dev)
|
||||
{
|
||||
struct fs_enet_private *fep = netdev_priv(dev);
|
||||
|
||||
schedule_work(&fep->timeout_work);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------
|
||||
* generic link-change handler - should be sufficient for most cases
|
||||
*-----------------------------------------------------------------------------*/
|
||||
|
@ -759,6 +767,7 @@ static int fs_enet_close(struct net_device *dev)
|
|||
netif_stop_queue(dev);
|
||||
netif_carrier_off(dev);
|
||||
napi_disable(&fep->napi);
|
||||
cancel_work_sync(&fep->timeout_work);
|
||||
phy_stop(dev->phydev);
|
||||
|
||||
spin_lock_irqsave(&fep->lock, flags);
|
||||
|
@ -1033,6 +1042,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
|
|||
|
||||
ndev->netdev_ops = &fs_enet_netdev_ops;
|
||||
ndev->watchdog_timeo = 2 * HZ;
|
||||
INIT_WORK(&fep->timeout_work, fs_timeout_work);
|
||||
netif_napi_add(ndev, &fep->napi, fs_enet_napi, fpi->napi_weight);
|
||||
|
||||
ndev->ethtool_ops = &fs_ethtool_ops;
|
||||
|
|
|
@ -124,6 +124,7 @@ struct fs_enet_private {
|
|||
spinlock_t lock; /* during all ops except TX pckt processing */
|
||||
spinlock_t tx_lock; /* during fs_start_xmit and fs_tx */
|
||||
struct fs_platform_info *fpi;
|
||||
struct work_struct timeout_work;
|
||||
const struct fs_ops *ops;
|
||||
int rx_ring, tx_ring;
|
||||
dma_addr_t ring_mem_addr;
|
||||
|
|
|
@ -266,7 +266,7 @@ static i40e_status i40e_read_nvm_aq(struct i40e_hw *hw, u8 module_pointer,
|
|||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
|
||||
* @data: word read from the Shadow RAM
|
||||
*
|
||||
* Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register.
|
||||
* Reads one 16 bit word from the Shadow RAM using the AdminQ
|
||||
**/
|
||||
static i40e_status i40e_read_nvm_word_aq(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
|
@ -280,27 +280,49 @@ static i40e_status i40e_read_nvm_word_aq(struct i40e_hw *hw, u16 offset,
|
|||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_word - Reads Shadow RAM
|
||||
* __i40e_read_nvm_word - Reads nvm word, assumes called does the locking
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
|
||||
* @data: word read from the Shadow RAM
|
||||
*
|
||||
* Reads one 16 bit word from the Shadow RAM using the GLNVM_SRCTL register.
|
||||
* Reads one 16 bit word from the Shadow RAM.
|
||||
*
|
||||
* Do not use this function except in cases where the nvm lock is already
|
||||
* taken via i40e_acquire_nvm().
|
||||
**/
|
||||
static i40e_status __i40e_read_nvm_word(struct i40e_hw *hw,
|
||||
u16 offset, u16 *data)
|
||||
{
|
||||
i40e_status ret_code = 0;
|
||||
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
|
||||
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
|
||||
else
|
||||
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_word - Reads nvm word and acquire lock if necessary
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF)
|
||||
* @data: word read from the Shadow RAM
|
||||
*
|
||||
* Reads one 16 bit word from the Shadow RAM.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data)
|
||||
{
|
||||
enum i40e_status_code ret_code = 0;
|
||||
i40e_status ret_code = 0;
|
||||
|
||||
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
|
||||
if (!ret_code) {
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
|
||||
ret_code = i40e_read_nvm_word_aq(hw, offset, data);
|
||||
} else {
|
||||
ret_code = i40e_read_nvm_word_srctl(hw, offset, data);
|
||||
}
|
||||
i40e_release_nvm(hw);
|
||||
}
|
||||
if (ret_code)
|
||||
return ret_code;
|
||||
|
||||
ret_code = __i40e_read_nvm_word(hw, offset, data);
|
||||
|
||||
i40e_release_nvm(hw);
|
||||
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
|
@ -393,31 +415,25 @@ read_nvm_buffer_aq_exit:
|
|||
}
|
||||
|
||||
/**
|
||||
* i40e_read_nvm_buffer - Reads Shadow RAM buffer
|
||||
* __i40e_read_nvm_buffer - Reads nvm buffer, caller must acquire lock
|
||||
* @hw: pointer to the HW structure
|
||||
* @offset: offset of the Shadow RAM word to read (0x000000 - 0x001FFF).
|
||||
* @words: (in) number of words to read; (out) number of words actually read
|
||||
* @data: words read from the Shadow RAM
|
||||
*
|
||||
* Reads 16 bit words (data buffer) from the SR using the i40e_read_nvm_srrd()
|
||||
* method. The buffer read is preceded by the NVM ownership take
|
||||
* and followed by the release.
|
||||
* method.
|
||||
**/
|
||||
i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
|
||||
u16 *words, u16 *data)
|
||||
static i40e_status __i40e_read_nvm_buffer(struct i40e_hw *hw,
|
||||
u16 offset, u16 *words,
|
||||
u16 *data)
|
||||
{
|
||||
enum i40e_status_code ret_code = 0;
|
||||
i40e_status ret_code = 0;
|
||||
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE) {
|
||||
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
|
||||
if (!ret_code) {
|
||||
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words,
|
||||
data);
|
||||
i40e_release_nvm(hw);
|
||||
}
|
||||
} else {
|
||||
if (hw->flags & I40E_HW_FLAG_AQ_SRCTL_ACCESS_ENABLE)
|
||||
ret_code = i40e_read_nvm_buffer_aq(hw, offset, words, data);
|
||||
else
|
||||
ret_code = i40e_read_nvm_buffer_srctl(hw, offset, words, data);
|
||||
}
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
|
@ -499,15 +515,15 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
|
|||
data = (u16 *)vmem.va;
|
||||
|
||||
/* read pointer to VPD area */
|
||||
ret_code = i40e_read_nvm_word(hw, I40E_SR_VPD_PTR, &vpd_module);
|
||||
ret_code = __i40e_read_nvm_word(hw, I40E_SR_VPD_PTR, &vpd_module);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
}
|
||||
|
||||
/* read pointer to PCIe Alt Auto-load module */
|
||||
ret_code = i40e_read_nvm_word(hw, I40E_SR_PCIE_ALT_AUTO_LOAD_PTR,
|
||||
&pcie_alt_module);
|
||||
ret_code = __i40e_read_nvm_word(hw, I40E_SR_PCIE_ALT_AUTO_LOAD_PTR,
|
||||
&pcie_alt_module);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
|
@ -521,7 +537,7 @@ static i40e_status i40e_calc_nvm_checksum(struct i40e_hw *hw,
|
|||
if ((i % I40E_SR_SECTOR_SIZE_IN_WORDS) == 0) {
|
||||
u16 words = I40E_SR_SECTOR_SIZE_IN_WORDS;
|
||||
|
||||
ret_code = i40e_read_nvm_buffer(hw, i, &words, data);
|
||||
ret_code = __i40e_read_nvm_buffer(hw, i, &words, data);
|
||||
if (ret_code) {
|
||||
ret_code = I40E_ERR_NVM_CHECKSUM;
|
||||
goto i40e_calc_nvm_checksum_exit;
|
||||
|
@ -593,14 +609,19 @@ i40e_status i40e_validate_nvm_checksum(struct i40e_hw *hw,
|
|||
u16 checksum_sr = 0;
|
||||
u16 checksum_local = 0;
|
||||
|
||||
ret_code = i40e_calc_nvm_checksum(hw, &checksum_local);
|
||||
if (ret_code)
|
||||
goto i40e_validate_nvm_checksum_exit;
|
||||
|
||||
/* Do not use i40e_read_nvm_word() because we do not want to take
|
||||
* the synchronization semaphores twice here.
|
||||
/* We must acquire the NVM lock in order to correctly synchronize the
|
||||
* NVM accesses across multiple PFs. Without doing so it is possible
|
||||
* for one of the PFs to read invalid data potentially indicating that
|
||||
* the checksum is invalid.
|
||||
*/
|
||||
i40e_read_nvm_word(hw, I40E_SR_SW_CHECKSUM_WORD, &checksum_sr);
|
||||
ret_code = i40e_acquire_nvm(hw, I40E_RESOURCE_READ);
|
||||
if (ret_code)
|
||||
return ret_code;
|
||||
ret_code = i40e_calc_nvm_checksum(hw, &checksum_local);
|
||||
__i40e_read_nvm_word(hw, I40E_SR_SW_CHECKSUM_WORD, &checksum_sr);
|
||||
i40e_release_nvm(hw);
|
||||
if (ret_code)
|
||||
return ret_code;
|
||||
|
||||
/* Verify read checksum from EEPROM is the same as
|
||||
* calculated checksum
|
||||
|
@ -612,7 +633,6 @@ i40e_status i40e_validate_nvm_checksum(struct i40e_hw *hw,
|
|||
if (checksum)
|
||||
*checksum = checksum_local;
|
||||
|
||||
i40e_validate_nvm_checksum_exit:
|
||||
return ret_code;
|
||||
}
|
||||
|
||||
|
@ -986,6 +1006,7 @@ retry:
|
|||
break;
|
||||
|
||||
case I40E_NVMUPD_CSUM_CON:
|
||||
/* Assumes the caller has acquired the nvm */
|
||||
status = i40e_update_nvm_checksum(hw);
|
||||
if (status) {
|
||||
*perrno = hw->aq.asq_last_status ?
|
||||
|
@ -1000,6 +1021,7 @@ retry:
|
|||
break;
|
||||
|
||||
case I40E_NVMUPD_CSUM_LCB:
|
||||
/* Assumes the caller has acquired the nvm */
|
||||
status = i40e_update_nvm_checksum(hw);
|
||||
if (status) {
|
||||
*perrno = hw->aq.asq_last_status ?
|
||||
|
|
|
@ -311,8 +311,6 @@ i40e_status i40e_acquire_nvm(struct i40e_hw *hw,
|
|||
void i40e_release_nvm(struct i40e_hw *hw);
|
||||
i40e_status i40e_read_nvm_word(struct i40e_hw *hw, u16 offset,
|
||||
u16 *data);
|
||||
i40e_status i40e_read_nvm_buffer(struct i40e_hw *hw, u16 offset,
|
||||
u16 *words, u16 *data);
|
||||
i40e_status i40e_update_nvm_checksum(struct i40e_hw *hw);
|
||||
i40e_status i40e_validate_nvm_checksum(struct i40e_hw *hw,
|
||||
u16 *checksum);
|
||||
|
|
|
@ -245,19 +245,7 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
|
|||
hw->bus.func = (rd32(E1000_STATUS) & E1000_STATUS_FUNC_MASK) >>
|
||||
E1000_STATUS_FUNC_SHIFT;
|
||||
|
||||
/* Make sure the PHY is in a good state. Several people have reported
|
||||
* firmware leaving the PHY's page select register set to something
|
||||
* other than the default of zero, which causes the PHY ID read to
|
||||
* access something other than the intended register.
|
||||
*/
|
||||
ret_val = hw->phy.ops.reset(hw);
|
||||
if (ret_val) {
|
||||
hw_dbg("Error resetting the PHY.\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Set phy->phy_addr and phy->id. */
|
||||
igb_write_phy_reg_82580(hw, I347AT4_PAGE_SELECT, 0);
|
||||
ret_val = igb_get_phy_id_82575(hw);
|
||||
if (ret_val)
|
||||
return ret_val;
|
||||
|
|
|
@ -965,7 +965,7 @@ static int mlx5_cmd_invoke(struct mlx5_core_dev *dev, struct mlx5_cmd_msg *in,
|
|||
|
||||
err = wait_func(dev, ent);
|
||||
if (err == -ETIMEDOUT)
|
||||
goto out_free;
|
||||
goto out;
|
||||
|
||||
ds = ent->ts2 - ent->ts1;
|
||||
op = MLX5_GET(mbox_in, in->first.data, opcode);
|
||||
|
@ -1428,6 +1428,7 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)
|
|||
mlx5_core_err(dev, "Command completion arrived after timeout (entry idx = %d).\n",
|
||||
ent->idx);
|
||||
free_ent(cmd, ent->idx);
|
||||
free_cmd(ent);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -1486,7 +1487,8 @@ void mlx5_cmd_comp_handler(struct mlx5_core_dev *dev, u64 vec, bool forced)
|
|||
free_msg(dev, ent->in);
|
||||
|
||||
err = err ? err : ent->status;
|
||||
free_cmd(ent);
|
||||
if (!forced)
|
||||
free_cmd(ent);
|
||||
callback(err, context);
|
||||
} else {
|
||||
complete(&ent->done);
|
||||
|
|
|
@ -197,9 +197,15 @@ static int mlx5e_am_stats_compare(struct mlx5e_rx_am_stats *curr,
|
|||
return (curr->bpms > prev->bpms) ? MLX5E_AM_STATS_BETTER :
|
||||
MLX5E_AM_STATS_WORSE;
|
||||
|
||||
if (!prev->ppms)
|
||||
return curr->ppms ? MLX5E_AM_STATS_BETTER :
|
||||
MLX5E_AM_STATS_SAME;
|
||||
|
||||
if (IS_SIGNIFICANT_DIFF(curr->ppms, prev->ppms))
|
||||
return (curr->ppms > prev->ppms) ? MLX5E_AM_STATS_BETTER :
|
||||
MLX5E_AM_STATS_WORSE;
|
||||
if (!prev->epms)
|
||||
return MLX5E_AM_STATS_SAME;
|
||||
|
||||
if (IS_SIGNIFICANT_DIFF(curr->epms, prev->epms))
|
||||
return (curr->epms < prev->epms) ? MLX5E_AM_STATS_BETTER :
|
||||
|
|
|
@ -369,10 +369,11 @@ void mlx5_drain_health_wq(struct mlx5_core_dev *dev)
|
|||
void mlx5_drain_health_recovery(struct mlx5_core_dev *dev)
|
||||
{
|
||||
struct mlx5_core_health *health = &dev->priv.health;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock(&health->wq_lock);
|
||||
spin_lock_irqsave(&health->wq_lock, flags);
|
||||
set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags);
|
||||
spin_unlock(&health->wq_lock);
|
||||
spin_unlock_irqrestore(&health->wq_lock, flags);
|
||||
cancel_delayed_work_sync(&dev->priv.health.recover_work);
|
||||
}
|
||||
|
||||
|
|
|
@ -957,7 +957,7 @@ static int mlx5_load_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
|
|||
if (err) {
|
||||
dev_err(&dev->pdev->dev, "Firmware over %d MS in pre-initializing state, aborting\n",
|
||||
FW_PRE_INIT_TIMEOUT_MILI);
|
||||
goto out;
|
||||
goto out_err;
|
||||
}
|
||||
|
||||
err = mlx5_cmd_init(dev);
|
||||
|
|
|
@ -34,6 +34,7 @@ struct qed_ptt {
|
|||
struct list_head list_entry;
|
||||
unsigned int idx;
|
||||
struct pxp_ptt_entry pxp;
|
||||
u8 hwfn_id;
|
||||
};
|
||||
|
||||
struct qed_ptt_pool {
|
||||
|
@ -55,6 +56,7 @@ int qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn)
|
|||
p_pool->ptts[i].idx = i;
|
||||
p_pool->ptts[i].pxp.offset = QED_BAR_INVALID_OFFSET;
|
||||
p_pool->ptts[i].pxp.pretend.control = 0;
|
||||
p_pool->ptts[i].hwfn_id = p_hwfn->my_id;
|
||||
if (i >= RESERVED_PTT_MAX)
|
||||
list_add(&p_pool->ptts[i].list_entry,
|
||||
&p_pool->free_list);
|
||||
|
@ -169,6 +171,11 @@ static u32 qed_set_ptt(struct qed_hwfn *p_hwfn,
|
|||
|
||||
offset = hw_addr - win_hw_addr;
|
||||
|
||||
if (p_ptt->hwfn_id != p_hwfn->my_id)
|
||||
DP_NOTICE(p_hwfn,
|
||||
"ptt[%d] of hwfn[%02x] is used by hwfn[%02x]!\n",
|
||||
p_ptt->idx, p_ptt->hwfn_id, p_hwfn->my_id);
|
||||
|
||||
/* Verify the address is within the window */
|
||||
if (hw_addr < win_hw_addr ||
|
||||
offset >= PXP_EXTERNAL_BAR_PF_WINDOW_SINGLE_SIZE) {
|
||||
|
|
|
@ -1059,23 +1059,16 @@ static void qed_rdma_copy_gids(struct qed_rdma_qp *qp, __le32 *src_gid,
|
|||
|
||||
static enum roce_flavor qed_roce_mode_to_flavor(enum roce_mode roce_mode)
|
||||
{
|
||||
enum roce_flavor flavor;
|
||||
|
||||
switch (roce_mode) {
|
||||
case ROCE_V1:
|
||||
flavor = PLAIN_ROCE;
|
||||
break;
|
||||
return PLAIN_ROCE;
|
||||
case ROCE_V2_IPV4:
|
||||
flavor = RROCE_IPV4;
|
||||
break;
|
||||
return RROCE_IPV4;
|
||||
case ROCE_V2_IPV6:
|
||||
flavor = ROCE_V2_IPV6;
|
||||
break;
|
||||
return RROCE_IPV6;
|
||||
default:
|
||||
flavor = MAX_ROCE_MODE;
|
||||
break;
|
||||
return MAX_ROCE_FLAVOR;
|
||||
}
|
||||
return flavor;
|
||||
}
|
||||
|
||||
static int qed_roce_alloc_cid(struct qed_hwfn *p_hwfn, u16 *cid)
|
||||
|
|
|
@ -295,7 +295,6 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
|
|||
}
|
||||
|
||||
if (!p_iov->b_pre_fp_hsi &&
|
||||
ETH_HSI_VER_MINOR &&
|
||||
(resp->pfdev_info.minor_fp_hsi < ETH_HSI_VER_MINOR)) {
|
||||
DP_INFO(p_hwfn,
|
||||
"PF is using older fastpath HSI; %02x.%02x is configured\n",
|
||||
|
|
|
@ -1825,22 +1825,44 @@ struct qlcnic_hardware_ops {
|
|||
u32 (*get_cap_size)(void *, int);
|
||||
void (*set_sys_info)(void *, int, u32);
|
||||
void (*store_cap_mask)(void *, u32);
|
||||
bool (*encap_rx_offload) (struct qlcnic_adapter *adapter);
|
||||
bool (*encap_tx_offload) (struct qlcnic_adapter *adapter);
|
||||
};
|
||||
|
||||
extern struct qlcnic_nic_template qlcnic_vf_ops;
|
||||
|
||||
static inline bool qlcnic_encap_tx_offload(struct qlcnic_adapter *adapter)
|
||||
static inline bool qlcnic_83xx_encap_tx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return adapter->ahw->extra_capability[0] &
|
||||
QLCNIC_83XX_FW_CAPAB_ENCAP_TX_OFFLOAD;
|
||||
}
|
||||
|
||||
static inline bool qlcnic_encap_rx_offload(struct qlcnic_adapter *adapter)
|
||||
static inline bool qlcnic_83xx_encap_rx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return adapter->ahw->extra_capability[0] &
|
||||
QLCNIC_83XX_FW_CAPAB_ENCAP_RX_OFFLOAD;
|
||||
}
|
||||
|
||||
static inline bool qlcnic_82xx_encap_tx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool qlcnic_82xx_encap_rx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
static inline bool qlcnic_encap_rx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return adapter->ahw->hw_ops->encap_rx_offload(adapter);
|
||||
}
|
||||
|
||||
static inline bool qlcnic_encap_tx_offload(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return adapter->ahw->hw_ops->encap_tx_offload(adapter);
|
||||
}
|
||||
|
||||
static inline int qlcnic_start_firmware(struct qlcnic_adapter *adapter)
|
||||
{
|
||||
return adapter->nic_ops->start_firmware(adapter);
|
||||
|
|
|
@ -242,6 +242,8 @@ static struct qlcnic_hardware_ops qlcnic_83xx_hw_ops = {
|
|||
.get_cap_size = qlcnic_83xx_get_cap_size,
|
||||
.set_sys_info = qlcnic_83xx_set_sys_info,
|
||||
.store_cap_mask = qlcnic_83xx_store_cap_mask,
|
||||
.encap_rx_offload = qlcnic_83xx_encap_rx_offload,
|
||||
.encap_tx_offload = qlcnic_83xx_encap_tx_offload,
|
||||
};
|
||||
|
||||
static struct qlcnic_nic_template qlcnic_83xx_ops = {
|
||||
|
|
|
@ -632,6 +632,8 @@ static struct qlcnic_hardware_ops qlcnic_hw_ops = {
|
|||
.get_cap_size = qlcnic_82xx_get_cap_size,
|
||||
.set_sys_info = qlcnic_82xx_set_sys_info,
|
||||
.store_cap_mask = qlcnic_82xx_store_cap_mask,
|
||||
.encap_rx_offload = qlcnic_82xx_encap_rx_offload,
|
||||
.encap_tx_offload = qlcnic_82xx_encap_tx_offload,
|
||||
};
|
||||
|
||||
static int qlcnic_check_multi_tx_capability(struct qlcnic_adapter *adapter)
|
||||
|
|
|
@ -77,6 +77,8 @@ static struct qlcnic_hardware_ops qlcnic_sriov_vf_hw_ops = {
|
|||
.free_mac_list = qlcnic_sriov_vf_free_mac_list,
|
||||
.enable_sds_intr = qlcnic_83xx_enable_sds_intr,
|
||||
.disable_sds_intr = qlcnic_83xx_disable_sds_intr,
|
||||
.encap_rx_offload = qlcnic_83xx_encap_rx_offload,
|
||||
.encap_tx_offload = qlcnic_83xx_encap_tx_offload,
|
||||
};
|
||||
|
||||
static struct qlcnic_nic_template qlcnic_sriov_vf_ops = {
|
||||
|
|
|
@ -7559,17 +7559,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget)
|
|||
struct rtl8169_private *tp = container_of(napi, struct rtl8169_private, napi);
|
||||
struct net_device *dev = tp->dev;
|
||||
u16 enable_mask = RTL_EVENT_NAPI | tp->event_slow;
|
||||
int work_done= 0;
|
||||
int work_done;
|
||||
u16 status;
|
||||
|
||||
status = rtl_get_events(tp);
|
||||
rtl_ack_events(tp, status & ~tp->event_slow);
|
||||
|
||||
if (status & RTL_EVENT_NAPI_RX)
|
||||
work_done = rtl_rx(dev, tp, (u32) budget);
|
||||
work_done = rtl_rx(dev, tp, (u32) budget);
|
||||
|
||||
if (status & RTL_EVENT_NAPI_TX)
|
||||
rtl_tx(dev, tp);
|
||||
rtl_tx(dev, tp);
|
||||
|
||||
if (status & tp->event_slow) {
|
||||
enable_mask &= ~tp->event_slow;
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define TSE_PCS_CONTROL_AN_EN_MASK BIT(12)
|
||||
#define TSE_PCS_CONTROL_REG 0x00
|
||||
#define TSE_PCS_CONTROL_RESTART_AN_MASK BIT(9)
|
||||
#define TSE_PCS_CTRL_AUTONEG_SGMII 0x1140
|
||||
#define TSE_PCS_IF_MODE_REG 0x28
|
||||
#define TSE_PCS_LINK_TIMER_0_REG 0x24
|
||||
#define TSE_PCS_LINK_TIMER_1_REG 0x26
|
||||
|
@ -65,6 +66,7 @@
|
|||
#define TSE_PCS_SW_RESET_TIMEOUT 100
|
||||
#define TSE_PCS_USE_SGMII_AN_MASK BIT(1)
|
||||
#define TSE_PCS_USE_SGMII_ENA BIT(0)
|
||||
#define TSE_PCS_IF_USE_SGMII 0x03
|
||||
|
||||
#define SGMII_ADAPTER_CTRL_REG 0x00
|
||||
#define SGMII_ADAPTER_DISABLE 0x0001
|
||||
|
@ -101,7 +103,9 @@ int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs)
|
|||
{
|
||||
int ret = 0;
|
||||
|
||||
writew(TSE_PCS_USE_SGMII_ENA, base + TSE_PCS_IF_MODE_REG);
|
||||
writew(TSE_PCS_IF_USE_SGMII, base + TSE_PCS_IF_MODE_REG);
|
||||
|
||||
writew(TSE_PCS_CTRL_AUTONEG_SGMII, base + TSE_PCS_CONTROL_REG);
|
||||
|
||||
writew(TSE_PCS_SGMII_LINK_TIMER_0, base + TSE_PCS_LINK_TIMER_0_REG);
|
||||
writew(TSE_PCS_SGMII_LINK_TIMER_1, base + TSE_PCS_LINK_TIMER_1_REG);
|
||||
|
|
|
@ -2199,7 +2199,8 @@ static netdev_tx_t stmmac_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
unsigned int nopaged_len = skb_headlen(skb);
|
||||
int i, csum_insertion = 0, is_jumbo = 0;
|
||||
int nfrags = skb_shinfo(skb)->nr_frags;
|
||||
unsigned int entry, first_entry;
|
||||
int entry;
|
||||
unsigned int first_entry;
|
||||
struct dma_desc *desc, *first;
|
||||
unsigned int enh_desc;
|
||||
unsigned int des;
|
||||
|
|
|
@ -216,7 +216,7 @@ static int stmmac_mdio_write_gmac4(struct mii_bus *bus, int phyaddr, int phyreg,
|
|||
*/
|
||||
int stmmac_mdio_reset(struct mii_bus *bus)
|
||||
{
|
||||
#if defined(CONFIG_STMMAC_PLATFORM)
|
||||
#if IS_ENABLED(CONFIG_STMMAC_PLATFORM)
|
||||
struct net_device *ndev = bus->priv;
|
||||
struct stmmac_priv *priv = netdev_priv(ndev);
|
||||
unsigned int mii_address = priv->hw->mii.addr;
|
||||
|
|
|
@ -744,6 +744,7 @@ static struct sk_buff *macsec_encrypt(struct sk_buff *skb,
|
|||
sg_init_table(sg, ret);
|
||||
ret = skb_to_sgvec(skb, sg, 0, skb->len);
|
||||
if (unlikely(ret < 0)) {
|
||||
aead_request_free(req);
|
||||
macsec_txsa_put(tx_sa);
|
||||
kfree_skb(skb);
|
||||
return ERR_PTR(ret);
|
||||
|
@ -956,6 +957,7 @@ static struct sk_buff *macsec_decrypt(struct sk_buff *skb,
|
|||
sg_init_table(sg, ret);
|
||||
ret = skb_to_sgvec(skb, sg, 0, skb->len);
|
||||
if (unlikely(ret < 0)) {
|
||||
aead_request_free(req);
|
||||
kfree_skb(skb);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
|
|
@ -1610,7 +1610,7 @@ static struct phy_driver marvell_drivers[] = {
|
|||
.flags = PHY_HAS_INTERRUPT,
|
||||
.probe = marvell_probe,
|
||||
.config_init = &m88e1145_config_init,
|
||||
.config_aneg = &marvell_config_aneg,
|
||||
.config_aneg = &m88e1101_config_aneg,
|
||||
.read_status = &genphy_read_status,
|
||||
.ack_interrupt = &marvell_ack_interrupt,
|
||||
.config_intr = &marvell_config_intr,
|
||||
|
|
|
@ -575,6 +575,9 @@ int asix_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
|
|||
struct usbnet *dev = netdev_priv(net);
|
||||
u8 opt = 0;
|
||||
|
||||
if (wolinfo->wolopts & ~(WAKE_PHY | WAKE_MAGIC))
|
||||
return -EINVAL;
|
||||
|
||||
if (wolinfo->wolopts & WAKE_PHY)
|
||||
opt |= AX_MONITOR_LINK;
|
||||
if (wolinfo->wolopts & WAKE_MAGIC)
|
||||
|
|
|
@ -566,6 +566,9 @@ ax88179_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
|
|||
struct usbnet *dev = netdev_priv(net);
|
||||
u8 opt = 0;
|
||||
|
||||
if (wolinfo->wolopts & ~(WAKE_PHY | WAKE_MAGIC))
|
||||
return -EINVAL;
|
||||
|
||||
if (wolinfo->wolopts & WAKE_PHY)
|
||||
opt |= AX_MONITOR_MODE_RWLC;
|
||||
if (wolinfo->wolopts & WAKE_MAGIC)
|
||||
|
|
|
@ -772,7 +772,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
|
|||
int err;
|
||||
u8 iface_no;
|
||||
struct usb_cdc_parsed_header hdr;
|
||||
u16 curr_ntb_format;
|
||||
__le16 curr_ntb_format;
|
||||
|
||||
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
|
@ -890,7 +890,7 @@ int cdc_ncm_bind_common(struct usbnet *dev, struct usb_interface *intf, u8 data_
|
|||
goto error2;
|
||||
}
|
||||
|
||||
if (curr_ntb_format == USB_CDC_NCM_NTB32_FORMAT) {
|
||||
if (curr_ntb_format == cpu_to_le16(USB_CDC_NCM_NTB32_FORMAT)) {
|
||||
dev_info(&intf->dev, "resetting NTB format to 16-bit");
|
||||
err = usbnet_write_cmd(dev, USB_CDC_SET_NTB_FORMAT,
|
||||
USB_TYPE_CLASS | USB_DIR_OUT
|
||||
|
|
|
@ -1311,19 +1311,10 @@ static int lan78xx_set_wol(struct net_device *netdev,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
pdata->wol = 0;
|
||||
if (wol->wolopts & WAKE_UCAST)
|
||||
pdata->wol |= WAKE_UCAST;
|
||||
if (wol->wolopts & WAKE_MCAST)
|
||||
pdata->wol |= WAKE_MCAST;
|
||||
if (wol->wolopts & WAKE_BCAST)
|
||||
pdata->wol |= WAKE_BCAST;
|
||||
if (wol->wolopts & WAKE_MAGIC)
|
||||
pdata->wol |= WAKE_MAGIC;
|
||||
if (wol->wolopts & WAKE_PHY)
|
||||
pdata->wol |= WAKE_PHY;
|
||||
if (wol->wolopts & WAKE_ARP)
|
||||
pdata->wol |= WAKE_ARP;
|
||||
if (wol->wolopts & ~WAKE_ALL)
|
||||
return -EINVAL;
|
||||
|
||||
pdata->wol = wol->wolopts;
|
||||
|
||||
device_set_wakeup_enable(&dev->udev->dev, (bool)wol->wolopts);
|
||||
|
||||
|
|
|
@ -3776,6 +3776,9 @@ static int rtl8152_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
|
|||
if (!rtl_can_wakeup(tp))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (wol->wolopts & ~WAKE_ANY)
|
||||
return -EINVAL;
|
||||
|
||||
ret = usb_autopm_get_interface(tp->intf);
|
||||
if (ret < 0)
|
||||
goto out_set_wol;
|
||||
|
|
|
@ -731,6 +731,9 @@ static int smsc75xx_ethtool_set_wol(struct net_device *net,
|
|||
struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0]);
|
||||
int ret;
|
||||
|
||||
if (wolinfo->wolopts & ~SUPPORTED_WAKE)
|
||||
return -EINVAL;
|
||||
|
||||
pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;
|
||||
|
||||
ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);
|
||||
|
|
|
@ -775,6 +775,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,
|
|||
struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0]);
|
||||
int ret;
|
||||
|
||||
if (wolinfo->wolopts & ~SUPPORTED_WAKE)
|
||||
return -EINVAL;
|
||||
|
||||
pdata->wolopts = wolinfo->wolopts & SUPPORTED_WAKE;
|
||||
|
||||
ret = device_set_wakeup_enable(&dev->udev->dev, pdata->wolopts);
|
||||
|
|
|
@ -421,6 +421,9 @@ sr_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)
|
|||
struct usbnet *dev = netdev_priv(net);
|
||||
u8 opt = 0;
|
||||
|
||||
if (wolinfo->wolopts & ~(WAKE_PHY | WAKE_MAGIC))
|
||||
return -EINVAL;
|
||||
|
||||
if (wolinfo->wolopts & WAKE_PHY)
|
||||
opt |= SR_MONITOR_LINK;
|
||||
if (wolinfo->wolopts & WAKE_MAGIC)
|
||||
|
|
|
@ -640,6 +640,7 @@ static int ath10k_ahb_hif_start(struct ath10k *ar)
|
|||
{
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot ahb hif start\n");
|
||||
|
||||
napi_enable(&ar->napi);
|
||||
ath10k_ce_enable_interrupts(ar);
|
||||
ath10k_pci_enable_legacy_irq(ar);
|
||||
|
||||
|
@ -692,7 +693,6 @@ static int ath10k_ahb_hif_power_up(struct ath10k *ar)
|
|||
ath10k_err(ar, "could not wake up target CPU: %d\n", ret);
|
||||
goto err_ce_deinit;
|
||||
}
|
||||
napi_enable(&ar->napi);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -698,7 +698,8 @@ static int ath10k_core_get_board_id_from_otp(struct ath10k *ar)
|
|||
|
||||
if ((result & ATH10K_BMI_BOARD_ID_STATUS_MASK) != 0 ||
|
||||
(board_id == 0)) {
|
||||
ath10k_warn(ar, "board id is not exist in otp, ignore it\n");
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT,
|
||||
"board id does not exist in otp, ignore it\n");
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
|
|
|
@ -2665,8 +2665,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
|
|||
list_add_tail(&data->list, &hwsim_radios);
|
||||
spin_unlock_bh(&hwsim_radio_lock);
|
||||
|
||||
if (idx > 0)
|
||||
hwsim_mcast_new_radio(idx, info, param);
|
||||
hwsim_mcast_new_radio(idx, info, param);
|
||||
|
||||
return idx;
|
||||
|
||||
|
|
|
@ -1368,6 +1368,10 @@ static int if_sdio_suspend(struct device *dev)
|
|||
if (priv->wol_criteria == EHS_REMOVE_WAKEUP) {
|
||||
dev_info(dev, "Suspend without wake params -- powering down card\n");
|
||||
if (priv->fw_ready) {
|
||||
ret = lbs_suspend(priv);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
priv->power_up_on_resume = true;
|
||||
if_sdio_power_off(card);
|
||||
}
|
||||
|
|
|
@ -1848,7 +1848,7 @@ static int talk_to_netback(struct xenbus_device *dev,
|
|||
err = xen_net_read_mac(dev, info->netdev->dev_addr);
|
||||
if (err) {
|
||||
xenbus_dev_fatal(dev, err, "parsing %s/mac", dev->nodename);
|
||||
goto out;
|
||||
goto out_unlocked;
|
||||
}
|
||||
|
||||
rtnl_lock();
|
||||
|
@ -1963,6 +1963,7 @@ abort_transaction_no_dev_fatal:
|
|||
xennet_destroy_queues(info);
|
||||
out:
|
||||
rtnl_unlock();
|
||||
out_unlocked:
|
||||
device_unregister(&dev->dev);
|
||||
return err;
|
||||
}
|
||||
|
@ -1994,10 +1995,6 @@ static int xennet_connect(struct net_device *dev)
|
|||
/* talk_to_netback() sets the correct number of queues */
|
||||
num_queues = dev->real_num_tx_queues;
|
||||
|
||||
rtnl_lock();
|
||||
netdev_update_features(dev);
|
||||
rtnl_unlock();
|
||||
|
||||
if (dev->reg_state == NETREG_UNINITIALIZED) {
|
||||
err = register_netdev(dev);
|
||||
if (err) {
|
||||
|
@ -2007,6 +2004,10 @@ static int xennet_connect(struct net_device *dev)
|
|||
}
|
||||
}
|
||||
|
||||
rtnl_lock();
|
||||
netdev_update_features(dev);
|
||||
rtnl_unlock();
|
||||
|
||||
/*
|
||||
* All public and private state should now be sane. Get
|
||||
* ready to start sending and receiving packets and give the driver
|
||||
|
|
|
@ -1393,11 +1393,9 @@ static inline void nvme_release_cmb(struct nvme_dev *dev)
|
|||
if (dev->cmb) {
|
||||
iounmap(dev->cmb);
|
||||
dev->cmb = NULL;
|
||||
if (dev->cmbsz) {
|
||||
sysfs_remove_file_from_group(&dev->ctrl.device->kobj,
|
||||
&dev_attr_cmb.attr, NULL);
|
||||
dev->cmbsz = 0;
|
||||
}
|
||||
sysfs_remove_file_from_group(&dev->ctrl.device->kobj,
|
||||
&dev_attr_cmb.attr, NULL);
|
||||
dev->cmbsz = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1632,16 +1630,14 @@ static int nvme_pci_enable(struct nvme_dev *dev)
|
|||
|
||||
/*
|
||||
* CMBs can currently only exist on >=1.2 PCIe devices. We only
|
||||
* populate sysfs if a CMB is implemented. Note that we add the
|
||||
* CMB attribute to the nvme_ctrl kobj which removes the need to remove
|
||||
* it on exit. Since nvme_dev_attrs_group has no name we can pass
|
||||
* NULL as final argument to sysfs_add_file_to_group.
|
||||
* populate sysfs if a CMB is implemented. Since nvme_dev_attrs_group
|
||||
* has no name we can pass NULL as final argument to
|
||||
* sysfs_add_file_to_group.
|
||||
*/
|
||||
|
||||
if (readl(dev->bar + NVME_REG_VS) >= NVME_VS(1, 2, 0)) {
|
||||
dev->cmb = nvme_map_cmb(dev);
|
||||
|
||||
if (dev->cmbsz) {
|
||||
if (dev->cmb) {
|
||||
if (sysfs_add_file_to_group(&dev->ctrl.device->kobj,
|
||||
&dev_attr_cmb.attr, NULL))
|
||||
dev_warn(dev->dev,
|
||||
|
|
|
@ -192,6 +192,7 @@ static void nvmet_execute_identify_ctrl(struct nvmet_req *req)
|
|||
id->vid = 0;
|
||||
id->ssvid = 0;
|
||||
|
||||
memset(id->sn, ' ', sizeof(id->sn));
|
||||
bin2hex(id->sn, &ctrl->subsys->serial,
|
||||
min(sizeof(ctrl->subsys->serial), sizeof(id->sn) / 2));
|
||||
copy_and_pad(id->mn, sizeof(id->mn), model, sizeof(model) - 1);
|
||||
|
|
|
@ -1634,8 +1634,8 @@ static void quirk_pcie_mch(struct pci_dev *pdev)
|
|||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7520_MCH, quirk_pcie_mch);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7320_MCH, quirk_pcie_mch);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_E7525_MCH, quirk_pcie_mch);
|
||||
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_HUAWEI, 0x1610, quirk_pcie_mch);
|
||||
|
||||
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_VENDOR_ID_HUAWEI, 0x1610, PCI_CLASS_BRIDGE_PCI, 8, quirk_pcie_mch);
|
||||
|
||||
/*
|
||||
* It's possible for the MSI to get corrupted if shpc and acpi
|
||||
|
|
|
@ -1856,7 +1856,7 @@ static acpi_status __init acer_wmi_get_handle_cb(acpi_handle ah, u32 level,
|
|||
if (!strcmp(ctx, "SENR")) {
|
||||
if (acpi_bus_get_device(ah, &dev))
|
||||
return AE_OK;
|
||||
if (!strcmp(ACER_WMID_ACCEL_HID, acpi_device_hid(dev)))
|
||||
if (strcmp(ACER_WMID_ACCEL_HID, acpi_device_hid(dev)))
|
||||
return AE_OK;
|
||||
} else
|
||||
return AE_OK;
|
||||
|
@ -1877,8 +1877,7 @@ static int __init acer_wmi_get_handle(const char *name, const char *prop,
|
|||
handle = NULL;
|
||||
status = acpi_get_devices(prop, acer_wmi_get_handle_cb,
|
||||
(void *)name, &handle);
|
||||
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
if (ACPI_SUCCESS(status) && handle) {
|
||||
*ah = handle;
|
||||
return 0;
|
||||
} else {
|
||||
|
@ -2247,8 +2246,8 @@ static int __init acer_wmi_init(void)
|
|||
if (err)
|
||||
return err;
|
||||
err = acer_wmi_accel_setup();
|
||||
if (err)
|
||||
return err;
|
||||
if (err && err != -ENODEV)
|
||||
pr_warn("Cannot enable accelerometer\n");
|
||||
}
|
||||
|
||||
err = platform_driver_register(&acer_platform_driver);
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <linux/slab.h>
|
||||
#include <linux/timekeeping.h>
|
||||
|
||||
#include <linux/nospec.h>
|
||||
|
||||
#include "ptp_private.h"
|
||||
|
||||
static int ptp_disable_pinfunc(struct ptp_clock_info *ops,
|
||||
|
@ -248,6 +250,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
|
|||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
pin_index = array_index_nospec(pin_index, ops->n_pins);
|
||||
if (mutex_lock_interruptible(&ptp->pincfg_mux))
|
||||
return -ERESTARTSYS;
|
||||
pd = ops->pin_config[pin_index];
|
||||
|
@ -266,6 +269,7 @@ long ptp_ioctl(struct posix_clock *pc, unsigned int cmd, unsigned long arg)
|
|||
err = -EINVAL;
|
||||
break;
|
||||
}
|
||||
pin_index = array_index_nospec(pin_index, ops->n_pins);
|
||||
if (mutex_lock_interruptible(&ptp->pincfg_mux))
|
||||
return -ERESTARTSYS;
|
||||
err = ptp_set_pinfunc(ptp, pin_index, pd.func, pd.chan);
|
||||
|
|
|
@ -155,3 +155,5 @@ static int __init hi6220_reset_init(void)
|
|||
}
|
||||
|
||||
postcore_initcall(hi6220_reset_init);
|
||||
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue