This is the 5.4.260 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVLYbYACgkQONu9yGCS aT4NCQ//dUTZz1mLxyB81yVaTKkQ1mjqXmAXHcMzYtQxLAIxwz0vb57dMX6YLZxO YKdb5X1vxreYsCRRRAxf5jIMbHxLLqhG4Joaq1hyxGUripbWLpu5tmmPvuv8bSOp wXr35/SUm6W8V/fKPEmPC28j8jdUZKBULKgGf5O35zECHnVlcnTOCAHjfaZJ/0Ck xSOTabAVPxJ2Lnrvt4azxvsG1lqVmPA6sYbLR2c2WyV29VQ4VBY+GzrukQVCSedR haEaMmbUux6aOO3LX+UXq4zqO/pPYzF85GkhXO1DWPDhcmrIr/szbsT3yxMWl07T sZg8CUQl14HfoF5eHHMAnrj/zO6WI+o2CcTcjn8Z1fvcXSgf6UbvmJbJrRACOyAv c6CEjHlHOxACiHYUQATiMpuuEk+ALu05clpBexvzHfVV9S+KKcN3VosycCEeNgOk CEFZFYHbRwoKqd/1GwwBlP/B80Shms50Mj5YlD980wdI00hdMOPowyFE07Owfz4+ Xw+Nhygqtb6Q/IuzE0r0PjX0sfpDo1PlCP3HOfPZ0U0S9ASotlAnOgBFeNUMO3Fc /by7COcthjE6vxSp/1Xi2Ia5L0yD6nMWWmyeTzFJFVIJQ5CAzEbeLinZCthc5fy0 PggOKqWiZ6je59ca/TPM5Es5uJoiRaA7hefKTUVF+vZbRoU2VHI= =+ILk -----END PGP SIGNATURE----- Merge 5.4.260 into android11-5.4-lts Changes in 5.4.260 mtd: rawnand: marvell: Ensure program page operations are successful selftests/ftrace: Add new test case which checks non unique symbol mcb: Return actual parsed size when reading chameleon table mcb-lpc: Reallocate memory region to avoid memory overlapping virtio_balloon: Fix endless deflation and inflation on arm64 virtio-mmio: fix memory leak of vm_dev r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1 r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1 treewide: Spelling fix in comment igb: Fix potential memory leak in igb_add_ethtool_nfc_entry neighbour: fix various data-races igc: Fix ambiguity in the ethtool advertising net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show() r8152: Increase USB control msg timeout to 5000ms as per spec r8152: Run the unload routine if we have errors during probe r8152: Cancel hw_phy_work if we have an error in probe tcp: fix wrong RTO timeout when received SACK reneging gtp: uapi: fix GTPA_MAX gtp: fix fragmentation needed check with gso iio: exynos-adc: request second interupt only when touchscreen mode is used i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node() i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node() i2c: stm32f7: Fix PEC handling in case of SMBUS transfers i2c: aspeed: Fix i2c bus hang in slave read nvmem: imx: correct nregs for i.MX6ULL nvmem: imx: correct nregs for i.MX6SLL nvmem: imx: correct nregs for i.MX6UL perf/core: Fix potential NULL deref clk: Sanitize possible_parent_show to Handle Return Value of of_clk_get_parent_name i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper() arm64: fix a concurrency issue in emulation_proc_handler() kobject: Fix slab-out-of-bounds in fill_kobj_path() smbdirect: missing rc checks while waiting for rdma events f2fs: fix to do sanity check on inode type during garbage collection nfsd: lock_rename() needs both directories to live on the same fs x86/mm: Simplify RESERVE_BRK() x86/mm: Fix RESERVE_BRK() for older binutils ext4: add two helper functions extent_logical_end() and pa_logical_end() ext4: avoid overlapping preallocations due to overflow ext4: fix BUG in ext4_mb_new_inode_pa() due to overflow driver: platform: Add helper for safer setting of driver_override rpmsg: Constify local variable in field store macro rpmsg: Fix kfree() of static memory on setting driver_override rpmsg: Fix calling device_lock() on non-initialized device rpmsg: glink: Release driver_override rpmsg: Fix possible refcount leak in rpmsg_register_device_override() x86: Fix .brk attribute in linker script Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table irqchip/stm32-exti: add missing DT IRQ flag translation dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport fbdev: atyfb: only use ioremap_uc() on i386 and ia64 spi: npcm-fiu: Fix UMA reads when dummy.nbytes == 0 netfilter: nfnetlink_log: silence bogus compiler warning ASoC: rt5650: fix the wrong result of key button fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit() scsi: mpt3sas: Fix in error path platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e platform/mellanox: mlxbf-tmfifo: Fix a warning message net: chelsio: cxgb4: add an error code check in t4_load_phy_fw ata: ahci: fix enum constants for gcc-13 remove the sx8 block driver nvmet-tcp: move send/recv error handling in the send/recv methods instead of call-sites nvmet-tcp: Fix a possible UAF in queue intialization setup Revert "ARM: dts: Move am33xx and am43xx mmc nodes to sdhci-omap driver" PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility tty: 8250: Remove UC-257 and UC-431 tty: 8250: Add support for additional Brainboxes UC cards tty: 8250: Add support for Brainboxes UP cards tty: 8250: Add support for Intashield IS-100 Linux 5.4.260 Change-Id: I723ce192f509587c74523519038f1ad6441938fe Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
7b96d6414a
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 5
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 259
|
||||
SUBLEVEL = 260
|
||||
EXTRAVERSION =
|
||||
NAME = Kleptomaniac Octopus
|
||||
|
||||
|
@ -381,7 +381,7 @@
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
bus-width = <4>;
|
||||
cap-power-off-card;
|
||||
pinctrl-names = "default";
|
||||
|
@ -22,7 +22,6 @@
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
bus-width = <8>;
|
||||
status = "okay";
|
||||
non-removable;
|
||||
};
|
||||
|
||||
&am33xx_pinmux {
|
||||
|
@ -75,6 +75,7 @@
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -389,6 +389,7 @@
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -75,6 +75,7 @@
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
cap-power-off-card;
|
||||
ti,needs-special-hs-handling;
|
||||
keep-power-in-suspend;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wl18xx_pins>;
|
||||
|
@ -782,7 +782,8 @@
|
||||
bus-width = <4>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins &wlan_pins>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
ti,needs-special-hs-handling;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
|
||||
|
@ -700,7 +700,7 @@
|
||||
&mmc2 {
|
||||
status = "okay";
|
||||
vmmc-supply = <&wl12xx_vmmc>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
bus-width = <4>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
|
@ -361,7 +361,7 @@
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
pinctrl-0 = <&mmc1_pins_default>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -473,7 +473,7 @@
|
||||
vmmc-supply = <&vmmcsd_fixed>;
|
||||
bus-width = <8>;
|
||||
pinctrl-0 = <&mmc2_pins_default>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -341,7 +341,7 @@
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&ldo3_reg>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
@ -351,7 +351,7 @@
|
||||
pinctrl-0 = <&wireless_pins>;
|
||||
vmmmc-supply = <&v3v3c_reg>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
dmas = <&edma_xbar 12 0 1
|
||||
&edma_xbar 13 0 2>;
|
||||
dma-names = "tx", "rx";
|
||||
|
@ -69,7 +69,7 @@
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmc_reg>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -1333,8 +1333,10 @@
|
||||
ranges = <0x0 0x60000 0x1000>;
|
||||
|
||||
mmc1: mmc@0 {
|
||||
compatible = "ti,am335-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
ti,dual-volt;
|
||||
ti,needs-special-reset;
|
||||
ti,needs-special-hs-handling;
|
||||
dmas = <&edma 24 0>, <&edma 25 0>;
|
||||
dma-names = "tx", "rx";
|
||||
interrupts = <64>;
|
||||
@ -1824,7 +1826,7 @@
|
||||
ranges = <0x0 0xd8000 0x1000>;
|
||||
|
||||
mmc2: mmc@0 {
|
||||
compatible = "ti,am335-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 2 0
|
||||
&edma 3 0>;
|
||||
|
@ -259,11 +259,10 @@
|
||||
ranges = <0x0 0x47810000 0x1000>;
|
||||
|
||||
mmc3: mmc@0 {
|
||||
compatible = "ti,am335-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
ti,needs-special-reset;
|
||||
interrupts = <29>;
|
||||
reg = <0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -250,11 +250,10 @@
|
||||
ranges = <0x0 0x47810000 0x1000>;
|
||||
|
||||
mmc3: mmc@0 {
|
||||
compatible = "ti,am437-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
ti,needs-special-reset;
|
||||
interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
|
||||
reg = <0x0 0x1000>;
|
||||
status = "disabled";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -291,7 +291,7 @@
|
||||
pinctrl-0 = <&emmc_pins>;
|
||||
vmmc-supply = <&vmmc_3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
|
@ -872,7 +872,7 @@
|
||||
pinctrl-names = "default", "sleep";
|
||||
pinctrl-0 = <&emmc_pins_default>;
|
||||
pinctrl-1 = <&emmc_pins_sleep>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
};
|
||||
|
||||
&mmc3 {
|
||||
@ -889,7 +889,7 @@
|
||||
pinctrl-1 = <&mmc3_pins_sleep>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -1104,8 +1104,9 @@
|
||||
ranges = <0x0 0x60000 0x1000>;
|
||||
|
||||
mmc1: mmc@0 {
|
||||
compatible = "ti,am437-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
reg = <0x0 0x1000>;
|
||||
ti,dual-volt;
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 24 0>,
|
||||
<&edma 25 0>;
|
||||
@ -1640,7 +1641,7 @@
|
||||
ranges = <0x0 0xd8000 0x1000>;
|
||||
|
||||
mmc2: mmc@0 {
|
||||
compatible = "ti,am437-sdhci";
|
||||
compatible = "ti,omap4-hsmmc";
|
||||
reg = <0x0 0x1000>;
|
||||
ti,needs-special-reset;
|
||||
dmas = <&edma 2 0>,
|
||||
|
@ -694,7 +694,7 @@
|
||||
pinctrl-1 = <&mmc3_pins_sleep>;
|
||||
cap-power-off-card;
|
||||
keep-power-in-suspend;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
@ -208,10 +208,12 @@ static int emulation_proc_handler(struct ctl_table *table, int write,
|
||||
loff_t *ppos)
|
||||
{
|
||||
int ret = 0;
|
||||
struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);
|
||||
enum insn_emulation_mode prev_mode = insn->current_mode;
|
||||
struct insn_emulation *insn;
|
||||
enum insn_emulation_mode prev_mode;
|
||||
|
||||
mutex_lock(&insn_emulation_mutex);
|
||||
insn = container_of(table->data, struct insn_emulation, current_mode);
|
||||
prev_mode = insn->current_mode;
|
||||
ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
|
||||
|
||||
if (ret || !write || prev_mode == insn->current_mode)
|
||||
|
@ -67,6 +67,8 @@ struct legacy_pic {
|
||||
void (*make_irq)(unsigned int irq);
|
||||
};
|
||||
|
||||
void legacy_pic_pcat_compat(void);
|
||||
|
||||
extern struct legacy_pic *legacy_pic;
|
||||
extern struct legacy_pic null_legacy_pic;
|
||||
|
||||
|
@ -94,27 +94,16 @@ extern unsigned long _brk_end;
|
||||
void *extend_brk(size_t size, size_t align);
|
||||
|
||||
/*
|
||||
* Reserve space in the brk section. The name must be unique within
|
||||
* the file, and somewhat descriptive. The size is in bytes. Must be
|
||||
* used at file scope.
|
||||
* Reserve space in the .brk section, which is a block of memory from which the
|
||||
* caller is allowed to allocate very early (before even memblock is available)
|
||||
* by calling extend_brk(). All allocated memory will be eventually converted
|
||||
* to memblock. Any leftover unallocated memory will be freed.
|
||||
*
|
||||
* (This uses a temp function to wrap the asm so we can pass it the
|
||||
* size parameter; otherwise we wouldn't be able to. We can't use a
|
||||
* "section" attribute on a normal variable because it always ends up
|
||||
* being @progbits, which ends up allocating space in the vmlinux
|
||||
* executable.)
|
||||
* The size is in bytes.
|
||||
*/
|
||||
#define RESERVE_BRK(name,sz) \
|
||||
static void __section(.discard.text) __used notrace \
|
||||
__brk_reservation_fn_##name##__(void) { \
|
||||
asm volatile ( \
|
||||
".pushsection .brk_reservation,\"aw\",@nobits;" \
|
||||
".brk." #name ":" \
|
||||
" 1:.skip %c0;" \
|
||||
" .size .brk." #name ", . - 1b;" \
|
||||
" .popsection" \
|
||||
: : "i" (sz)); \
|
||||
}
|
||||
#define RESERVE_BRK(name, size) \
|
||||
__section(.bss..brk) __aligned(1) __used \
|
||||
static char __brk_##name[size]
|
||||
|
||||
/* Helper for reserving space for arrays of things */
|
||||
#define RESERVE_BRK_ARRAY(type, name, entries) \
|
||||
@ -132,12 +121,19 @@ asmlinkage void __init x86_64_start_reservations(char *real_mode_data);
|
||||
|
||||
#endif /* __i386__ */
|
||||
#endif /* _SETUP */
|
||||
#else
|
||||
#define RESERVE_BRK(name,sz) \
|
||||
.pushsection .brk_reservation,"aw",@nobits; \
|
||||
.brk.name: \
|
||||
1: .skip sz; \
|
||||
.size .brk.name,.-1b; \
|
||||
|
||||
#else /* __ASSEMBLY */
|
||||
|
||||
.macro __RESERVE_BRK name, size
|
||||
.pushsection .bss..brk, "aw"
|
||||
SYM_DATA_START(__brk_\name)
|
||||
.skip \size
|
||||
SYM_DATA_END(__brk_\name)
|
||||
.popsection
|
||||
.endm
|
||||
|
||||
#define RESERVE_BRK(name, size) __RESERVE_BRK name, size
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_X86_SETUP_H */
|
||||
|
@ -140,6 +140,9 @@ static int __init acpi_parse_madt(struct acpi_table_header *table)
|
||||
madt->address);
|
||||
}
|
||||
|
||||
if (madt->flags & ACPI_MADT_PCAT_COMPAT)
|
||||
legacy_pic_pcat_compat();
|
||||
|
||||
default_acpi_madt_oem_check(madt->header.oem_id,
|
||||
madt->header.oem_table_id);
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
*/
|
||||
static void init_8259A(int auto_eoi);
|
||||
|
||||
static bool pcat_compat __ro_after_init;
|
||||
static int i8259A_auto_eoi;
|
||||
DEFINE_RAW_SPINLOCK(i8259A_lock);
|
||||
|
||||
@ -301,15 +302,32 @@ static void unmask_8259A(void)
|
||||
|
||||
static int probe_8259A(void)
|
||||
{
|
||||
unsigned char new_val, probe_val = ~(1 << PIC_CASCADE_IR);
|
||||
unsigned long flags;
|
||||
unsigned char probe_val = ~(1 << PIC_CASCADE_IR);
|
||||
unsigned char new_val;
|
||||
|
||||
/*
|
||||
* Check to see if we have a PIC.
|
||||
* Mask all except the cascade and read
|
||||
* back the value we just wrote. If we don't
|
||||
* have a PIC, we will read 0xff as opposed to the
|
||||
* value we wrote.
|
||||
* If MADT has the PCAT_COMPAT flag set, then do not bother probing
|
||||
* for the PIC. Some BIOSes leave the PIC uninitialized and probing
|
||||
* fails.
|
||||
*
|
||||
* Right now this causes problems as quite some code depends on
|
||||
* nr_legacy_irqs() > 0 or has_legacy_pic() == true. This is silly
|
||||
* when the system has an IO/APIC because then PIC is not required
|
||||
* at all, except for really old machines where the timer interrupt
|
||||
* must be routed through the PIC. So just pretend that the PIC is
|
||||
* there and let legacy_pic->init() initialize it for nothing.
|
||||
*
|
||||
* Alternatively this could just try to initialize the PIC and
|
||||
* repeat the probe, but for cases where there is no PIC that's
|
||||
* just pointless.
|
||||
*/
|
||||
if (pcat_compat)
|
||||
return nr_legacy_irqs();
|
||||
|
||||
/*
|
||||
* Check to see if we have a PIC. Mask all except the cascade and
|
||||
* read back the value we just wrote. If we don't have a PIC, we
|
||||
* will read 0xff as opposed to the value we wrote.
|
||||
*/
|
||||
raw_spin_lock_irqsave(&i8259A_lock, flags);
|
||||
|
||||
@ -431,5 +449,9 @@ static int __init i8259A_init_ops(void)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
device_initcall(i8259A_init_ops);
|
||||
|
||||
void __init legacy_pic_pcat_compat(void)
|
||||
{
|
||||
pcat_compat = true;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ SECTIONS
|
||||
.brk : AT(ADDR(.brk) - LOAD_OFFSET) {
|
||||
__brk_base = .;
|
||||
. += 64 * 1024; /* 64k alignment slop space */
|
||||
*(.brk_reservation) /* areas brk users have reserved */
|
||||
*(.bss..brk) /* areas brk users have reserved */
|
||||
__brk_limit = .;
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <linux/libata.h>
|
||||
#include <linux/phy/phy.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/bits.h>
|
||||
|
||||
/* Enclosure Management Control */
|
||||
#define EM_CTRL_MSG_TYPE 0x000f0000
|
||||
@ -54,12 +55,12 @@ enum {
|
||||
AHCI_PORT_PRIV_FBS_DMA_SZ = AHCI_CMD_SLOT_SZ +
|
||||
AHCI_CMD_TBL_AR_SZ +
|
||||
(AHCI_RX_FIS_SZ * 16),
|
||||
AHCI_IRQ_ON_SG = (1 << 31),
|
||||
AHCI_CMD_ATAPI = (1 << 5),
|
||||
AHCI_CMD_WRITE = (1 << 6),
|
||||
AHCI_CMD_PREFETCH = (1 << 7),
|
||||
AHCI_CMD_RESET = (1 << 8),
|
||||
AHCI_CMD_CLR_BUSY = (1 << 10),
|
||||
AHCI_IRQ_ON_SG = BIT(31),
|
||||
AHCI_CMD_ATAPI = BIT(5),
|
||||
AHCI_CMD_WRITE = BIT(6),
|
||||
AHCI_CMD_PREFETCH = BIT(7),
|
||||
AHCI_CMD_RESET = BIT(8),
|
||||
AHCI_CMD_CLR_BUSY = BIT(10),
|
||||
|
||||
RX_FIS_PIO_SETUP = 0x20, /* offset of PIO Setup FIS data */
|
||||
RX_FIS_D2H_REG = 0x40, /* offset of D2H Register FIS data */
|
||||
@ -77,37 +78,37 @@ enum {
|
||||
HOST_CAP2 = 0x24, /* host capabilities, extended */
|
||||
|
||||
/* HOST_CTL bits */
|
||||
HOST_RESET = (1 << 0), /* reset controller; self-clear */
|
||||
HOST_IRQ_EN = (1 << 1), /* global IRQ enable */
|
||||
HOST_MRSM = (1 << 2), /* MSI Revert to Single Message */
|
||||
HOST_AHCI_EN = (1 << 31), /* AHCI enabled */
|
||||
HOST_RESET = BIT(0), /* reset controller; self-clear */
|
||||
HOST_IRQ_EN = BIT(1), /* global IRQ enable */
|
||||
HOST_MRSM = BIT(2), /* MSI Revert to Single Message */
|
||||
HOST_AHCI_EN = BIT(31), /* AHCI enabled */
|
||||
|
||||
/* HOST_CAP bits */
|
||||
HOST_CAP_SXS = (1 << 5), /* Supports External SATA */
|
||||
HOST_CAP_EMS = (1 << 6), /* Enclosure Management support */
|
||||
HOST_CAP_CCC = (1 << 7), /* Command Completion Coalescing */
|
||||
HOST_CAP_PART = (1 << 13), /* Partial state capable */
|
||||
HOST_CAP_SSC = (1 << 14), /* Slumber state capable */
|
||||
HOST_CAP_PIO_MULTI = (1 << 15), /* PIO multiple DRQ support */
|
||||
HOST_CAP_FBS = (1 << 16), /* FIS-based switching support */
|
||||
HOST_CAP_PMP = (1 << 17), /* Port Multiplier support */
|
||||
HOST_CAP_ONLY = (1 << 18), /* Supports AHCI mode only */
|
||||
HOST_CAP_CLO = (1 << 24), /* Command List Override support */
|
||||
HOST_CAP_LED = (1 << 25), /* Supports activity LED */
|
||||
HOST_CAP_ALPM = (1 << 26), /* Aggressive Link PM support */
|
||||
HOST_CAP_SSS = (1 << 27), /* Staggered Spin-up */
|
||||
HOST_CAP_MPS = (1 << 28), /* Mechanical presence switch */
|
||||
HOST_CAP_SNTF = (1 << 29), /* SNotification register */
|
||||
HOST_CAP_NCQ = (1 << 30), /* Native Command Queueing */
|
||||
HOST_CAP_64 = (1 << 31), /* PCI DAC (64-bit DMA) support */
|
||||
HOST_CAP_SXS = BIT(5), /* Supports External SATA */
|
||||
HOST_CAP_EMS = BIT(6), /* Enclosure Management support */
|
||||
HOST_CAP_CCC = BIT(7), /* Command Completion Coalescing */
|
||||
HOST_CAP_PART = BIT(13), /* Partial state capable */
|
||||
HOST_CAP_SSC = BIT(14), /* Slumber state capable */
|
||||
HOST_CAP_PIO_MULTI = BIT(15), /* PIO multiple DRQ support */
|
||||
HOST_CAP_FBS = BIT(16), /* FIS-based switching support */
|
||||
HOST_CAP_PMP = BIT(17), /* Port Multiplier support */
|
||||
HOST_CAP_ONLY = BIT(18), /* Supports AHCI mode only */
|
||||
HOST_CAP_CLO = BIT(24), /* Command List Override support */
|
||||
HOST_CAP_LED = BIT(25), /* Supports activity LED */
|
||||
HOST_CAP_ALPM = BIT(26), /* Aggressive Link PM support */
|
||||
HOST_CAP_SSS = BIT(27), /* Staggered Spin-up */
|
||||
HOST_CAP_MPS = BIT(28), /* Mechanical presence switch */
|
||||
HOST_CAP_SNTF = BIT(29), /* SNotification register */
|
||||
HOST_CAP_NCQ = BIT(30), /* Native Command Queueing */
|
||||
HOST_CAP_64 = BIT(31), /* PCI DAC (64-bit DMA) support */
|
||||
|
||||
/* HOST_CAP2 bits */
|
||||
HOST_CAP2_BOH = (1 << 0), /* BIOS/OS handoff supported */
|
||||
HOST_CAP2_NVMHCI = (1 << 1), /* NVMHCI supported */
|
||||
HOST_CAP2_APST = (1 << 2), /* Automatic partial to slumber */
|
||||
HOST_CAP2_SDS = (1 << 3), /* Support device sleep */
|
||||
HOST_CAP2_SADM = (1 << 4), /* Support aggressive DevSlp */
|
||||
HOST_CAP2_DESO = (1 << 5), /* DevSlp from slumber only */
|
||||
HOST_CAP2_BOH = BIT(0), /* BIOS/OS handoff supported */
|
||||
HOST_CAP2_NVMHCI = BIT(1), /* NVMHCI supported */
|
||||
HOST_CAP2_APST = BIT(2), /* Automatic partial to slumber */
|
||||
HOST_CAP2_SDS = BIT(3), /* Support device sleep */
|
||||
HOST_CAP2_SADM = BIT(4), /* Support aggressive DevSlp */
|
||||
HOST_CAP2_DESO = BIT(5), /* DevSlp from slumber only */
|
||||
|
||||
/* registers for each SATA port */
|
||||
PORT_LST_ADDR = 0x00, /* command list DMA addr */
|
||||
@ -129,24 +130,24 @@ enum {
|
||||
PORT_DEVSLP = 0x44, /* device sleep */
|
||||
|
||||
/* PORT_IRQ_{STAT,MASK} bits */
|
||||
PORT_IRQ_COLD_PRES = (1 << 31), /* cold presence detect */
|
||||
PORT_IRQ_TF_ERR = (1 << 30), /* task file error */
|
||||
PORT_IRQ_HBUS_ERR = (1 << 29), /* host bus fatal error */
|
||||
PORT_IRQ_HBUS_DATA_ERR = (1 << 28), /* host bus data error */
|
||||
PORT_IRQ_IF_ERR = (1 << 27), /* interface fatal error */
|
||||
PORT_IRQ_IF_NONFATAL = (1 << 26), /* interface non-fatal error */
|
||||
PORT_IRQ_OVERFLOW = (1 << 24), /* xfer exhausted available S/G */
|
||||
PORT_IRQ_BAD_PMP = (1 << 23), /* incorrect port multiplier */
|
||||
PORT_IRQ_COLD_PRES = BIT(31), /* cold presence detect */
|
||||
PORT_IRQ_TF_ERR = BIT(30), /* task file error */
|
||||
PORT_IRQ_HBUS_ERR = BIT(29), /* host bus fatal error */
|
||||
PORT_IRQ_HBUS_DATA_ERR = BIT(28), /* host bus data error */
|
||||
PORT_IRQ_IF_ERR = BIT(27), /* interface fatal error */
|
||||
PORT_IRQ_IF_NONFATAL = BIT(26), /* interface non-fatal error */
|
||||
PORT_IRQ_OVERFLOW = BIT(24), /* xfer exhausted available S/G */
|
||||
PORT_IRQ_BAD_PMP = BIT(23), /* incorrect port multiplier */
|
||||
|
||||
PORT_IRQ_PHYRDY = (1 << 22), /* PhyRdy changed */
|
||||
PORT_IRQ_DEV_ILCK = (1 << 7), /* device interlock */
|
||||
PORT_IRQ_CONNECT = (1 << 6), /* port connect change status */
|
||||
PORT_IRQ_SG_DONE = (1 << 5), /* descriptor processed */
|
||||
PORT_IRQ_UNK_FIS = (1 << 4), /* unknown FIS rx'd */
|
||||
PORT_IRQ_SDB_FIS = (1 << 3), /* Set Device Bits FIS rx'd */
|
||||
PORT_IRQ_DMAS_FIS = (1 << 2), /* DMA Setup FIS rx'd */
|
||||
PORT_IRQ_PIOS_FIS = (1 << 1), /* PIO Setup FIS rx'd */
|
||||
PORT_IRQ_D2H_REG_FIS = (1 << 0), /* D2H Register FIS rx'd */
|
||||
PORT_IRQ_PHYRDY = BIT(22), /* PhyRdy changed */
|
||||
PORT_IRQ_DEV_ILCK = BIT(7), /* device interlock */
|
||||
PORT_IRQ_CONNECT = BIT(6), /* port connect change status */
|
||||
PORT_IRQ_SG_DONE = BIT(5), /* descriptor processed */
|
||||
PORT_IRQ_UNK_FIS = BIT(4), /* unknown FIS rx'd */
|
||||
PORT_IRQ_SDB_FIS = BIT(3), /* Set Device Bits FIS rx'd */
|
||||
PORT_IRQ_DMAS_FIS = BIT(2), /* DMA Setup FIS rx'd */
|
||||
PORT_IRQ_PIOS_FIS = BIT(1), /* PIO Setup FIS rx'd */
|
||||
PORT_IRQ_D2H_REG_FIS = BIT(0), /* D2H Register FIS rx'd */
|
||||
|
||||
PORT_IRQ_FREEZE = PORT_IRQ_HBUS_ERR |
|
||||
PORT_IRQ_IF_ERR |
|
||||
@ -162,34 +163,34 @@ enum {
|
||||
PORT_IRQ_PIOS_FIS | PORT_IRQ_D2H_REG_FIS,
|
||||
|
||||
/* PORT_CMD bits */
|
||||
PORT_CMD_ASP = (1 << 27), /* Aggressive Slumber/Partial */
|
||||
PORT_CMD_ALPE = (1 << 26), /* Aggressive Link PM enable */
|
||||
PORT_CMD_ATAPI = (1 << 24), /* Device is ATAPI */
|
||||
PORT_CMD_FBSCP = (1 << 22), /* FBS Capable Port */
|
||||
PORT_CMD_ESP = (1 << 21), /* External Sata Port */
|
||||
PORT_CMD_HPCP = (1 << 18), /* HotPlug Capable Port */
|
||||
PORT_CMD_PMP = (1 << 17), /* PMP attached */
|
||||
PORT_CMD_LIST_ON = (1 << 15), /* cmd list DMA engine running */
|
||||
PORT_CMD_FIS_ON = (1 << 14), /* FIS DMA engine running */
|
||||
PORT_CMD_FIS_RX = (1 << 4), /* Enable FIS receive DMA engine */
|
||||
PORT_CMD_CLO = (1 << 3), /* Command list override */
|
||||
PORT_CMD_POWER_ON = (1 << 2), /* Power up device */
|
||||
PORT_CMD_SPIN_UP = (1 << 1), /* Spin up device */
|
||||
PORT_CMD_START = (1 << 0), /* Enable port DMA engine */
|
||||
PORT_CMD_ASP = BIT(27), /* Aggressive Slumber/Partial */
|
||||
PORT_CMD_ALPE = BIT(26), /* Aggressive Link PM enable */
|
||||
PORT_CMD_ATAPI = BIT(24), /* Device is ATAPI */
|
||||
PORT_CMD_FBSCP = BIT(22), /* FBS Capable Port */
|
||||
PORT_CMD_ESP = BIT(21), /* External Sata Port */
|
||||
PORT_CMD_HPCP = BIT(18), /* HotPlug Capable Port */
|
||||
PORT_CMD_PMP = BIT(17), /* PMP attached */
|
||||
PORT_CMD_LIST_ON = BIT(15), /* cmd list DMA engine running */
|
||||
PORT_CMD_FIS_ON = BIT(14), /* FIS DMA engine running */
|
||||
PORT_CMD_FIS_RX = BIT(4), /* Enable FIS receive DMA engine */
|
||||
PORT_CMD_CLO = BIT(3), /* Command list override */
|
||||
PORT_CMD_POWER_ON = BIT(2), /* Power up device */
|
||||
PORT_CMD_SPIN_UP = BIT(1), /* Spin up device */
|
||||
PORT_CMD_START = BIT(0), /* Enable port DMA engine */
|
||||
|
||||
PORT_CMD_ICC_MASK = (0xf << 28), /* i/f ICC state mask */
|
||||
PORT_CMD_ICC_ACTIVE = (0x1 << 28), /* Put i/f in active state */
|
||||
PORT_CMD_ICC_PARTIAL = (0x2 << 28), /* Put i/f in partial state */
|
||||
PORT_CMD_ICC_SLUMBER = (0x6 << 28), /* Put i/f in slumber state */
|
||||
PORT_CMD_ICC_MASK = (0xfu << 28), /* i/f ICC state mask */
|
||||
PORT_CMD_ICC_ACTIVE = (0x1u << 28), /* Put i/f in active state */
|
||||
PORT_CMD_ICC_PARTIAL = (0x2u << 28), /* Put i/f in partial state */
|
||||
PORT_CMD_ICC_SLUMBER = (0x6u << 28), /* Put i/f in slumber state */
|
||||
|
||||
/* PORT_FBS bits */
|
||||
PORT_FBS_DWE_OFFSET = 16, /* FBS device with error offset */
|
||||
PORT_FBS_ADO_OFFSET = 12, /* FBS active dev optimization offset */
|
||||
PORT_FBS_DEV_OFFSET = 8, /* FBS device to issue offset */
|
||||
PORT_FBS_DEV_MASK = (0xf << PORT_FBS_DEV_OFFSET), /* FBS.DEV */
|
||||
PORT_FBS_SDE = (1 << 2), /* FBS single device error */
|
||||
PORT_FBS_DEC = (1 << 1), /* FBS device error clear */
|
||||
PORT_FBS_EN = (1 << 0), /* Enable FBS */
|
||||
PORT_FBS_SDE = BIT(2), /* FBS single device error */
|
||||
PORT_FBS_DEC = BIT(1), /* FBS device error clear */
|
||||
PORT_FBS_EN = BIT(0), /* Enable FBS */
|
||||
|
||||
/* PORT_DEVSLP bits */
|
||||
PORT_DEVSLP_DM_OFFSET = 25, /* DITO multiplier offset */
|
||||
@ -197,52 +198,52 @@ enum {
|
||||
PORT_DEVSLP_DITO_OFFSET = 15, /* DITO offset */
|
||||
PORT_DEVSLP_MDAT_OFFSET = 10, /* Minimum assertion time */
|
||||
PORT_DEVSLP_DETO_OFFSET = 2, /* DevSlp exit timeout */
|
||||
PORT_DEVSLP_DSP = (1 << 1), /* DevSlp present */
|
||||
PORT_DEVSLP_ADSE = (1 << 0), /* Aggressive DevSlp enable */
|
||||
PORT_DEVSLP_DSP = BIT(1), /* DevSlp present */
|
||||
PORT_DEVSLP_ADSE = BIT(0), /* Aggressive DevSlp enable */
|
||||
|
||||
/* hpriv->flags bits */
|
||||
|
||||
#define AHCI_HFLAGS(flags) .private_data = (void *)(flags)
|
||||
|
||||
AHCI_HFLAG_NO_NCQ = (1 << 0),
|
||||
AHCI_HFLAG_IGN_IRQ_IF_ERR = (1 << 1), /* ignore IRQ_IF_ERR */
|
||||
AHCI_HFLAG_IGN_SERR_INTERNAL = (1 << 2), /* ignore SERR_INTERNAL */
|
||||
AHCI_HFLAG_32BIT_ONLY = (1 << 3), /* force 32bit */
|
||||
AHCI_HFLAG_MV_PATA = (1 << 4), /* PATA port */
|
||||
AHCI_HFLAG_NO_MSI = (1 << 5), /* no PCI MSI */
|
||||
AHCI_HFLAG_NO_PMP = (1 << 6), /* no PMP */
|
||||
AHCI_HFLAG_SECT255 = (1 << 8), /* max 255 sectors */
|
||||
AHCI_HFLAG_YES_NCQ = (1 << 9), /* force NCQ cap on */
|
||||
AHCI_HFLAG_NO_SUSPEND = (1 << 10), /* don't suspend */
|
||||
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = (1 << 11), /* treat SRST timeout as
|
||||
link offline */
|
||||
AHCI_HFLAG_NO_SNTF = (1 << 12), /* no sntf */
|
||||
AHCI_HFLAG_NO_FPDMA_AA = (1 << 13), /* no FPDMA AA */
|
||||
AHCI_HFLAG_YES_FBS = (1 << 14), /* force FBS cap on */
|
||||
AHCI_HFLAG_DELAY_ENGINE = (1 << 15), /* do not start engine on
|
||||
port start (wait until
|
||||
error-handling stage) */
|
||||
AHCI_HFLAG_NO_DEVSLP = (1 << 17), /* no device sleep */
|
||||
AHCI_HFLAG_NO_FBS = (1 << 18), /* no FBS */
|
||||
AHCI_HFLAG_NO_NCQ = BIT(0),
|
||||
AHCI_HFLAG_IGN_IRQ_IF_ERR = BIT(1), /* ignore IRQ_IF_ERR */
|
||||
AHCI_HFLAG_IGN_SERR_INTERNAL = BIT(2), /* ignore SERR_INTERNAL */
|
||||
AHCI_HFLAG_32BIT_ONLY = BIT(3), /* force 32bit */
|
||||
AHCI_HFLAG_MV_PATA = BIT(4), /* PATA port */
|
||||
AHCI_HFLAG_NO_MSI = BIT(5), /* no PCI MSI */
|
||||
AHCI_HFLAG_NO_PMP = BIT(6), /* no PMP */
|
||||
AHCI_HFLAG_SECT255 = BIT(8), /* max 255 sectors */
|
||||
AHCI_HFLAG_YES_NCQ = BIT(9), /* force NCQ cap on */
|
||||
AHCI_HFLAG_NO_SUSPEND = BIT(10), /* don't suspend */
|
||||
AHCI_HFLAG_SRST_TOUT_IS_OFFLINE = BIT(11), /* treat SRST timeout as
|
||||
link offline */
|
||||
AHCI_HFLAG_NO_SNTF = BIT(12), /* no sntf */
|
||||
AHCI_HFLAG_NO_FPDMA_AA = BIT(13), /* no FPDMA AA */
|
||||
AHCI_HFLAG_YES_FBS = BIT(14), /* force FBS cap on */
|
||||
AHCI_HFLAG_DELAY_ENGINE = BIT(15), /* do not start engine on
|
||||
port start (wait until
|
||||
error-handling stage) */
|
||||
AHCI_HFLAG_NO_DEVSLP = BIT(17), /* no device sleep */
|
||||
AHCI_HFLAG_NO_FBS = BIT(18), /* no FBS */
|
||||
|
||||
#ifdef CONFIG_PCI_MSI
|
||||
AHCI_HFLAG_MULTI_MSI = (1 << 20), /* per-port MSI(-X) */
|
||||
AHCI_HFLAG_MULTI_MSI = BIT(20), /* per-port MSI(-X) */
|
||||
#else
|
||||
/* compile out MSI infrastructure */
|
||||
AHCI_HFLAG_MULTI_MSI = 0,
|
||||
#endif
|
||||
AHCI_HFLAG_WAKE_BEFORE_STOP = (1 << 22), /* wake before DMA stop */
|
||||
AHCI_HFLAG_YES_ALPM = (1 << 23), /* force ALPM cap on */
|
||||
AHCI_HFLAG_NO_WRITE_TO_RO = (1 << 24), /* don't write to read
|
||||
only registers */
|
||||
AHCI_HFLAG_IS_MOBILE = (1 << 25), /* mobile chipset, use
|
||||
SATA_MOBILE_LPM_POLICY
|
||||
as default lpm_policy */
|
||||
AHCI_HFLAG_SUSPEND_PHYS = (1 << 26), /* handle PHYs during
|
||||
suspend/resume */
|
||||
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = (1 << 27), /* ignore -EOPNOTSUPP
|
||||
from phy_power_on() */
|
||||
AHCI_HFLAG_NO_SXS = (1 << 28), /* SXS not supported */
|
||||
AHCI_HFLAG_WAKE_BEFORE_STOP = BIT(22), /* wake before DMA stop */
|
||||
AHCI_HFLAG_YES_ALPM = BIT(23), /* force ALPM cap on */
|
||||
AHCI_HFLAG_NO_WRITE_TO_RO = BIT(24), /* don't write to read
|
||||
only registers */
|
||||
AHCI_HFLAG_IS_MOBILE = BIT(25), /* mobile chipset, use
|
||||
SATA_MOBILE_LPM_POLICY
|
||||
as default lpm_policy */
|
||||
AHCI_HFLAG_SUSPEND_PHYS = BIT(26), /* handle PHYs during
|
||||
suspend/resume */
|
||||
AHCI_HFLAG_IGN_NOTSUPP_POWER_ON = BIT(27), /* ignore -EOPNOTSUPP
|
||||
from phy_power_on() */
|
||||
AHCI_HFLAG_NO_SXS = BIT(28), /* SXS not supported */
|
||||
|
||||
/* ap->flags bits */
|
||||
|
||||
@ -258,22 +259,22 @@ enum {
|
||||
EM_MAX_RETRY = 5,
|
||||
|
||||
/* em_ctl bits */
|
||||
EM_CTL_RST = (1 << 9), /* Reset */
|
||||
EM_CTL_TM = (1 << 8), /* Transmit Message */
|
||||
EM_CTL_MR = (1 << 0), /* Message Received */
|
||||
EM_CTL_ALHD = (1 << 26), /* Activity LED */
|
||||
EM_CTL_XMT = (1 << 25), /* Transmit Only */
|
||||
EM_CTL_SMB = (1 << 24), /* Single Message Buffer */
|
||||
EM_CTL_SGPIO = (1 << 19), /* SGPIO messages supported */
|
||||
EM_CTL_SES = (1 << 18), /* SES-2 messages supported */
|
||||
EM_CTL_SAFTE = (1 << 17), /* SAF-TE messages supported */
|
||||
EM_CTL_LED = (1 << 16), /* LED messages supported */
|
||||
EM_CTL_RST = BIT(9), /* Reset */
|
||||
EM_CTL_TM = BIT(8), /* Transmit Message */
|
||||
EM_CTL_MR = BIT(0), /* Message Received */
|
||||
EM_CTL_ALHD = BIT(26), /* Activity LED */
|
||||
EM_CTL_XMT = BIT(25), /* Transmit Only */
|
||||
EM_CTL_SMB = BIT(24), /* Single Message Buffer */
|
||||
EM_CTL_SGPIO = BIT(19), /* SGPIO messages supported */
|
||||
EM_CTL_SES = BIT(18), /* SES-2 messages supported */
|
||||
EM_CTL_SAFTE = BIT(17), /* SAF-TE messages supported */
|
||||
EM_CTL_LED = BIT(16), /* LED messages supported */
|
||||
|
||||
/* em message type */
|
||||
EM_MSG_TYPE_LED = (1 << 0), /* LED */
|
||||
EM_MSG_TYPE_SAFTE = (1 << 1), /* SAF-TE */
|
||||
EM_MSG_TYPE_SES2 = (1 << 2), /* SES-2 */
|
||||
EM_MSG_TYPE_SGPIO = (1 << 3), /* SGPIO */
|
||||
EM_MSG_TYPE_LED = BIT(0), /* LED */
|
||||
EM_MSG_TYPE_SAFTE = BIT(1), /* SAF-TE */
|
||||
EM_MSG_TYPE_SES2 = BIT(2), /* SES-2 */
|
||||
EM_MSG_TYPE_SGPIO = BIT(3), /* SGPIO */
|
||||
};
|
||||
|
||||
struct ahci_cmd_hdr {
|
||||
|
@ -29,6 +29,75 @@ static struct device *next_device(struct klist_iter *i)
|
||||
return dev;
|
||||
}
|
||||
|
||||
/**
|
||||
* driver_set_override() - Helper to set or clear driver override.
|
||||
* @dev: Device to change
|
||||
* @override: Address of string to change (e.g. &device->driver_override);
|
||||
* The contents will be freed and hold newly allocated override.
|
||||
* @s: NUL-terminated string, new driver name to force a match, pass empty
|
||||
* string to clear it ("" or "\n", where the latter is only for sysfs
|
||||
* interface).
|
||||
* @len: length of @s
|
||||
*
|
||||
* Helper to set or clear driver override in a device, intended for the cases
|
||||
* when the driver_override field is allocated by driver/bus code.
|
||||
*
|
||||
* Returns: 0 on success or a negative error code on failure.
|
||||
*/
|
||||
int driver_set_override(struct device *dev, const char **override,
|
||||
const char *s, size_t len)
|
||||
{
|
||||
const char *new, *old;
|
||||
char *cp;
|
||||
|
||||
if (!override || !s)
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
* The stored value will be used in sysfs show callback (sysfs_emit()),
|
||||
* which has a length limit of PAGE_SIZE and adds a trailing newline.
|
||||
* Thus we can store one character less to avoid truncation during sysfs
|
||||
* show.
|
||||
*/
|
||||
if (len >= (PAGE_SIZE - 1))
|
||||
return -EINVAL;
|
||||
|
||||
if (!len) {
|
||||
/* Empty string passed - clear override */
|
||||
device_lock(dev);
|
||||
old = *override;
|
||||
*override = NULL;
|
||||
device_unlock(dev);
|
||||
kfree(old);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
cp = strnchr(s, len, '\n');
|
||||
if (cp)
|
||||
len = cp - s;
|
||||
|
||||
new = kstrndup(s, len, GFP_KERNEL);
|
||||
if (!new)
|
||||
return -ENOMEM;
|
||||
|
||||
device_lock(dev);
|
||||
old = *override;
|
||||
if (cp != s) {
|
||||
*override = new;
|
||||
} else {
|
||||
/* "\n" passed - clear override */
|
||||
kfree(new);
|
||||
*override = NULL;
|
||||
}
|
||||
device_unlock(dev);
|
||||
|
||||
kfree(old);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(driver_set_override);
|
||||
|
||||
/**
|
||||
* driver_for_each_device - Iterator for devices bound to a driver.
|
||||
* @drv: Driver we're iterating.
|
||||
|
@ -973,31 +973,11 @@ static ssize_t driver_override_store(struct device *dev,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
char *driver_override, *old, *cp;
|
||||
int ret;
|
||||
|
||||
/* We need to keep extra room for a newline */
|
||||
if (count >= (PAGE_SIZE - 1))
|
||||
return -EINVAL;
|
||||
|
||||
driver_override = kstrndup(buf, count, GFP_KERNEL);
|
||||
if (!driver_override)
|
||||
return -ENOMEM;
|
||||
|
||||
cp = strchr(driver_override, '\n');
|
||||
if (cp)
|
||||
*cp = '\0';
|
||||
|
||||
device_lock(dev);
|
||||
old = pdev->driver_override;
|
||||
if (strlen(driver_override)) {
|
||||
pdev->driver_override = driver_override;
|
||||
} else {
|
||||
kfree(driver_override);
|
||||
pdev->driver_override = NULL;
|
||||
}
|
||||
device_unlock(dev);
|
||||
|
||||
kfree(old);
|
||||
ret = driver_set_override(dev, &pdev->driver_override, buf, count);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return count;
|
||||
}
|
||||
|
@ -299,15 +299,6 @@ config BLK_DEV_SKD
|
||||
|
||||
Use device /dev/skd$N amd /dev/skd$Np$M.
|
||||
|
||||
config BLK_DEV_SX8
|
||||
tristate "Promise SATA SX8 support"
|
||||
depends on PCI
|
||||
---help---
|
||||
Saying Y or M here will enable support for the
|
||||
Promise SATA SX8 controllers.
|
||||
|
||||
Use devices /dev/sx8/$N and /dev/sx8/$Np$M.
|
||||
|
||||
config BLK_DEV_RAM
|
||||
tristate "RAM block device support"
|
||||
---help---
|
||||
|
@ -26,8 +26,6 @@ obj-$(CONFIG_BLK_DEV_NBD) += nbd.o
|
||||
obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
|
||||
obj-$(CONFIG_VIRTIO_BLK) += virtio_blk.o
|
||||
|
||||
obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
|
||||
|
||||
obj-$(CONFIG_XEN_BLKDEV_FRONTEND) += xen-blkfront.o
|
||||
obj-$(CONFIG_XEN_BLKDEV_BACKEND) += xen-blkback/
|
||||
obj-$(CONFIG_BLK_DEV_DRBD) += drbd/
|
||||
|
1586
drivers/block/sx8.c
1586
drivers/block/sx8.c
File diff suppressed because it is too large
Load Diff
@ -3159,6 +3159,7 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,
|
||||
unsigned int i, char terminator)
|
||||
{
|
||||
struct clk_core *parent;
|
||||
const char *name = NULL;
|
||||
|
||||
/*
|
||||
* Go through the following options to fetch a parent's name.
|
||||
@ -3173,18 +3174,20 @@ static void possible_parent_show(struct seq_file *s, struct clk_core *core,
|
||||
* registered (yet).
|
||||
*/
|
||||
parent = clk_core_get_parent_by_index(core, i);
|
||||
if (parent)
|
||||
if (parent) {
|
||||
seq_puts(s, parent->name);
|
||||
else if (core->parents[i].name)
|
||||
} else if (core->parents[i].name) {
|
||||
seq_puts(s, core->parents[i].name);
|
||||
else if (core->parents[i].fw_name)
|
||||
} else if (core->parents[i].fw_name) {
|
||||
seq_printf(s, "<%s>(fw)", core->parents[i].fw_name);
|
||||
else if (core->parents[i].index >= 0)
|
||||
seq_puts(s,
|
||||
of_clk_get_parent_name(core->of_node,
|
||||
core->parents[i].index));
|
||||
else
|
||||
seq_puts(s, "(missing)");
|
||||
} else {
|
||||
if (core->parents[i].index >= 0)
|
||||
name = of_clk_get_parent_name(core->of_node, core->parents[i].index);
|
||||
if (!name)
|
||||
name = "(missing)";
|
||||
|
||||
seq_puts(s, name);
|
||||
}
|
||||
|
||||
seq_putc(s, terminator);
|
||||
}
|
||||
|
@ -3700,6 +3700,7 @@ static int __init d40_probe(struct platform_device *pdev)
|
||||
regulator_disable(base->lcpa_regulator);
|
||||
regulator_put(base->lcpa_regulator);
|
||||
}
|
||||
pm_runtime_disable(base->dev);
|
||||
|
||||
kfree(base->lcla_pool.alloc_map);
|
||||
kfree(base->lookup_log_chans);
|
||||
|
@ -1806,14 +1806,14 @@ static struct drm_dp_mst_branch *get_mst_branch_device_by_guid_helper(
|
||||
struct drm_dp_mst_branch *found_mstb;
|
||||
struct drm_dp_mst_port *port;
|
||||
|
||||
if (!mstb)
|
||||
return NULL;
|
||||
|
||||
if (memcmp(mstb->guid, guid, 16) == 0)
|
||||
return mstb;
|
||||
|
||||
|
||||
list_for_each_entry(port, &mstb->ports, next) {
|
||||
if (!port->mstb)
|
||||
continue;
|
||||
|
||||
found_mstb = get_mst_branch_device_by_guid_helper(port->mstb, guid);
|
||||
|
||||
if (found_mstb)
|
||||
|
@ -740,6 +740,8 @@ static void __aspeed_i2c_reg_slave(struct aspeed_i2c_bus *bus, u16 slave_addr)
|
||||
func_ctrl_reg_val = readl(bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
func_ctrl_reg_val |= ASPEED_I2CD_SLAVE_EN;
|
||||
writel(func_ctrl_reg_val, bus->base + ASPEED_I2C_FUN_CTRL_REG);
|
||||
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
}
|
||||
|
||||
static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
@ -756,7 +758,6 @@ static int aspeed_i2c_reg_slave(struct i2c_client *client)
|
||||
__aspeed_i2c_reg_slave(bus, client->addr);
|
||||
|
||||
bus->slave = client;
|
||||
bus->slave_state = ASPEED_I2C_SLAVE_INACTIVE;
|
||||
spin_unlock_irqrestore(&bus->lock, flags);
|
||||
|
||||
return 0;
|
||||
|
@ -974,9 +974,10 @@ static int stm32f7_i2c_smbus_xfer_msg(struct stm32f7_i2c_dev *i2c_dev,
|
||||
/* Configure PEC */
|
||||
if ((flags & I2C_CLIENT_PEC) && f7_msg->size != I2C_SMBUS_QUICK) {
|
||||
cr1 |= STM32F7_I2C_CR1_PECEN;
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
if (!f7_msg->read_write)
|
||||
if (!f7_msg->read_write) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
f7_msg->count++;
|
||||
}
|
||||
} else {
|
||||
cr1 &= ~STM32F7_I2C_CR1_PECEN;
|
||||
cr2 &= ~STM32F7_I2C_CR2_PECBYTE;
|
||||
@ -1064,8 +1065,10 @@ static void stm32f7_i2c_smbus_rep_start(struct stm32f7_i2c_dev *i2c_dev)
|
||||
f7_msg->stop = true;
|
||||
|
||||
/* Add one byte for PEC if needed */
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN)
|
||||
if (cr1 & STM32F7_I2C_CR1_PECEN) {
|
||||
cr2 |= STM32F7_I2C_CR2_PECBYTE;
|
||||
f7_msg->count++;
|
||||
}
|
||||
|
||||
/* Set number of bytes to be transferred */
|
||||
cr2 &= ~(STM32F7_I2C_CR2_NBYTES_MASK);
|
||||
|
@ -61,7 +61,7 @@ static int i2c_demux_activate_master(struct i2c_demux_pinctrl_priv *priv, u32 ne
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
adap = of_find_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
adap = of_get_i2c_adapter_by_node(priv->chan[new_chan].parent_np);
|
||||
if (!adap) {
|
||||
ret = -ENODEV;
|
||||
goto err_with_revert;
|
||||
|
@ -52,7 +52,7 @@ static struct i2c_adapter *mux_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
@ -62,7 +62,7 @@ static struct i2c_adapter *i2c_mux_pinctrl_parent_adapter(struct device *dev)
|
||||
dev_err(dev, "Cannot parse i2c-parent\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
}
|
||||
parent = of_find_i2c_adapter_by_node(parent_np);
|
||||
parent = of_get_i2c_adapter_by_node(parent_np);
|
||||
of_node_put(parent_np);
|
||||
if (!parent)
|
||||
return ERR_PTR(-EPROBE_DEFER);
|
||||
|
@ -804,16 +804,26 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||
}
|
||||
}
|
||||
|
||||
/* leave out any TS related code if unreachable */
|
||||
if (IS_REACHABLE(CONFIG_INPUT)) {
|
||||
has_ts = of_property_read_bool(pdev->dev.of_node,
|
||||
"has-touchscreen") || pdata;
|
||||
}
|
||||
|
||||
irq = platform_get_irq(pdev, 0);
|
||||
if (irq < 0)
|
||||
return irq;
|
||||
info->irq = irq;
|
||||
|
||||
irq = platform_get_irq(pdev, 1);
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return irq;
|
||||
if (has_ts) {
|
||||
irq = platform_get_irq(pdev, 1);
|
||||
if (irq == -EPROBE_DEFER)
|
||||
return irq;
|
||||
|
||||
info->tsirq = irq;
|
||||
info->tsirq = irq;
|
||||
} else {
|
||||
info->tsirq = -1;
|
||||
}
|
||||
|
||||
info->dev = &pdev->dev;
|
||||
|
||||
@ -880,12 +890,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
|
||||
if (info->data->init_hw)
|
||||
info->data->init_hw(info);
|
||||
|
||||
/* leave out any TS related code if unreachable */
|
||||
if (IS_REACHABLE(CONFIG_INPUT)) {
|
||||
has_ts = of_property_read_bool(pdev->dev.of_node,
|
||||
"has-touchscreen") || pdata;
|
||||
}
|
||||
|
||||
if (pdata)
|
||||
info->delay = pdata->delay;
|
||||
else
|
||||
|
@ -1747,6 +1747,7 @@ static int synaptics_create_intertouch(struct psmouse *psmouse,
|
||||
psmouse_matches_pnp_id(psmouse, topbuttonpad_pnp_ids) &&
|
||||
!SYN_CAP_EXT_BUTTONS_STICK(info->ext_cap_10);
|
||||
const struct rmi_device_platform_data pdata = {
|
||||
.reset_delay_ms = 30,
|
||||
.sensor_pdata = {
|
||||
.sensor_type = rmi_sensor_touchpad,
|
||||
.axis_align.flip_y = true,
|
||||
|
@ -235,12 +235,29 @@ static void rmi_smb_clear_state(struct rmi_smb_xport *rmi_smb)
|
||||
|
||||
static int rmi_smb_enable_smbus_mode(struct rmi_smb_xport *rmi_smb)
|
||||
{
|
||||
int retval;
|
||||
struct i2c_client *client = rmi_smb->client;
|
||||
int smbus_version;
|
||||
|
||||
/*
|
||||
* psmouse driver resets the controller, we only need to wait
|
||||
* to give the firmware chance to fully reinitialize.
|
||||
*/
|
||||
if (rmi_smb->xport.pdata.reset_delay_ms)
|
||||
msleep(rmi_smb->xport.pdata.reset_delay_ms);
|
||||
|
||||
/* we need to get the smbus version to activate the touchpad */
|
||||
retval = rmi_smb_get_version(rmi_smb);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
smbus_version = rmi_smb_get_version(rmi_smb);
|
||||
if (smbus_version < 0)
|
||||
return smbus_version;
|
||||
|
||||
rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
|
||||
smbus_version);
|
||||
|
||||
if (smbus_version != 2 && smbus_version != 3) {
|
||||
dev_err(&client->dev, "Unrecognized SMB version %d\n",
|
||||
smbus_version);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -253,11 +270,10 @@ static int rmi_smb_reset(struct rmi_transport_dev *xport, u16 reset_addr)
|
||||
rmi_smb_clear_state(rmi_smb);
|
||||
|
||||
/*
|
||||
* we do not call the actual reset command, it has to be handled in
|
||||
* PS/2 or there will be races between PS/2 and SMBus.
|
||||
* PS/2 should ensure that a psmouse_reset is called before
|
||||
* intializing the device and after it has been removed to be in a known
|
||||
* state.
|
||||
* We do not call the actual reset command, it has to be handled in
|
||||
* PS/2 or there will be races between PS/2 and SMBus. PS/2 should
|
||||
* ensure that a psmouse_reset is called before initializing the
|
||||
* device and after it has been removed to be in a known state.
|
||||
*/
|
||||
return rmi_smb_enable_smbus_mode(rmi_smb);
|
||||
}
|
||||
@ -273,7 +289,6 @@ static int rmi_smb_probe(struct i2c_client *client,
|
||||
{
|
||||
struct rmi_device_platform_data *pdata = dev_get_platdata(&client->dev);
|
||||
struct rmi_smb_xport *rmi_smb;
|
||||
int smbus_version;
|
||||
int error;
|
||||
|
||||
if (!pdata) {
|
||||
@ -312,18 +327,9 @@ static int rmi_smb_probe(struct i2c_client *client,
|
||||
rmi_smb->xport.proto_name = "smb";
|
||||
rmi_smb->xport.ops = &rmi_smb_ops;
|
||||
|
||||
smbus_version = rmi_smb_get_version(rmi_smb);
|
||||
if (smbus_version < 0)
|
||||
return smbus_version;
|
||||
|
||||
rmi_dbg(RMI_DEBUG_XPORT, &client->dev, "Smbus version is %d",
|
||||
smbus_version);
|
||||
|
||||
if (smbus_version != 2 && smbus_version != 3) {
|
||||
dev_err(&client->dev, "Unrecognized SMB version %d\n",
|
||||
smbus_version);
|
||||
return -ENODEV;
|
||||
}
|
||||
error = rmi_smb_enable_smbus_mode(rmi_smb);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
i2c_set_clientdata(client, rmi_smb);
|
||||
|
||||
|
@ -609,6 +609,14 @@ static const struct dmi_system_id i8042_dmi_quirk_table[] __initconst = {
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOMUX)
|
||||
},
|
||||
{
|
||||
/* Fujitsu Lifebook E5411 */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU CLIENT COMPUTING LIMITED"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E5411"),
|
||||
},
|
||||
.driver_data = (void *)(SERIO_QUIRK_NOAUX)
|
||||
},
|
||||
{
|
||||
/* Gigabyte M912 */
|
||||
.matches = {
|
||||
|
@ -414,6 +414,7 @@ static const struct irq_domain_ops irq_exti_domain_ops = {
|
||||
.map = irq_map_generic_chip,
|
||||
.alloc = stm32_exti_alloc,
|
||||
.free = stm32_exti_free,
|
||||
.xlate = irq_domain_xlate_twocell,
|
||||
};
|
||||
|
||||
static void stm32_irq_ack(struct irq_data *d)
|
||||
|
@ -23,7 +23,7 @@ static int mcb_lpc_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct resource *res;
|
||||
struct priv *priv;
|
||||
int ret = 0;
|
||||
int ret = 0, table_size;
|
||||
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
@ -58,16 +58,43 @@ static int mcb_lpc_probe(struct platform_device *pdev)
|
||||
|
||||
ret = chameleon_parse_cells(priv->bus, priv->mem->start, priv->base);
|
||||
if (ret < 0) {
|
||||
mcb_release_bus(priv->bus);
|
||||
return ret;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
dev_dbg(&pdev->dev, "Found %d cells\n", ret);
|
||||
table_size = ret;
|
||||
|
||||
if (table_size < CHAM_HEADER_SIZE) {
|
||||
/* Release the previous resources */
|
||||
devm_iounmap(&pdev->dev, priv->base);
|
||||
devm_release_mem_region(&pdev->dev, priv->mem->start, resource_size(priv->mem));
|
||||
|
||||
/* Then, allocate it again with the actual chameleon table size */
|
||||
res = devm_request_mem_region(&pdev->dev, priv->mem->start,
|
||||
table_size,
|
||||
KBUILD_MODNAME);
|
||||
if (!res) {
|
||||
dev_err(&pdev->dev, "Failed to request PCI memory\n");
|
||||
ret = -EBUSY;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
priv->base = devm_ioremap(&pdev->dev, priv->mem->start, table_size);
|
||||
if (!priv->base) {
|
||||
dev_err(&pdev->dev, "Cannot ioremap\n");
|
||||
ret = -ENOMEM;
|
||||
goto out_mcb_bus;
|
||||
}
|
||||
|
||||
platform_set_drvdata(pdev, priv);
|
||||
}
|
||||
|
||||
mcb_bus_add_devices(priv->bus);
|
||||
|
||||
return 0;
|
||||
|
||||
out_mcb_bus:
|
||||
mcb_release_bus(priv->bus);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int mcb_lpc_remove(struct platform_device *pdev)
|
||||
|
@ -128,7 +128,7 @@ static void chameleon_parse_bar(void __iomem *base,
|
||||
}
|
||||
}
|
||||
|
||||
static int chameleon_get_bar(char __iomem **base, phys_addr_t mapbase,
|
||||
static int chameleon_get_bar(void __iomem **base, phys_addr_t mapbase,
|
||||
struct chameleon_bar **cb)
|
||||
{
|
||||
struct chameleon_bar *c;
|
||||
@ -177,12 +177,13 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
|
||||
{
|
||||
struct chameleon_fpga_header *header;
|
||||
struct chameleon_bar *cb;
|
||||
char __iomem *p = base;
|
||||
void __iomem *p = base;
|
||||
int num_cells = 0;
|
||||
uint32_t dtype;
|
||||
int bar_count;
|
||||
int ret;
|
||||
u32 hsize;
|
||||
u32 table_size;
|
||||
|
||||
hsize = sizeof(struct chameleon_fpga_header);
|
||||
|
||||
@ -237,12 +238,16 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
|
||||
num_cells++;
|
||||
}
|
||||
|
||||
if (num_cells == 0)
|
||||
num_cells = -EINVAL;
|
||||
if (num_cells == 0) {
|
||||
ret = -EINVAL;
|
||||
goto free_bar;
|
||||
}
|
||||
|
||||
table_size = p - base;
|
||||
pr_debug("%d cell(s) found. Chameleon table size: 0x%04x bytes\n", num_cells, table_size);
|
||||
kfree(cb);
|
||||
kfree(header);
|
||||
return num_cells;
|
||||
return table_size;
|
||||
|
||||
free_bar:
|
||||
kfree(cb);
|
||||
|
@ -1109,6 +1109,7 @@ static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
|
||||
.ndcb[2] = NDCB2_ADDR5_PAGE(page),
|
||||
};
|
||||
unsigned int oob_bytes = lt->spare_bytes + (raw ? lt->ecc_bytes : 0);
|
||||
u8 status;
|
||||
int ret;
|
||||
|
||||
/* NFCv2 needs more information about the operation being executed */
|
||||
@ -1142,7 +1143,18 @@ static int marvell_nfc_hw_ecc_hmg_do_write_page(struct nand_chip *chip,
|
||||
|
||||
ret = marvell_nfc_wait_op(chip,
|
||||
PSEC_TO_MSEC(chip->data_interface.timings.sdr.tPROG_max));
|
||||
return ret;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Check write status on the chip side */
|
||||
ret = nand_status_op(chip, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (status & NAND_STATUS_FAIL)
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int marvell_nfc_hw_ecc_hmg_write_page_raw(struct nand_chip *chip,
|
||||
@ -1570,6 +1582,7 @@ static int marvell_nfc_hw_ecc_bch_write_page(struct nand_chip *chip,
|
||||
int data_len = lt->data_bytes;
|
||||
int spare_len = lt->spare_bytes;
|
||||
int chunk, ret;
|
||||
u8 status;
|
||||
|
||||
marvell_nfc_select_target(chip, chip->cur_cs);
|
||||
|
||||
@ -1607,6 +1620,14 @@ static int marvell_nfc_hw_ecc_bch_write_page(struct nand_chip *chip,
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Check write status on the chip side */
|
||||
ret = nand_status_op(chip, &status);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
if (status & NAND_STATUS_FAIL)
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -3850,6 +3850,8 @@ int t4_load_phy_fw(struct adapter *adap,
|
||||
FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD));
|
||||
ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1,
|
||||
¶m, &val, 30000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* If we have version number support, then check to see that the new
|
||||
* firmware got loaded properly.
|
||||
|
@ -2669,7 +2669,7 @@ int i40e_napi_poll(struct napi_struct *napi, int budget)
|
||||
return budget;
|
||||
}
|
||||
|
||||
if (vsi->back->flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
if (q_vector->tx.ring[0].flags & I40E_TXR_FLAGS_WB_ON_ITR)
|
||||
q_vector->arm_wb_state = false;
|
||||
|
||||
/* Exit the polling mode, but don't re-enable interrupts if stack might
|
||||
|
@ -2997,11 +2997,15 @@ static int igb_add_ethtool_nfc_entry(struct igb_adapter *adapter,
|
||||
if (err)
|
||||
goto err_out_w_lock;
|
||||
|
||||
igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
err = igb_update_ethtool_nfc_entry(adapter, input, input->sw_idx);
|
||||
if (err)
|
||||
goto err_out_input_filter;
|
||||
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
return 0;
|
||||
|
||||
err_out_input_filter:
|
||||
igb_erase_filter(adapter, input);
|
||||
err_out_w_lock:
|
||||
spin_unlock(&adapter->nfc_lock);
|
||||
err_out:
|
||||
|
@ -1768,7 +1768,7 @@ static int igc_set_link_ksettings(struct net_device *netdev,
|
||||
{
|
||||
struct igc_adapter *adapter = netdev_priv(netdev);
|
||||
struct igc_hw *hw = &adapter->hw;
|
||||
u32 advertising;
|
||||
u16 advertised = 0;
|
||||
|
||||
/* When adapter in resetting mode, autoneg/speed/duplex
|
||||
* cannot be changed
|
||||
@ -1794,18 +1794,33 @@ static int igc_set_link_ksettings(struct net_device *netdev,
|
||||
while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
|
||||
usleep_range(1000, 2000);
|
||||
|
||||
ethtool_convert_link_mode_to_legacy_u32(&advertising,
|
||||
cmd->link_modes.advertising);
|
||||
/* Converting to legacy u32 drops ETHTOOL_LINK_MODE_2500baseT_Full_BIT.
|
||||
* We have to check this and convert it to ADVERTISE_2500_FULL
|
||||
* (aka ETHTOOL_LINK_MODE_2500baseX_Full_BIT) explicitly.
|
||||
*/
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising, 2500baseT_Full))
|
||||
advertising |= ADVERTISE_2500_FULL;
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
2500baseT_Full))
|
||||
advertised |= ADVERTISE_2500_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
1000baseT_Full))
|
||||
advertised |= ADVERTISE_1000_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Full))
|
||||
advertised |= ADVERTISE_100_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
100baseT_Half))
|
||||
advertised |= ADVERTISE_100_HALF;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Full))
|
||||
advertised |= ADVERTISE_10_FULL;
|
||||
|
||||
if (ethtool_link_ksettings_test_link_mode(cmd, advertising,
|
||||
10baseT_Half))
|
||||
advertised |= ADVERTISE_10_HALF;
|
||||
|
||||
if (cmd->base.autoneg == AUTONEG_ENABLE) {
|
||||
hw->mac.autoneg = 1;
|
||||
hw->phy.autoneg_advertised = advertising;
|
||||
hw->phy.autoneg_advertised = advertised;
|
||||
if (adapter->fc_autoneg)
|
||||
hw->fc.requested_mode = igc_fc_default;
|
||||
} else {
|
||||
|
@ -6031,7 +6031,7 @@ static void rtl_tx(struct net_device *dev, struct rtl8169_private *tp,
|
||||
struct ring_info *tx_skb = tp->tx_skb + entry;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(tp->TxDescArray[entry].opts1);
|
||||
status = le32_to_cpu(READ_ONCE(tp->TxDescArray[entry].opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
@ -6114,7 +6114,7 @@ static int rtl_rx(struct net_device *dev, struct rtl8169_private *tp, u32 budget
|
||||
struct RxDesc *desc = tp->RxDescArray + entry;
|
||||
u32 status;
|
||||
|
||||
status = le32_to_cpu(desc->opts1);
|
||||
status = le32_to_cpu(READ_ONCE(desc->opts1));
|
||||
if (status & DescOwn)
|
||||
break;
|
||||
|
||||
|
@ -1217,7 +1217,7 @@ static int gelic_wl_set_encodeext(struct net_device *netdev,
|
||||
key_index = wl->current_key;
|
||||
|
||||
if (!enc->length && (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)) {
|
||||
/* reques to change default key index */
|
||||
/* request to change default key index */
|
||||
pr_debug("%s: request to change default key to %d\n",
|
||||
__func__, key_index);
|
||||
wl->current_key = key_index;
|
||||
|
@ -544,8 +544,9 @@ static int gtp_build_skb_ip4(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
rt->dst.ops->update_pmtu(&rt->dst, NULL, skb, mtu, false);
|
||||
|
||||
if (!skb_is_gso(skb) && (iph->frag_off & htons(IP_DF)) &&
|
||||
mtu < ntohs(iph->tot_len)) {
|
||||
if (iph->frag_off & htons(IP_DF) &&
|
||||
((!skb_is_gso(skb) && skb->len > mtu) ||
|
||||
(skb_is_gso(skb) && !skb_gso_validate_network_len(skb, mtu)))) {
|
||||
netdev_dbg(dev, "packet too big, fragmentation needed\n");
|
||||
icmp_ndo_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED,
|
||||
htonl(mtu));
|
||||
|
@ -1162,9 +1162,10 @@ static int adf7242_stats_show(struct seq_file *file, void *offset)
|
||||
|
||||
static void adf7242_debugfs_init(struct adf7242_local *lp)
|
||||
{
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1] = "adf7242-";
|
||||
char debugfs_dir_name[DNAME_INLINE_LEN + 1];
|
||||
|
||||
strncat(debugfs_dir_name, dev_name(&lp->spi->dev), DNAME_INLINE_LEN);
|
||||
snprintf(debugfs_dir_name, sizeof(debugfs_dir_name),
|
||||
"adf7242-%s", dev_name(&lp->spi->dev));
|
||||
|
||||
lp->debugfs_root = debugfs_create_dir(debugfs_dir_name, NULL);
|
||||
|
||||
|
@ -850,7 +850,7 @@ int get_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
||||
|
||||
ret = usb_control_msg(tp->udev, usb_rcvctrlpipe(tp->udev, 0),
|
||||
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
||||
value, index, tmp, size, 500);
|
||||
value, index, tmp, size, USB_CTRL_GET_TIMEOUT);
|
||||
if (ret < 0)
|
||||
memset(data, 0xff, size);
|
||||
else
|
||||
@ -873,7 +873,7 @@ int set_registers(struct r8152 *tp, u16 value, u16 index, u16 size, void *data)
|
||||
|
||||
ret = usb_control_msg(tp->udev, usb_sndctrlpipe(tp->udev, 0),
|
||||
RTL8152_REQ_SET_REGS, RTL8152_REQT_WRITE,
|
||||
value, index, tmp, size, 500);
|
||||
value, index, tmp, size, USB_CTRL_SET_TIMEOUT);
|
||||
|
||||
kfree(tmp);
|
||||
|
||||
@ -5584,7 +5584,8 @@ static u8 rtl_get_version(struct usb_interface *intf)
|
||||
|
||||
ret = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
|
||||
RTL8152_REQ_GET_REGS, RTL8152_REQT_READ,
|
||||
PLA_TCR0, MCU_TYPE_PLA, tmp, sizeof(*tmp), 500);
|
||||
PLA_TCR0, MCU_TYPE_PLA, tmp, sizeof(*tmp),
|
||||
USB_CTRL_GET_TIMEOUT);
|
||||
if (ret > 0)
|
||||
ocp_data = (__le32_to_cpu(*tmp) >> 16) & VERSION_MASK;
|
||||
|
||||
@ -5778,6 +5779,9 @@ static int rtl8152_probe(struct usb_interface *intf,
|
||||
|
||||
out1:
|
||||
tasklet_kill(&tp->tx_tl);
|
||||
cancel_delayed_work_sync(&tp->hw_phy_work);
|
||||
if (tp->rtl_ops.unload)
|
||||
tp->rtl_ops.unload(tp);
|
||||
usb_set_intfdata(intf, NULL);
|
||||
out:
|
||||
free_netdev(netdev);
|
||||
|
@ -321,6 +321,15 @@ static void nvmet_tcp_fatal_error(struct nvmet_tcp_queue *queue)
|
||||
kernel_sock_shutdown(queue->sock, SHUT_RDWR);
|
||||
}
|
||||
|
||||
static void nvmet_tcp_socket_error(struct nvmet_tcp_queue *queue, int status)
|
||||
{
|
||||
queue->rcv_state = NVMET_TCP_RECV_ERR;
|
||||
if (status == -EPIPE || status == -ECONNRESET)
|
||||
kernel_sock_shutdown(queue->sock, SHUT_RDWR);
|
||||
else
|
||||
nvmet_tcp_fatal_error(queue);
|
||||
}
|
||||
|
||||
static int nvmet_tcp_map_data(struct nvmet_tcp_cmd *cmd)
|
||||
{
|
||||
struct nvme_sgl_desc *sgl = &cmd->req.cmd->common.dptr.sgl;
|
||||
@ -714,11 +723,15 @@ static int nvmet_tcp_try_send(struct nvmet_tcp_queue *queue,
|
||||
|
||||
for (i = 0; i < budget; i++) {
|
||||
ret = nvmet_tcp_try_send_one(queue, i == budget - 1);
|
||||
if (ret <= 0)
|
||||
if (unlikely(ret < 0)) {
|
||||
nvmet_tcp_socket_error(queue, ret);
|
||||
goto done;
|
||||
} else if (ret == 0) {
|
||||
break;
|
||||
}
|
||||
(*sends)++;
|
||||
}
|
||||
|
||||
done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -816,15 +829,11 @@ static int nvmet_tcp_handle_icreq(struct nvmet_tcp_queue *queue)
|
||||
iov.iov_len = sizeof(*icresp);
|
||||
ret = kernel_sendmsg(queue->sock, &msg, &iov, 1, iov.iov_len);
|
||||
if (ret < 0)
|
||||
goto free_crypto;
|
||||
return ret; /* queue removal will cleanup */
|
||||
|
||||
queue->state = NVMET_TCP_Q_LIVE;
|
||||
nvmet_prepare_receive_pdu(queue);
|
||||
return 0;
|
||||
free_crypto:
|
||||
if (queue->hdr_digest || queue->data_digest)
|
||||
nvmet_tcp_free_crypto(queue);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void nvmet_tcp_handle_req_failure(struct nvmet_tcp_queue *queue,
|
||||
@ -1167,11 +1176,15 @@ static int nvmet_tcp_try_recv(struct nvmet_tcp_queue *queue,
|
||||
|
||||
for (i = 0; i < budget; i++) {
|
||||
ret = nvmet_tcp_try_recv_one(queue);
|
||||
if (ret <= 0)
|
||||
if (unlikely(ret < 0)) {
|
||||
nvmet_tcp_socket_error(queue, ret);
|
||||
goto done;
|
||||
} else if (ret == 0) {
|
||||
break;
|
||||
}
|
||||
(*recvs)++;
|
||||
}
|
||||
|
||||
done:
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -1196,27 +1209,16 @@ static void nvmet_tcp_io_work(struct work_struct *w)
|
||||
pending = false;
|
||||
|
||||
ret = nvmet_tcp_try_recv(queue, NVMET_TCP_RECV_BUDGET, &ops);
|
||||
if (ret > 0) {
|
||||
if (ret > 0)
|
||||
pending = true;
|
||||
} else if (ret < 0) {
|
||||
if (ret == -EPIPE || ret == -ECONNRESET)
|
||||
kernel_sock_shutdown(queue->sock, SHUT_RDWR);
|
||||
else
|
||||
nvmet_tcp_fatal_error(queue);
|
||||
else if (ret < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
ret = nvmet_tcp_try_send(queue, NVMET_TCP_SEND_BUDGET, &ops);
|
||||
if (ret > 0) {
|
||||
/* transmitted message/data */
|
||||
if (ret > 0)
|
||||
pending = true;
|
||||
} else if (ret < 0) {
|
||||
if (ret == -EPIPE || ret == -ECONNRESET)
|
||||
kernel_sock_shutdown(queue->sock, SHUT_RDWR);
|
||||
else
|
||||
nvmet_tcp_fatal_error(queue);
|
||||
else if (ret < 0)
|
||||
return;
|
||||
}
|
||||
|
||||
} while (pending && ops < NVMET_TCP_IO_WORK_BUDGET);
|
||||
|
||||
|
@ -433,7 +433,7 @@ static const struct ocotp_params imx6sl_params = {
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6sll_params = {
|
||||
.nregs = 128,
|
||||
.nregs = 80,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
};
|
||||
@ -445,13 +445,13 @@ static const struct ocotp_params imx6sx_params = {
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6ul_params = {
|
||||
.nregs = 128,
|
||||
.nregs = 144,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
};
|
||||
|
||||
static const struct ocotp_params imx6ull_params = {
|
||||
.nregs = 64,
|
||||
.nregs = 80,
|
||||
.bank_address_words = 0,
|
||||
.set_timing = imx_ocotp_set_imx6_timing,
|
||||
};
|
||||
|
@ -597,7 +597,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
|
||||
/*
|
||||
* In the AMD NL platform, this device ([1022:7912]) has a class code of
|
||||
* PCI_CLASS_SERIAL_USB_XHCI (0x0c0330), which means the xhci driver will
|
||||
* claim it.
|
||||
* claim it. The same applies on the VanGogh platform device ([1022:163a]).
|
||||
*
|
||||
* But the dwc3 driver is a more specific driver for this device, and we'd
|
||||
* prefer to use it instead of xhci. To prevent xhci from claiming the
|
||||
@ -605,7 +605,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_RS100, quirk_ati_
|
||||
* defines as "USB device (not host controller)". The dwc3 driver can then
|
||||
* claim it based on its Vendor and Device ID.
|
||||
*/
|
||||
static void quirk_amd_nl_class(struct pci_dev *pdev)
|
||||
static void quirk_amd_dwc_class(struct pci_dev *pdev)
|
||||
{
|
||||
u32 class = pdev->class;
|
||||
|
||||
@ -615,7 +615,9 @@ static void quirk_amd_nl_class(struct pci_dev *pdev)
|
||||
class, pdev->class);
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_NL_USB,
|
||||
quirk_amd_nl_class);
|
||||
quirk_amd_dwc_class);
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VANGOGH_USB,
|
||||
quirk_amd_dwc_class);
|
||||
|
||||
/*
|
||||
* Synopsys USB 3.x host HAPS platform has a class code of
|
||||
|
@ -588,24 +588,25 @@ static void mlxbf_tmfifo_rxtx_word(struct mlxbf_tmfifo_vring *vring,
|
||||
|
||||
if (vring->cur_len + sizeof(u64) <= len) {
|
||||
/* The whole word. */
|
||||
if (!IS_VRING_DROP(vring)) {
|
||||
if (is_rx)
|
||||
if (is_rx) {
|
||||
if (!IS_VRING_DROP(vring))
|
||||
memcpy(addr + vring->cur_len, &data,
|
||||
sizeof(u64));
|
||||
else
|
||||
memcpy(&data, addr + vring->cur_len,
|
||||
sizeof(u64));
|
||||
} else {
|
||||
memcpy(&data, addr + vring->cur_len,
|
||||
sizeof(u64));
|
||||
}
|
||||
vring->cur_len += sizeof(u64);
|
||||
} else {
|
||||
/* Leftover bytes. */
|
||||
if (!IS_VRING_DROP(vring)) {
|
||||
if (is_rx)
|
||||
if (is_rx) {
|
||||
if (!IS_VRING_DROP(vring))
|
||||
memcpy(addr + vring->cur_len, &data,
|
||||
len - vring->cur_len);
|
||||
else
|
||||
memcpy(&data, addr + vring->cur_len,
|
||||
len - vring->cur_len);
|
||||
} else {
|
||||
data = 0;
|
||||
memcpy(&data, addr + vring->cur_len,
|
||||
len - vring->cur_len);
|
||||
}
|
||||
vring->cur_len = len;
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include <linux/i8042.h>
|
||||
|
||||
#define ASUS_WMI_KEY_IGNORE (-1)
|
||||
#define ASUS_WMI_BRN_DOWN 0x20
|
||||
#define ASUS_WMI_BRN_DOWN 0x2e
|
||||
#define ASUS_WMI_BRN_UP 0x2f
|
||||
|
||||
struct module;
|
||||
|
@ -1379,6 +1379,7 @@ static void qcom_glink_rpdev_release(struct device *dev)
|
||||
struct glink_channel *channel = to_glink_channel(rpdev->ept);
|
||||
|
||||
channel->rpdev = NULL;
|
||||
kfree(rpdev->driver_override);
|
||||
kfree(rpdev);
|
||||
}
|
||||
|
||||
|
@ -368,7 +368,8 @@ field##_store(struct device *dev, struct device_attribute *attr, \
|
||||
const char *buf, size_t sz) \
|
||||
{ \
|
||||
struct rpmsg_device *rpdev = to_rpmsg_device(dev); \
|
||||
char *new, *old; \
|
||||
const char *old; \
|
||||
char *new; \
|
||||
\
|
||||
new = kstrndup(buf, sz, GFP_KERNEL); \
|
||||
if (!new) \
|
||||
@ -565,24 +566,52 @@ static struct bus_type rpmsg_bus = {
|
||||
.remove = rpmsg_dev_remove,
|
||||
};
|
||||
|
||||
int rpmsg_register_device(struct rpmsg_device *rpdev)
|
||||
/*
|
||||
* A helper for registering rpmsg device with driver override and name.
|
||||
* Drivers should not be using it, but instead rpmsg_register_device().
|
||||
*/
|
||||
int rpmsg_register_device_override(struct rpmsg_device *rpdev,
|
||||
const char *driver_override)
|
||||
{
|
||||
struct device *dev = &rpdev->dev;
|
||||
int ret;
|
||||
|
||||
if (driver_override)
|
||||
strcpy(rpdev->id.name, driver_override);
|
||||
|
||||
dev_set_name(&rpdev->dev, "%s.%s.%d.%d", dev_name(dev->parent),
|
||||
rpdev->id.name, rpdev->src, rpdev->dst);
|
||||
|
||||
rpdev->dev.bus = &rpmsg_bus;
|
||||
|
||||
ret = device_register(&rpdev->dev);
|
||||
device_initialize(dev);
|
||||
if (driver_override) {
|
||||
ret = driver_set_override(dev, &rpdev->driver_override,
|
||||
driver_override,
|
||||
strlen(driver_override));
|
||||
if (ret) {
|
||||
dev_err(dev, "device_set_override failed: %d\n", ret);
|
||||
put_device(dev);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
ret = device_add(dev);
|
||||
if (ret) {
|
||||
dev_err(dev, "device_register failed: %d\n", ret);
|
||||
dev_err(dev, "device_add failed: %d\n", ret);
|
||||
kfree(rpdev->driver_override);
|
||||
rpdev->driver_override = NULL;
|
||||
put_device(&rpdev->dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(rpmsg_register_device_override);
|
||||
|
||||
int rpmsg_register_device(struct rpmsg_device *rpdev)
|
||||
{
|
||||
return rpmsg_register_device_override(rpdev, NULL);
|
||||
}
|
||||
EXPORT_SYMBOL(rpmsg_register_device);
|
||||
|
||||
/*
|
||||
|
@ -89,10 +89,7 @@ struct device *rpmsg_find_device(struct device *parent,
|
||||
*/
|
||||
static inline int rpmsg_chrdev_register_device(struct rpmsg_device *rpdev)
|
||||
{
|
||||
strcpy(rpdev->id.name, "rpmsg_chrdev");
|
||||
rpdev->driver_override = "rpmsg_chrdev";
|
||||
|
||||
return rpmsg_register_device(rpdev);
|
||||
return rpmsg_register_device_override(rpdev, "rpmsg_ctrl");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -11138,8 +11138,10 @@ _mpt3sas_init(void)
|
||||
mpt3sas_ctl_init(hbas_to_enumerate);
|
||||
|
||||
error = pci_register_driver(&mpt3sas_driver);
|
||||
if (error)
|
||||
if (error) {
|
||||
mpt3sas_ctl_exit(hbas_to_enumerate);
|
||||
scsih_exit();
|
||||
}
|
||||
|
||||
return error;
|
||||
}
|
||||
|
@ -334,8 +334,9 @@ static int npcm_fiu_uma_read(struct spi_mem *mem,
|
||||
uma_cfg |= ilog2(op->cmd.buswidth);
|
||||
uma_cfg |= ilog2(op->addr.buswidth)
|
||||
<< NPCM_FIU_UMA_CFG_ADBPCK_SHIFT;
|
||||
uma_cfg |= ilog2(op->dummy.buswidth)
|
||||
<< NPCM_FIU_UMA_CFG_DBPCK_SHIFT;
|
||||
if (op->dummy.nbytes)
|
||||
uma_cfg |= ilog2(op->dummy.buswidth)
|
||||
<< NPCM_FIU_UMA_CFG_DBPCK_SHIFT;
|
||||
uma_cfg |= ilog2(op->data.buswidth)
|
||||
<< NPCM_FIU_UMA_CFG_RDBPCK_SHIFT;
|
||||
uma_cfg |= op->dummy.nbytes << NPCM_FIU_UMA_CFG_DBSIZ_SHIFT;
|
||||
|
@ -5123,6 +5123,12 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
0, 0,
|
||||
pbn_b1_bt_1_115200 },
|
||||
|
||||
/*
|
||||
* IntaShield IS-100
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0D60,
|
||||
PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
pbn_b2_1_115200 },
|
||||
/*
|
||||
* IntaShield IS-200
|
||||
*/
|
||||
@ -5150,10 +5156,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_1_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0AA2,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_1_115200 },
|
||||
/*
|
||||
* Brainboxes UC-257
|
||||
* Brainboxes UC-253/UC-734
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0861,
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0CA1,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
@ -5168,6 +5178,66 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
PCI_CLASS_COMMUNICATION_MULTISERIAL << 8, 0xffff00,
|
||||
pbn_b2_4_115200 },
|
||||
/*
|
||||
* Brainboxes UP-189
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0AC1,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0AC2,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0AC3,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UP-200
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0B21,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0B22,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0B23,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UP-869
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C01,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C02,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C03,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UP-880
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C21,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C22,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0C23,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UC-268
|
||||
*/
|
||||
@ -5189,6 +5259,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x08E2,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x08E3,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UC-310
|
||||
*/
|
||||
@ -5199,6 +5277,14 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
/*
|
||||
* Brainboxes UC-313
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x08A1,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x08A2,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x08A3,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
@ -5213,6 +5299,10 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
/*
|
||||
* Brainboxes UC-346
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0B01,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_4_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0B02,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
@ -5224,6 +5314,10 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0A82,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0A83,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
@ -5236,12 +5330,34 @@ static const struct pci_device_id serial_pci_tbl[] = {
|
||||
0, 0,
|
||||
pbn_b2_4_115200 },
|
||||
/*
|
||||
* Brainboxes UC-420/431
|
||||
* Brainboxes UC-420
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0921,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_4_115200 },
|
||||
/*
|
||||
* Brainboxes UC-607
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x09A1,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x09A2,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x09A3,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_2_115200 },
|
||||
/*
|
||||
* Brainboxes UC-836
|
||||
*/
|
||||
{ PCI_VENDOR_ID_INTASHIELD, 0x0D41,
|
||||
PCI_ANY_ID, PCI_ANY_ID,
|
||||
0, 0,
|
||||
pbn_b2_4_115200 },
|
||||
/*
|
||||
* Perle PCI-RAS cards
|
||||
*/
|
||||
|
@ -19,7 +19,7 @@ UNUSUAL_DEV( 0x04b4, 0x6831, 0x0000, 0x9999,
|
||||
"Cypress ISD-300LP",
|
||||
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
|
||||
|
||||
UNUSUAL_DEV( 0x14cd, 0x6116, 0x0160, 0x0160,
|
||||
UNUSUAL_DEV( 0x14cd, 0x6116, 0x0150, 0x0160,
|
||||
"Super Top",
|
||||
"USB 2.0 SATA BRIDGE",
|
||||
USB_SC_CYP_ATACB, USB_PR_DEVICE, NULL, 0),
|
||||
|
@ -3410,11 +3410,15 @@ static int atyfb_setup_generic(struct pci_dev *pdev, struct fb_info *info,
|
||||
}
|
||||
|
||||
info->fix.mmio_start = raddr;
|
||||
#if defined(__i386__) || defined(__ia64__)
|
||||
/*
|
||||
* By using strong UC we force the MTRR to never have an
|
||||
* effect on the MMIO region on both non-PAT and PAT systems.
|
||||
*/
|
||||
par->ati_regbase = ioremap_uc(info->fix.mmio_start, 0x1000);
|
||||
#else
|
||||
par->ati_regbase = ioremap(info->fix.mmio_start, 0x1000);
|
||||
#endif
|
||||
if (par->ati_regbase == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -1933,10 +1933,10 @@ static void uvesafb_exit(void)
|
||||
}
|
||||
}
|
||||
|
||||
cn_del_callback(&uvesafb_cn_id);
|
||||
driver_remove_file(&uvesafb_driver.driver, &driver_attr_v86d);
|
||||
platform_device_unregister(uvesafb_device);
|
||||
platform_driver_unregister(&uvesafb_driver);
|
||||
cn_del_callback(&uvesafb_cn_id);
|
||||
}
|
||||
|
||||
module_exit(uvesafb_exit);
|
||||
|
@ -365,7 +365,11 @@ static inline s64 towards_target(struct virtio_balloon *vb)
|
||||
if (!virtio_has_feature(vb->vdev, VIRTIO_F_VERSION_1))
|
||||
num_pages = le32_to_cpu((__force __le32)num_pages);
|
||||
|
||||
target = num_pages;
|
||||
/*
|
||||
* Aligned up to guest page size to avoid inflating and deflating
|
||||
* balloon endlessly.
|
||||
*/
|
||||
target = ALIGN(num_pages, VIRTIO_BALLOON_PAGES_PER_PAGE);
|
||||
return target - vb->num_pages;
|
||||
}
|
||||
|
||||
|
@ -567,14 +567,17 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&vm_dev->lock);
|
||||
|
||||
vm_dev->base = devm_platform_ioremap_resource(pdev, 0);
|
||||
if (IS_ERR(vm_dev->base))
|
||||
return PTR_ERR(vm_dev->base);
|
||||
if (IS_ERR(vm_dev->base)) {
|
||||
rc = PTR_ERR(vm_dev->base);
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
/* Check magic value */
|
||||
magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE);
|
||||
if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
|
||||
dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic);
|
||||
return -ENODEV;
|
||||
rc = -ENODEV;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
/* Check device version */
|
||||
@ -582,7 +585,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
if (vm_dev->version < 1 || vm_dev->version > 2) {
|
||||
dev_err(&pdev->dev, "Version %ld not supported!\n",
|
||||
vm_dev->version);
|
||||
return -ENXIO;
|
||||
rc = -ENXIO;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
|
||||
vm_dev->vdev.id.device = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_ID);
|
||||
@ -591,7 +595,8 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
* virtio-mmio device with an ID 0 is a (dummy) placeholder
|
||||
* with no function. End probing now with no error reported.
|
||||
*/
|
||||
return -ENODEV;
|
||||
rc = -ENODEV;
|
||||
goto free_vm_dev;
|
||||
}
|
||||
vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID);
|
||||
|
||||
@ -621,6 +626,10 @@ static int virtio_mmio_probe(struct platform_device *pdev)
|
||||
put_device(&vm_dev->vdev.dev);
|
||||
|
||||
return rc;
|
||||
|
||||
free_vm_dev:
|
||||
kfree(vm_dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int virtio_mmio_remove(struct platform_device *pdev)
|
||||
|
@ -607,8 +607,13 @@ static struct rdma_cm_id *smbd_create_id(
|
||||
log_rdma_event(ERR, "rdma_resolve_addr() failed %i\n", rc);
|
||||
goto out;
|
||||
}
|
||||
wait_for_completion_interruptible_timeout(
|
||||
rc = wait_for_completion_interruptible_timeout(
|
||||
&info->ri_done, msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT));
|
||||
/* e.g. if interrupted returns -ERESTARTSYS */
|
||||
if (rc < 0) {
|
||||
log_rdma_event(ERR, "rdma_resolve_addr timeout rc: %i\n", rc);
|
||||
goto out;
|
||||
}
|
||||
rc = info->ri_rc;
|
||||
if (rc) {
|
||||
log_rdma_event(ERR, "rdma_resolve_addr() completed %i\n", rc);
|
||||
@ -621,8 +626,13 @@ static struct rdma_cm_id *smbd_create_id(
|
||||
log_rdma_event(ERR, "rdma_resolve_route() failed %i\n", rc);
|
||||
goto out;
|
||||
}
|
||||
wait_for_completion_interruptible_timeout(
|
||||
rc = wait_for_completion_interruptible_timeout(
|
||||
&info->ri_done, msecs_to_jiffies(RDMA_RESOLVE_TIMEOUT));
|
||||
/* e.g. if interrupted returns -ERESTARTSYS */
|
||||
if (rc < 0) {
|
||||
log_rdma_event(ERR, "rdma_resolve_addr timeout rc: %i\n", rc);
|
||||
goto out;
|
||||
}
|
||||
rc = info->ri_rc;
|
||||
if (rc) {
|
||||
log_rdma_event(ERR, "rdma_resolve_route() completed %i\n", rc);
|
||||
|
@ -3094,8 +3094,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
struct ext4_sb_info *sbi = EXT4_SB(ac->ac_sb);
|
||||
struct ext4_super_block *es = sbi->s_es;
|
||||
int bsbits, max;
|
||||
ext4_lblk_t end;
|
||||
loff_t size, start_off;
|
||||
loff_t size, start_off, end;
|
||||
loff_t orig_size __maybe_unused;
|
||||
ext4_lblk_t start;
|
||||
struct ext4_inode_info *ei = EXT4_I(ac->ac_inode);
|
||||
@ -3124,7 +3123,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
|
||||
/* first, let's learn actual file size
|
||||
* given current request is allocated */
|
||||
size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);
|
||||
size = extent_logical_end(sbi, &ac->ac_o_ex);
|
||||
size = size << bsbits;
|
||||
if (size < i_size_read(ac->ac_inode))
|
||||
size = i_size_read(ac->ac_inode);
|
||||
@ -3203,7 +3202,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
/* check we don't cross already preallocated blocks */
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
|
||||
ext4_lblk_t pa_end;
|
||||
loff_t pa_end;
|
||||
|
||||
if (pa->pa_deleted)
|
||||
continue;
|
||||
@ -3213,8 +3212,7 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
continue;
|
||||
}
|
||||
|
||||
pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
|
||||
pa->pa_len);
|
||||
pa_end = pa_logical_end(EXT4_SB(ac->ac_sb), pa);
|
||||
|
||||
/* PA must not overlap original request */
|
||||
BUG_ON(!(ac->ac_o_ex.fe_logical >= pa_end ||
|
||||
@ -3243,12 +3241,11 @@ ext4_mb_normalize_request(struct ext4_allocation_context *ac,
|
||||
/* XXX: extra loop to check we really don't overlap preallocations */
|
||||
rcu_read_lock();
|
||||
list_for_each_entry_rcu(pa, &ei->i_prealloc_list, pa_inode_list) {
|
||||
ext4_lblk_t pa_end;
|
||||
loff_t pa_end;
|
||||
|
||||
spin_lock(&pa->pa_lock);
|
||||
if (pa->pa_deleted == 0) {
|
||||
pa_end = pa->pa_lstart + EXT4_C2B(EXT4_SB(ac->ac_sb),
|
||||
pa->pa_len);
|
||||
pa_end = pa_logical_end(EXT4_SB(ac->ac_sb), pa);
|
||||
BUG_ON(!(start >= pa_end || end <= pa->pa_lstart));
|
||||
}
|
||||
spin_unlock(&pa->pa_lock);
|
||||
@ -3462,8 +3459,7 @@ ext4_mb_use_preallocated(struct ext4_allocation_context *ac)
|
||||
/* all fields in this condition don't change,
|
||||
* so we can skip locking for them */
|
||||
if (ac->ac_o_ex.fe_logical < pa->pa_lstart ||
|
||||
ac->ac_o_ex.fe_logical >= (pa->pa_lstart +
|
||||
EXT4_C2B(sbi, pa->pa_len)))
|
||||
ac->ac_o_ex.fe_logical >= pa_logical_end(sbi, pa))
|
||||
continue;
|
||||
|
||||
/* non-extent files can't have physical blocks past 2^32 */
|
||||
@ -3684,8 +3680,11 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
|
||||
return -ENOMEM;
|
||||
|
||||
if (ac->ac_b_ex.fe_len < ac->ac_g_ex.fe_len) {
|
||||
int new_bex_start;
|
||||
int new_bex_end;
|
||||
struct ext4_free_extent ex = {
|
||||
.fe_logical = ac->ac_g_ex.fe_logical,
|
||||
.fe_len = ac->ac_g_ex.fe_len,
|
||||
};
|
||||
loff_t orig_goal_end = extent_logical_end(sbi, &ex);
|
||||
|
||||
/* we can't allocate as much as normalizer wants.
|
||||
* so, found space must get proper lstart
|
||||
@ -3704,29 +3703,23 @@ ext4_mb_new_inode_pa(struct ext4_allocation_context *ac)
|
||||
* still cover original start
|
||||
* 3. Else, keep the best ex at start of original request.
|
||||
*/
|
||||
new_bex_end = ac->ac_g_ex.fe_logical +
|
||||
EXT4_C2B(sbi, ac->ac_g_ex.fe_len);
|
||||
new_bex_start = new_bex_end - EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical >= new_bex_start)
|
||||
ex.fe_len = ac->ac_b_ex.fe_len;
|
||||
|
||||
ex.fe_logical = orig_goal_end - EXT4_C2B(sbi, ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical >= ex.fe_logical)
|
||||
goto adjust_bex;
|
||||
|
||||
new_bex_start = ac->ac_g_ex.fe_logical;
|
||||
new_bex_end =
|
||||
new_bex_start + EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
if (ac->ac_o_ex.fe_logical < new_bex_end)
|
||||
ex.fe_logical = ac->ac_g_ex.fe_logical;
|
||||
if (ac->ac_o_ex.fe_logical < extent_logical_end(sbi, &ex))
|
||||
goto adjust_bex;
|
||||
|
||||
new_bex_start = ac->ac_o_ex.fe_logical;
|
||||
new_bex_end =
|
||||
new_bex_start + EXT4_C2B(sbi, ac->ac_b_ex.fe_len);
|
||||
|
||||
ex.fe_logical = ac->ac_o_ex.fe_logical;
|
||||
adjust_bex:
|
||||
ac->ac_b_ex.fe_logical = new_bex_start;
|
||||
ac->ac_b_ex.fe_logical = ex.fe_logical;
|
||||
|
||||
BUG_ON(ac->ac_o_ex.fe_logical < ac->ac_b_ex.fe_logical);
|
||||
BUG_ON(ac->ac_o_ex.fe_len > ac->ac_b_ex.fe_len);
|
||||
BUG_ON(new_bex_end > (ac->ac_g_ex.fe_logical +
|
||||
EXT4_C2B(sbi, ac->ac_g_ex.fe_len)));
|
||||
BUG_ON(extent_logical_end(sbi, &ex) > orig_goal_end);
|
||||
}
|
||||
|
||||
/* preallocation can change ac_b_ex, thus we store actually
|
||||
@ -4234,7 +4227,7 @@ static void ext4_mb_group_or_file(struct ext4_allocation_context *ac)
|
||||
if (unlikely(ac->ac_flags & EXT4_MB_HINT_GOAL_ONLY))
|
||||
return;
|
||||
|
||||
size = ac->ac_o_ex.fe_logical + EXT4_C2B(sbi, ac->ac_o_ex.fe_len);
|
||||
size = extent_logical_end(sbi, &ac->ac_o_ex);
|
||||
isize = (i_size_read(ac->ac_inode) + ac->ac_sb->s_blocksize - 1)
|
||||
>> bsbits;
|
||||
|
||||
|
@ -199,6 +199,20 @@ static inline ext4_fsblk_t ext4_grp_offs_to_block(struct super_block *sb,
|
||||
(fex->fe_start << EXT4_SB(sb)->s_cluster_bits);
|
||||
}
|
||||
|
||||
static inline loff_t extent_logical_end(struct ext4_sb_info *sbi,
|
||||
struct ext4_free_extent *fex)
|
||||
{
|
||||
/* Use loff_t to avoid end exceeding ext4_lblk_t max. */
|
||||
return (loff_t)fex->fe_logical + EXT4_C2B(sbi, fex->fe_len);
|
||||
}
|
||||
|
||||
static inline loff_t pa_logical_end(struct ext4_sb_info *sbi,
|
||||
struct ext4_prealloc_space *pa)
|
||||
{
|
||||
/* Use loff_t to avoid end exceeding ext4_lblk_t max. */
|
||||
return (loff_t)pa->pa_lstart + EXT4_C2B(sbi, pa->pa_len);
|
||||
}
|
||||
|
||||
typedef int (*ext4_mballoc_query_range_fn)(
|
||||
struct super_block *sb,
|
||||
ext4_group_t agno,
|
||||
|
@ -1086,7 +1086,8 @@ static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
|
||||
|
||||
if (phase == 3) {
|
||||
inode = f2fs_iget(sb, dni.ino);
|
||||
if (IS_ERR(inode) || is_bad_inode(inode)) {
|
||||
if (IS_ERR(inode) || is_bad_inode(inode) ||
|
||||
special_file(inode->i_mode)) {
|
||||
set_sbi_flag(sbi, SBI_NEED_FSCK);
|
||||
continue;
|
||||
}
|
||||
|
@ -1689,6 +1689,12 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
|
||||
if (!flen || isdotent(fname, flen) || !tlen || isdotent(tname, tlen))
|
||||
goto out;
|
||||
|
||||
err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev;
|
||||
if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt)
|
||||
goto out;
|
||||
if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry)
|
||||
goto out;
|
||||
|
||||
retry:
|
||||
host_err = fh_want_write(ffhp);
|
||||
if (host_err) {
|
||||
@ -1723,12 +1729,6 @@ nfsd_rename(struct svc_rqst *rqstp, struct svc_fh *ffhp, char *fname, int flen,
|
||||
if (ndentry == trap)
|
||||
goto out_dput_new;
|
||||
|
||||
host_err = -EXDEV;
|
||||
if (ffhp->fh_export->ex_path.mnt != tfhp->fh_export->ex_path.mnt)
|
||||
goto out_dput_new;
|
||||
if (ffhp->fh_export->ex_path.dentry != tfhp->fh_export->ex_path.dentry)
|
||||
goto out_dput_new;
|
||||
|
||||
if (nfsd_has_cached_files(ndentry)) {
|
||||
has_cached = true;
|
||||
goto out_dput_old;
|
||||
|
@ -449,6 +449,8 @@ extern int __must_check driver_create_file(struct device_driver *driver,
|
||||
extern void driver_remove_file(struct device_driver *driver,
|
||||
const struct driver_attribute *attr);
|
||||
|
||||
int driver_set_override(struct device *dev, const char **override,
|
||||
const char *s, size_t len);
|
||||
extern int __must_check driver_for_each_device(struct device_driver *drv,
|
||||
struct device *start,
|
||||
void *data,
|
||||
|
@ -554,6 +554,7 @@
|
||||
#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F3 0x1493
|
||||
#define PCI_DEVICE_ID_AMD_17H_M60H_DF_F3 0x144b
|
||||
#define PCI_DEVICE_ID_AMD_17H_M70H_DF_F3 0x1443
|
||||
#define PCI_DEVICE_ID_AMD_VANGOGH_USB 0x163a
|
||||
#define PCI_DEVICE_ID_AMD_19H_DF_F3 0x1653
|
||||
#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
|
||||
#define PCI_DEVICE_ID_AMD_LANCE 0x2000
|
||||
|
@ -29,7 +29,11 @@ struct platform_device {
|
||||
struct resource *resource;
|
||||
|
||||
const struct platform_device_id *id_entry;
|
||||
char *driver_override; /* Driver name to force a match */
|
||||
/*
|
||||
* Driver name to force a match. Do not set directly, because core
|
||||
* frees it. Use driver_set_override() to set or clear it.
|
||||
*/
|
||||
const char *driver_override;
|
||||
|
||||
/* MFD cell pointer */
|
||||
struct mfd_cell *mfd_cell;
|
||||
|
@ -42,7 +42,9 @@ struct rpmsg_channel_info {
|
||||
* rpmsg_device - device that belong to the rpmsg bus
|
||||
* @dev: the device struct
|
||||
* @id: device id (used to match between rpmsg drivers and devices)
|
||||
* @driver_override: driver name to force a match
|
||||
* @driver_override: driver name to force a match; do not set directly,
|
||||
* because core frees it; use driver_set_override() to
|
||||
* set or clear it.
|
||||
* @src: local address
|
||||
* @dst: destination address
|
||||
* @ept: the rpmsg endpoint of this channel
|
||||
@ -51,7 +53,7 @@ struct rpmsg_channel_info {
|
||||
struct rpmsg_device {
|
||||
struct device dev;
|
||||
struct rpmsg_device_id id;
|
||||
char *driver_override;
|
||||
const char *driver_override;
|
||||
u32 src;
|
||||
u32 dst;
|
||||
struct rpmsg_endpoint *ept;
|
||||
@ -120,6 +122,8 @@ struct rpmsg_driver {
|
||||
|
||||
#if IS_ENABLED(CONFIG_RPMSG)
|
||||
|
||||
int rpmsg_register_device_override(struct rpmsg_device *rpdev,
|
||||
const char *driver_override);
|
||||
int register_rpmsg_device(struct rpmsg_device *dev);
|
||||
void unregister_rpmsg_device(struct rpmsg_device *dev);
|
||||
int __register_rpmsg_driver(struct rpmsg_driver *drv, struct module *owner);
|
||||
@ -147,6 +151,12 @@ int rpmsg_set_signals(struct rpmsg_endpoint *ept, u32 set, u32 clear);
|
||||
|
||||
#else
|
||||
|
||||
static inline int rpmsg_register_device_override(struct rpmsg_device *rpdev,
|
||||
const char *driver_override)
|
||||
{
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
static inline int register_rpmsg_device(struct rpmsg_device *dev)
|
||||
{
|
||||
return -ENXIO;
|
||||
|
@ -30,6 +30,6 @@ enum gtp_attrs {
|
||||
GTPA_PAD,
|
||||
__GTPA_MAX,
|
||||
};
|
||||
#define GTPA_MAX (__GTPA_MAX + 1)
|
||||
#define GTPA_MAX (__GTPA_MAX - 1)
|
||||
|
||||
#endif /* _UAPI_LINUX_GTP_H_ */
|
||||
|
@ -144,7 +144,7 @@ static int get_kobj_path_length(struct kobject *kobj)
|
||||
return length;
|
||||
}
|
||||
|
||||
static void fill_kobj_path(struct kobject *kobj, char *path, int length)
|
||||
static int fill_kobj_path(struct kobject *kobj, char *path, int length)
|
||||
{
|
||||
struct kobject *parent;
|
||||
|
||||
@ -153,12 +153,16 @@ static void fill_kobj_path(struct kobject *kobj, char *path, int length)
|
||||
int cur = strlen(kobject_name(parent));
|
||||
/* back up enough to print this name with '/' */
|
||||
length -= cur;
|
||||
if (length <= 0)
|
||||
return -EINVAL;
|
||||
memcpy(path + length, kobject_name(parent), cur);
|
||||
*(path + --length) = '/';
|
||||
}
|
||||
|
||||
pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj),
|
||||
kobj, __func__, path);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -173,13 +177,17 @@ char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask)
|
||||
char *path;
|
||||
int len;
|
||||
|
||||
retry:
|
||||
len = get_kobj_path_length(kobj);
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
path = kzalloc(len, gfp_mask);
|
||||
if (!path)
|
||||
return NULL;
|
||||
fill_kobj_path(kobj, path, len);
|
||||
if (fill_kobj_path(kobj, path, len)) {
|
||||
kfree(path);
|
||||
goto retry;
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
@ -224,7 +224,8 @@ bool neigh_remove_one(struct neighbour *ndel, struct neigh_table *tbl)
|
||||
|
||||
static int neigh_forced_gc(struct neigh_table *tbl)
|
||||
{
|
||||
int max_clean = atomic_read(&tbl->gc_entries) - tbl->gc_thresh2;
|
||||
int max_clean = atomic_read(&tbl->gc_entries) -
|
||||
READ_ONCE(tbl->gc_thresh2);
|
||||
unsigned long tref = jiffies - 5 * HZ;
|
||||
struct neighbour *n, *tmp;
|
||||
int shrunk = 0;
|
||||
@ -251,7 +252,7 @@ static int neigh_forced_gc(struct neigh_table *tbl)
|
||||
}
|
||||
}
|
||||
|
||||
tbl->last_flush = jiffies;
|
||||
WRITE_ONCE(tbl->last_flush, jiffies);
|
||||
|
||||
write_unlock_bh(&tbl->lock);
|
||||
|
||||
@ -407,17 +408,17 @@ static struct neighbour *neigh_alloc(struct neigh_table *tbl,
|
||||
{
|
||||
struct neighbour *n = NULL;
|
||||
unsigned long now = jiffies;
|
||||
int entries;
|
||||
int entries, gc_thresh3;
|
||||
|
||||
if (exempt_from_gc)
|
||||
goto do_alloc;
|
||||
|
||||
entries = atomic_inc_return(&tbl->gc_entries) - 1;
|
||||
if (entries >= tbl->gc_thresh3 ||
|
||||
(entries >= tbl->gc_thresh2 &&
|
||||
time_after(now, tbl->last_flush + 5 * HZ))) {
|
||||
if (!neigh_forced_gc(tbl) &&
|
||||
entries >= tbl->gc_thresh3) {
|
||||
gc_thresh3 = READ_ONCE(tbl->gc_thresh3);
|
||||
if (entries >= gc_thresh3 ||
|
||||
(entries >= READ_ONCE(tbl->gc_thresh2) &&
|
||||
time_after(now, READ_ONCE(tbl->last_flush) + 5 * HZ))) {
|
||||
if (!neigh_forced_gc(tbl) && entries >= gc_thresh3) {
|
||||
net_info_ratelimited("%s: neighbor table overflow!\n",
|
||||
tbl->id);
|
||||
NEIGH_CACHE_STAT_INC(tbl, table_fulls);
|
||||
@ -900,13 +901,14 @@ static void neigh_periodic_work(struct work_struct *work)
|
||||
|
||||
if (time_after(jiffies, tbl->last_rand + 300 * HZ)) {
|
||||
struct neigh_parms *p;
|
||||
tbl->last_rand = jiffies;
|
||||
|
||||
WRITE_ONCE(tbl->last_rand, jiffies);
|
||||
list_for_each_entry(p, &tbl->parms_list, list)
|
||||
p->reachable_time =
|
||||
neigh_rand_reach_time(NEIGH_VAR(p, BASE_REACHABLE_TIME));
|
||||
}
|
||||
|
||||
if (atomic_read(&tbl->entries) < tbl->gc_thresh1)
|
||||
if (atomic_read(&tbl->entries) < READ_ONCE(tbl->gc_thresh1))
|
||||
goto out;
|
||||
|
||||
for (i = 0 ; i < (1 << nht->hash_shift); i++) {
|
||||
@ -2048,15 +2050,16 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
ndtmsg->ndtm_pad2 = 0;
|
||||
|
||||
if (nla_put_string(skb, NDTA_NAME, tbl->id) ||
|
||||
nla_put_msecs(skb, NDTA_GC_INTERVAL, tbl->gc_interval, NDTA_PAD) ||
|
||||
nla_put_u32(skb, NDTA_THRESH1, tbl->gc_thresh1) ||
|
||||
nla_put_u32(skb, NDTA_THRESH2, tbl->gc_thresh2) ||
|
||||
nla_put_u32(skb, NDTA_THRESH3, tbl->gc_thresh3))
|
||||
nla_put_msecs(skb, NDTA_GC_INTERVAL, READ_ONCE(tbl->gc_interval),
|
||||
NDTA_PAD) ||
|
||||
nla_put_u32(skb, NDTA_THRESH1, READ_ONCE(tbl->gc_thresh1)) ||
|
||||
nla_put_u32(skb, NDTA_THRESH2, READ_ONCE(tbl->gc_thresh2)) ||
|
||||
nla_put_u32(skb, NDTA_THRESH3, READ_ONCE(tbl->gc_thresh3)))
|
||||
goto nla_put_failure;
|
||||
{
|
||||
unsigned long now = jiffies;
|
||||
long flush_delta = now - tbl->last_flush;
|
||||
long rand_delta = now - tbl->last_rand;
|
||||
long flush_delta = now - READ_ONCE(tbl->last_flush);
|
||||
long rand_delta = now - READ_ONCE(tbl->last_rand);
|
||||
struct neigh_hash_table *nht;
|
||||
struct ndt_config ndc = {
|
||||
.ndtc_key_len = tbl->key_len,
|
||||
@ -2064,7 +2067,7 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
.ndtc_entries = atomic_read(&tbl->entries),
|
||||
.ndtc_last_flush = jiffies_to_msecs(flush_delta),
|
||||
.ndtc_last_rand = jiffies_to_msecs(rand_delta),
|
||||
.ndtc_proxy_qlen = tbl->proxy_queue.qlen,
|
||||
.ndtc_proxy_qlen = READ_ONCE(tbl->proxy_queue.qlen),
|
||||
};
|
||||
|
||||
rcu_read_lock_bh();
|
||||
@ -2087,17 +2090,17 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
|
||||
struct neigh_statistics *st;
|
||||
|
||||
st = per_cpu_ptr(tbl->stats, cpu);
|
||||
ndst.ndts_allocs += st->allocs;
|
||||
ndst.ndts_destroys += st->destroys;
|
||||
ndst.ndts_hash_grows += st->hash_grows;
|
||||
ndst.ndts_res_failed += st->res_failed;
|
||||
ndst.ndts_lookups += st->lookups;
|
||||
ndst.ndts_hits += st->hits;
|
||||
ndst.ndts_rcv_probes_mcast += st->rcv_probes_mcast;
|
||||
ndst.ndts_rcv_probes_ucast += st->rcv_probes_ucast;
|
||||
ndst.ndts_periodic_gc_runs += st->periodic_gc_runs;
|
||||
ndst.ndts_forced_gc_runs += st->forced_gc_runs;
|
||||
ndst.ndts_table_fulls += st->table_fulls;
|
||||
ndst.ndts_allocs += READ_ONCE(st->allocs);
|
||||
ndst.ndts_destroys += READ_ONCE(st->destroys);
|
||||
ndst.ndts_hash_grows += READ_ONCE(st->hash_grows);
|
||||
ndst.ndts_res_failed += READ_ONCE(st->res_failed);
|
||||
ndst.ndts_lookups += READ_ONCE(st->lookups);
|
||||
ndst.ndts_hits += READ_ONCE(st->hits);
|
||||
ndst.ndts_rcv_probes_mcast += READ_ONCE(st->rcv_probes_mcast);
|
||||
ndst.ndts_rcv_probes_ucast += READ_ONCE(st->rcv_probes_ucast);
|
||||
ndst.ndts_periodic_gc_runs += READ_ONCE(st->periodic_gc_runs);
|
||||
ndst.ndts_forced_gc_runs += READ_ONCE(st->forced_gc_runs);
|
||||
ndst.ndts_table_fulls += READ_ONCE(st->table_fulls);
|
||||
}
|
||||
|
||||
if (nla_put_64bit(skb, NDTA_STATS, sizeof(ndst), &ndst,
|
||||
@ -2321,16 +2324,16 @@ static int neightbl_set(struct sk_buff *skb, struct nlmsghdr *nlh,
|
||||
goto errout_tbl_lock;
|
||||
|
||||
if (tb[NDTA_THRESH1])
|
||||
tbl->gc_thresh1 = nla_get_u32(tb[NDTA_THRESH1]);
|
||||
WRITE_ONCE(tbl->gc_thresh1, nla_get_u32(tb[NDTA_THRESH1]));
|
||||
|
||||
if (tb[NDTA_THRESH2])
|
||||
tbl->gc_thresh2 = nla_get_u32(tb[NDTA_THRESH2]);
|
||||
WRITE_ONCE(tbl->gc_thresh2, nla_get_u32(tb[NDTA_THRESH2]));
|
||||
|
||||
if (tb[NDTA_THRESH3])
|
||||
tbl->gc_thresh3 = nla_get_u32(tb[NDTA_THRESH3]);
|
||||
WRITE_ONCE(tbl->gc_thresh3, nla_get_u32(tb[NDTA_THRESH3]));
|
||||
|
||||
if (tb[NDTA_GC_INTERVAL])
|
||||
tbl->gc_interval = nla_get_msecs(tb[NDTA_GC_INTERVAL]);
|
||||
WRITE_ONCE(tbl->gc_interval, nla_get_msecs(tb[NDTA_GC_INTERVAL]));
|
||||
|
||||
err = 0;
|
||||
|
||||
|
@ -2058,16 +2058,17 @@ void tcp_enter_loss(struct sock *sk)
|
||||
* restore sanity to the SACK scoreboard. If the apparent reneging
|
||||
* persists until this RTO then we'll clear the SACK scoreboard.
|
||||
*/
|
||||
static bool tcp_check_sack_reneging(struct sock *sk, int flag)
|
||||
static bool tcp_check_sack_reneging(struct sock *sk, int *ack_flag)
|
||||
{
|
||||
if (flag & FLAG_SACK_RENEGING &&
|
||||
flag & FLAG_SND_UNA_ADVANCED) {
|
||||
if (*ack_flag & FLAG_SACK_RENEGING &&
|
||||
*ack_flag & FLAG_SND_UNA_ADVANCED) {
|
||||
struct tcp_sock *tp = tcp_sk(sk);
|
||||
unsigned long delay = max(usecs_to_jiffies(tp->srtt_us >> 4),
|
||||
msecs_to_jiffies(10));
|
||||
|
||||
inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
|
||||
delay, TCP_RTO_MAX);
|
||||
*ack_flag &= ~FLAG_SET_XMIT_TIMER;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@ -2841,7 +2842,7 @@ static void tcp_fastretrans_alert(struct sock *sk, const u32 prior_snd_una,
|
||||
tp->prior_ssthresh = 0;
|
||||
|
||||
/* B. In all the states check for reneging SACKs. */
|
||||
if (tcp_check_sack_reneging(sk, flag))
|
||||
if (tcp_check_sack_reneging(sk, ack_flag))
|
||||
return;
|
||||
|
||||
/* C. Check consistency of the current state. */
|
||||
|
@ -683,8 +683,8 @@ nfulnl_log_packet(struct net *net,
|
||||
unsigned int plen = 0;
|
||||
struct nfnl_log_net *log = nfnl_log_pernet(net);
|
||||
const struct nfnl_ct_hook *nfnl_ct = NULL;
|
||||
enum ip_conntrack_info ctinfo = 0;
|
||||
struct nf_conn *ct = NULL;
|
||||
enum ip_conntrack_info ctinfo;
|
||||
|
||||
if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
|
||||
li = li_user;
|
||||
|
@ -3241,6 +3241,8 @@ int rt5645_set_jack_detect(struct snd_soc_component *component,
|
||||
RT5645_GP1_PIN_IRQ, RT5645_GP1_PIN_IRQ);
|
||||
regmap_update_bits(rt5645->regmap, RT5645_GEN_CTRL1,
|
||||
RT5645_DIG_GATE_CTRL, RT5645_DIG_GATE_CTRL);
|
||||
regmap_update_bits(rt5645->regmap, RT5645_DEPOP_M1,
|
||||
RT5645_HP_CB_MASK, RT5645_HP_CB_PU);
|
||||
}
|
||||
rt5645_irq(0, rt5645);
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
# description: Test failure of registering kprobe on non unique symbol
|
||||
# requires: kprobe_events
|
||||
|
||||
SYMBOL='name_show'
|
||||
|
||||
# We skip this test on kernel where SYMBOL is unique or does not exist.
|
||||
if [ "$(grep -c -E "[[:alnum:]]+ t ${SYMBOL}" /proc/kallsyms)" -le '1' ]; then
|
||||
exit_unsupported
|
||||
fi
|
||||
|
||||
! echo "p:test_non_unique ${SYMBOL}" > kprobe_events
|
Loading…
Reference in New Issue
Block a user