mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-24 19:40:21 +09:00
Merge tag 'v6.6.102' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroid-6.6.y
This is the 6.6.102 stable release Change-Id: I190d77ce588a35aedb1d5db4cb184c9800bfa844
This commit is contained in:
@@ -233,9 +233,9 @@ usrjquota=<file> Appoint specified file and type during mount, so that quota
|
||||
grpjquota=<file> information can be properly updated during recovery flow,
|
||||
prjjquota=<file> <quota file>: must be in root directory;
|
||||
jqfmt=<quota type> <quota type>: [vfsold,vfsv0,vfsv1].
|
||||
offusrjquota Turn off user journalled quota.
|
||||
offgrpjquota Turn off group journalled quota.
|
||||
offprjjquota Turn off project journalled quota.
|
||||
usrjquota= Turn off user journalled quota.
|
||||
grpjquota= Turn off group journalled quota.
|
||||
prjjquota= Turn off project journalled quota.
|
||||
quota Enable plain user disk quota accounting.
|
||||
noquota Disable all plain disk quota option.
|
||||
alloc_mode=%s Adjust block allocation policy, which supports "reuse"
|
||||
|
||||
@@ -1489,9 +1489,6 @@ operations:
|
||||
|
||||
do: &module-eeprom-get-op
|
||||
request:
|
||||
attributes:
|
||||
- header
|
||||
reply:
|
||||
attributes:
|
||||
- header
|
||||
- offset
|
||||
@@ -1499,6 +1496,9 @@ operations:
|
||||
- page
|
||||
- bank
|
||||
- i2c-address
|
||||
reply:
|
||||
attributes:
|
||||
- header
|
||||
- data
|
||||
dump: *module-eeprom-get-op
|
||||
-
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 6
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 101
|
||||
SUBLEVEL = 102
|
||||
EXTRAVERSION =
|
||||
NAME = Pinguïn Aangedreven
|
||||
|
||||
|
||||
@@ -169,7 +169,6 @@
|
||||
pinctrl-0 = <&pinctrl_uart2>;
|
||||
linux,rs485-enabled-at-boot-time;
|
||||
rs485-rx-during-tx;
|
||||
rs485-rts-active-low;
|
||||
uart-has-rtscts;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
@@ -612,7 +612,7 @@
|
||||
|
||||
ftm: ftm@400b8000 {
|
||||
compatible = "fsl,ftm-timer";
|
||||
reg = <0x400b8000 0x1000 0x400b9000 0x1000>;
|
||||
reg = <0x400b8000 0x1000>, <0x400b9000 0x1000>;
|
||||
interrupts = <44 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clock-names = "ftm-evt", "ftm-src",
|
||||
"ftm-evt-counter-en", "ftm-src-counter-en";
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"P9_18 [spi0_d1]",
|
||||
"P9_17 [spi0_cs0]",
|
||||
"[mmc0_cd]",
|
||||
"P8_42A [ecappwm0]",
|
||||
"P9_42A [ecappwm0]",
|
||||
"P8_35 [lcd d12]",
|
||||
"P8_33 [lcd d13]",
|
||||
"P8_31 [lcd d14]",
|
||||
|
||||
@@ -245,7 +245,7 @@ static int ctr_encrypt(struct skcipher_request *req)
|
||||
while (walk.nbytes > 0) {
|
||||
const u8 *src = walk.src.virt.addr;
|
||||
u8 *dst = walk.dst.virt.addr;
|
||||
int bytes = walk.nbytes;
|
||||
unsigned int bytes = walk.nbytes;
|
||||
|
||||
if (unlikely(bytes < AES_BLOCK_SIZE))
|
||||
src = dst = memcpy(buf + sizeof(buf) - bytes,
|
||||
|
||||
@@ -284,6 +284,8 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
|
||||
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
assigned-clocks = <&clk IMX8MM_CLK_USDHC3>;
|
||||
assigned-clock-rates = <400000000>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
@@ -295,6 +295,8 @@
|
||||
pinctrl-0 = <&pinctrl_usdhc3>;
|
||||
pinctrl-1 = <&pinctrl_usdhc3_100mhz>;
|
||||
pinctrl-2 = <&pinctrl_usdhc3_200mhz>;
|
||||
assigned-clocks = <&clk IMX8MN_CLK_USDHC3>;
|
||||
assigned-clock-rates = <400000000>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
@@ -862,6 +862,7 @@
|
||||
clock-names = "bam_clk";
|
||||
#dma-cells = <1>;
|
||||
qcom,ee = <0>;
|
||||
qcom,controlled-remotely;
|
||||
};
|
||||
|
||||
blsp1_uart1: serial@78af000 {
|
||||
@@ -982,6 +983,7 @@
|
||||
clock-names = "bam_clk";
|
||||
#dma-cells = <1>;
|
||||
qcom,ee = <0>;
|
||||
qcom,controlled-remotely;
|
||||
};
|
||||
|
||||
blsp2_uart2: serial@7af0000 {
|
||||
|
||||
@@ -3435,18 +3435,18 @@
|
||||
#interrupt-cells = <4>;
|
||||
};
|
||||
|
||||
sram@146aa000 {
|
||||
sram@14680000 {
|
||||
compatible = "qcom,sc7180-imem", "syscon", "simple-mfd";
|
||||
reg = <0 0x146aa000 0 0x2000>;
|
||||
reg = <0 0x14680000 0 0x2e000>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0 0 0x146aa000 0x2000>;
|
||||
ranges = <0 0 0x14680000 0x2e000>;
|
||||
|
||||
pil-reloc@94c {
|
||||
pil-reloc@2a94c {
|
||||
compatible = "qcom,pil-reloc-info";
|
||||
reg = <0x94c 0xc8>;
|
||||
reg = <0x2a94c 0xc8>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -4989,18 +4989,18 @@
|
||||
#interrupt-cells = <4>;
|
||||
};
|
||||
|
||||
sram@146bf000 {
|
||||
sram@14680000 {
|
||||
compatible = "qcom,sdm845-imem", "syscon", "simple-mfd";
|
||||
reg = <0 0x146bf000 0 0x1000>;
|
||||
reg = <0 0x14680000 0 0x40000>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
ranges = <0 0 0x146bf000 0x1000>;
|
||||
ranges = <0 0 0x14680000 0x40000>;
|
||||
|
||||
pil-reloc@94c {
|
||||
pil-reloc@3f94c {
|
||||
compatible = "qcom,pil-reloc-info";
|
||||
reg = <0x94c 0xc8>;
|
||||
reg = <0x3f94c 0xc8>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ config BOOTPARAM_STRING
|
||||
|
||||
config EARLY_PRINTK
|
||||
bool "Early printk"
|
||||
depends on !(SUN3 || M68000 || COLDFIRE)
|
||||
depends on MMU_MOTOROLA
|
||||
help
|
||||
Write kernel log output directly to a serial port.
|
||||
Where implemented, output goes to the framebuffer as well.
|
||||
|
||||
@@ -16,25 +16,10 @@
|
||||
#include "../mvme147/mvme147.h"
|
||||
#include "../mvme16x/mvme16x.h"
|
||||
|
||||
asmlinkage void __init debug_cons_nputs(const char *s, unsigned n);
|
||||
|
||||
static void __ref debug_cons_write(struct console *c,
|
||||
const char *s, unsigned n)
|
||||
{
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
if (MACH_IS_MVME147)
|
||||
mvme147_scc_write(c, s, n);
|
||||
else if (MACH_IS_MVME16x)
|
||||
mvme16x_cons_write(c, s, n);
|
||||
else
|
||||
debug_cons_nputs(s, n);
|
||||
#endif
|
||||
}
|
||||
asmlinkage void __init debug_cons_nputs(struct console *c, const char *s, unsigned int n);
|
||||
|
||||
static struct console early_console_instance = {
|
||||
.name = "debug",
|
||||
.write = debug_cons_write,
|
||||
.flags = CON_PRINTBUFFER | CON_BOOT,
|
||||
.index = -1
|
||||
};
|
||||
@@ -44,6 +29,12 @@ static int __init setup_early_printk(char *buf)
|
||||
if (early_console || buf)
|
||||
return 0;
|
||||
|
||||
if (MACH_IS_MVME147)
|
||||
early_console_instance.write = mvme147_scc_write;
|
||||
else if (MACH_IS_MVME16x)
|
||||
early_console_instance.write = mvme16x_cons_write;
|
||||
else
|
||||
early_console_instance.write = debug_cons_nputs;
|
||||
early_console = &early_console_instance;
|
||||
register_console(early_console);
|
||||
|
||||
@@ -51,20 +42,15 @@ static int __init setup_early_printk(char *buf)
|
||||
}
|
||||
early_param("earlyprintk", setup_early_printk);
|
||||
|
||||
/*
|
||||
* debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be called
|
||||
* after init sections are discarded (for platforms that use it).
|
||||
*/
|
||||
#if !(defined(CONFIG_SUN3) || defined(CONFIG_M68000) || \
|
||||
defined(CONFIG_COLDFIRE))
|
||||
|
||||
static int __init unregister_early_console(void)
|
||||
{
|
||||
if (!early_console || MACH_IS_MVME16x)
|
||||
return 0;
|
||||
/*
|
||||
* debug_cons_nputs() defined in arch/m68k/kernel/head.S cannot be
|
||||
* called after init sections are discarded (for platforms that use it).
|
||||
*/
|
||||
if (early_console && early_console->write == debug_cons_nputs)
|
||||
return unregister_console(early_console);
|
||||
|
||||
return unregister_console(early_console);
|
||||
return 0;
|
||||
}
|
||||
late_initcall(unregister_early_console);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3267,8 +3267,8 @@ func_return putn
|
||||
* turns around and calls the internal routines. This routine
|
||||
* is used by the boot console.
|
||||
*
|
||||
* The calling parameters are:
|
||||
* void debug_cons_nputs(const char *str, unsigned length)
|
||||
* The function signature is -
|
||||
* void debug_cons_nputs(struct console *c, const char *s, unsigned int n)
|
||||
*
|
||||
* This routine does NOT understand variable arguments only
|
||||
* simple strings!
|
||||
@@ -3277,8 +3277,8 @@ ENTRY(debug_cons_nputs)
|
||||
moveml %d0/%d1/%a0,%sp@-
|
||||
movew %sr,%sp@-
|
||||
ori #0x0700,%sr
|
||||
movel %sp@(18),%a0 /* fetch parameter */
|
||||
movel %sp@(22),%d1 /* fetch parameter */
|
||||
movel %sp@(22),%a0 /* char *s */
|
||||
movel %sp@(26),%d1 /* unsigned int n */
|
||||
jra 2f
|
||||
1:
|
||||
#ifdef CONSOLE_DEBUG
|
||||
|
||||
@@ -506,6 +506,60 @@ static int __init set_ntlb(char *str)
|
||||
|
||||
__setup("ntlb=", set_ntlb);
|
||||
|
||||
/* Initialise all TLB entries with unique values */
|
||||
static void r4k_tlb_uniquify(void)
|
||||
{
|
||||
int entry = num_wired_entries();
|
||||
|
||||
htw_stop();
|
||||
write_c0_entrylo0(0);
|
||||
write_c0_entrylo1(0);
|
||||
|
||||
while (entry < current_cpu_data.tlbsize) {
|
||||
unsigned long asid_mask = cpu_asid_mask(¤t_cpu_data);
|
||||
unsigned long asid = 0;
|
||||
int idx;
|
||||
|
||||
/* Skip wired MMID to make ginvt_mmid work */
|
||||
if (cpu_has_mmid)
|
||||
asid = MMID_KERNEL_WIRED + 1;
|
||||
|
||||
/* Check for match before using UNIQUE_ENTRYHI */
|
||||
do {
|
||||
if (cpu_has_mmid) {
|
||||
write_c0_memorymapid(asid);
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry));
|
||||
} else {
|
||||
write_c0_entryhi(UNIQUE_ENTRYHI(entry) | asid);
|
||||
}
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_probe();
|
||||
tlb_probe_hazard();
|
||||
idx = read_c0_index();
|
||||
/* No match or match is on current entry */
|
||||
if (idx < 0 || idx == entry)
|
||||
break;
|
||||
/*
|
||||
* If we hit a match, we need to try again with
|
||||
* a different ASID.
|
||||
*/
|
||||
asid++;
|
||||
} while (asid < asid_mask);
|
||||
|
||||
if (idx >= 0 && idx != entry)
|
||||
panic("Unable to uniquify TLB entry %d", idx);
|
||||
|
||||
write_c0_index(entry);
|
||||
mtc0_tlbw_hazard();
|
||||
tlb_write_indexed();
|
||||
entry++;
|
||||
}
|
||||
|
||||
tlbw_use_hazard();
|
||||
htw_start();
|
||||
flush_micro_tlb();
|
||||
}
|
||||
|
||||
/*
|
||||
* Configure TLB (for init or after a CPU has been powered off).
|
||||
*/
|
||||
@@ -545,7 +599,7 @@ static void r4k_tlb_configure(void)
|
||||
temp_tlb_entry = current_cpu_data.tlbsize - 1;
|
||||
|
||||
/* From this point on the ARC firmware is dead. */
|
||||
local_flush_tlb_all();
|
||||
r4k_tlb_uniquify();
|
||||
|
||||
/* Did I tell you that ARC SUCKS? */
|
||||
}
|
||||
|
||||
@@ -254,7 +254,6 @@ CONFIG_NET_SCH_DSMARK=m
|
||||
CONFIG_NET_SCH_NETEM=m
|
||||
CONFIG_NET_SCH_INGRESS=m
|
||||
CONFIG_NET_CLS_BASIC=m
|
||||
CONFIG_NET_CLS_TCINDEX=m
|
||||
CONFIG_NET_CLS_ROUTE4=m
|
||||
CONFIG_NET_CLS_FW=m
|
||||
CONFIG_NET_CLS_U32=m
|
||||
|
||||
@@ -1130,6 +1130,7 @@ int eeh_unfreeze_pe(struct eeh_pe *pe)
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(eeh_unfreeze_pe);
|
||||
|
||||
|
||||
static struct pci_device_id eeh_reset_ids[] = {
|
||||
|
||||
@@ -257,13 +257,12 @@ static void eeh_pe_report_edev(struct eeh_dev *edev, eeh_report_fn fn,
|
||||
struct pci_driver *driver;
|
||||
enum pci_ers_result new_result;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pdev = edev->pdev;
|
||||
if (pdev)
|
||||
get_device(&pdev->dev);
|
||||
pci_unlock_rescan_remove();
|
||||
if (!pdev) {
|
||||
eeh_edev_info(edev, "no device");
|
||||
*result = PCI_ERS_RESULT_DISCONNECT;
|
||||
return;
|
||||
}
|
||||
device_lock(&pdev->dev);
|
||||
@@ -304,8 +303,9 @@ static void eeh_pe_report(const char *name, struct eeh_pe *root,
|
||||
struct eeh_dev *edev, *tmp;
|
||||
|
||||
pr_info("EEH: Beginning: '%s'\n", name);
|
||||
eeh_for_each_pe(root, pe) eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
eeh_for_each_pe(root, pe)
|
||||
eeh_pe_for_each_dev(pe, edev, tmp)
|
||||
eeh_pe_report_edev(edev, fn, result);
|
||||
if (result)
|
||||
pr_info("EEH: Finished:'%s' with aggregate recovery state:'%s'\n",
|
||||
name, pci_ers_result_name(*result));
|
||||
@@ -383,6 +383,8 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (!edev)
|
||||
return;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/*
|
||||
* The content in the config space isn't saved because
|
||||
* the blocked config space on some adapters. We have
|
||||
@@ -393,14 +395,19 @@ static void eeh_dev_restore_state(struct eeh_dev *edev, void *userdata)
|
||||
if (list_is_last(&edev->entry, &edev->pe->edevs))
|
||||
eeh_pe_restore_bars(edev->pe);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = eeh_dev_to_pci_dev(edev);
|
||||
if (!pdev)
|
||||
if (!pdev) {
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
pci_restore_state(pdev);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -647,9 +654,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (any_passed || driver_eeh_aware || (pe->type & EEH_PE_VF)) {
|
||||
eeh_pe_dev_traverse(pe, eeh_rmv_device, rmv_data);
|
||||
} else {
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -665,8 +670,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
/* Restore PE */
|
||||
eeh_ops->configure_bridge(pe);
|
||||
eeh_pe_restore_bars(pe);
|
||||
@@ -674,7 +677,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
/* Clear frozen state */
|
||||
rc = eeh_clear_pe_frozen_state(pe, false);
|
||||
if (rc) {
|
||||
pci_unlock_rescan_remove();
|
||||
return rc;
|
||||
}
|
||||
|
||||
@@ -709,7 +711,6 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
|
||||
pe->tstamp = tstamp;
|
||||
pe->freeze_count = cnt;
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -843,10 +844,13 @@ void eeh_handle_normal_event(struct eeh_pe *pe)
|
||||
{LIST_HEAD_INIT(rmv_data.removed_vf_list), 0};
|
||||
int devices = 0;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (!bus) {
|
||||
pr_err("%s: Cannot find PCI bus for PHB#%x-PE#%x\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1085,10 +1089,15 @@ recover_failed:
|
||||
eeh_pe_state_clear(pe, EEH_PE_PRI_BUS, true);
|
||||
eeh_pe_dev_mode_mark(pe, EEH_DEV_REMOVED);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
pci_hp_remove_devices(bus);
|
||||
pci_unlock_rescan_remove();
|
||||
bus = eeh_pe_bus_get(pe);
|
||||
if (bus)
|
||||
pci_hp_remove_devices(bus);
|
||||
else
|
||||
pr_err("%s: PCI bus for PHB#%x-PE#%x disappeared\n",
|
||||
__func__, pe->phb->global_number, pe->addr);
|
||||
|
||||
/* The passed PE should no longer be used */
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1105,6 +1114,8 @@ out:
|
||||
eeh_clear_slot_attention(edev->pdev);
|
||||
|
||||
eeh_pe_state_clear(pe, EEH_PE_RECOVERING, true);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1123,6 +1134,7 @@ void eeh_handle_special_event(void)
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
|
||||
do {
|
||||
rc = eeh_ops->next_error(&pe);
|
||||
@@ -1162,10 +1174,12 @@ void eeh_handle_special_event(void)
|
||||
|
||||
break;
|
||||
case EEH_NEXT_ERR_NONE:
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
default:
|
||||
pr_warn("%s: Invalid value %d from next_error()\n",
|
||||
__func__, rc);
|
||||
pci_unlock_rescan_remove();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1177,7 +1191,9 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_FROZEN_PE ||
|
||||
rc == EEH_NEXT_ERR_FENCED_PHB) {
|
||||
eeh_pe_state_mark(pe, EEH_PE_RECOVERING);
|
||||
pci_unlock_rescan_remove();
|
||||
eeh_handle_normal_event(pe);
|
||||
pci_lock_rescan_remove();
|
||||
} else {
|
||||
eeh_for_each_pe(pe, tmp_pe)
|
||||
eeh_pe_for_each_dev(tmp_pe, edev, tmp_edev)
|
||||
@@ -1190,7 +1206,6 @@ void eeh_handle_special_event(void)
|
||||
eeh_report_failure, NULL);
|
||||
eeh_set_channel_state(pe, pci_channel_io_perm_failure);
|
||||
|
||||
pci_lock_rescan_remove();
|
||||
list_for_each_entry(hose, &hose_list, list_node) {
|
||||
phb_pe = eeh_phb_pe_get(hose);
|
||||
if (!phb_pe ||
|
||||
@@ -1209,7 +1224,6 @@ void eeh_handle_special_event(void)
|
||||
}
|
||||
pci_hp_remove_devices(bus);
|
||||
}
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1219,4 +1233,6 @@ void eeh_handle_special_event(void)
|
||||
if (rc == EEH_NEXT_ERR_DEAD_IOC)
|
||||
break;
|
||||
} while (rc != EEH_NEXT_ERR_NONE);
|
||||
|
||||
pci_unlock_rescan_remove();
|
||||
}
|
||||
|
||||
@@ -671,10 +671,12 @@ static void eeh_bridge_check_link(struct eeh_dev *edev)
|
||||
eeh_ops->write_config(edev, cap + PCI_EXP_LNKCTL, 2, val);
|
||||
|
||||
/* Check link */
|
||||
if (!edev->pdev->link_active_reporting) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability\n");
|
||||
msleep(1000);
|
||||
return;
|
||||
if (edev->pdev) {
|
||||
if (!edev->pdev->link_active_reporting) {
|
||||
eeh_edev_dbg(edev, "No link reporting capability\n");
|
||||
msleep(1000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait the link is up until timeout (5s) */
|
||||
|
||||
@@ -111,6 +111,9 @@ void pci_hp_add_devices(struct pci_bus *bus)
|
||||
struct pci_controller *phb;
|
||||
struct device_node *dn = pci_bus_to_OF_node(bus);
|
||||
|
||||
if (!dn)
|
||||
return;
|
||||
|
||||
phb = pci_bus_to_host(bus);
|
||||
|
||||
mode = PCI_PROBE_NORMAL;
|
||||
|
||||
@@ -103,16 +103,16 @@ UTS_MACHINE := sh
|
||||
LDFLAGS_vmlinux += -e _stext
|
||||
|
||||
ifdef CONFIG_CPU_LITTLE_ENDIAN
|
||||
ld-bfd := elf32-sh-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld-bfd)
|
||||
ld_bfd := elf32-sh-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64 --oformat $(ld_bfd)
|
||||
KBUILD_LDFLAGS += -EL
|
||||
else
|
||||
ld-bfd := elf32-shbig-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld-bfd)
|
||||
ld_bfd := elf32-shbig-linux
|
||||
LDFLAGS_vmlinux += --defsym jiffies=jiffies_64+4 --oformat $(ld_bfd)
|
||||
KBUILD_LDFLAGS += -EB
|
||||
endif
|
||||
|
||||
export ld-bfd
|
||||
export ld_bfd
|
||||
|
||||
# Mach groups
|
||||
machdir-$(CONFIG_SOLUTION_ENGINE) += mach-se
|
||||
|
||||
@@ -29,7 +29,7 @@ endif
|
||||
|
||||
ccflags-remove-$(CONFIG_MCOUNT) += -pg
|
||||
|
||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
||||
LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(IMAGE_OFFSET) -e startup \
|
||||
-T $(obj)/../../kernel/vmlinux.lds
|
||||
|
||||
KBUILD_CFLAGS += -DDISABLE_BRANCH_PROFILING
|
||||
@@ -53,7 +53,7 @@ $(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
|
||||
|
||||
OBJCOPYFLAGS += -R .empty_zero_page
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/vmlinux.bin.$(suffix_y) FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
@@ -13,7 +13,7 @@ mmcif-obj-$(CONFIG_CPU_SUBTYPE_SH7724) := $(obj)/mmcif-sh7724.o
|
||||
load-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-load-y)
|
||||
obj-$(CONFIG_ROMIMAGE_MMCIF) := $(mmcif-obj-y)
|
||||
|
||||
LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(load-y) -e romstart \
|
||||
LDFLAGS_vmlinux := --oformat $(ld_bfd) -Ttext $(load-y) -e romstart \
|
||||
-T $(obj)/../../kernel/vmlinux.lds
|
||||
|
||||
$(obj)/vmlinux: $(obj)/head.o $(obj-y) $(obj)/piggy.o FORCE
|
||||
@@ -24,7 +24,7 @@ OBJCOPYFLAGS += -j .empty_zero_page
|
||||
$(obj)/zeropage.bin: vmlinux FORCE
|
||||
$(call if_changed,objcopy)
|
||||
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T
|
||||
LDFLAGS_piggy.o := -r --format binary --oformat $(ld_bfd) -T
|
||||
|
||||
$(obj)/piggy.o: $(obj)/vmlinux.scr $(obj)/zeropage.bin arch/sh/boot/zImage FORCE
|
||||
$(call if_changed,ld)
|
||||
|
||||
@@ -28,7 +28,7 @@ int uml_rtc_start(bool timetravel)
|
||||
int err;
|
||||
|
||||
if (timetravel) {
|
||||
int err = os_pipe(uml_rtc_irq_fds, 1, 1);
|
||||
err = os_pipe(uml_rtc_irq_fds, 1, 1);
|
||||
if (err)
|
||||
goto fail;
|
||||
} else {
|
||||
|
||||
@@ -165,6 +165,13 @@ static void __page_state_change(unsigned long paddr, enum psc_op op)
|
||||
*/
|
||||
if (op == SNP_PAGE_STATE_PRIVATE && pvalidate(paddr, RMP_PG_SIZE_4K, 1))
|
||||
sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PVALIDATE);
|
||||
|
||||
/*
|
||||
* If validating memory (making it private) and affected by the
|
||||
* cache-coherency vulnerability, perform the cache eviction mitigation.
|
||||
*/
|
||||
if (op == SNP_PAGE_STATE_PRIVATE && !has_cpuflag(X86_FEATURE_COHERENCY_SFW_NO))
|
||||
sev_evict_cache((void *)paddr, 1);
|
||||
}
|
||||
|
||||
void snp_set_page_private(unsigned long paddr)
|
||||
|
||||
@@ -115,5 +115,18 @@ void get_cpuflags(void)
|
||||
cpuid(0x80000001, &ignored, &ignored, &cpu.flags[6],
|
||||
&cpu.flags[1]);
|
||||
}
|
||||
|
||||
if (max_amd_level >= 0x8000001f) {
|
||||
u32 ebx;
|
||||
|
||||
/*
|
||||
* The X86_FEATURE_COHERENCY_SFW_NO feature bit is in
|
||||
* the virtualization flags entry (word 8) and set by
|
||||
* scattered.c, so the bit needs to be explicitly set.
|
||||
*/
|
||||
cpuid(0x8000001f, &ignored, &ebx, &ignored, &ignored);
|
||||
if (ebx & BIT(31))
|
||||
set_bit(X86_FEATURE_COHERENCY_SFW_NO, cpu.flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,6 +228,7 @@
|
||||
#define X86_FEATURE_FLEXPRIORITY ( 8*32+ 1) /* Intel FlexPriority */
|
||||
#define X86_FEATURE_EPT ( 8*32+ 2) /* Intel Extended Page Table */
|
||||
#define X86_FEATURE_VPID ( 8*32+ 3) /* Intel Virtual Processor ID */
|
||||
#define X86_FEATURE_COHERENCY_SFW_NO ( 8*32+ 4) /* "" SNP cache coherency software work around not needed */
|
||||
|
||||
#define X86_FEATURE_VMMCALL ( 8*32+15) /* Prefer VMMCALL to VMCALL */
|
||||
#define X86_FEATURE_XENPV ( 8*32+16) /* "" Xen paravirtual guest */
|
||||
|
||||
@@ -46,6 +46,7 @@ static const struct cpuid_bit cpuid_bits[] = {
|
||||
{ X86_FEATURE_CPB, CPUID_EDX, 9, 0x80000007, 0 },
|
||||
{ X86_FEATURE_PROC_FEEDBACK, CPUID_EDX, 11, 0x80000007, 0 },
|
||||
{ X86_FEATURE_MBA, CPUID_EBX, 6, 0x80000008, 0 },
|
||||
{ X86_FEATURE_COHERENCY_SFW_NO, CPUID_EBX, 31, 0x8000001f, 0 },
|
||||
{ X86_FEATURE_SMBA, CPUID_EBX, 2, 0x80000020, 0 },
|
||||
{ X86_FEATURE_BMEC, CPUID_EBX, 3, 0x80000020, 0 },
|
||||
{ X86_FEATURE_TSA_SQ_NO, CPUID_ECX, 1, 0x80000021, 0 },
|
||||
|
||||
@@ -1068,6 +1068,24 @@ static void __head setup_cpuid_table(const struct cc_blob_sev_info *cc_info)
|
||||
}
|
||||
}
|
||||
|
||||
static inline void sev_evict_cache(void *va, int npages)
|
||||
{
|
||||
volatile u8 val __always_unused;
|
||||
u8 *bytes = va;
|
||||
int page_idx;
|
||||
|
||||
/*
|
||||
* For SEV guests, a read from the first/last cache-lines of a 4K page
|
||||
* using the guest key is sufficient to cause a flush of all cache-lines
|
||||
* associated with that 4K page without incurring all the overhead of a
|
||||
* full CLFLUSH sequence.
|
||||
*/
|
||||
for (page_idx = 0; page_idx < npages; page_idx++) {
|
||||
val = bytes[page_idx * PAGE_SIZE];
|
||||
val = bytes[page_idx * PAGE_SIZE + PAGE_SIZE - 1];
|
||||
}
|
||||
}
|
||||
|
||||
static void pvalidate_pages(struct snp_psc_desc *desc)
|
||||
{
|
||||
struct psc_entry *e;
|
||||
@@ -1100,6 +1118,24 @@ static void pvalidate_pages(struct snp_psc_desc *desc)
|
||||
sev_es_terminate(SEV_TERM_SET_LINUX, GHCB_TERM_PVALIDATE);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If not affected by the cache-coherency vulnerability there is no need
|
||||
* to perform the cache eviction mitigation.
|
||||
*/
|
||||
if (cpu_feature_enabled(X86_FEATURE_COHERENCY_SFW_NO))
|
||||
return;
|
||||
|
||||
for (i = 0; i <= desc->hdr.end_entry; i++) {
|
||||
e = &desc->entries[i];
|
||||
|
||||
/*
|
||||
* If validating memory (making it private) perform the cache
|
||||
* eviction mitigation.
|
||||
*/
|
||||
if (e->operation == SNP_PAGE_STATE_PRIVATE)
|
||||
sev_evict_cache(pfn_to_kaddr(e->gfn), e->pagesize ? 512 : 1);
|
||||
}
|
||||
}
|
||||
|
||||
static int vmgexit_psc(struct ghcb *ghcb, struct snp_psc_desc *desc)
|
||||
|
||||
@@ -688,12 +688,14 @@ static void __head
|
||||
early_set_pages_state(unsigned long vaddr, unsigned long paddr,
|
||||
unsigned long npages, enum psc_op op)
|
||||
{
|
||||
unsigned long paddr_end;
|
||||
unsigned long vaddr_begin, paddr_end;
|
||||
u64 val;
|
||||
int ret;
|
||||
|
||||
vaddr = vaddr & PAGE_MASK;
|
||||
|
||||
vaddr_begin = vaddr;
|
||||
|
||||
paddr = paddr & PAGE_MASK;
|
||||
paddr_end = paddr + (npages << PAGE_SHIFT);
|
||||
|
||||
@@ -736,6 +738,13 @@ early_set_pages_state(unsigned long vaddr, unsigned long paddr,
|
||||
paddr += PAGE_SIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* If validating memory (making it private) and affected by the
|
||||
* cache-coherency vulnerability, perform the cache eviction mitigation.
|
||||
*/
|
||||
if (op == SNP_PAGE_STATE_PRIVATE && !cpu_feature_enabled(X86_FEATURE_COHERENCY_SFW_NO))
|
||||
sev_evict_cache((void *)vaddr_begin, npages);
|
||||
|
||||
return;
|
||||
|
||||
e_term:
|
||||
|
||||
@@ -121,13 +121,12 @@ static bool ex_handler_sgx(const struct exception_table_entry *fixup,
|
||||
static bool ex_handler_fprestore(const struct exception_table_entry *fixup,
|
||||
struct pt_regs *regs)
|
||||
{
|
||||
regs->ip = ex_fixup_addr(fixup);
|
||||
|
||||
WARN_ONCE(1, "Bad FPU state detected at %pB, reinitializing FPU registers.",
|
||||
(void *)instruction_pointer(regs));
|
||||
|
||||
fpu_reset_from_exception_fixup();
|
||||
return true;
|
||||
|
||||
return ex_handler_default(fixup, regs);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -2030,7 +2030,7 @@ static void ublk_deinit_queues(struct ublk_device *ub)
|
||||
|
||||
for (i = 0; i < nr_queues; i++)
|
||||
ublk_deinit_queue(ub, i);
|
||||
kfree(ub->__queues);
|
||||
kvfree(ub->__queues);
|
||||
}
|
||||
|
||||
static int ublk_init_queues(struct ublk_device *ub)
|
||||
@@ -2041,7 +2041,7 @@ static int ublk_init_queues(struct ublk_device *ub)
|
||||
int i, ret = -ENOMEM;
|
||||
|
||||
ub->queue_size = ubq_size;
|
||||
ub->__queues = kcalloc(nr_queues, ubq_size, GFP_KERNEL);
|
||||
ub->__queues = kvcalloc(nr_queues, ubq_size, GFP_KERNEL);
|
||||
if (!ub->__queues)
|
||||
return ret;
|
||||
|
||||
|
||||
@@ -508,6 +508,10 @@ static const struct usb_device_id quirks_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3549), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Realtek 8851BU Bluetooth devices */
|
||||
{ USB_DEVICE(0x3625, 0x010b), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Realtek 8852AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0bda, 0x2852), .driver_info = BTUSB_REALTEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
@@ -142,7 +142,9 @@ static int mtk_rng_probe(struct platform_device *pdev)
|
||||
dev_set_drvdata(&pdev->dev, priv);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, RNG_AUTOSUSPEND_TIMEOUT);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
devm_pm_runtime_enable(&pdev->dev);
|
||||
ret = devm_pm_runtime_enable(&pdev->dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
dev_info(&pdev->dev, "registered RNG driver\n");
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ static const struct axi_clkgen_limits axi_clkgen_zynqmp_default_limits = {
|
||||
|
||||
static const struct axi_clkgen_limits axi_clkgen_zynq_default_limits = {
|
||||
.fpfd_min = 10000,
|
||||
.fpfd_max = 300000,
|
||||
.fpfd_max = 450000,
|
||||
.fvco_min = 600000,
|
||||
.fvco_max = 1200000,
|
||||
};
|
||||
|
||||
@@ -278,6 +278,11 @@ davinci_lpsc_clk_register(struct device *dev, const char *name,
|
||||
|
||||
lpsc->pm_domain.name = devm_kasprintf(dev, GFP_KERNEL, "%s: %s",
|
||||
best_dev_name(dev), name);
|
||||
if (!lpsc->pm_domain.name) {
|
||||
clk_hw_unregister(&lpsc->hw);
|
||||
kfree(lpsc);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
}
|
||||
lpsc->pm_domain.attach_dev = davinci_psc_genpd_attach_dev;
|
||||
lpsc->pm_domain.detach_dev = davinci_psc_genpd_detach_dev;
|
||||
lpsc->pm_domain.flags = GENPD_FLAG_PM_CLK;
|
||||
|
||||
@@ -347,8 +347,7 @@ static SUNXI_CCU_GATE(dram_ohci_clk, "dram-ohci", "dram",
|
||||
|
||||
static const char * const de_parents[] = { "pll-video", "pll-periph0" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(de_clk, "de", de_parents,
|
||||
0x104, 0, 4, 24, 2, BIT(31),
|
||||
CLK_SET_RATE_PARENT);
|
||||
0x104, 0, 4, 24, 3, BIT(31), 0);
|
||||
|
||||
static const char * const tcon_parents[] = { "pll-video" };
|
||||
static SUNXI_CCU_M_WITH_MUX_GATE(tcon_clk, "tcon", tcon_parents,
|
||||
|
||||
@@ -587,8 +587,8 @@ static void xvcu_unregister_clock_provider(struct xvcu_device *xvcu)
|
||||
xvcu_clk_hw_unregister_leaf(hws[CLK_XVCU_ENC_MCU]);
|
||||
if (!IS_ERR_OR_NULL(hws[CLK_XVCU_ENC_CORE]))
|
||||
xvcu_clk_hw_unregister_leaf(hws[CLK_XVCU_ENC_CORE]);
|
||||
|
||||
clk_hw_unregister_fixed_factor(xvcu->pll_post);
|
||||
if (!IS_ERR_OR_NULL(xvcu->pll_post))
|
||||
clk_hw_unregister_fixed_factor(xvcu->pll_post);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1287,6 +1287,8 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
goto err_free_real_cpus;
|
||||
}
|
||||
|
||||
init_rwsem(&policy->rwsem);
|
||||
|
||||
freq_constraints_init(&policy->constraints);
|
||||
|
||||
policy->nb_min.notifier_call = cpufreq_notifier_min;
|
||||
@@ -1309,7 +1311,6 @@ static struct cpufreq_policy *cpufreq_policy_alloc(unsigned int cpu)
|
||||
}
|
||||
|
||||
INIT_LIST_HEAD(&policy->policy_list);
|
||||
init_rwsem(&policy->rwsem);
|
||||
spin_lock_init(&policy->transition_lock);
|
||||
init_waitqueue_head(&policy->transition_wait);
|
||||
INIT_WORK(&policy->update, handle_update);
|
||||
@@ -2938,15 +2939,6 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
||||
cpufreq_driver = driver_data;
|
||||
write_unlock_irqrestore(&cpufreq_driver_lock, flags);
|
||||
|
||||
/*
|
||||
* Mark support for the scheduler's frequency invariance engine for
|
||||
* drivers that implement target(), target_index() or fast_switch().
|
||||
*/
|
||||
if (!cpufreq_driver->setpolicy) {
|
||||
static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
|
||||
pr_debug("supports frequency invariance");
|
||||
}
|
||||
|
||||
if (driver_data->setpolicy)
|
||||
driver_data->flags |= CPUFREQ_CONST_LOOPS;
|
||||
|
||||
@@ -2977,6 +2969,15 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
|
||||
hp_online = ret;
|
||||
ret = 0;
|
||||
|
||||
/*
|
||||
* Mark support for the scheduler's frequency invariance engine for
|
||||
* drivers that implement target(), target_index() or fast_switch().
|
||||
*/
|
||||
if (!cpufreq_driver->setpolicy) {
|
||||
static_branch_enable_cpuslocked(&cpufreq_freq_invariance);
|
||||
pr_debug("supports frequency invariance");
|
||||
}
|
||||
|
||||
pr_debug("driver %s up and running\n", driver_data->name);
|
||||
goto out;
|
||||
|
||||
|
||||
@@ -2902,8 +2902,8 @@ static int intel_cpufreq_update_pstate(struct cpufreq_policy *policy,
|
||||
int max_pstate = policy->strict_target ?
|
||||
target_pstate : cpu->max_perf_ratio;
|
||||
|
||||
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate, 0,
|
||||
fast_switch);
|
||||
intel_cpufreq_hwp_update(cpu, target_pstate, max_pstate,
|
||||
target_pstate, fast_switch);
|
||||
} else if (target_pstate != old_pstate) {
|
||||
intel_cpufreq_perf_ctl_update(cpu, target_pstate, fast_switch);
|
||||
}
|
||||
|
||||
@@ -265,8 +265,8 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req
|
||||
}
|
||||
|
||||
chan->timeout = areq->cryptlen;
|
||||
rctx->nr_sgs = nr_sgs;
|
||||
rctx->nr_sgd = nr_sgd;
|
||||
rctx->nr_sgs = ns;
|
||||
rctx->nr_sgd = nd;
|
||||
return 0;
|
||||
|
||||
theend_sgs:
|
||||
|
||||
@@ -319,5 +319,8 @@ void ccp5_debugfs_setup(struct ccp_device *ccp)
|
||||
|
||||
void ccp5_debugfs_destroy(void)
|
||||
{
|
||||
mutex_lock(&ccp_debugfs_lock);
|
||||
debugfs_remove_recursive(ccp_debugfs_dir);
|
||||
ccp_debugfs_dir = NULL;
|
||||
mutex_unlock(&ccp_debugfs_lock);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ static int img_hash_write_via_dma_stop(struct img_hash_dev *hdev)
|
||||
struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
|
||||
|
||||
if (ctx->flags & DRIVER_FLAGS_SG)
|
||||
dma_unmap_sg(hdev->dev, ctx->sg, ctx->dma_ct, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(hdev->dev, ctx->sg, 1, DMA_TO_DEVICE);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -249,7 +249,9 @@ static int safexcel_handle_req_result(struct safexcel_crypto_priv *priv,
|
||||
safexcel_complete(priv, ring);
|
||||
|
||||
if (sreq->nents) {
|
||||
dma_unmap_sg(priv->dev, areq->src, sreq->nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(priv->dev, areq->src,
|
||||
sg_nents_for_len(areq->src, areq->nbytes),
|
||||
DMA_TO_DEVICE);
|
||||
sreq->nents = 0;
|
||||
}
|
||||
|
||||
@@ -497,7 +499,9 @@ unmap_result:
|
||||
DMA_FROM_DEVICE);
|
||||
unmap_sg:
|
||||
if (req->nents) {
|
||||
dma_unmap_sg(priv->dev, areq->src, req->nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(priv->dev, areq->src,
|
||||
sg_nents_for_len(areq->src, areq->nbytes),
|
||||
DMA_TO_DEVICE);
|
||||
req->nents = 0;
|
||||
}
|
||||
cdesc_rollback:
|
||||
|
||||
@@ -68,6 +68,7 @@ struct ocs_hcu_ctx {
|
||||
* @sg_data_total: Total data in the SG list at any time.
|
||||
* @sg_data_offset: Offset into the data of the current individual SG node.
|
||||
* @sg_dma_nents: Number of sg entries mapped in dma_list.
|
||||
* @nents: Number of entries in the scatterlist.
|
||||
*/
|
||||
struct ocs_hcu_rctx {
|
||||
struct ocs_hcu_dev *hcu_dev;
|
||||
@@ -91,6 +92,7 @@ struct ocs_hcu_rctx {
|
||||
unsigned int sg_data_total;
|
||||
unsigned int sg_data_offset;
|
||||
unsigned int sg_dma_nents;
|
||||
unsigned int nents;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -199,7 +201,7 @@ static void kmb_ocs_hcu_dma_cleanup(struct ahash_request *req,
|
||||
|
||||
/* Unmap req->src (if mapped). */
|
||||
if (rctx->sg_dma_nents) {
|
||||
dma_unmap_sg(dev, req->src, rctx->sg_dma_nents, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(dev, req->src, rctx->nents, DMA_TO_DEVICE);
|
||||
rctx->sg_dma_nents = 0;
|
||||
}
|
||||
|
||||
@@ -260,6 +262,10 @@ static int kmb_ocs_dma_prepare(struct ahash_request *req)
|
||||
rc = -ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
/* Save the value of nents to pass to dma_unmap_sg. */
|
||||
rctx->nents = nents;
|
||||
|
||||
/*
|
||||
* The value returned by dma_map_sg() can be < nents; so update
|
||||
* nents accordingly.
|
||||
|
||||
@@ -31,8 +31,10 @@ static void *adf_ring_next(struct seq_file *sfile, void *v, loff_t *pos)
|
||||
struct adf_etr_ring_data *ring = sfile->private;
|
||||
|
||||
if (*pos >= (ADF_SIZE_TO_RING_SIZE_IN_BYTES(ring->ring_size) /
|
||||
ADF_MSG_SIZE_TO_BYTES(ring->msg_size)))
|
||||
ADF_MSG_SIZE_TO_BYTES(ring->msg_size))) {
|
||||
(*pos)++;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return ring->base_addr +
|
||||
(ADF_MSG_SIZE_TO_BYTES(ring->msg_size) * (*pos)++);
|
||||
|
||||
@@ -38,7 +38,7 @@ void qat_bl_free_bufl(struct adf_accel_dev *accel_dev,
|
||||
for (i = 0; i < blout->num_mapped_bufs; i++) {
|
||||
dma_unmap_single(dev, blout->buffers[i].addr,
|
||||
blout->buffers[i].len,
|
||||
DMA_FROM_DEVICE);
|
||||
DMA_BIDIRECTIONAL);
|
||||
}
|
||||
dma_unmap_single(dev, blpout, sz_out, DMA_TO_DEVICE);
|
||||
|
||||
@@ -160,7 +160,7 @@ static int __qat_bl_sgl_to_bufl(struct adf_accel_dev *accel_dev,
|
||||
}
|
||||
buffers[y].addr = dma_map_single(dev, sg_virt(sg) + left,
|
||||
sg->length - left,
|
||||
DMA_FROM_DEVICE);
|
||||
DMA_BIDIRECTIONAL);
|
||||
if (unlikely(dma_mapping_error(dev, buffers[y].addr)))
|
||||
goto err_out;
|
||||
buffers[y].len = sg->length;
|
||||
@@ -202,7 +202,7 @@ err_out:
|
||||
if (!dma_mapping_error(dev, buflout->buffers[i].addr))
|
||||
dma_unmap_single(dev, buflout->buffers[i].addr,
|
||||
buflout->buffers[i].len,
|
||||
DMA_FROM_DEVICE);
|
||||
DMA_BIDIRECTIONAL);
|
||||
}
|
||||
|
||||
if (!buf->sgl_dst_valid)
|
||||
|
||||
@@ -197,7 +197,7 @@ static int qat_compression_alloc_dc_data(struct adf_accel_dev *accel_dev)
|
||||
struct adf_dc_data *dc_data = NULL;
|
||||
u8 *obuff = NULL;
|
||||
|
||||
dc_data = devm_kzalloc(dev, sizeof(*dc_data), GFP_KERNEL);
|
||||
dc_data = kzalloc_node(sizeof(*dc_data), GFP_KERNEL, dev_to_node(dev));
|
||||
if (!dc_data)
|
||||
goto err;
|
||||
|
||||
@@ -205,7 +205,7 @@ static int qat_compression_alloc_dc_data(struct adf_accel_dev *accel_dev)
|
||||
if (!obuff)
|
||||
goto err;
|
||||
|
||||
obuff_p = dma_map_single(dev, obuff, ovf_buff_sz, DMA_FROM_DEVICE);
|
||||
obuff_p = dma_map_single(dev, obuff, ovf_buff_sz, DMA_BIDIRECTIONAL);
|
||||
if (unlikely(dma_mapping_error(dev, obuff_p)))
|
||||
goto err;
|
||||
|
||||
@@ -233,9 +233,9 @@ static void qat_free_dc_data(struct adf_accel_dev *accel_dev)
|
||||
return;
|
||||
|
||||
dma_unmap_single(dev, dc_data->ovf_buff_p, dc_data->ovf_buff_sz,
|
||||
DMA_FROM_DEVICE);
|
||||
DMA_BIDIRECTIONAL);
|
||||
kfree_sensitive(dc_data->ovf_buff);
|
||||
devm_kfree(dev, dc_data);
|
||||
kfree(dc_data);
|
||||
accel_dev->dc_data = NULL;
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,12 @@ mv_cesa_skcipher_dma_cleanup(struct skcipher_request *req)
|
||||
static inline void mv_cesa_skcipher_cleanup(struct skcipher_request *req)
|
||||
{
|
||||
struct mv_cesa_skcipher_req *creq = skcipher_request_ctx(req);
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ)
|
||||
mv_cesa_skcipher_dma_cleanup(req);
|
||||
|
||||
atomic_sub(req->cryptlen, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_skcipher_std_step(struct skcipher_request *req)
|
||||
@@ -212,7 +215,6 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req)
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
unsigned int ivsize;
|
||||
|
||||
atomic_sub(skreq->cryptlen, &engine->load);
|
||||
ivsize = crypto_skcipher_ivsize(crypto_skcipher_reqtfm(skreq));
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ) {
|
||||
|
||||
@@ -110,9 +110,12 @@ static inline void mv_cesa_ahash_dma_cleanup(struct ahash_request *req)
|
||||
static inline void mv_cesa_ahash_cleanup(struct ahash_request *req)
|
||||
{
|
||||
struct mv_cesa_ahash_req *creq = ahash_request_ctx(req);
|
||||
struct mv_cesa_engine *engine = creq->base.engine;
|
||||
|
||||
if (mv_cesa_req_get_type(&creq->base) == CESA_DMA_REQ)
|
||||
mv_cesa_ahash_dma_cleanup(req);
|
||||
|
||||
atomic_sub(req->nbytes, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_ahash_last_cleanup(struct ahash_request *req)
|
||||
@@ -395,8 +398,6 @@ static void mv_cesa_ahash_complete(struct crypto_async_request *req)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
atomic_sub(ahashreq->nbytes, &engine->load);
|
||||
}
|
||||
|
||||
static void mv_cesa_ahash_prepare(struct crypto_async_request *req,
|
||||
|
||||
@@ -1382,15 +1382,11 @@ int devfreq_remove_governor(struct devfreq_governor *governor)
|
||||
int ret;
|
||||
struct device *dev = devfreq->dev.parent;
|
||||
|
||||
if (!devfreq->governor)
|
||||
continue;
|
||||
|
||||
if (!strncmp(devfreq->governor->name, governor->name,
|
||||
DEVFREQ_NAME_LEN)) {
|
||||
/* we should have a devfreq governor! */
|
||||
if (!devfreq->governor) {
|
||||
dev_warn(dev, "%s: Governor %s NOT present\n",
|
||||
__func__, governor->name);
|
||||
continue;
|
||||
/* Fall through */
|
||||
}
|
||||
ret = devfreq->governor->event_handler(devfreq,
|
||||
DEVFREQ_GOV_STOP, NULL);
|
||||
if (ret) {
|
||||
|
||||
@@ -1061,8 +1061,16 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
*/
|
||||
mv_chan->dummy_src_addr = dma_map_single(dma_dev->dev,
|
||||
mv_chan->dummy_src, MV_XOR_MIN_BYTE_COUNT, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(dma_dev->dev, mv_chan->dummy_src_addr))
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
mv_chan->dummy_dst_addr = dma_map_single(dma_dev->dev,
|
||||
mv_chan->dummy_dst, MV_XOR_MIN_BYTE_COUNT, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(dma_dev->dev, mv_chan->dummy_dst_addr)) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unmap_src;
|
||||
}
|
||||
|
||||
|
||||
/* allocate coherent memory for hardware descriptors
|
||||
* note: writecombine gives slightly better performance, but
|
||||
@@ -1071,8 +1079,10 @@ mv_xor_channel_add(struct mv_xor_device *xordev,
|
||||
mv_chan->dma_desc_pool_virt =
|
||||
dma_alloc_wc(&pdev->dev, MV_XOR_POOL_SIZE, &mv_chan->dma_desc_pool,
|
||||
GFP_KERNEL);
|
||||
if (!mv_chan->dma_desc_pool_virt)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
if (!mv_chan->dma_desc_pool_virt) {
|
||||
ret = -ENOMEM;
|
||||
goto err_unmap_dst;
|
||||
}
|
||||
|
||||
/* discover transaction capabilites from the platform data */
|
||||
dma_dev->cap_mask = cap_mask;
|
||||
@@ -1155,6 +1165,13 @@ err_free_irq:
|
||||
err_free_dma:
|
||||
dma_free_coherent(&pdev->dev, MV_XOR_POOL_SIZE,
|
||||
mv_chan->dma_desc_pool_virt, mv_chan->dma_desc_pool);
|
||||
err_unmap_dst:
|
||||
dma_unmap_single(dma_dev->dev, mv_chan->dummy_dst_addr,
|
||||
MV_XOR_MIN_BYTE_COUNT, DMA_TO_DEVICE);
|
||||
err_unmap_src:
|
||||
dma_unmap_single(dma_dev->dev, mv_chan->dummy_src_addr,
|
||||
MV_XOR_MIN_BYTE_COUNT, DMA_FROM_DEVICE);
|
||||
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
|
||||
@@ -711,6 +711,9 @@ static int nbpf_desc_page_alloc(struct nbpf_channel *chan)
|
||||
list_add_tail(&ldesc->node, &lhead);
|
||||
ldesc->hwdesc_dma_addr = dma_map_single(dchan->device->dev,
|
||||
hwdesc, sizeof(*hwdesc), DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(dchan->device->dev,
|
||||
ldesc->hwdesc_dma_addr))
|
||||
goto unmap_error;
|
||||
|
||||
dev_dbg(dev, "%s(): mapped 0x%p to %pad\n", __func__,
|
||||
hwdesc, &ldesc->hwdesc_dma_addr);
|
||||
@@ -737,6 +740,16 @@ static int nbpf_desc_page_alloc(struct nbpf_channel *chan)
|
||||
spin_unlock_irq(&chan->lock);
|
||||
|
||||
return ARRAY_SIZE(dpage->desc);
|
||||
|
||||
unmap_error:
|
||||
while (i--) {
|
||||
ldesc--; hwdesc--;
|
||||
|
||||
dma_unmap_single(dchan->device->dev, ldesc->hwdesc_dma_addr,
|
||||
sizeof(hwdesc), DMA_TO_DEVICE);
|
||||
}
|
||||
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
static void nbpf_desc_put(struct nbpf_desc *desc)
|
||||
|
||||
@@ -149,7 +149,7 @@ int phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
|
||||
}
|
||||
|
||||
cgs_write_register(hwmgr->device, indirect_port, index);
|
||||
return phm_wait_on_register(hwmgr, indirect_port + 1, mask, value);
|
||||
return phm_wait_on_register(hwmgr, indirect_port + 1, value, mask);
|
||||
}
|
||||
|
||||
int phm_wait_for_register_unequal(struct pp_hwmgr *hwmgr,
|
||||
|
||||
@@ -378,6 +378,7 @@ static const struct dpu_perf_cfg sc8180x_perf_data = {
|
||||
.min_core_ib = 2400000,
|
||||
.min_llcc_ib = 800000,
|
||||
.min_dram_ib = 800000,
|
||||
.min_prefill_lines = 24,
|
||||
.danger_lut_tbl = {0xf, 0xffff, 0x0},
|
||||
.safe_lut_tbl = {0xfff0, 0xf000, 0xffff},
|
||||
.qos_lut_tbl = {
|
||||
|
||||
@@ -52,16 +52,9 @@ rockchip_fb_create(struct drm_device *dev, struct drm_file *file,
|
||||
}
|
||||
|
||||
if (drm_is_afbc(mode_cmd->modifier[0])) {
|
||||
int ret, i;
|
||||
|
||||
ret = drm_gem_fb_afbc_init(dev, mode_cmd, afbc_fb);
|
||||
if (ret) {
|
||||
struct drm_gem_object **obj = afbc_fb->base.obj;
|
||||
|
||||
for (i = 0; i < info->num_planes; ++i)
|
||||
drm_gem_object_put(obj[i]);
|
||||
|
||||
kfree(afbc_fb);
|
||||
drm_framebuffer_put(&afbc_fb->base);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ int vmw_compat_shader_add(struct vmw_private *dev_priv,
|
||||
.busy_domain = VMW_BO_DOMAIN_SYS,
|
||||
.bo_type = ttm_bo_type_device,
|
||||
.size = size,
|
||||
.pin = true,
|
||||
.pin = false,
|
||||
.keep_resv = true,
|
||||
};
|
||||
|
||||
|
||||
@@ -726,10 +726,11 @@ static void stm32f7_i2c_disable_dma_req(struct stm32f7_i2c_dev *i2c_dev)
|
||||
|
||||
static void stm32f7_i2c_dma_callback(void *arg)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = (struct stm32f7_i2c_dev *)arg;
|
||||
struct stm32f7_i2c_dev *i2c_dev = arg;
|
||||
struct stm32_i2c_dma *dma = i2c_dev->dma;
|
||||
|
||||
stm32f7_i2c_disable_dma_req(i2c_dev);
|
||||
dmaengine_terminate_async(dma->chan_using);
|
||||
dma_unmap_single(i2c_dev->dev, dma->dma_buf, dma->dma_len,
|
||||
dma->dma_data_dir);
|
||||
complete(&dma->dma_complete);
|
||||
@@ -1496,17 +1497,11 @@ static irqreturn_t stm32f7_i2c_slave_isr_event(struct stm32f7_i2c_dev *i2c_dev)
|
||||
static irqreturn_t stm32f7_i2c_isr_event(int irq, void *data)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = data;
|
||||
struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg;
|
||||
struct stm32_i2c_dma *dma = i2c_dev->dma;
|
||||
void __iomem *base = i2c_dev->base;
|
||||
u32 status, mask;
|
||||
int ret = IRQ_HANDLED;
|
||||
u32 status;
|
||||
|
||||
/* Check if the interrupt if for a slave device */
|
||||
if (!i2c_dev->master_mode) {
|
||||
ret = stm32f7_i2c_slave_isr_event(i2c_dev);
|
||||
return ret;
|
||||
}
|
||||
/* Check if the interrupt is for a slave device */
|
||||
if (!i2c_dev->master_mode)
|
||||
return IRQ_WAKE_THREAD;
|
||||
|
||||
status = readl_relaxed(i2c_dev->base + STM32F7_I2C_ISR);
|
||||
|
||||
@@ -1518,18 +1513,68 @@ static irqreturn_t stm32f7_i2c_isr_event(int irq, void *data)
|
||||
if (status & STM32F7_I2C_ISR_RXNE)
|
||||
stm32f7_i2c_read_rx_data(i2c_dev);
|
||||
|
||||
/* Wake up the thread if other flags are raised */
|
||||
if (status &
|
||||
(STM32F7_I2C_ISR_NACKF | STM32F7_I2C_ISR_STOPF |
|
||||
STM32F7_I2C_ISR_TC | STM32F7_I2C_ISR_TCR))
|
||||
return IRQ_WAKE_THREAD;
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t stm32f7_i2c_isr_event_thread(int irq, void *data)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = data;
|
||||
struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg;
|
||||
void __iomem *base = i2c_dev->base;
|
||||
u32 status, mask;
|
||||
int ret;
|
||||
|
||||
if (!i2c_dev->master_mode)
|
||||
return stm32f7_i2c_slave_isr_event(i2c_dev);
|
||||
|
||||
status = readl_relaxed(i2c_dev->base + STM32F7_I2C_ISR);
|
||||
|
||||
/* NACK received */
|
||||
if (status & STM32F7_I2C_ISR_NACKF) {
|
||||
dev_dbg(i2c_dev->dev, "<%s>: Receive NACK (addr %x)\n",
|
||||
__func__, f7_msg->addr);
|
||||
writel_relaxed(STM32F7_I2C_ICR_NACKCF, base + STM32F7_I2C_ICR);
|
||||
if (i2c_dev->use_dma) {
|
||||
stm32f7_i2c_disable_dma_req(i2c_dev);
|
||||
dmaengine_terminate_async(dma->chan_using);
|
||||
}
|
||||
if (i2c_dev->use_dma)
|
||||
stm32f7_i2c_dma_callback(i2c_dev);
|
||||
f7_msg->result = -ENXIO;
|
||||
}
|
||||
|
||||
if (status & STM32F7_I2C_ISR_TCR) {
|
||||
if (f7_msg->smbus)
|
||||
stm32f7_i2c_smbus_reload(i2c_dev);
|
||||
else
|
||||
stm32f7_i2c_reload(i2c_dev);
|
||||
}
|
||||
|
||||
/* Transfer complete */
|
||||
if (status & STM32F7_I2C_ISR_TC) {
|
||||
/* Wait for dma transfer completion before sending next message */
|
||||
if (i2c_dev->use_dma && !f7_msg->result) {
|
||||
ret = wait_for_completion_timeout(&i2c_dev->dma->dma_complete, HZ);
|
||||
if (!ret) {
|
||||
dev_dbg(i2c_dev->dev, "<%s>: Timed out\n", __func__);
|
||||
stm32f7_i2c_dma_callback(i2c_dev);
|
||||
f7_msg->result = -ETIMEDOUT;
|
||||
}
|
||||
}
|
||||
if (f7_msg->stop) {
|
||||
mask = STM32F7_I2C_CR2_STOP;
|
||||
stm32f7_i2c_set_bits(base + STM32F7_I2C_CR2, mask);
|
||||
} else if (f7_msg->smbus) {
|
||||
stm32f7_i2c_smbus_rep_start(i2c_dev);
|
||||
} else {
|
||||
i2c_dev->msg_id++;
|
||||
i2c_dev->msg++;
|
||||
stm32f7_i2c_xfer_msg(i2c_dev, i2c_dev->msg);
|
||||
}
|
||||
}
|
||||
|
||||
/* STOP detection flag */
|
||||
if (status & STM32F7_I2C_ISR_STOPF) {
|
||||
/* Disable interrupts */
|
||||
@@ -1542,71 +1587,6 @@ static irqreturn_t stm32f7_i2c_isr_event(int irq, void *data)
|
||||
/* Clear STOP flag */
|
||||
writel_relaxed(STM32F7_I2C_ICR_STOPCF, base + STM32F7_I2C_ICR);
|
||||
|
||||
if (i2c_dev->use_dma && !f7_msg->result) {
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
} else {
|
||||
i2c_dev->master_mode = false;
|
||||
complete(&i2c_dev->complete);
|
||||
}
|
||||
}
|
||||
|
||||
/* Transfer complete */
|
||||
if (status & STM32F7_I2C_ISR_TC) {
|
||||
if (f7_msg->stop) {
|
||||
mask = STM32F7_I2C_CR2_STOP;
|
||||
stm32f7_i2c_set_bits(base + STM32F7_I2C_CR2, mask);
|
||||
} else if (i2c_dev->use_dma && !f7_msg->result) {
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
} else if (f7_msg->smbus) {
|
||||
stm32f7_i2c_smbus_rep_start(i2c_dev);
|
||||
} else {
|
||||
i2c_dev->msg_id++;
|
||||
i2c_dev->msg++;
|
||||
stm32f7_i2c_xfer_msg(i2c_dev, i2c_dev->msg);
|
||||
}
|
||||
}
|
||||
|
||||
if (status & STM32F7_I2C_ISR_TCR) {
|
||||
if (f7_msg->smbus)
|
||||
stm32f7_i2c_smbus_reload(i2c_dev);
|
||||
else
|
||||
stm32f7_i2c_reload(i2c_dev);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static irqreturn_t stm32f7_i2c_isr_event_thread(int irq, void *data)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = data;
|
||||
struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg;
|
||||
struct stm32_i2c_dma *dma = i2c_dev->dma;
|
||||
u32 status;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Wait for dma transfer completion before sending next message or
|
||||
* notity the end of xfer to the client
|
||||
*/
|
||||
ret = wait_for_completion_timeout(&i2c_dev->dma->dma_complete, HZ);
|
||||
if (!ret) {
|
||||
dev_dbg(i2c_dev->dev, "<%s>: Timed out\n", __func__);
|
||||
stm32f7_i2c_disable_dma_req(i2c_dev);
|
||||
dmaengine_terminate_async(dma->chan_using);
|
||||
f7_msg->result = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
status = readl_relaxed(i2c_dev->base + STM32F7_I2C_ISR);
|
||||
|
||||
if (status & STM32F7_I2C_ISR_TC) {
|
||||
if (f7_msg->smbus) {
|
||||
stm32f7_i2c_smbus_rep_start(i2c_dev);
|
||||
} else {
|
||||
i2c_dev->msg_id++;
|
||||
i2c_dev->msg++;
|
||||
stm32f7_i2c_xfer_msg(i2c_dev, i2c_dev->msg);
|
||||
}
|
||||
} else {
|
||||
i2c_dev->master_mode = false;
|
||||
complete(&i2c_dev->complete);
|
||||
}
|
||||
@@ -1614,21 +1594,20 @@ static irqreturn_t stm32f7_i2c_isr_event_thread(int irq, void *data)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static irqreturn_t stm32f7_i2c_isr_error(int irq, void *data)
|
||||
static irqreturn_t stm32f7_i2c_isr_error_thread(int irq, void *data)
|
||||
{
|
||||
struct stm32f7_i2c_dev *i2c_dev = data;
|
||||
struct stm32f7_i2c_msg *f7_msg = &i2c_dev->f7_msg;
|
||||
u16 addr = f7_msg->addr;
|
||||
void __iomem *base = i2c_dev->base;
|
||||
struct device *dev = i2c_dev->dev;
|
||||
struct stm32_i2c_dma *dma = i2c_dev->dma;
|
||||
u32 status;
|
||||
|
||||
status = readl_relaxed(i2c_dev->base + STM32F7_I2C_ISR);
|
||||
|
||||
/* Bus error */
|
||||
if (status & STM32F7_I2C_ISR_BERR) {
|
||||
dev_err(dev, "<%s>: Bus error accessing addr 0x%x\n",
|
||||
__func__, f7_msg->addr);
|
||||
dev_err(dev, "Bus error accessing addr 0x%x\n", addr);
|
||||
writel_relaxed(STM32F7_I2C_ICR_BERRCF, base + STM32F7_I2C_ICR);
|
||||
stm32f7_i2c_release_bus(&i2c_dev->adap);
|
||||
f7_msg->result = -EIO;
|
||||
@@ -1636,21 +1615,19 @@ static irqreturn_t stm32f7_i2c_isr_error(int irq, void *data)
|
||||
|
||||
/* Arbitration loss */
|
||||
if (status & STM32F7_I2C_ISR_ARLO) {
|
||||
dev_dbg(dev, "<%s>: Arbitration loss accessing addr 0x%x\n",
|
||||
__func__, f7_msg->addr);
|
||||
dev_dbg(dev, "Arbitration loss accessing addr 0x%x\n", addr);
|
||||
writel_relaxed(STM32F7_I2C_ICR_ARLOCF, base + STM32F7_I2C_ICR);
|
||||
f7_msg->result = -EAGAIN;
|
||||
}
|
||||
|
||||
if (status & STM32F7_I2C_ISR_PECERR) {
|
||||
dev_err(dev, "<%s>: PEC error in reception accessing addr 0x%x\n",
|
||||
__func__, f7_msg->addr);
|
||||
dev_err(dev, "PEC error in reception accessing addr 0x%x\n", addr);
|
||||
writel_relaxed(STM32F7_I2C_ICR_PECCF, base + STM32F7_I2C_ICR);
|
||||
f7_msg->result = -EINVAL;
|
||||
}
|
||||
|
||||
if (status & STM32F7_I2C_ISR_ALERT) {
|
||||
dev_dbg(dev, "<%s>: SMBus alert received\n", __func__);
|
||||
dev_dbg(dev, "SMBus alert received\n");
|
||||
writel_relaxed(STM32F7_I2C_ICR_ALERTCF, base + STM32F7_I2C_ICR);
|
||||
i2c_handle_smbus_alert(i2c_dev->alert->ara);
|
||||
return IRQ_HANDLED;
|
||||
@@ -1667,10 +1644,8 @@ static irqreturn_t stm32f7_i2c_isr_error(int irq, void *data)
|
||||
}
|
||||
|
||||
/* Disable dma */
|
||||
if (i2c_dev->use_dma) {
|
||||
stm32f7_i2c_disable_dma_req(i2c_dev);
|
||||
dmaengine_terminate_async(dma->chan_using);
|
||||
}
|
||||
if (i2c_dev->use_dma)
|
||||
stm32f7_i2c_dma_callback(i2c_dev);
|
||||
|
||||
i2c_dev->master_mode = false;
|
||||
complete(&i2c_dev->complete);
|
||||
@@ -2177,23 +2152,16 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
|
||||
i2c_dev->wakeup_src = of_property_read_bool(pdev->dev.of_node,
|
||||
"wakeup-source");
|
||||
|
||||
i2c_dev->clk = devm_clk_get(&pdev->dev, NULL);
|
||||
i2c_dev->clk = devm_clk_get_enabled(&pdev->dev, NULL);
|
||||
if (IS_ERR(i2c_dev->clk))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(i2c_dev->clk),
|
||||
"Failed to get controller clock\n");
|
||||
|
||||
ret = clk_prepare_enable(i2c_dev->clk);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to prepare_enable clock\n");
|
||||
return ret;
|
||||
}
|
||||
"Failed to enable controller clock\n");
|
||||
|
||||
rst = devm_reset_control_get(&pdev->dev, NULL);
|
||||
if (IS_ERR(rst)) {
|
||||
ret = dev_err_probe(&pdev->dev, PTR_ERR(rst),
|
||||
"Error: Missing reset ctrl\n");
|
||||
goto clk_free;
|
||||
}
|
||||
if (IS_ERR(rst))
|
||||
return dev_err_probe(&pdev->dev, PTR_ERR(rst),
|
||||
"Error: Missing reset ctrl\n");
|
||||
|
||||
reset_control_assert(rst);
|
||||
udelay(2);
|
||||
reset_control_deassert(rst);
|
||||
@@ -2205,40 +2173,36 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
|
||||
stm32f7_i2c_isr_event_thread,
|
||||
IRQF_ONESHOT,
|
||||
pdev->name, i2c_dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to request irq event %i\n",
|
||||
irq_event);
|
||||
goto clk_free;
|
||||
}
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret, "Failed to request irq event\n");
|
||||
|
||||
ret = devm_request_irq(&pdev->dev, irq_error, stm32f7_i2c_isr_error, 0,
|
||||
pdev->name, i2c_dev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "Failed to request irq error %i\n",
|
||||
irq_error);
|
||||
goto clk_free;
|
||||
}
|
||||
ret = devm_request_threaded_irq(&pdev->dev, irq_error,
|
||||
NULL,
|
||||
stm32f7_i2c_isr_error_thread,
|
||||
IRQF_ONESHOT,
|
||||
pdev->name, i2c_dev);
|
||||
if (ret)
|
||||
return dev_err_probe(&pdev->dev, ret, "Failed to request irq error\n");
|
||||
|
||||
setup = of_device_get_match_data(&pdev->dev);
|
||||
if (!setup) {
|
||||
dev_err(&pdev->dev, "Can't get device data\n");
|
||||
ret = -ENODEV;
|
||||
goto clk_free;
|
||||
return -ENODEV;
|
||||
}
|
||||
i2c_dev->setup = *setup;
|
||||
|
||||
ret = stm32f7_i2c_setup_timing(i2c_dev, &i2c_dev->setup);
|
||||
if (ret)
|
||||
goto clk_free;
|
||||
return ret;
|
||||
|
||||
/* Setup Fast mode plus if necessary */
|
||||
if (i2c_dev->bus_rate > I2C_MAX_FAST_MODE_FREQ) {
|
||||
ret = stm32f7_i2c_setup_fm_plus_bits(pdev, i2c_dev);
|
||||
if (ret)
|
||||
goto clk_free;
|
||||
return ret;
|
||||
ret = stm32f7_i2c_write_fm_plus_bits(i2c_dev, true);
|
||||
if (ret)
|
||||
goto clk_free;
|
||||
return ret;
|
||||
}
|
||||
|
||||
adap = &i2c_dev->adap;
|
||||
@@ -2349,9 +2313,6 @@ clr_wakeup_capable:
|
||||
fmp_clear:
|
||||
stm32f7_i2c_write_fm_plus_bits(i2c_dev, false);
|
||||
|
||||
clk_free:
|
||||
clk_disable_unprepare(i2c_dev->clk);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2385,8 +2346,6 @@ static void stm32f7_i2c_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
stm32f7_i2c_write_fm_plus_bits(i2c_dev, false);
|
||||
|
||||
clk_disable_unprepare(i2c_dev->clk);
|
||||
}
|
||||
|
||||
static int __maybe_unused stm32f7_i2c_runtime_suspend(struct device *dev)
|
||||
|
||||
@@ -585,7 +585,8 @@ err_free_mtt:
|
||||
static void erdma_destroy_mtt_buf_sg(struct erdma_dev *dev,
|
||||
struct erdma_mtt *mtt)
|
||||
{
|
||||
dma_unmap_sg(&dev->pdev->dev, mtt->sglist, mtt->nsg, DMA_TO_DEVICE);
|
||||
dma_unmap_sg(&dev->pdev->dev, mtt->sglist,
|
||||
DIV_ROUND_UP(mtt->size, PAGE_SIZE), DMA_TO_DEVICE);
|
||||
vfree(mtt->sglist);
|
||||
}
|
||||
|
||||
|
||||
@@ -5192,11 +5192,10 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
|
||||
{
|
||||
struct hns_roce_dev *hr_dev = to_hr_dev(ibqp->device);
|
||||
struct hns_roce_qp *hr_qp = to_hr_qp(ibqp);
|
||||
struct hns_roce_v2_qp_context ctx[2];
|
||||
struct hns_roce_v2_qp_context *context = ctx;
|
||||
struct hns_roce_v2_qp_context *qpc_mask = ctx + 1;
|
||||
struct hns_roce_v2_qp_context *context;
|
||||
struct hns_roce_v2_qp_context *qpc_mask;
|
||||
struct ib_device *ibdev = &hr_dev->ib_dev;
|
||||
int ret;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
if (attr_mask & ~IB_QP_ATTR_STANDARD_BITS)
|
||||
return -EOPNOTSUPP;
|
||||
@@ -5207,7 +5206,11 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
|
||||
* we should set all bits of the relevant fields in context mask to
|
||||
* 0 at the same time, else set them to 0x1.
|
||||
*/
|
||||
memset(context, 0, hr_dev->caps.qpc_sz);
|
||||
context = kvzalloc(sizeof(*context), GFP_KERNEL);
|
||||
qpc_mask = kvzalloc(sizeof(*qpc_mask), GFP_KERNEL);
|
||||
if (!context || !qpc_mask)
|
||||
goto out;
|
||||
|
||||
memset(qpc_mask, 0xff, hr_dev->caps.qpc_sz);
|
||||
|
||||
ret = hns_roce_v2_set_abs_fields(ibqp, attr, attr_mask, cur_state,
|
||||
@@ -5249,6 +5252,8 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
|
||||
clear_qp(hr_qp);
|
||||
|
||||
out:
|
||||
kvfree(qpc_mask);
|
||||
kvfree(context);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ static struct ib_dm *handle_alloc_dm_memic(struct ib_ucontext *ctx,
|
||||
int err;
|
||||
u64 address;
|
||||
|
||||
if (!MLX5_CAP_DEV_MEM(dm_db->dev, memic))
|
||||
if (!dm_db || !MLX5_CAP_DEV_MEM(dm_db->dev, memic))
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
|
||||
dm = kzalloc(sizeof(*dm), GFP_KERNEL);
|
||||
|
||||
@@ -1492,34 +1492,40 @@ static struct qcom_icc_bcm bcm_sh3 = {
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn0 = {
|
||||
.name = "SN0",
|
||||
.num_nodes = 1,
|
||||
.nodes = { &slv_qns_gemnoc_sf }
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn1 = {
|
||||
.name = "SN1",
|
||||
.num_nodes = 1,
|
||||
.nodes = { &slv_qxs_imem }
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn2 = {
|
||||
.name = "SN2",
|
||||
.keepalive = true,
|
||||
.num_nodes = 1,
|
||||
.nodes = { &slv_qns_gemnoc_gc }
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_co2 = {
|
||||
.name = "CO2",
|
||||
.num_nodes = 1,
|
||||
.nodes = { &mas_qnm_npu }
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn3 = {
|
||||
.name = "SN3",
|
||||
.keepalive = true,
|
||||
.num_nodes = 2,
|
||||
.nodes = { &slv_srvc_aggre1_noc,
|
||||
&slv_qns_cnoc }
|
||||
};
|
||||
|
||||
static struct qcom_icc_bcm bcm_sn4 = {
|
||||
.name = "SN4",
|
||||
.num_nodes = 1,
|
||||
.nodes = { &slv_qxs_pimem }
|
||||
};
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ static struct qcom_icc_node qnm_a1noc_cfg = {
|
||||
.id = SC8280XP_MASTER_A1NOC_CFG,
|
||||
.channels = 1,
|
||||
.buswidth = 4,
|
||||
.num_links = 1,
|
||||
.links = { SC8280XP_SLAVE_SERVICE_A1NOC },
|
||||
};
|
||||
|
||||
|
||||
@@ -2159,8 +2159,21 @@ static inline u64 dma_max_address(void)
|
||||
if (amd_iommu_pgtable == AMD_IOMMU_V1)
|
||||
return ~0ULL;
|
||||
|
||||
/* V2 with 4/5 level page table */
|
||||
return ((1ULL << PM_LEVEL_SHIFT(amd_iommu_gpt_level)) - 1);
|
||||
/*
|
||||
* V2 with 4/5 level page table. Note that "2.2.6.5 AMD64 4-Kbyte Page
|
||||
* Translation" shows that the V2 table sign extends the top of the
|
||||
* address space creating a reserved region in the middle of the
|
||||
* translation, just like the CPU does. Further Vasant says the docs are
|
||||
* incomplete and this only applies to non-zero PASIDs. If the AMDv2
|
||||
* page table is assigned to the 0 PASID then there is no sign extension
|
||||
* check.
|
||||
*
|
||||
* Since the IOMMU must have a fixed geometry, and the core code does
|
||||
* not understand sign extended addressing, we have to chop off the high
|
||||
* bit to get consistent behavior with attachments of the domain to any
|
||||
* PASID.
|
||||
*/
|
||||
return ((1ULL << (PM_LEVEL_SHIFT(amd_iommu_gpt_level) - 1)) - 1);
|
||||
}
|
||||
|
||||
static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
|
||||
|
||||
@@ -483,6 +483,7 @@ config IMX_MU_MSI
|
||||
tristate "i.MX MU used as MSI controller"
|
||||
depends on OF && HAS_IOMEM
|
||||
depends on ARCH_MXC || COMPILE_TEST
|
||||
depends on ARM || ARM64
|
||||
default m if ARCH_MXC
|
||||
select IRQ_DOMAIN
|
||||
select IRQ_DOMAIN_HIERARCHY
|
||||
|
||||
@@ -9465,8 +9465,8 @@ void md_check_recovery(struct mddev *mddev)
|
||||
* remove disk.
|
||||
*/
|
||||
rdev_for_each_safe(rdev, tmp, mddev) {
|
||||
if (test_and_clear_bit(ClusterRemove, &rdev->flags) &&
|
||||
rdev->raid_disk < 0)
|
||||
if (rdev->raid_disk < 0 &&
|
||||
test_and_clear_bit(ClusterRemove, &rdev->flags))
|
||||
md_kick_rdev_from_array(rdev);
|
||||
}
|
||||
}
|
||||
@@ -9813,8 +9813,11 @@ static void check_sb_changes(struct mddev *mddev, struct md_rdev *rdev)
|
||||
|
||||
/* Check for change of roles in the active devices */
|
||||
rdev_for_each_safe(rdev2, tmp, mddev) {
|
||||
if (test_bit(Faulty, &rdev2->flags))
|
||||
if (test_bit(Faulty, &rdev2->flags)) {
|
||||
if (test_bit(ClusterRemove, &rdev2->flags))
|
||||
set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Check if the roles changed */
|
||||
role = le16_to_cpu(sb->dev_roles[rdev2->desc_nr]);
|
||||
|
||||
@@ -894,12 +894,12 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
|
||||
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_QPPRIME_Y_ZERO_TRANSFORM_BYPASS;
|
||||
|
||||
if (p_h264_sps->chroma_format_idc < 3)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
|
||||
}
|
||||
|
||||
if (p_h264_sps->chroma_format_idc < 3)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_SEPARATE_COLOUR_PLANE;
|
||||
|
||||
if (p_h264_sps->flags & V4L2_H264_SPS_FLAG_FRAME_MBS_ONLY)
|
||||
p_h264_sps->flags &=
|
||||
~V4L2_H264_SPS_FLAG_MB_ADAPTIVE_FRAME_FIELD;
|
||||
|
||||
@@ -344,7 +344,7 @@ static int erase_xfer(partition_t *part,
|
||||
return -ENOMEM;
|
||||
|
||||
erase->addr = xfer->Offset;
|
||||
erase->len = 1 << part->header.EraseUnitSize;
|
||||
erase->len = 1ULL << part->header.EraseUnitSize;
|
||||
|
||||
ret = mtd_erase(part->mbd.mtd, erase);
|
||||
if (!ret) {
|
||||
|
||||
@@ -373,7 +373,7 @@ static int atmel_nand_dma_transfer(struct atmel_nand_controller *nc,
|
||||
dma_cookie_t cookie;
|
||||
|
||||
buf_dma = dma_map_single(nc->dev, buf, len, dir);
|
||||
if (dma_mapping_error(nc->dev, dev_dma)) {
|
||||
if (dma_mapping_error(nc->dev, buf_dma)) {
|
||||
dev_err(nc->dev,
|
||||
"Failed to prepare a buffer for DMA access\n");
|
||||
goto err;
|
||||
|
||||
@@ -143,6 +143,7 @@ struct atmel_pmecc_caps {
|
||||
int nstrengths;
|
||||
int el_offset;
|
||||
bool correct_erased_chunks;
|
||||
bool clk_ctrl;
|
||||
};
|
||||
|
||||
struct atmel_pmecc {
|
||||
@@ -843,6 +844,10 @@ static struct atmel_pmecc *atmel_pmecc_create(struct platform_device *pdev,
|
||||
if (IS_ERR(pmecc->regs.errloc))
|
||||
return ERR_CAST(pmecc->regs.errloc);
|
||||
|
||||
/* pmecc data setup time */
|
||||
if (caps->clk_ctrl)
|
||||
writel(PMECC_CLK_133MHZ, pmecc->regs.base + ATMEL_PMECC_CLK);
|
||||
|
||||
/* Disable all interrupts before registering the PMECC handler. */
|
||||
writel(0xffffffff, pmecc->regs.base + ATMEL_PMECC_IDR);
|
||||
atmel_pmecc_reset(pmecc);
|
||||
@@ -896,6 +901,7 @@ static struct atmel_pmecc_caps at91sam9g45_caps = {
|
||||
.strengths = atmel_pmecc_strengths,
|
||||
.nstrengths = 5,
|
||||
.el_offset = 0x8c,
|
||||
.clk_ctrl = true,
|
||||
};
|
||||
|
||||
static struct atmel_pmecc_caps sama5d4_caps = {
|
||||
|
||||
@@ -656,9 +656,16 @@ static int rk_nfc_write_page_hwecc(struct nand_chip *chip, const u8 *buf,
|
||||
|
||||
dma_data = dma_map_single(nfc->dev, (void *)nfc->page_buf,
|
||||
mtd->writesize, DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(nfc->dev, dma_data))
|
||||
return -ENOMEM;
|
||||
|
||||
dma_oob = dma_map_single(nfc->dev, nfc->oob_buf,
|
||||
ecc->steps * oob_step,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(nfc->dev, dma_oob)) {
|
||||
dma_unmap_single(nfc->dev, dma_data, mtd->writesize, DMA_TO_DEVICE);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
reinit_completion(&nfc->done);
|
||||
writel(INT_DMA, nfc->regs + nfc->cfg->int_en_off);
|
||||
@@ -772,9 +779,17 @@ static int rk_nfc_read_page_hwecc(struct nand_chip *chip, u8 *buf, int oob_on,
|
||||
dma_data = dma_map_single(nfc->dev, nfc->page_buf,
|
||||
mtd->writesize,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(nfc->dev, dma_data))
|
||||
return -ENOMEM;
|
||||
|
||||
dma_oob = dma_map_single(nfc->dev, nfc->oob_buf,
|
||||
ecc->steps * oob_step,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(nfc->dev, dma_oob)) {
|
||||
dma_unmap_single(nfc->dev, dma_data, mtd->writesize,
|
||||
DMA_FROM_DEVICE);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*
|
||||
* The first blocks (4, 8 or 16 depending on the device)
|
||||
|
||||
@@ -927,6 +927,7 @@ static int kvaser_pciefd_setup_can_ctrls(struct kvaser_pciefd *pcie)
|
||||
can->err_rep_cnt = 0;
|
||||
can->bec.txerr = 0;
|
||||
can->bec.rxerr = 0;
|
||||
can->can.dev->dev_port = i;
|
||||
|
||||
init_completion(&can->start_comp);
|
||||
init_completion(&can->flush_comp);
|
||||
|
||||
@@ -856,6 +856,7 @@ static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel)
|
||||
}
|
||||
SET_NETDEV_DEV(netdev, &dev->intf->dev);
|
||||
netdev->dev_id = channel;
|
||||
netdev->dev_port = channel;
|
||||
|
||||
dev->nets[channel] = priv;
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ struct __packed pcan_ufd_fw_info {
|
||||
__le32 ser_no; /* S/N */
|
||||
__le32 flags; /* special functions */
|
||||
|
||||
/* extended data when type == PCAN_USBFD_TYPE_EXT */
|
||||
/* extended data when type >= PCAN_USBFD_TYPE_EXT */
|
||||
u8 cmd_out_ep; /* ep for cmd */
|
||||
u8 cmd_in_ep; /* ep for replies */
|
||||
u8 data_out_ep[2]; /* ep for CANx TX */
|
||||
@@ -982,10 +982,11 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
|
||||
dev->can.ctrlmode |= CAN_CTRLMODE_FD_NON_ISO;
|
||||
}
|
||||
|
||||
/* if vendor rsp is of type 2, then it contains EP numbers to
|
||||
* use for cmds pipes. If not, then default EP should be used.
|
||||
/* if vendor rsp type is greater than or equal to 2, then it
|
||||
* contains EP numbers to use for cmds pipes. If not, then
|
||||
* default EP should be used.
|
||||
*/
|
||||
if (fw_info->type != cpu_to_le16(PCAN_USBFD_TYPE_EXT)) {
|
||||
if (le16_to_cpu(fw_info->type) < PCAN_USBFD_TYPE_EXT) {
|
||||
fw_info->cmd_out_ep = PCAN_USBPRO_EP_CMDOUT;
|
||||
fw_info->cmd_in_ep = PCAN_USBPRO_EP_CMDIN;
|
||||
}
|
||||
@@ -1018,11 +1019,11 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
|
||||
dev->can_channel_id =
|
||||
le32_to_cpu(pdev->usb_if->fw_info.dev_id[dev->ctrl_idx]);
|
||||
|
||||
/* if vendor rsp is of type 2, then it contains EP numbers to
|
||||
* use for data pipes. If not, then statically defined EP are used
|
||||
* (see peak_usb_create_dev()).
|
||||
/* if vendor rsp type is greater than or equal to 2, then it contains EP
|
||||
* numbers to use for data pipes. If not, then statically defined EP are
|
||||
* used (see peak_usb_create_dev()).
|
||||
*/
|
||||
if (fw_info->type == cpu_to_le16(PCAN_USBFD_TYPE_EXT)) {
|
||||
if (le16_to_cpu(fw_info->type) >= PCAN_USBFD_TYPE_EXT) {
|
||||
dev->ep_msg_in = fw_info->data_in_ep;
|
||||
dev->ep_msg_out = fw_info->data_out_ep[dev->ctrl_idx];
|
||||
}
|
||||
|
||||
@@ -3852,8 +3852,8 @@ int be_cmd_set_mac_list(struct be_adapter *adapter, u8 *mac_array,
|
||||
status = be_mcc_notify_wait(adapter);
|
||||
|
||||
err:
|
||||
dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va, cmd.dma);
|
||||
spin_unlock_bh(&adapter->mcc_lock);
|
||||
dma_free_coherent(&adapter->pdev->dev, cmd.size, cmd.va, cmd.dma);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -189,13 +189,14 @@ struct fm10k_q_vector {
|
||||
struct fm10k_ring_container rx, tx;
|
||||
|
||||
struct napi_struct napi;
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
|
||||
cpumask_t affinity_mask;
|
||||
char name[IFNAMSIZ + 9];
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
struct dentry *dbg_q_vector;
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
|
||||
/* for dynamic allocation of rings associated with this q_vector */
|
||||
struct fm10k_ring ring[] ____cacheline_internodealigned_in_smp;
|
||||
|
||||
@@ -953,6 +953,7 @@ struct i40e_q_vector {
|
||||
u16 reg_idx; /* register index of the interrupt */
|
||||
|
||||
struct napi_struct napi;
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
|
||||
struct i40e_ring_container rx;
|
||||
struct i40e_ring_container tx;
|
||||
@@ -963,7 +964,6 @@ struct i40e_q_vector {
|
||||
cpumask_t affinity_mask;
|
||||
struct irq_affinity_notify affinity_notify;
|
||||
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
char name[I40E_INT_NAME_STR_LEN];
|
||||
bool arm_wb_state;
|
||||
bool in_busy_poll;
|
||||
|
||||
@@ -503,9 +503,10 @@ struct ixgbe_q_vector {
|
||||
struct ixgbe_ring_container rx, tx;
|
||||
|
||||
struct napi_struct napi;
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
|
||||
cpumask_t affinity_mask;
|
||||
int numa_node;
|
||||
struct rcu_head rcu; /* to avoid race with update stats on free */
|
||||
char name[IFNAMSIZ + 9];
|
||||
|
||||
/* for dynamic allocation of rings associated with this q_vector */
|
||||
|
||||
@@ -331,6 +331,9 @@ static int port_set_buffer(struct mlx5e_priv *priv,
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
/* RO bits should be set to 0 on write */
|
||||
MLX5_SET(pbmc_reg, in, port_buffer_size, 0);
|
||||
|
||||
err = mlx5e_port_set_pbmc(mdev, in);
|
||||
out:
|
||||
kfree(in);
|
||||
|
||||
@@ -333,6 +333,10 @@ void mlx5e_ipsec_offload_handle_rx_skb(struct net_device *netdev,
|
||||
if (unlikely(!sa_entry)) {
|
||||
rcu_read_unlock();
|
||||
atomic64_inc(&ipsec->sw_stats.ipsec_rx_drop_sadb_miss);
|
||||
/* Clear secpath to prevent invalid dereference
|
||||
* in downstream XFRM policy checks.
|
||||
*/
|
||||
secpath_reset(skb);
|
||||
return;
|
||||
}
|
||||
xfrm_state_hold(sa_entry->x);
|
||||
|
||||
@@ -1573,6 +1573,7 @@ static inline void mlx5e_build_rx_skb(struct mlx5_cqe64 *cqe,
|
||||
unsigned int hdrlen = mlx5e_lro_update_hdr(skb, cqe, cqe_bcnt);
|
||||
|
||||
skb_shinfo(skb)->gso_size = DIV_ROUND_UP(cqe_bcnt - hdrlen, lro_num_seg);
|
||||
skb_shinfo(skb)->gso_segs = lro_num_seg;
|
||||
/* Subtract one since we already counted this as one
|
||||
* "regular" packet in mlx5e_complete_rx_cqe()
|
||||
*/
|
||||
|
||||
@@ -28,7 +28,7 @@ struct mlx5_dm *mlx5_dm_create(struct mlx5_core_dev *dev)
|
||||
|
||||
dm = kzalloc(sizeof(*dm), GFP_KERNEL);
|
||||
if (!dm)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return NULL;
|
||||
|
||||
spin_lock_init(&dm->lock);
|
||||
|
||||
@@ -80,7 +80,7 @@ err_modify_hdr:
|
||||
err_steering:
|
||||
kfree(dm);
|
||||
|
||||
return ERR_PTR(-ENOMEM);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void mlx5_dm_cleanup(struct mlx5_core_dev *dev)
|
||||
|
||||
@@ -1055,9 +1055,6 @@ static int mlx5_init_once(struct mlx5_core_dev *dev)
|
||||
}
|
||||
|
||||
dev->dm = mlx5_dm_create(dev);
|
||||
if (IS_ERR(dev->dm))
|
||||
mlx5_core_warn(dev, "Failed to init device memory %ld\n", PTR_ERR(dev->dm));
|
||||
|
||||
dev->tracer = mlx5_fw_tracer_create(dev);
|
||||
dev->hv_vhca = mlx5_hv_vhca_create(dev);
|
||||
dev->rsc_dump = mlx5_rsc_dump_create(dev);
|
||||
|
||||
@@ -38,8 +38,12 @@ static const char *ipa_version_string(struct ipa *ipa)
|
||||
return "4.11";
|
||||
case IPA_VERSION_5_0:
|
||||
return "5.0";
|
||||
case IPA_VERSION_5_1:
|
||||
return "5.1";
|
||||
case IPA_VERSION_5_5:
|
||||
return "5.5";
|
||||
default:
|
||||
return "0.0"; /* Won't happen (checked at probe time) */
|
||||
return "0.0"; /* Should not happen */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -897,6 +897,7 @@ static int vsc85xx_eth1_conf(struct phy_device *phydev, enum ts_blk blk,
|
||||
get_unaligned_be32(ptp_multicast));
|
||||
} else {
|
||||
val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST;
|
||||
val |= ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST;
|
||||
vsc85xx_ts_write_csr(phydev, blk,
|
||||
MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(0), val);
|
||||
vsc85xx_ts_write_csr(phydev, blk,
|
||||
|
||||
@@ -98,6 +98,7 @@
|
||||
#define MSCC_ANA_ETH1_FLOW_ADDR_MATCH2(x) (MSCC_ANA_ETH1_FLOW_ENA(x) + 3)
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_MASK_MASK GENMASK(22, 20)
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_MULTICAST 0x400000
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_ANY_UNICAST 0x200000
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_FULL_ADDR 0x100000
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST_MASK GENMASK(17, 16)
|
||||
#define ANA_ETH1_FLOW_ADDR_MATCH2_SRC_DEST 0x020000
|
||||
|
||||
@@ -159,19 +159,17 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
|
||||
int len;
|
||||
unsigned char *data;
|
||||
__u32 seq_recv;
|
||||
|
||||
|
||||
struct rtable *rt;
|
||||
struct net_device *tdev;
|
||||
struct iphdr *iph;
|
||||
int max_headroom;
|
||||
|
||||
if (sk_pppox(po)->sk_state & PPPOX_DEAD)
|
||||
goto tx_error;
|
||||
goto tx_drop;
|
||||
|
||||
rt = pptp_route_output(po, &fl4);
|
||||
if (IS_ERR(rt))
|
||||
goto tx_error;
|
||||
goto tx_drop;
|
||||
|
||||
tdev = rt->dst.dev;
|
||||
|
||||
@@ -179,16 +177,20 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
|
||||
|
||||
if (skb_headroom(skb) < max_headroom || skb_cloned(skb) || skb_shared(skb)) {
|
||||
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
|
||||
if (!new_skb) {
|
||||
ip_rt_put(rt);
|
||||
|
||||
if (!new_skb)
|
||||
goto tx_error;
|
||||
}
|
||||
|
||||
if (skb->sk)
|
||||
skb_set_owner_w(new_skb, skb->sk);
|
||||
consume_skb(skb);
|
||||
skb = new_skb;
|
||||
}
|
||||
|
||||
/* Ensure we can safely access protocol field and LCP code */
|
||||
if (!pskb_may_pull(skb, 3))
|
||||
goto tx_error;
|
||||
|
||||
data = skb->data;
|
||||
islcp = ((data[0] << 8) + data[1]) == PPP_LCP && 1 <= data[2] && data[2] <= 7;
|
||||
|
||||
@@ -262,6 +264,8 @@ static int pptp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
|
||||
return 1;
|
||||
|
||||
tx_error:
|
||||
ip_rt_put(rt);
|
||||
tx_drop:
|
||||
kfree_skb(skb);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -1113,6 +1113,9 @@ static void __handle_link_change(struct usbnet *dev)
|
||||
if (!test_bit(EVENT_DEV_OPEN, &dev->flags))
|
||||
return;
|
||||
|
||||
if (test_and_clear_bit(EVENT_LINK_CARRIER_ON, &dev->flags))
|
||||
netif_carrier_on(dev->net);
|
||||
|
||||
if (!netif_carrier_ok(dev->net)) {
|
||||
/* kill URBs for reading packets to save bus bandwidth */
|
||||
unlink_urbs(dev, &dev->rxq);
|
||||
@@ -2015,10 +2018,12 @@ EXPORT_SYMBOL(usbnet_manage_power);
|
||||
void usbnet_link_change(struct usbnet *dev, bool link, bool need_reset)
|
||||
{
|
||||
/* update link after link is reseted */
|
||||
if (link && !need_reset)
|
||||
netif_carrier_on(dev->net);
|
||||
else
|
||||
if (link && !need_reset) {
|
||||
set_bit(EVENT_LINK_CARRIER_ON, &dev->flags);
|
||||
} else {
|
||||
clear_bit(EVENT_LINK_CARRIER_ON, &dev->flags);
|
||||
netif_carrier_off(dev->net);
|
||||
}
|
||||
|
||||
if (need_reset && link)
|
||||
usbnet_defer_kevent(dev, EVENT_LINK_RESET);
|
||||
|
||||
@@ -1345,6 +1345,8 @@ static void vrf_ip6_input_dst(struct sk_buff *skb, struct net_device *vrf_dev,
|
||||
struct net *net = dev_net(vrf_dev);
|
||||
struct rt6_info *rt6;
|
||||
|
||||
skb_dst_drop(skb);
|
||||
|
||||
rt6 = vrf_ip6_route_lookup(net, vrf_dev, &fl6, ifindex, skb,
|
||||
RT6_LOOKUP_F_HAS_SADDR | RT6_LOOKUP_F_IFACE);
|
||||
if (unlikely(!rt6))
|
||||
|
||||
@@ -1319,6 +1319,10 @@ EXPORT_SYMBOL(ath11k_hal_srng_init);
|
||||
void ath11k_hal_srng_deinit(struct ath11k_base *ab)
|
||||
{
|
||||
struct ath11k_hal *hal = &ab->hal;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < HAL_SRNG_RING_ID_MAX; i++)
|
||||
ab->hal.srng_list[i].initialized = 0;
|
||||
|
||||
ath11k_hal_unregister_srng_key(ab);
|
||||
ath11k_hal_free_cont_rdp(ab);
|
||||
|
||||
@@ -6303,7 +6303,7 @@ static int ath12k_wmi_tlv_services_parser(struct ath12k_base *ab,
|
||||
void *data)
|
||||
{
|
||||
const struct wmi_service_available_event *ev;
|
||||
u32 *wmi_ext2_service_bitmap;
|
||||
__le32 *wmi_ext2_service_bitmap;
|
||||
int i, j;
|
||||
u16 expected_len;
|
||||
|
||||
@@ -6335,12 +6335,12 @@ static int ath12k_wmi_tlv_services_parser(struct ath12k_base *ab,
|
||||
ev->wmi_service_segment_bitmap[3]);
|
||||
break;
|
||||
case WMI_TAG_ARRAY_UINT32:
|
||||
wmi_ext2_service_bitmap = (u32 *)ptr;
|
||||
wmi_ext2_service_bitmap = (__le32 *)ptr;
|
||||
for (i = 0, j = WMI_MAX_EXT_SERVICE;
|
||||
i < WMI_SERVICE_SEGMENT_BM_SIZE32 && j < WMI_MAX_EXT2_SERVICE;
|
||||
i++) {
|
||||
do {
|
||||
if (wmi_ext2_service_bitmap[i] &
|
||||
if (__le32_to_cpu(wmi_ext2_service_bitmap[i]) &
|
||||
BIT(j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32))
|
||||
set_bit(j, ab->wmi_ab.svc_map);
|
||||
} while (++j % WMI_AVAIL_SERVICE_BITS_IN_SIZE32);
|
||||
@@ -6348,8 +6348,10 @@ static int ath12k_wmi_tlv_services_parser(struct ath12k_base *ab,
|
||||
|
||||
ath12k_dbg(ab, ATH12K_DBG_WMI,
|
||||
"wmi_ext2_service_bitmap 0x%04x 0x%04x 0x%04x 0x%04x",
|
||||
wmi_ext2_service_bitmap[0], wmi_ext2_service_bitmap[1],
|
||||
wmi_ext2_service_bitmap[2], wmi_ext2_service_bitmap[3]);
|
||||
__le32_to_cpu(wmi_ext2_service_bitmap[0]),
|
||||
__le32_to_cpu(wmi_ext2_service_bitmap[1]),
|
||||
__le32_to_cpu(wmi_ext2_service_bitmap[2]),
|
||||
__le32_to_cpu(wmi_ext2_service_bitmap[3]));
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -1541,10 +1541,6 @@ brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
/* If scan req comes for p2p0, send it over primary I/F */
|
||||
if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif)
|
||||
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
|
||||
|
||||
brcmf_dbg(SCAN, "START ESCAN\n");
|
||||
|
||||
cfg->scan_request = request;
|
||||
@@ -1560,6 +1556,10 @@ brcmf_cfg80211_scan(struct wiphy *wiphy, struct cfg80211_scan_request *request)
|
||||
if (err)
|
||||
goto scan_out;
|
||||
|
||||
/* If scan req comes for p2p0, send it over primary I/F */
|
||||
if (vif == cfg->p2p.bss_idx[P2PAPI_BSSCFG_DEVICE].vif)
|
||||
vif = cfg->p2p.bss_idx[P2PAPI_BSSCFG_PRIMARY].vif;
|
||||
|
||||
err = brcmf_do_escan(vif->ifp, request);
|
||||
if (err)
|
||||
goto scan_out;
|
||||
|
||||
@@ -1048,9 +1048,11 @@ static void iwl_bg_restart(struct work_struct *data)
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
static void iwl_setup_deferred_work(struct iwl_priv *priv)
|
||||
static int iwl_setup_deferred_work(struct iwl_priv *priv)
|
||||
{
|
||||
priv->workqueue = alloc_ordered_workqueue(DRV_NAME, 0);
|
||||
if (!priv->workqueue)
|
||||
return -ENOMEM;
|
||||
|
||||
INIT_WORK(&priv->restart, iwl_bg_restart);
|
||||
INIT_WORK(&priv->beacon_update, iwl_bg_beacon_update);
|
||||
@@ -1067,6 +1069,8 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv)
|
||||
timer_setup(&priv->statistics_periodic, iwl_bg_statistics_periodic, 0);
|
||||
|
||||
timer_setup(&priv->ucode_trace, iwl_bg_ucode_trace, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void iwl_cancel_deferred_work(struct iwl_priv *priv)
|
||||
@@ -1456,7 +1460,9 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
|
||||
/********************
|
||||
* 6. Setup services
|
||||
********************/
|
||||
iwl_setup_deferred_work(priv);
|
||||
if (iwl_setup_deferred_work(priv))
|
||||
goto out_uninit_drv;
|
||||
|
||||
iwl_setup_rx_handlers(priv);
|
||||
|
||||
iwl_power_initialize(priv);
|
||||
@@ -1494,6 +1500,7 @@ out_destroy_workqueue:
|
||||
iwl_cancel_deferred_work(priv);
|
||||
destroy_workqueue(priv->workqueue);
|
||||
priv->workqueue = NULL;
|
||||
out_uninit_drv:
|
||||
iwl_uninit_drv(priv);
|
||||
out_free_eeprom_blob:
|
||||
kfree(priv->eeprom_blob);
|
||||
|
||||
@@ -65,8 +65,10 @@ static int __init iwl_mvm_init(void)
|
||||
}
|
||||
|
||||
ret = iwl_opmode_register("iwlmvm", &iwl_mvm_ops);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
pr_err("Unable to register MVM op_mode: %d\n", ret);
|
||||
iwl_mvm_rate_control_unregister();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1222,6 +1222,10 @@ static int rxq_refill(struct ieee80211_hw *hw, int index, int limit)
|
||||
|
||||
addr = dma_map_single(&priv->pdev->dev, skb->data,
|
||||
MWL8K_RX_MAXSZ, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&priv->pdev->dev, addr)) {
|
||||
kfree_skb(skb);
|
||||
break;
|
||||
}
|
||||
|
||||
rxq->rxd_count++;
|
||||
rx = rxq->tail++;
|
||||
|
||||
@@ -100,11 +100,6 @@ int plfxlc_mac_init_hw(struct ieee80211_hw *hw)
|
||||
return r;
|
||||
}
|
||||
|
||||
void plfxlc_mac_release(struct plfxlc_mac *mac)
|
||||
{
|
||||
plfxlc_chip_release(&mac->chip);
|
||||
}
|
||||
|
||||
int plfxlc_op_start(struct ieee80211_hw *hw)
|
||||
{
|
||||
plfxlc_hw_mac(hw)->chip.usb.initialized = 1;
|
||||
@@ -752,3 +747,9 @@ struct ieee80211_hw *plfxlc_mac_alloc_hw(struct usb_interface *intf)
|
||||
SET_IEEE80211_DEV(hw, &intf->dev);
|
||||
return hw;
|
||||
}
|
||||
|
||||
void plfxlc_mac_release_hw(struct ieee80211_hw *hw)
|
||||
{
|
||||
plfxlc_chip_release(&plfxlc_hw_mac(hw)->chip);
|
||||
ieee80211_free_hw(hw);
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ static inline u8 *plfxlc_mac_get_perm_addr(struct plfxlc_mac *mac)
|
||||
}
|
||||
|
||||
struct ieee80211_hw *plfxlc_mac_alloc_hw(struct usb_interface *intf);
|
||||
void plfxlc_mac_release(struct plfxlc_mac *mac);
|
||||
void plfxlc_mac_release_hw(struct ieee80211_hw *hw);
|
||||
|
||||
int plfxlc_mac_preinit_hw(struct ieee80211_hw *hw, const u8 *hw_address);
|
||||
int plfxlc_mac_init_hw(struct ieee80211_hw *hw);
|
||||
|
||||
@@ -604,7 +604,7 @@ static int probe(struct usb_interface *intf,
|
||||
r = plfxlc_upload_mac_and_serial(intf, hw_address, serial_number);
|
||||
if (r) {
|
||||
dev_err(&intf->dev, "MAC and Serial upload failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_free_hw;
|
||||
}
|
||||
|
||||
chip->unit_type = STA;
|
||||
@@ -613,13 +613,13 @@ static int probe(struct usb_interface *intf,
|
||||
r = plfxlc_mac_preinit_hw(hw, hw_address);
|
||||
if (r) {
|
||||
dev_err(&intf->dev, "Init mac failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_free_hw;
|
||||
}
|
||||
|
||||
r = ieee80211_register_hw(hw);
|
||||
if (r) {
|
||||
dev_err(&intf->dev, "Register device failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_free_hw;
|
||||
}
|
||||
|
||||
if ((le16_to_cpu(interface_to_usbdev(intf)->descriptor.idVendor) ==
|
||||
@@ -632,7 +632,7 @@ static int probe(struct usb_interface *intf,
|
||||
}
|
||||
if (r != 0) {
|
||||
dev_err(&intf->dev, "FPGA download failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_unreg_hw;
|
||||
}
|
||||
|
||||
tx->mac_fifo_full = 0;
|
||||
@@ -642,21 +642,21 @@ static int probe(struct usb_interface *intf,
|
||||
r = plfxlc_usb_init_hw(usb);
|
||||
if (r < 0) {
|
||||
dev_err(&intf->dev, "usb_init_hw failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_unreg_hw;
|
||||
}
|
||||
|
||||
msleep(PLF_MSLEEP_TIME);
|
||||
r = plfxlc_chip_switch_radio(chip, PLFXLC_RADIO_ON);
|
||||
if (r < 0) {
|
||||
dev_dbg(&intf->dev, "chip_switch_radio_on failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_unreg_hw;
|
||||
}
|
||||
|
||||
msleep(PLF_MSLEEP_TIME);
|
||||
r = plfxlc_chip_set_rate(chip, 8);
|
||||
if (r < 0) {
|
||||
dev_dbg(&intf->dev, "chip_set_rate failed (%d)\n", r);
|
||||
goto error;
|
||||
goto error_unreg_hw;
|
||||
}
|
||||
|
||||
msleep(PLF_MSLEEP_TIME);
|
||||
@@ -664,7 +664,7 @@ static int probe(struct usb_interface *intf,
|
||||
hw_address, ETH_ALEN, USB_REQ_MAC_WR);
|
||||
if (r < 0) {
|
||||
dev_dbg(&intf->dev, "MAC_WR failure (%d)\n", r);
|
||||
goto error;
|
||||
goto error_unreg_hw;
|
||||
}
|
||||
|
||||
plfxlc_chip_enable_rxtx(chip);
|
||||
@@ -691,12 +691,12 @@ static int probe(struct usb_interface *intf,
|
||||
plfxlc_mac_init_hw(hw);
|
||||
usb->initialized = true;
|
||||
return 0;
|
||||
|
||||
error_unreg_hw:
|
||||
ieee80211_unregister_hw(hw);
|
||||
error_free_hw:
|
||||
plfxlc_mac_release_hw(hw);
|
||||
error:
|
||||
if (hw) {
|
||||
plfxlc_mac_release(plfxlc_hw_mac(hw));
|
||||
ieee80211_unregister_hw(hw);
|
||||
ieee80211_free_hw(hw);
|
||||
}
|
||||
dev_err(&intf->dev, "pureLifi:Device error");
|
||||
return r;
|
||||
}
|
||||
@@ -730,8 +730,7 @@ static void disconnect(struct usb_interface *intf)
|
||||
*/
|
||||
usb_reset_device(interface_to_usbdev(intf));
|
||||
|
||||
plfxlc_mac_release(mac);
|
||||
ieee80211_free_hw(hw);
|
||||
plfxlc_mac_release_hw(hw);
|
||||
}
|
||||
|
||||
static void plfxlc_usb_resume(struct plfxlc_usb *usb)
|
||||
|
||||
@@ -1041,10 +1041,11 @@ static void rtl8187_stop(struct ieee80211_hw *dev)
|
||||
rtl818x_iowrite8(priv, &priv->map->CONFIG4, reg | RTL818X_CONFIG4_VCOOFF);
|
||||
rtl818x_iowrite8(priv, &priv->map->EEPROM_CMD, RTL818X_EEPROM_CMD_NORMAL);
|
||||
|
||||
usb_kill_anchored_urbs(&priv->anchored);
|
||||
|
||||
while ((skb = skb_dequeue(&priv->b_tx_status.queue)))
|
||||
dev_kfree_skb_any(skb);
|
||||
|
||||
usb_kill_anchored_urbs(&priv->anchored);
|
||||
mutex_unlock(&priv->conf_mutex);
|
||||
|
||||
if (!priv->is_rtl8187b)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user