Merge android-4.19-q.90 (e7f7ced
) into msm-4.19
* refs/heads/tmp-e7f7ced: Revert "usb: dwc3: gadget: Fix logical condition" Linux 4.19.90 of: unittest: fix memory leak in attach_node_and_children scsi: zorro_esp: Limit DMA transfers to 65536 bytes (except on Fastlane) idr: Fix idr_get_next_ul race with idr_remove iio: imu: mpu6050: add missing available scan masks scsi: qla2xxx: Change discovery state before PLOGI raid5: need to set STRIPE_HANDLE for batch head gpiolib: acpi: Add Terra Pad 1061 to the run_edge_events_on_boot_blacklist cifs: Fix potential softlockups while refreshing DFS cache kernel/module.c: wakeup processes in module_wq on module unload of: overlay: add_changeset_property() memory leak gfs2: fix glock reference problem in gfs2_trans_remove_revoke PCI: rcar: Fix missing MACCTLR register setting in initialization sequence leds: trigger: netdev: fix handling on interface rename net/mlx5e: Fix SFF 8472 eeprom length sunrpc: fix crash when cache_head become valid before update firmware: arm_scmi: Avoid double free in error flow gre: refetch erspan header from skb->data after pskb_may_pull() perf callchain: Fix segfault in thread__resolve_callchain_sample() workqueue: Fix missing kfree(rescuer) in destroy_workqueue() blk-mq: make sure that line break can be printed s390/smp,vdso: fix ASCE handling mm, thp, proc: report THP eligibility for each vma mfd: rk808: Fix RK818 ID template ext4: fix a bug in ext4_wait_for_tail_page_commit splice: only read in as much information as there is pipe buffer space rtc: disable uie before setting time and enable after mm/shmem.c: cast the type of unmap_start to u64 firmware: qcom: scm: Ensure 'a0' status code is treated as signed ext4: work around deleting a file with i_nlink == 0 safely powerpc: Fix vDSO clock_getres() powerpc: Avoid clang warnings around setjmp and longjmp regulator: 88pm800: fix warning same module names ath10k: fix fw crash by moving chip reset after napi disabled media: vimc: fix component match compare mlxsw: spectrum_router: Refresh nexthop neighbour when it becomes dead power: supply: cpcap-battery: Fix signed counter sample register x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk x86/MCE/AMD: Turn off MC4_MISC thresholding on all family 0x15 models scsi: hisi_sas: Reject setting programmed minimum linkrate > 1.5G scsi: hisi_sas: send primitive NOTIFY to SSP situation only net: hns3: Check variable is valid before assigning it to another net: hns3: change hnae3_register_ae_dev() to int net: hns3: clear pci private data when unload hns3 driver net/smc: do not wait under send_lock sch_cake: Correctly update parent qlen when splitting GSO packets pvcalls-front: don't return error when the ring is full e100: Fix passing zero to 'PTR_ERR' warning in e100_load_ucode_wait drbd: Change drbd_request_detach_interruptible's return type to int scsi: lpfc: Correct topology type reporting on G7 adapters scsi: lpfc: Correct code setting non existent bits in sli4 ABORT WQE scsi: lpfc: Cap NPIV vports to 256 omap: pdata-quirks: remove openpandora quirks for mmc3 and wl1251 usb: typec: fix use after free in typec_register_port() xhci: make sure interrupts are restored to correct state scsi: qla2xxx: Fix SRB leak on switch command timeout scsi: qla2xxx: Fix message indicating vectors used by driver scsi: qla2xxx: Always check the qla2x00_wait_for_hba_online() return value scsi: qla2xxx: Fix qla24xx_process_bidir_cmd() scsi: qla2xxx: Fix session lookup in qlt_abort_work() scsi: qla2xxx: Fix hang in fcport delete path scsi: qla2xxx: Fix DMA unmap leak scsi: zfcp: trace channel log even for FCP command responses block: fix single range discard merge reiserfs: fix extended attributes on the root directory ext4: Fix credit estimate for final inode freeing quota: fix livelock in dquot_writeback_dquots ext2: check err when partial != NULL quota: Check that quota is not dirty before release video/hdmi: Fix AVI bar unpack powerpc/xive: Skip ioremap() of ESB pages for LSI interrupts powerpc: Allow flush_icache_range to work across ranges >4GB powerpc/xive: Prevent page fault issues in the machine crash handler powerpc: Allow 64bit VDSO __kernel_sync_dicache to work across ranges >4GB ppdev: fix PPGETTIME/PPSETTIME ioctls ARM: dts: omap3-tao3530: Fix incorrect MMC card detection GPIO polarity mmc: host: omap_hsmmc: add code for special init of wl1251 to get rid of pandora_wl1251_init_card pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init pinctrl: samsung: Fix device node refcount leaks in init code pinctrl: samsung: Fix device node refcount leaks in S3C24xx wakeup controller init pinctrl: samsung: Fix device node refcount leaks in Exynos wakeup controller init pinctrl: samsung: Add of_node_put() before return in error path pinctrl: armada-37xx: Fix irq mask access in armada_37xx_irq_set_type() ACPI: PM: Avoid attaching ACPI PM domain to certain devices ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() ACPI: OSL: only free map once in osl.c ACPI / hotplug / PCI: Allocate resources directly under the non-hotplug bridge cpufreq: powernv: fix stack bloat and hard limit on number of CPUs PM / devfreq: Lock devfreq in trans_stat_show intel_th: pci: Add Tiger Lake CPU support intel_th: pci: Add Ice Lake CPU support intel_th: Fix a double put_device() in error path erofs: zero out when listxattr is called with no xattr cpuidle: Do not unset the driver if it is there already media: cec.h: CEC_OP_REC_FLAG_ values were swapped media: radio: wl1273: fix interrupt masking on release media: bdisp: fix memleak on release s390/mm: properly clear _PAGE_NOEXEC bit when it is not supported ar5523: check NULL before memcpy() in ar5523_cmd() cgroup: pids: use atomic64_t for pids->limit blk-mq: avoid sysfs buffer overflow with too many CPU cores md: improve handling of bio with REQ_PREFLUSH in md_flush_request() ASoC: Jack: Fix NULL pointer dereference in snd_soc_jack_report ASoC: rt5645: Fixed typo for buddy jack support. ASoC: rt5645: Fixed buddy jack support. workqueue: Fix pwq ref leak in rescuer_thread() workqueue: Fix spurious sanity check failures in destroy_workqueue() dm zoned: reduce overhead of backing device checks dm writecache: handle REQ_FUA hwrng: omap - Fix RNG wait loop timeout ovl: relax WARN_ON() on rename to self ovl: fix corner case of non-unique st_dev;st_ino lib: raid6: fix awk build warnings rtlwifi: rtl8192de: Fix missing enable interrupt flag rtlwifi: rtl8192de: Fix missing callback that tests for hw release of buffer rtlwifi: rtl8192de: Fix missing code to retrieve RX buffer address btrfs: record all roots for rename exchange on a subvol Btrfs: send, skip backreference walking for extents with many references btrfs: Remove btrfs_bio::flags member btrfs: Avoid getting stuck during cyclic writebacks Btrfs: fix negative subv_writers counter and data space leak after buffered write Btrfs: fix metadata space leak on fixup worker failure to set range as delalloc btrfs: use refcount_inc_not_zero in kill_all_nodes btrfs: check page->mapping when loading free space cache phy: renesas: rcar-gen3-usb2: Fix sysfs interface of "role" usb: dwc3: ep0: Clear started flag on completion usb: dwc3: gadget: Fix logical condition usb: dwc3: pci: add ID for the Intel Comet Lake -H variant virtio-balloon: fix managed page counts when migrating pages between zones mtd: spear_smi: Fix Write Burst mode tpm: add check after commands attribs tab allocation usb: mon: Fix a deadlock in usbmon between mmap and read usb: core: urb: fix URB structure initialization function USB: adutux: fix interface sanity check usb: roles: fix a potential use after free USB: serial: io_edgeport: fix epic endpoint lookup USB: idmouse: fix interface sanity checks USB: atm: ueagle-atm: add missing endpoint check iio: imu: inv_mpu6050: fix temperature reporting using bad unit iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting iio: adis16480: Add debugfs_reg_access entry ARM: dts: pandora-common: define wl1251 as child node of mmc3 xhci: handle some XHCI_TRUST_TX_LENGTH quirks cases as default behaviour. xhci: Increase STS_HALT timeout in xhci_suspend() xhci: Fix memory leak in xhci_add_in_port() usb: xhci: only set D3hot for pci device staging: gigaset: add endpoint-type sanity check staging: gigaset: fix illegal free on probe errors staging: gigaset: fix general protection fault on probe staging: rtl8712: fix interface sanity check staging: rtl8188eu: fix interface sanity check usb: Allow USB device to be warm reset in suspended state USB: documentation: flags on usb-storage versus UAS USB: uas: heed CAPACITY_HEURISTICS USB: uas: honor flag to avoid CAPACITY16 media: venus: remove invalid compat_ioctl32 handler scsi: qla2xxx: Fix driver unload hang usb: gadget: pch_udc: fix use after free usb: gadget: configfs: Fix missing spin_lock_init() Conflicts: drivers/usb/dwc3/ep0.c mm/memory.c Change-Id: Idaf405dc55ef10d3fb86e979e0a5e46a34e08f13 Signed-off-by: Ivaylo Georgiev <irgeorgiev@codeaurora.org>
This commit is contained in:
commit
e6ff8969c8
184 changed files with 1243 additions and 639 deletions
|
@ -4954,13 +4954,13 @@
|
|||
Flags is a set of characters, each corresponding
|
||||
to a common usb-storage quirk flag as follows:
|
||||
a = SANE_SENSE (collect more than 18 bytes
|
||||
of sense data);
|
||||
of sense data, not on uas);
|
||||
b = BAD_SENSE (don't collect more than 18
|
||||
bytes of sense data);
|
||||
bytes of sense data, not on uas);
|
||||
c = FIX_CAPACITY (decrease the reported
|
||||
device capacity by one sector);
|
||||
d = NO_READ_DISC_INFO (don't use
|
||||
READ_DISC_INFO command);
|
||||
READ_DISC_INFO command, not on uas);
|
||||
e = NO_READ_CAPACITY_16 (don't use
|
||||
READ_CAPACITY_16 command);
|
||||
f = NO_REPORT_OPCODES (don't use report opcodes
|
||||
|
@ -4975,17 +4975,18 @@
|
|||
j = NO_REPORT_LUNS (don't use report luns
|
||||
command, uas only);
|
||||
l = NOT_LOCKABLE (don't try to lock and
|
||||
unlock ejectable media);
|
||||
unlock ejectable media, not on uas);
|
||||
m = MAX_SECTORS_64 (don't transfer more
|
||||
than 64 sectors = 32 KB at a time);
|
||||
than 64 sectors = 32 KB at a time,
|
||||
not on uas);
|
||||
n = INITIAL_READ10 (force a retry of the
|
||||
initial READ(10) command);
|
||||
initial READ(10) command, not on uas);
|
||||
o = CAPACITY_OK (accept the capacity
|
||||
reported by the device);
|
||||
reported by the device, not on uas);
|
||||
p = WRITE_CACHE (the device cache is ON
|
||||
by default);
|
||||
by default, not on uas);
|
||||
r = IGNORE_RESIDUE (the device reports
|
||||
bogus residue values);
|
||||
bogus residue values, not on uas);
|
||||
s = SINGLE_LUN (the device has only one
|
||||
Logical Unit);
|
||||
t = NO_ATA_1X (don't allow ATA(12) and ATA(16)
|
||||
|
@ -4994,7 +4995,8 @@
|
|||
w = NO_WP_DETECT (don't test whether the
|
||||
medium is write-protected).
|
||||
y = ALWAYS_SYNC (issue a SYNCHRONIZE_CACHE
|
||||
even if the device claims no cache)
|
||||
even if the device claims no cache,
|
||||
not on uas)
|
||||
Example: quirks=0419:aaf5:rl,0421:0433:rc
|
||||
|
||||
user_debug= [KNL,ARM]
|
||||
|
|
|
@ -428,6 +428,7 @@ SwapPss: 0 kB
|
|||
KernelPageSize: 4 kB
|
||||
MMUPageSize: 4 kB
|
||||
Locked: 0 kB
|
||||
THPeligible: 0
|
||||
VmFlags: rd ex mr mw me dw
|
||||
Name: name from userspace
|
||||
|
||||
|
@ -466,6 +467,8 @@ replaced by copy-on-write) part of the underlying shmem object out on swap.
|
|||
"SwapPss" shows proportional swap share of this mapping. Unlike "Swap", this
|
||||
does not take into account swapped out page of underlying shmem objects.
|
||||
"Locked" indicates whether the mapping is locked in memory or not.
|
||||
"THPeligible" indicates whether the mapping is eligible for THP pages - 1 if
|
||||
true, 0 otherwise.
|
||||
|
||||
"VmFlags" field deserves a separate description. This member represents the kernel
|
||||
flags associated with the particular virtual memory area in two letter encoded
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 89
|
||||
SUBLEVEL = 90
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
|
|
@ -229,6 +229,17 @@
|
|||
gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>; /* GPIO_164 */
|
||||
};
|
||||
|
||||
/* wl1251 wifi+bt module */
|
||||
wlan_en: fixed-regulator-wg7210_en {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "vwlan";
|
||||
regulator-min-microvolt = <1800000>;
|
||||
regulator-max-microvolt = <1800000>;
|
||||
startup-delay-us = <50000>;
|
||||
enable-active-high;
|
||||
gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
/* wg7210 (wifi+bt module) 32k clock buffer */
|
||||
wg7210_32k: fixed-regulator-wg7210_32k {
|
||||
compatible = "regulator-fixed";
|
||||
|
@ -525,9 +536,30 @@
|
|||
/*wp-gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;*/ /* GPIO_127 */
|
||||
};
|
||||
|
||||
/* mmc3 is probed using pdata-quirks to pass wl1251 card data */
|
||||
&mmc3 {
|
||||
status = "disabled";
|
||||
vmmc-supply = <&wlan_en>;
|
||||
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
ti,non-removable;
|
||||
cap-power-off-card;
|
||||
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc3_pins>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
wlan: wifi@1 {
|
||||
compatible = "ti,wl1251";
|
||||
|
||||
reg = <1>;
|
||||
|
||||
interrupt-parent = <&gpio1>;
|
||||
interrupts = <21 IRQ_TYPE_LEVEL_HIGH>; /* GPIO_21 */
|
||||
|
||||
ti,wl1251-has-eeprom;
|
||||
};
|
||||
};
|
||||
|
||||
/* bluetooth*/
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
pinctrl-0 = <&mmc1_pins>;
|
||||
vmmc-supply = <&vmmc1>;
|
||||
vqmmc-supply = <&vsim>;
|
||||
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_HIGH>;
|
||||
cd-gpios = <&twl_gpio 0 GPIO_ACTIVE_LOW>;
|
||||
bus-width = <8>;
|
||||
};
|
||||
|
||||
|
|
|
@ -305,108 +305,15 @@ static void __init omap3_logicpd_torpedo_init(void)
|
|||
}
|
||||
|
||||
/* omap3pandora legacy devices */
|
||||
#define PANDORA_WIFI_IRQ_GPIO 21
|
||||
#define PANDORA_WIFI_NRESET_GPIO 23
|
||||
|
||||
static struct platform_device pandora_backlight = {
|
||||
.name = "pandora-backlight",
|
||||
.id = -1,
|
||||
};
|
||||
|
||||
static struct regulator_consumer_supply pandora_vmmc3_supply[] = {
|
||||
REGULATOR_SUPPLY("vmmc", "omap_hsmmc.2"),
|
||||
};
|
||||
|
||||
static struct regulator_init_data pandora_vmmc3 = {
|
||||
.constraints = {
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
},
|
||||
.num_consumer_supplies = ARRAY_SIZE(pandora_vmmc3_supply),
|
||||
.consumer_supplies = pandora_vmmc3_supply,
|
||||
};
|
||||
|
||||
static struct fixed_voltage_config pandora_vwlan = {
|
||||
.supply_name = "vwlan",
|
||||
.microvolts = 1800000, /* 1.8V */
|
||||
.gpio = PANDORA_WIFI_NRESET_GPIO,
|
||||
.startup_delay = 50000, /* 50ms */
|
||||
.enable_high = 1,
|
||||
.init_data = &pandora_vmmc3,
|
||||
};
|
||||
|
||||
static struct platform_device pandora_vwlan_device = {
|
||||
.name = "reg-fixed-voltage",
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &pandora_vwlan,
|
||||
},
|
||||
};
|
||||
|
||||
static void pandora_wl1251_init_card(struct mmc_card *card)
|
||||
{
|
||||
/*
|
||||
* We have TI wl1251 attached to MMC3. Pass this information to
|
||||
* SDIO core because it can't be probed by normal methods.
|
||||
*/
|
||||
if (card->type == MMC_TYPE_SDIO || card->type == MMC_TYPE_SD_COMBO) {
|
||||
card->quirks |= MMC_QUIRK_NONSTD_SDIO;
|
||||
card->cccr.wide_bus = 1;
|
||||
card->cis.vendor = 0x104c;
|
||||
card->cis.device = 0x9066;
|
||||
card->cis.blksize = 512;
|
||||
card->cis.max_dtr = 24000000;
|
||||
card->ocr = 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
static struct omap2_hsmmc_info pandora_mmc3[] = {
|
||||
{
|
||||
.mmc = 3,
|
||||
.caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
|
||||
.gpio_cd = -EINVAL,
|
||||
.gpio_wp = -EINVAL,
|
||||
.init_card = pandora_wl1251_init_card,
|
||||
},
|
||||
{} /* Terminator */
|
||||
};
|
||||
|
||||
static void __init pandora_wl1251_init(void)
|
||||
{
|
||||
struct wl1251_platform_data pandora_wl1251_pdata;
|
||||
int ret;
|
||||
|
||||
memset(&pandora_wl1251_pdata, 0, sizeof(pandora_wl1251_pdata));
|
||||
|
||||
pandora_wl1251_pdata.power_gpio = -1;
|
||||
|
||||
ret = gpio_request_one(PANDORA_WIFI_IRQ_GPIO, GPIOF_IN, "wl1251 irq");
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
pandora_wl1251_pdata.irq = gpio_to_irq(PANDORA_WIFI_IRQ_GPIO);
|
||||
if (pandora_wl1251_pdata.irq < 0)
|
||||
goto fail_irq;
|
||||
|
||||
pandora_wl1251_pdata.use_eeprom = true;
|
||||
ret = wl1251_set_platform_data(&pandora_wl1251_pdata);
|
||||
if (ret < 0)
|
||||
goto fail_irq;
|
||||
|
||||
return;
|
||||
|
||||
fail_irq:
|
||||
gpio_free(PANDORA_WIFI_IRQ_GPIO);
|
||||
fail:
|
||||
pr_err("wl1251 board initialisation failed\n");
|
||||
}
|
||||
|
||||
static void __init omap3_pandora_legacy_init(void)
|
||||
{
|
||||
platform_device_register(&pandora_backlight);
|
||||
platform_device_register(&pandora_vwlan_device);
|
||||
omap_hsmmc_init(pandora_mmc3);
|
||||
omap_hsmmc_late_init(pandora_mmc3);
|
||||
pandora_wl1251_init();
|
||||
}
|
||||
#endif /* CONFIG_ARCH_OMAP3 */
|
||||
|
||||
|
|
|
@ -86,6 +86,7 @@ struct vdso_data {
|
|||
__s32 wtom_clock_nsec; /* Wall to monotonic clock nsec */
|
||||
__s64 wtom_clock_sec; /* Wall to monotonic clock sec */
|
||||
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
|
||||
__u32 hrtimer_res; /* hrtimer resolution */
|
||||
__u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
};
|
||||
|
@ -107,6 +108,7 @@ struct vdso_data {
|
|||
__s32 wtom_clock_nsec;
|
||||
struct timespec stamp_xtime; /* xtime as at tb_orig_stamp */
|
||||
__u32 stamp_sec_fraction; /* fractional seconds of stamp_xtime */
|
||||
__u32 hrtimer_res; /* hrtimer resolution */
|
||||
__u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */
|
||||
__u32 dcache_block_size; /* L1 d-cache block size */
|
||||
__u32 icache_block_size; /* L1 i-cache block size */
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
|
||||
|
||||
# Disable clang warning for using setjmp without setjmp.h header
|
||||
CFLAGS_crash.o += $(call cc-disable-warning, builtin-requires-header)
|
||||
# Avoid clang warnings around longjmp/setjmp declarations
|
||||
CFLAGS_crash.o += -ffreestanding
|
||||
|
||||
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
|
||||
|
||||
|
|
|
@ -379,6 +379,7 @@ int main(void)
|
|||
OFFSET(WTOM_CLOCK_NSEC, vdso_data, wtom_clock_nsec);
|
||||
OFFSET(STAMP_XTIME, vdso_data, stamp_xtime);
|
||||
OFFSET(STAMP_SEC_FRAC, vdso_data, stamp_sec_fraction);
|
||||
OFFSET(CLOCK_HRTIMER_RES, vdso_data, hrtimer_res);
|
||||
OFFSET(CFG_ICACHE_BLOCKSZ, vdso_data, icache_block_size);
|
||||
OFFSET(CFG_DCACHE_BLOCKSZ, vdso_data, dcache_block_size);
|
||||
OFFSET(CFG_ICACHE_LOGBLOCKSZ, vdso_data, icache_log_block_size);
|
||||
|
@ -409,7 +410,6 @@ int main(void)
|
|||
DEFINE(CLOCK_REALTIME_COARSE, CLOCK_REALTIME_COARSE);
|
||||
DEFINE(CLOCK_MONOTONIC_COARSE, CLOCK_MONOTONIC_COARSE);
|
||||
DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
|
||||
DEFINE(CLOCK_REALTIME_RES, MONOTONIC_RES_NSEC);
|
||||
|
||||
#ifdef CONFIG_BUG
|
||||
DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
|
||||
|
|
|
@ -87,7 +87,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
|
|||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5 /* ensure we get enough */
|
||||
lwz r9,DCACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of cache block size */
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
1: dcbst 0,r6
|
||||
|
@ -103,7 +103,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
|
|||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5
|
||||
lwz r9,ICACHEL1LOGBLOCKSIZE(r10) /* Get log-2 of Icache block size */
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
2: icbi 0,r6
|
||||
|
|
|
@ -929,6 +929,7 @@ void update_vsyscall(struct timekeeper *tk)
|
|||
vdso_data->wtom_clock_nsec = tk->wall_to_monotonic.tv_nsec;
|
||||
vdso_data->stamp_xtime = xt;
|
||||
vdso_data->stamp_sec_fraction = frac_sec;
|
||||
vdso_data->hrtimer_res = hrtimer_resolution;
|
||||
smp_wmb();
|
||||
++(vdso_data->tb_update_count);
|
||||
}
|
||||
|
|
|
@ -160,12 +160,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
|
|||
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
|
||||
bne cr0,99f
|
||||
|
||||
mflr r12
|
||||
.cfi_register lr,r12
|
||||
bl __get_datapage@local /* get data page */
|
||||
lwz r5, CLOCK_HRTIMER_RES(r3)
|
||||
mtlr r12
|
||||
li r3,0
|
||||
cmpli cr0,r4,0
|
||||
crclr cr0*4+so
|
||||
beqlr
|
||||
lis r5,CLOCK_REALTIME_RES@h
|
||||
ori r5,r5,CLOCK_REALTIME_RES@l
|
||||
stw r3,TSPC32_TV_SEC(r4)
|
||||
stw r5,TSPC32_TV_NSEC(r4)
|
||||
blr
|
||||
|
|
|
@ -39,7 +39,7 @@ V_FUNCTION_BEGIN(__kernel_sync_dicache)
|
|||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5 /* ensure we get enough */
|
||||
lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10)
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
crclr cr0*4+so
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
|
@ -56,7 +56,7 @@ V_FUNCTION_BEGIN(__kernel_sync_dicache)
|
|||
subf r8,r6,r4 /* compute length */
|
||||
add r8,r8,r5
|
||||
lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10)
|
||||
srw. r8,r8,r9 /* compute line count */
|
||||
srd. r8,r8,r9 /* compute line count */
|
||||
crclr cr0*4+so
|
||||
beqlr /* nothing to do? */
|
||||
mtctr r8
|
||||
|
|
|
@ -190,12 +190,15 @@ V_FUNCTION_BEGIN(__kernel_clock_getres)
|
|||
cror cr0*4+eq,cr0*4+eq,cr1*4+eq
|
||||
bne cr0,99f
|
||||
|
||||
mflr r12
|
||||
.cfi_register lr,r12
|
||||
bl V_LOCAL_FUNC(__get_datapage)
|
||||
lwz r5, CLOCK_HRTIMER_RES(r3)
|
||||
mtlr r12
|
||||
li r3,0
|
||||
cmpldi cr0,r4,0
|
||||
crclr cr0*4+so
|
||||
beqlr
|
||||
lis r5,CLOCK_REALTIME_RES@h
|
||||
ori r5,r5,CLOCK_REALTIME_RES@l
|
||||
std r3,TSPC64_TV_SEC(r4)
|
||||
std r5,TSPC64_TV_NSEC(r4)
|
||||
blr
|
||||
|
|
|
@ -968,6 +968,15 @@ static int xive_irq_alloc_data(unsigned int virq, irq_hw_number_t hw)
|
|||
xd->target = XIVE_INVALID_TARGET;
|
||||
irq_set_handler_data(virq, xd);
|
||||
|
||||
/*
|
||||
* Turn OFF by default the interrupt being mapped. A side
|
||||
* effect of this check is the mapping the ESB page of the
|
||||
* interrupt in the Linux address space. This prevents page
|
||||
* fault issues in the crash handler which masks all
|
||||
* interrupts.
|
||||
*/
|
||||
xive_esb_read(xd, XIVE_ESB_SET_PQ_01);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -359,20 +359,28 @@ static int xive_spapr_populate_irq_data(u32 hw_irq, struct xive_irq_data *data)
|
|||
data->esb_shift = esb_shift;
|
||||
data->trig_page = trig_page;
|
||||
|
||||
data->hw_irq = hw_irq;
|
||||
|
||||
/*
|
||||
* No chip-id for the sPAPR backend. This has an impact how we
|
||||
* pick a target. See xive_pick_irq_target().
|
||||
*/
|
||||
data->src_chip = XIVE_INVALID_CHIP_ID;
|
||||
|
||||
/*
|
||||
* When the H_INT_ESB flag is set, the H_INT_ESB hcall should
|
||||
* be used for interrupt management. Skip the remapping of the
|
||||
* ESB pages which are not available.
|
||||
*/
|
||||
if (data->flags & XIVE_IRQ_FLAG_H_INT_ESB)
|
||||
return 0;
|
||||
|
||||
data->eoi_mmio = ioremap(data->eoi_page, 1u << data->esb_shift);
|
||||
if (!data->eoi_mmio) {
|
||||
pr_err("Failed to map EOI page for irq 0x%x\n", hw_irq);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
data->hw_irq = hw_irq;
|
||||
|
||||
/* Full function page supports trigger */
|
||||
if (flags & XIVE_SRC_TRIGGER) {
|
||||
data->trig_mmio = data->eoi_mmio;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
# Makefile for xmon
|
||||
|
||||
# Disable clang warning for using setjmp without setjmp.h header
|
||||
subdir-ccflags-y := $(call cc-disable-warning, builtin-requires-header)
|
||||
# Avoid clang warnings around longjmp/setjmp declarations
|
||||
subdir-ccflags-y := -ffreestanding
|
||||
|
||||
subdir-ccflags-$(CONFIG_PPC_WERROR) += -Werror
|
||||
|
||||
|
|
|
@ -1150,8 +1150,6 @@ void gmap_pmdp_idte_global(struct mm_struct *mm, unsigned long vmaddr);
|
|||
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
|
||||
pte_t *ptep, pte_t entry)
|
||||
{
|
||||
if (!MACHINE_HAS_NX)
|
||||
pte_val(entry) &= ~_PAGE_NOEXEC;
|
||||
if (pte_present(entry))
|
||||
pte_val(entry) &= ~_PAGE_UNUSED;
|
||||
if (mm_has_pgste(mm))
|
||||
|
@ -1168,6 +1166,8 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
|
|||
{
|
||||
pte_t __pte;
|
||||
pte_val(__pte) = physpage + pgprot_val(pgprot);
|
||||
if (!MACHINE_HAS_NX)
|
||||
pte_val(__pte) &= ~_PAGE_NOEXEC;
|
||||
return pte_mkyoung(__pte);
|
||||
}
|
||||
|
||||
|
|
|
@ -261,9 +261,12 @@ static void pcpu_prepare_secondary(struct pcpu *pcpu, int cpu)
|
|||
lc->spinlock_index = 0;
|
||||
lc->percpu_offset = __per_cpu_offset[cpu];
|
||||
lc->kernel_asce = S390_lowcore.kernel_asce;
|
||||
lc->user_asce = S390_lowcore.kernel_asce;
|
||||
lc->machine_flags = S390_lowcore.machine_flags;
|
||||
lc->user_timer = lc->system_timer = lc->steal_timer = 0;
|
||||
__ctl_store(lc->cregs_save_area, 0, 15);
|
||||
lc->cregs_save_area[1] = lc->kernel_asce;
|
||||
lc->cregs_save_area[7] = lc->vdso_asce;
|
||||
save_access_regs((unsigned int *) lc->access_regs_save_area);
|
||||
memcpy(lc->stfle_fac_list, S390_lowcore.stfle_fac_list,
|
||||
sizeof(lc->stfle_fac_list));
|
||||
|
@ -810,6 +813,8 @@ static void smp_start_secondary(void *cpuvoid)
|
|||
restore_access_regs(S390_lowcore.access_regs_save_area);
|
||||
__ctl_load(S390_lowcore.cregs_save_area, 0, 15);
|
||||
__load_psw_mask(PSW_KERNEL_BITS | PSW_MASK_DAT);
|
||||
set_cpu_flag(CIF_ASCE_PRIMARY);
|
||||
set_cpu_flag(CIF_ASCE_SECONDARY);
|
||||
cpu_init();
|
||||
preempt_disable();
|
||||
init_cpu_timer();
|
||||
|
|
|
@ -1631,36 +1631,6 @@ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
|
|||
if (c->x86 == 0x15 && c->x86_model <= 0xf)
|
||||
mce_flags.overflow_recov = 1;
|
||||
|
||||
/*
|
||||
* Turn off MC4_MISC thresholding banks on those models since
|
||||
* they're not supported there.
|
||||
*/
|
||||
if (c->x86 == 0x15 &&
|
||||
(c->x86_model >= 0x10 && c->x86_model <= 0x1f)) {
|
||||
int i;
|
||||
u64 hwcr;
|
||||
bool need_toggle;
|
||||
u32 msrs[] = {
|
||||
0x00000413, /* MC4_MISC0 */
|
||||
0xc0000408, /* MC4_MISC1 */
|
||||
};
|
||||
|
||||
rdmsrl(MSR_K7_HWCR, hwcr);
|
||||
|
||||
/* McStatusWrEn has to be set */
|
||||
need_toggle = !(hwcr & BIT(18));
|
||||
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr | BIT(18));
|
||||
|
||||
/* Clear CntP bit safely */
|
||||
for (i = 0; i < ARRAY_SIZE(msrs); i++)
|
||||
msr_clear_bit(msrs[i], 62);
|
||||
|
||||
/* restore old settings */
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr);
|
||||
}
|
||||
}
|
||||
|
||||
if (c->x86_vendor == X86_VENDOR_INTEL) {
|
||||
|
|
|
@ -545,6 +545,40 @@ prepare_threshold_block(unsigned int bank, unsigned int block, u32 addr,
|
|||
return offset;
|
||||
}
|
||||
|
||||
/*
|
||||
* Turn off MC4_MISC thresholding banks on all family 0x15 models since
|
||||
* they're not supported there.
|
||||
*/
|
||||
void disable_err_thresholding(struct cpuinfo_x86 *c)
|
||||
{
|
||||
int i;
|
||||
u64 hwcr;
|
||||
bool need_toggle;
|
||||
u32 msrs[] = {
|
||||
0x00000413, /* MC4_MISC0 */
|
||||
0xc0000408, /* MC4_MISC1 */
|
||||
};
|
||||
|
||||
if (c->x86 != 0x15)
|
||||
return;
|
||||
|
||||
rdmsrl(MSR_K7_HWCR, hwcr);
|
||||
|
||||
/* McStatusWrEn has to be set */
|
||||
need_toggle = !(hwcr & BIT(18));
|
||||
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr | BIT(18));
|
||||
|
||||
/* Clear CntP bit safely */
|
||||
for (i = 0; i < ARRAY_SIZE(msrs); i++)
|
||||
msr_clear_bit(msrs[i], 62);
|
||||
|
||||
/* restore old settings */
|
||||
if (need_toggle)
|
||||
wrmsrl(MSR_K7_HWCR, hwcr);
|
||||
}
|
||||
|
||||
/* cpu init entry point, called from mce.c with preempt off */
|
||||
void mce_amd_feature_init(struct cpuinfo_x86 *c)
|
||||
{
|
||||
|
@ -552,6 +586,8 @@ void mce_amd_feature_init(struct cpuinfo_x86 *c)
|
|||
unsigned int bank, block, cpu = smp_processor_id();
|
||||
int offset = -1;
|
||||
|
||||
disable_err_thresholding(c);
|
||||
|
||||
for (bank = 0; bank < mca_cfg.banks; ++bank) {
|
||||
if (mce_flags.smca)
|
||||
smca_configure(bank, cpu);
|
||||
|
|
|
@ -786,7 +786,7 @@ static struct request *attempt_merge(struct request_queue *q,
|
|||
|
||||
req->__data_len += blk_rq_bytes(next);
|
||||
|
||||
if (req_op(req) != REQ_OP_DISCARD)
|
||||
if (!blk_discard_mergable(req))
|
||||
elv_merge_requests(q, req, next);
|
||||
|
||||
/*
|
||||
|
|
|
@ -151,20 +151,25 @@ static ssize_t blk_mq_hw_sysfs_nr_reserved_tags_show(struct blk_mq_hw_ctx *hctx,
|
|||
|
||||
static ssize_t blk_mq_hw_sysfs_cpus_show(struct blk_mq_hw_ctx *hctx, char *page)
|
||||
{
|
||||
const size_t size = PAGE_SIZE - 1;
|
||||
unsigned int i, first = 1;
|
||||
ssize_t ret = 0;
|
||||
int ret = 0, pos = 0;
|
||||
|
||||
for_each_cpu(i, hctx->cpumask) {
|
||||
if (first)
|
||||
ret += sprintf(ret + page, "%u", i);
|
||||
ret = snprintf(pos + page, size - pos, "%u", i);
|
||||
else
|
||||
ret += sprintf(ret + page, ", %u", i);
|
||||
ret = snprintf(pos + page, size - pos, ", %u", i);
|
||||
|
||||
if (ret >= size - pos)
|
||||
break;
|
||||
|
||||
first = 0;
|
||||
pos += ret;
|
||||
}
|
||||
|
||||
ret += sprintf(ret + page, "\n");
|
||||
return ret;
|
||||
ret = snprintf(pos + page, size + 1 - pos, "\n");
|
||||
return pos + ret;
|
||||
}
|
||||
|
||||
static struct attribute *default_ctx_attrs[] = {
|
||||
|
|
|
@ -166,7 +166,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
|
|||
{
|
||||
acpi_status status;
|
||||
|
||||
if (!*data)
|
||||
if (!data)
|
||||
return -EINVAL;
|
||||
|
||||
status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
|
||||
|
|
|
@ -1254,9 +1254,19 @@ static void acpi_dev_pm_detach(struct device *dev, bool power_off)
|
|||
*/
|
||||
int acpi_dev_pm_attach(struct device *dev, bool power_on)
|
||||
{
|
||||
/*
|
||||
* Skip devices whose ACPI companions match the device IDs below,
|
||||
* because they require special power management handling incompatible
|
||||
* with the generic ACPI PM domain.
|
||||
*/
|
||||
static const struct acpi_device_id special_pm_ids[] = {
|
||||
{"PNP0C0B", }, /* Generic ACPI fan */
|
||||
{"INT3404", }, /* Fan */
|
||||
{}
|
||||
};
|
||||
struct acpi_device *adev = ACPI_COMPANION(dev);
|
||||
|
||||
if (!adev)
|
||||
if (!adev || !acpi_match_device_ids(adev, special_pm_ids))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
|
|
|
@ -374,19 +374,21 @@ void *__ref acpi_os_map_memory(acpi_physical_address phys, acpi_size size)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_map_memory);
|
||||
|
||||
static void acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
||||
/* Must be called with mutex_lock(&acpi_ioremap_lock) */
|
||||
static unsigned long acpi_os_drop_map_ref(struct acpi_ioremap *map)
|
||||
{
|
||||
if (!--map->refcount)
|
||||
unsigned long refcount = --map->refcount;
|
||||
|
||||
if (!refcount)
|
||||
list_del_rcu(&map->list);
|
||||
return refcount;
|
||||
}
|
||||
|
||||
static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
||||
{
|
||||
if (!map->refcount) {
|
||||
synchronize_rcu_expedited();
|
||||
acpi_unmap(map->phys, map->virt);
|
||||
kfree(map);
|
||||
}
|
||||
synchronize_rcu_expedited();
|
||||
acpi_unmap(map->phys, map->virt);
|
||||
kfree(map);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -406,6 +408,7 @@ static void acpi_os_map_cleanup(struct acpi_ioremap *map)
|
|||
void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
||||
{
|
||||
struct acpi_ioremap *map;
|
||||
unsigned long refcount;
|
||||
|
||||
if (!acpi_permanent_mmap) {
|
||||
__acpi_unmap_table(virt, size);
|
||||
|
@ -419,10 +422,11 @@ void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size)
|
|||
WARN(true, PREFIX "%s: bad address %p\n", __func__, virt);
|
||||
return;
|
||||
}
|
||||
acpi_os_drop_map_ref(map);
|
||||
refcount = acpi_os_drop_map_ref(map);
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
|
||||
acpi_os_map_cleanup(map);
|
||||
if (!refcount)
|
||||
acpi_os_map_cleanup(map);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpi_os_unmap_iomem);
|
||||
|
||||
|
@ -457,6 +461,7 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
|||
{
|
||||
u64 addr;
|
||||
struct acpi_ioremap *map;
|
||||
unsigned long refcount;
|
||||
|
||||
if (gas->space_id != ACPI_ADR_SPACE_SYSTEM_MEMORY)
|
||||
return;
|
||||
|
@ -472,10 +477,11 @@ void acpi_os_unmap_generic_address(struct acpi_generic_address *gas)
|
|||
mutex_unlock(&acpi_ioremap_lock);
|
||||
return;
|
||||
}
|
||||
acpi_os_drop_map_ref(map);
|
||||
refcount = acpi_os_drop_map_ref(map);
|
||||
mutex_unlock(&acpi_ioremap_lock);
|
||||
|
||||
acpi_os_map_cleanup(map);
|
||||
if (!refcount)
|
||||
acpi_os_map_cleanup(map);
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_os_unmap_generic_address);
|
||||
|
||||
|
|
|
@ -688,11 +688,9 @@ request_detach(struct drbd_device *device)
|
|||
CS_VERBOSE | CS_ORDERED | CS_INHIBIT_MD_IO);
|
||||
}
|
||||
|
||||
enum drbd_state_rv
|
||||
drbd_request_detach_interruptible(struct drbd_device *device)
|
||||
int drbd_request_detach_interruptible(struct drbd_device *device)
|
||||
{
|
||||
enum drbd_state_rv rv;
|
||||
int ret;
|
||||
int ret, rv;
|
||||
|
||||
drbd_suspend_io(device); /* so no-one is stuck in drbd_al_begin_io */
|
||||
wait_event_interruptible(device->state_wait,
|
||||
|
|
|
@ -162,8 +162,7 @@ static inline int drbd_request_state(struct drbd_device *device,
|
|||
}
|
||||
|
||||
/* for use in adm_detach() (drbd_adm_detach(), drbd_adm_down()) */
|
||||
enum drbd_state_rv
|
||||
drbd_request_detach_interruptible(struct drbd_device *device);
|
||||
int drbd_request_detach_interruptible(struct drbd_device *device);
|
||||
|
||||
enum drbd_role conn_highest_role(struct drbd_connection *connection);
|
||||
enum drbd_role conn_highest_peer(struct drbd_connection *connection);
|
||||
|
|
|
@ -66,6 +66,13 @@
|
|||
#define OMAP4_RNG_OUTPUT_SIZE 0x8
|
||||
#define EIP76_RNG_OUTPUT_SIZE 0x10
|
||||
|
||||
/*
|
||||
* EIP76 RNG takes approx. 700us to produce 16 bytes of output data
|
||||
* as per testing results. And to account for the lack of udelay()'s
|
||||
* reliability, we keep the timeout as 1000us.
|
||||
*/
|
||||
#define RNG_DATA_FILL_TIMEOUT 100
|
||||
|
||||
enum {
|
||||
RNG_OUTPUT_0_REG = 0,
|
||||
RNG_OUTPUT_1_REG,
|
||||
|
@ -176,7 +183,7 @@ static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max,
|
|||
if (max < priv->pdata->data_size)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < 20; i++) {
|
||||
for (i = 0; i < RNG_DATA_FILL_TIMEOUT; i++) {
|
||||
present = priv->pdata->data_present(priv);
|
||||
if (present || !wait)
|
||||
break;
|
||||
|
|
|
@ -623,20 +623,27 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
if (copy_from_user(time32, argp, sizeof(time32)))
|
||||
return -EFAULT;
|
||||
|
||||
if ((time32[0] < 0) || (time32[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
return pp_set_timeout(pp->pdev, time32[0], time32[1]);
|
||||
|
||||
case PPSETTIME64:
|
||||
if (copy_from_user(time64, argp, sizeof(time64)))
|
||||
return -EFAULT;
|
||||
|
||||
if ((time64[0] < 0) || (time64[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
|
||||
time64[1] >>= 32;
|
||||
|
||||
return pp_set_timeout(pp->pdev, time64[0], time64[1]);
|
||||
|
||||
case PPGETTIME32:
|
||||
jiffies_to_timespec64(pp->pdev->timeout, &ts);
|
||||
time32[0] = ts.tv_sec;
|
||||
time32[1] = ts.tv_nsec / NSEC_PER_USEC;
|
||||
if ((time32[0] < 0) || (time32[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (copy_to_user(argp, time32, sizeof(time32)))
|
||||
return -EFAULT;
|
||||
|
@ -647,8 +654,9 @@ static int pp_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|||
jiffies_to_timespec64(pp->pdev->timeout, &ts);
|
||||
time64[0] = ts.tv_sec;
|
||||
time64[1] = ts.tv_nsec / NSEC_PER_USEC;
|
||||
if ((time64[0] < 0) || (time64[1] < 0))
|
||||
return -EINVAL;
|
||||
|
||||
if (IS_ENABLED(CONFIG_SPARC64) && !in_compat_syscall())
|
||||
time64[1] <<= 32;
|
||||
|
||||
if (copy_to_user(argp, time64, sizeof(time64)))
|
||||
return -EFAULT;
|
||||
|
|
|
@ -938,6 +938,10 @@ static int tpm2_get_cc_attrs_tbl(struct tpm_chip *chip)
|
|||
|
||||
chip->cc_attrs_tbl = devm_kcalloc(&chip->dev, 4, nr_commands,
|
||||
GFP_KERNEL);
|
||||
if (!chip->cc_attrs_tbl) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
rc = tpm_buf_init(&buf, TPM2_ST_NO_SESSIONS, TPM2_CC_GET_CAPABILITY);
|
||||
if (rc)
|
||||
|
|
|
@ -1042,9 +1042,14 @@ static struct cpufreq_driver powernv_cpufreq_driver = {
|
|||
|
||||
static int init_chip_info(void)
|
||||
{
|
||||
unsigned int chip[256];
|
||||
unsigned int *chip;
|
||||
unsigned int cpu, i;
|
||||
unsigned int prev_chip_id = UINT_MAX;
|
||||
int ret = 0;
|
||||
|
||||
chip = kcalloc(num_possible_cpus(), sizeof(*chip), GFP_KERNEL);
|
||||
if (!chip)
|
||||
return -ENOMEM;
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
unsigned int id = cpu_to_chip_id(cpu);
|
||||
|
@ -1056,8 +1061,10 @@ static int init_chip_info(void)
|
|||
}
|
||||
|
||||
chips = kcalloc(nr_chips, sizeof(struct chip), GFP_KERNEL);
|
||||
if (!chips)
|
||||
return -ENOMEM;
|
||||
if (!chips) {
|
||||
ret = -ENOMEM;
|
||||
goto free_and_return;
|
||||
}
|
||||
|
||||
for (i = 0; i < nr_chips; i++) {
|
||||
chips[i].id = chip[i];
|
||||
|
@ -1067,7 +1074,9 @@ static int init_chip_info(void)
|
|||
per_cpu(chip_info, cpu) = &chips[i];
|
||||
}
|
||||
|
||||
return 0;
|
||||
free_and_return:
|
||||
kfree(chip);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void clean_chip_info(void)
|
||||
|
|
|
@ -62,25 +62,24 @@ static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv)
|
|||
* __cpuidle_set_driver - set per CPU driver variables for the given driver.
|
||||
* @drv: a valid pointer to a struct cpuidle_driver
|
||||
*
|
||||
* For each CPU in the driver's cpumask, unset the registered driver per CPU
|
||||
* to @drv.
|
||||
*
|
||||
* Returns 0 on success, -EBUSY if the CPUs have driver(s) already.
|
||||
* Returns 0 on success, -EBUSY if any CPU in the cpumask have a driver
|
||||
* different from drv already.
|
||||
*/
|
||||
static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
|
||||
{
|
||||
int cpu;
|
||||
|
||||
for_each_cpu(cpu, drv->cpumask) {
|
||||
struct cpuidle_driver *old_drv;
|
||||
|
||||
if (__cpuidle_get_cpu_driver(cpu)) {
|
||||
__cpuidle_unset_driver(drv);
|
||||
old_drv = __cpuidle_get_cpu_driver(cpu);
|
||||
if (old_drv && old_drv != drv)
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
per_cpu(cpuidle_drivers, cpu) = drv;
|
||||
}
|
||||
|
||||
for_each_cpu(cpu, drv->cpumask)
|
||||
per_cpu(cpuidle_drivers, cpu) = drv;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@ int devfreq_update_status(struct devfreq *devfreq, unsigned long freq)
|
|||
int lev, prev_lev, ret = 0;
|
||||
unsigned long cur_time;
|
||||
|
||||
lockdep_assert_held(&devfreq->lock);
|
||||
cur_time = jiffies;
|
||||
|
||||
/* Immediately exit if previous_freq is not initialized yet. */
|
||||
|
@ -1346,12 +1347,17 @@ static ssize_t trans_stat_show(struct device *dev,
|
|||
int i, j;
|
||||
unsigned int max_state = devfreq->profile->max_state;
|
||||
|
||||
if (!devfreq->stop_polling &&
|
||||
devfreq_update_status(devfreq, devfreq->previous_freq))
|
||||
return 0;
|
||||
if (max_state == 0)
|
||||
return sprintf(buf, "Not Supported.\n");
|
||||
|
||||
mutex_lock(&devfreq->lock);
|
||||
if (!devfreq->stop_polling &&
|
||||
devfreq_update_status(devfreq, devfreq->previous_freq)) {
|
||||
mutex_unlock(&devfreq->lock);
|
||||
return 0;
|
||||
}
|
||||
mutex_unlock(&devfreq->lock);
|
||||
|
||||
len = sprintf(buf, " From : To\n");
|
||||
len += sprintf(buf + len, " :");
|
||||
for (i = 0; i < max_state; i++)
|
||||
|
|
|
@ -135,8 +135,10 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
|
|||
return NULL;
|
||||
|
||||
id = ida_simple_get(&scmi_bus_id, 1, 0, GFP_KERNEL);
|
||||
if (id < 0)
|
||||
goto free_mem;
|
||||
if (id < 0) {
|
||||
kfree(scmi_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
scmi_dev->id = id;
|
||||
scmi_dev->protocol_id = protocol;
|
||||
|
@ -154,8 +156,6 @@ scmi_device_create(struct device_node *np, struct device *parent, int protocol)
|
|||
put_dev:
|
||||
put_device(&scmi_dev->dev);
|
||||
ida_simple_remove(&scmi_bus_id, id);
|
||||
free_mem:
|
||||
kfree(scmi_dev);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,7 @@ static int qcom_scm_call(struct device *dev, u32 svc_id, u32 cmd_id,
|
|||
kfree(args_virt);
|
||||
}
|
||||
|
||||
if (res->a0 < 0)
|
||||
if ((long)res->a0 < 0)
|
||||
return qcom_scm_remap_error(res->a0);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -1265,11 +1265,28 @@ late_initcall_sync(acpi_gpio_handle_deferred_request_irqs);
|
|||
|
||||
static const struct dmi_system_id run_edge_events_on_boot_blacklist[] = {
|
||||
{
|
||||
/*
|
||||
* The Minix Neo Z83-4 has a micro-USB-B id-pin handler for
|
||||
* a non existing micro-USB-B connector which puts the HDMI
|
||||
* DDC pins in GPIO mode, breaking HDMI support.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "MINIX"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"),
|
||||
}
|
||||
},
|
||||
{
|
||||
/*
|
||||
* The Terra Pad 1061 has a micro-USB-B id-pin handler, which
|
||||
* instead of controlling the actual micro-USB-B turns the 5V
|
||||
* boost for its USB-A connector off. The actual micro-USB-B
|
||||
* connector is wired for charging only.
|
||||
*/
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "Wortmann_AG"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "TERRA_PAD_1061"),
|
||||
}
|
||||
},
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -629,10 +629,8 @@ intel_th_subdevice_alloc(struct intel_th *th,
|
|||
}
|
||||
|
||||
err = intel_th_device_add_resources(thdev, res, subdev->nres);
|
||||
if (err) {
|
||||
put_device(&thdev->dev);
|
||||
if (err)
|
||||
goto fail_put_device;
|
||||
}
|
||||
|
||||
if (subdev->type == INTEL_TH_OUTPUT) {
|
||||
thdev->dev.devt = MKDEV(th->major, th->num_thdevs);
|
||||
|
@ -646,10 +644,8 @@ intel_th_subdevice_alloc(struct intel_th *th,
|
|||
}
|
||||
|
||||
err = device_add(&thdev->dev);
|
||||
if (err) {
|
||||
put_device(&thdev->dev);
|
||||
if (err)
|
||||
goto fail_free_res;
|
||||
}
|
||||
|
||||
/* need switch driver to be loaded to enumerate the rest */
|
||||
if (subdev->type == INTEL_TH_SWITCH && !req) {
|
||||
|
|
|
@ -185,6 +185,16 @@ static const struct pci_device_id intel_th_pci_id_table[] = {
|
|||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x45c5),
|
||||
.driver_data = (kernel_ulong_t)&intel_th_2x,
|
||||
},
|
||||
{
|
||||
/* Ice Lake CPU */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x8a29),
|
||||
.driver_data = (kernel_ulong_t)&intel_th_2x,
|
||||
},
|
||||
{
|
||||
/* Tiger Lake CPU */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x9a33),
|
||||
.driver_data = (kernel_ulong_t)&intel_th_2x,
|
||||
},
|
||||
{
|
||||
/* Tiger Lake PCH */
|
||||
PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0xa0a6),
|
||||
|
|
|
@ -229,7 +229,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
|
|||
*val2 = 65536;
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
} else {
|
||||
*val = 100;
|
||||
*val = 100000;
|
||||
*val2 = 65536;
|
||||
return IIO_VAL_FRACTIONAL;
|
||||
}
|
||||
|
|
|
@ -727,6 +727,7 @@ static const struct iio_info adis16480_info = {
|
|||
.read_raw = &adis16480_read_raw,
|
||||
.write_raw = &adis16480_write_raw,
|
||||
.update_scan_mode = adis_update_scan_mode,
|
||||
.debugfs_reg_access = adis_debugfs_reg_access,
|
||||
};
|
||||
|
||||
static int adis16480_stop_device(struct iio_dev *indio_dev)
|
||||
|
|
|
@ -122,6 +122,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6050,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 1024,
|
||||
.temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU6500_WHOAMI_VALUE,
|
||||
|
@ -129,6 +130,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6500,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 512,
|
||||
.temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU6515_WHOAMI_VALUE,
|
||||
|
@ -136,6 +138,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6500,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 512,
|
||||
.temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU6000_WHOAMI_VALUE,
|
||||
|
@ -143,6 +146,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6050,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 1024,
|
||||
.temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU9150_WHOAMI_VALUE,
|
||||
|
@ -150,6 +154,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6050,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 1024,
|
||||
.temp = {INV_MPU6050_TEMP_OFFSET, INV_MPU6050_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU9250_WHOAMI_VALUE,
|
||||
|
@ -157,6 +162,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6500,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 512,
|
||||
.temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_MPU9255_WHOAMI_VALUE,
|
||||
|
@ -164,6 +170,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6500,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 512,
|
||||
.temp = {INV_MPU6500_TEMP_OFFSET, INV_MPU6500_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_ICM20608_WHOAMI_VALUE,
|
||||
|
@ -171,6 +178,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_6500,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 512,
|
||||
.temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE},
|
||||
},
|
||||
{
|
||||
.whoami = INV_ICM20602_WHOAMI_VALUE,
|
||||
|
@ -178,6 +186,7 @@ static const struct inv_mpu6050_hw hw_info[] = {
|
|||
.reg = ®_set_icm20602,
|
||||
.config = &chip_config_6050,
|
||||
.fifo_size = 1008,
|
||||
.temp = {INV_ICM20608_TEMP_OFFSET, INV_ICM20608_TEMP_SCALE},
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -478,12 +487,8 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev,
|
|||
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
case IIO_TEMP:
|
||||
*val = 0;
|
||||
if (st->chip_type == INV_ICM20602)
|
||||
*val2 = INV_ICM20602_TEMP_SCALE;
|
||||
else
|
||||
*val2 = INV_MPU6050_TEMP_SCALE;
|
||||
|
||||
*val = st->hw->temp.scale / 1000000;
|
||||
*val2 = st->hw->temp.scale % 1000000;
|
||||
return IIO_VAL_INT_PLUS_MICRO;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -491,11 +496,7 @@ inv_mpu6050_read_raw(struct iio_dev *indio_dev,
|
|||
case IIO_CHAN_INFO_OFFSET:
|
||||
switch (chan->type) {
|
||||
case IIO_TEMP:
|
||||
if (st->chip_type == INV_ICM20602)
|
||||
*val = INV_ICM20602_TEMP_OFFSET;
|
||||
else
|
||||
*val = INV_MPU6050_TEMP_OFFSET;
|
||||
|
||||
*val = st->hw->temp.offset;
|
||||
return IIO_VAL_INT;
|
||||
default:
|
||||
return -EINVAL;
|
||||
|
@ -859,6 +860,25 @@ static const struct iio_chan_spec inv_mpu_channels[] = {
|
|||
INV_MPU6050_CHAN(IIO_ACCEL, IIO_MOD_Z, INV_MPU6050_SCAN_ACCL_Z),
|
||||
};
|
||||
|
||||
static const unsigned long inv_mpu_scan_masks[] = {
|
||||
/* 3-axis accel */
|
||||
BIT(INV_MPU6050_SCAN_ACCL_X)
|
||||
| BIT(INV_MPU6050_SCAN_ACCL_Y)
|
||||
| BIT(INV_MPU6050_SCAN_ACCL_Z),
|
||||
/* 3-axis gyro */
|
||||
BIT(INV_MPU6050_SCAN_GYRO_X)
|
||||
| BIT(INV_MPU6050_SCAN_GYRO_Y)
|
||||
| BIT(INV_MPU6050_SCAN_GYRO_Z),
|
||||
/* 6-axis accel + gyro */
|
||||
BIT(INV_MPU6050_SCAN_ACCL_X)
|
||||
| BIT(INV_MPU6050_SCAN_ACCL_Y)
|
||||
| BIT(INV_MPU6050_SCAN_ACCL_Z)
|
||||
| BIT(INV_MPU6050_SCAN_GYRO_X)
|
||||
| BIT(INV_MPU6050_SCAN_GYRO_Y)
|
||||
| BIT(INV_MPU6050_SCAN_GYRO_Z),
|
||||
0,
|
||||
};
|
||||
|
||||
static const struct iio_chan_spec inv_icm20602_channels[] = {
|
||||
IIO_CHAN_SOFT_TIMESTAMP(INV_ICM20602_SCAN_TIMESTAMP),
|
||||
{
|
||||
|
@ -885,6 +905,28 @@ static const struct iio_chan_spec inv_icm20602_channels[] = {
|
|||
INV_MPU6050_CHAN(IIO_ACCEL, IIO_MOD_Z, INV_ICM20602_SCAN_ACCL_Z),
|
||||
};
|
||||
|
||||
static const unsigned long inv_icm20602_scan_masks[] = {
|
||||
/* 3-axis accel + temp (mandatory) */
|
||||
BIT(INV_ICM20602_SCAN_ACCL_X)
|
||||
| BIT(INV_ICM20602_SCAN_ACCL_Y)
|
||||
| BIT(INV_ICM20602_SCAN_ACCL_Z)
|
||||
| BIT(INV_ICM20602_SCAN_TEMP),
|
||||
/* 3-axis gyro + temp (mandatory) */
|
||||
BIT(INV_ICM20602_SCAN_GYRO_X)
|
||||
| BIT(INV_ICM20602_SCAN_GYRO_Y)
|
||||
| BIT(INV_ICM20602_SCAN_GYRO_Z)
|
||||
| BIT(INV_ICM20602_SCAN_TEMP),
|
||||
/* 6-axis accel + gyro + temp (mandatory) */
|
||||
BIT(INV_ICM20602_SCAN_ACCL_X)
|
||||
| BIT(INV_ICM20602_SCAN_ACCL_Y)
|
||||
| BIT(INV_ICM20602_SCAN_ACCL_Z)
|
||||
| BIT(INV_ICM20602_SCAN_GYRO_X)
|
||||
| BIT(INV_ICM20602_SCAN_GYRO_Y)
|
||||
| BIT(INV_ICM20602_SCAN_GYRO_Z)
|
||||
| BIT(INV_ICM20602_SCAN_TEMP),
|
||||
0,
|
||||
};
|
||||
|
||||
/*
|
||||
* The user can choose any frequency between INV_MPU6050_MIN_FIFO_RATE and
|
||||
* INV_MPU6050_MAX_FIFO_RATE, but only these frequencies are matched by the
|
||||
|
@ -1089,9 +1131,11 @@ int inv_mpu_core_probe(struct regmap *regmap, int irq, const char *name,
|
|||
if (chip_type == INV_ICM20602) {
|
||||
indio_dev->channels = inv_icm20602_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(inv_icm20602_channels);
|
||||
indio_dev->available_scan_masks = inv_icm20602_scan_masks;
|
||||
} else {
|
||||
indio_dev->channels = inv_mpu_channels;
|
||||
indio_dev->num_channels = ARRAY_SIZE(inv_mpu_channels);
|
||||
indio_dev->available_scan_masks = inv_mpu_scan_masks;
|
||||
}
|
||||
|
||||
indio_dev->info = &mpu_info;
|
||||
|
|
|
@ -109,6 +109,7 @@ struct inv_mpu6050_chip_config {
|
|||
* @reg: register map of the chip.
|
||||
* @config: configuration of the chip.
|
||||
* @fifo_size: size of the FIFO in bytes.
|
||||
* @temp: offset and scale to apply to raw temperature.
|
||||
*/
|
||||
struct inv_mpu6050_hw {
|
||||
u8 whoami;
|
||||
|
@ -116,6 +117,10 @@ struct inv_mpu6050_hw {
|
|||
const struct inv_mpu6050_reg_map *reg;
|
||||
const struct inv_mpu6050_chip_config *config;
|
||||
size_t fifo_size;
|
||||
struct {
|
||||
int offset;
|
||||
int scale;
|
||||
} temp;
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -224,16 +229,19 @@ struct inv_mpu6050_state {
|
|||
#define INV_MPU6050_REG_UP_TIME_MIN 5000
|
||||
#define INV_MPU6050_REG_UP_TIME_MAX 10000
|
||||
|
||||
#define INV_MPU6050_TEMP_OFFSET 12421
|
||||
#define INV_MPU6050_TEMP_SCALE 2941
|
||||
#define INV_MPU6050_TEMP_OFFSET 12420
|
||||
#define INV_MPU6050_TEMP_SCALE 2941176
|
||||
#define INV_MPU6050_MAX_GYRO_FS_PARAM 3
|
||||
#define INV_MPU6050_MAX_ACCL_FS_PARAM 3
|
||||
#define INV_MPU6050_THREE_AXIS 3
|
||||
#define INV_MPU6050_GYRO_CONFIG_FSR_SHIFT 3
|
||||
#define INV_MPU6050_ACCL_CONFIG_FSR_SHIFT 3
|
||||
|
||||
#define INV_ICM20602_TEMP_OFFSET 8170
|
||||
#define INV_ICM20602_TEMP_SCALE 3060
|
||||
#define INV_MPU6500_TEMP_OFFSET 7011
|
||||
#define INV_MPU6500_TEMP_SCALE 2995178
|
||||
|
||||
#define INV_ICM20608_TEMP_OFFSET 8170
|
||||
#define INV_ICM20608_TEMP_SCALE 3059976
|
||||
|
||||
/* 6 + 6 round up and plus 8 */
|
||||
#define INV_MPU6050_OUTPUT_DATA_SIZE 24
|
||||
|
|
|
@ -574,8 +574,7 @@ static int gigaset_initcshw(struct cardstate *cs)
|
|||
{
|
||||
struct usb_cardstate *ucs;
|
||||
|
||||
cs->hw.usb = ucs =
|
||||
kmalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
|
||||
cs->hw.usb = ucs = kzalloc(sizeof(struct usb_cardstate), GFP_KERNEL);
|
||||
if (!ucs) {
|
||||
pr_err("out of memory\n");
|
||||
return -ENOMEM;
|
||||
|
@ -587,9 +586,6 @@ static int gigaset_initcshw(struct cardstate *cs)
|
|||
ucs->bchars[3] = 0;
|
||||
ucs->bchars[4] = 0x11;
|
||||
ucs->bchars[5] = 0x13;
|
||||
ucs->bulk_out_buffer = NULL;
|
||||
ucs->bulk_out_urb = NULL;
|
||||
ucs->read_urb = NULL;
|
||||
tasklet_init(&cs->write_tasklet,
|
||||
gigaset_modem_fill, (unsigned long) cs);
|
||||
|
||||
|
@ -688,6 +684,11 @@ static int gigaset_probe(struct usb_interface *interface,
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
if (hostif->desc.bNumEndpoints < 2) {
|
||||
dev_err(&interface->dev, "missing endpoints\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
dev_info(&udev->dev, "%s: Device matched ... !\n", __func__);
|
||||
|
||||
/* allocate memory for our device state and initialize it */
|
||||
|
@ -707,6 +708,12 @@ static int gigaset_probe(struct usb_interface *interface,
|
|||
|
||||
endpoint = &hostif->endpoint[0].desc;
|
||||
|
||||
if (!usb_endpoint_is_bulk_out(endpoint)) {
|
||||
dev_err(&interface->dev, "missing bulk-out endpoint\n");
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
|
||||
ucs->bulk_out_size = buffer_size;
|
||||
ucs->bulk_out_epnum = usb_endpoint_num(endpoint);
|
||||
|
@ -726,6 +733,12 @@ static int gigaset_probe(struct usb_interface *interface,
|
|||
|
||||
endpoint = &hostif->endpoint[1].desc;
|
||||
|
||||
if (!usb_endpoint_is_int_in(endpoint)) {
|
||||
dev_err(&interface->dev, "missing int-in endpoint\n");
|
||||
retval = -ENODEV;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ucs->busy = 0;
|
||||
|
||||
ucs->read_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
|
|
|
@ -302,10 +302,12 @@ static int netdev_trig_notify(struct notifier_block *nb,
|
|||
container_of(nb, struct led_netdev_data, notifier);
|
||||
|
||||
if (evt != NETDEV_UP && evt != NETDEV_DOWN && evt != NETDEV_CHANGE
|
||||
&& evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER)
|
||||
&& evt != NETDEV_REGISTER && evt != NETDEV_UNREGISTER
|
||||
&& evt != NETDEV_CHANGENAME)
|
||||
return NOTIFY_DONE;
|
||||
|
||||
if (!(dev == trigger_data->net_dev ||
|
||||
(evt == NETDEV_CHANGENAME && !strcmp(dev->name, trigger_data->device_name)) ||
|
||||
(evt == NETDEV_REGISTER && !strcmp(dev->name, trigger_data->device_name))))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
|
@ -315,6 +317,7 @@ static int netdev_trig_notify(struct notifier_block *nb,
|
|||
|
||||
clear_bit(NETDEV_LED_MODE_LINKUP, &trigger_data->mode);
|
||||
switch (evt) {
|
||||
case NETDEV_CHANGENAME:
|
||||
case NETDEV_REGISTER:
|
||||
if (trigger_data->net_dev)
|
||||
dev_put(trigger_data->net_dev);
|
||||
|
|
|
@ -1223,7 +1223,8 @@ static int writecache_map(struct dm_target *ti, struct bio *bio)
|
|||
}
|
||||
} while (bio->bi_iter.bi_size);
|
||||
|
||||
if (unlikely(wc->uncommitted_blocks >= wc->autocommit_blocks))
|
||||
if (unlikely(bio->bi_opf & REQ_FUA ||
|
||||
wc->uncommitted_blocks >= wc->autocommit_blocks))
|
||||
writecache_flush(wc);
|
||||
else
|
||||
writecache_schedule_autocommit(wc);
|
||||
|
|
|
@ -552,6 +552,7 @@ static struct dmz_mblock *dmz_get_mblock(struct dmz_metadata *zmd,
|
|||
TASK_UNINTERRUPTIBLE);
|
||||
if (test_bit(DMZ_META_ERROR, &mblk->state)) {
|
||||
dmz_release_mblock(zmd, mblk);
|
||||
dmz_check_bdev(zmd->dev);
|
||||
return ERR_PTR(-EIO);
|
||||
}
|
||||
|
||||
|
@ -623,6 +624,8 @@ static int dmz_rdwr_block(struct dmz_metadata *zmd, int op, sector_t block,
|
|||
ret = submit_bio_wait(bio);
|
||||
bio_put(bio);
|
||||
|
||||
if (ret)
|
||||
dmz_check_bdev(zmd->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -689,6 +692,7 @@ static int dmz_write_dirty_mblocks(struct dmz_metadata *zmd,
|
|||
TASK_UNINTERRUPTIBLE);
|
||||
if (test_bit(DMZ_META_ERROR, &mblk->state)) {
|
||||
clear_bit(DMZ_META_ERROR, &mblk->state);
|
||||
dmz_check_bdev(zmd->dev);
|
||||
ret = -EIO;
|
||||
}
|
||||
nr_mblks_submitted--;
|
||||
|
@ -766,7 +770,7 @@ int dmz_flush_metadata(struct dmz_metadata *zmd)
|
|||
/* If there are no dirty metadata blocks, just flush the device cache */
|
||||
if (list_empty(&write_list)) {
|
||||
ret = blkdev_issue_flush(zmd->dev->bdev, GFP_NOIO, NULL);
|
||||
goto out;
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -776,7 +780,7 @@ int dmz_flush_metadata(struct dmz_metadata *zmd)
|
|||
*/
|
||||
ret = dmz_log_dirty_mblocks(zmd, &write_list);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* The log is on disk. It is now safe to update in place
|
||||
|
@ -784,11 +788,11 @@ int dmz_flush_metadata(struct dmz_metadata *zmd)
|
|||
*/
|
||||
ret = dmz_write_dirty_mblocks(zmd, &write_list, zmd->mblk_primary);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto err;
|
||||
|
||||
ret = dmz_write_sb(zmd, zmd->mblk_primary);
|
||||
if (ret)
|
||||
goto out;
|
||||
goto err;
|
||||
|
||||
while (!list_empty(&write_list)) {
|
||||
mblk = list_first_entry(&write_list, struct dmz_mblock, link);
|
||||
|
@ -803,16 +807,20 @@ int dmz_flush_metadata(struct dmz_metadata *zmd)
|
|||
|
||||
zmd->sb_gen++;
|
||||
out:
|
||||
if (ret && !list_empty(&write_list)) {
|
||||
spin_lock(&zmd->mblk_lock);
|
||||
list_splice(&write_list, &zmd->mblk_dirty_list);
|
||||
spin_unlock(&zmd->mblk_lock);
|
||||
}
|
||||
|
||||
dmz_unlock_flush(zmd);
|
||||
up_write(&zmd->mblk_sem);
|
||||
|
||||
return ret;
|
||||
|
||||
err:
|
||||
if (!list_empty(&write_list)) {
|
||||
spin_lock(&zmd->mblk_lock);
|
||||
list_splice(&write_list, &zmd->mblk_dirty_list);
|
||||
spin_unlock(&zmd->mblk_lock);
|
||||
}
|
||||
if (!dmz_check_bdev(zmd->dev))
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -1235,6 +1243,7 @@ static int dmz_update_zone(struct dmz_metadata *zmd, struct dm_zone *zone)
|
|||
if (ret) {
|
||||
dmz_dev_err(zmd->dev, "Get zone %u report failed",
|
||||
dmz_id(zmd, zone));
|
||||
dmz_check_bdev(zmd->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,6 +81,7 @@ static int dmz_reclaim_align_wp(struct dmz_reclaim *zrc, struct dm_zone *zone,
|
|||
"Align zone %u wp %llu to %llu (wp+%u) blocks failed %d",
|
||||
dmz_id(zmd, zone), (unsigned long long)wp_block,
|
||||
(unsigned long long)block, nr_blocks, ret);
|
||||
dmz_check_bdev(zrc->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -488,12 +489,7 @@ static void dmz_reclaim_work(struct work_struct *work)
|
|||
ret = dmz_do_reclaim(zrc);
|
||||
if (ret) {
|
||||
dmz_dev_debug(zrc->dev, "Reclaim error %d\n", ret);
|
||||
if (ret == -EIO)
|
||||
/*
|
||||
* LLD might be performing some error handling sequence
|
||||
* at the underlying device. To not interfere, do not
|
||||
* attempt to schedule the next reclaim run immediately.
|
||||
*/
|
||||
if (!dmz_check_bdev(zrc->dev))
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,6 +79,8 @@ static inline void dmz_bio_endio(struct bio *bio, blk_status_t status)
|
|||
|
||||
if (status != BLK_STS_OK && bio->bi_status == BLK_STS_OK)
|
||||
bio->bi_status = status;
|
||||
if (bio->bi_status != BLK_STS_OK)
|
||||
bioctx->target->dev->flags |= DMZ_CHECK_BDEV;
|
||||
|
||||
if (atomic_dec_and_test(&bioctx->ref)) {
|
||||
struct dm_zone *zone = bioctx->zone;
|
||||
|
@ -564,31 +566,51 @@ static int dmz_queue_chunk_work(struct dmz_target *dmz, struct bio *bio)
|
|||
}
|
||||
|
||||
/*
|
||||
* Check the backing device availability. If it's on the way out,
|
||||
* Check if the backing device is being removed. If it's on the way out,
|
||||
* start failing I/O. Reclaim and metadata components also call this
|
||||
* function to cleanly abort operation in the event of such failure.
|
||||
*/
|
||||
bool dmz_bdev_is_dying(struct dmz_dev *dmz_dev)
|
||||
{
|
||||
struct gendisk *disk;
|
||||
if (dmz_dev->flags & DMZ_BDEV_DYING)
|
||||
return true;
|
||||
|
||||
if (!(dmz_dev->flags & DMZ_BDEV_DYING)) {
|
||||
disk = dmz_dev->bdev->bd_disk;
|
||||
if (blk_queue_dying(bdev_get_queue(dmz_dev->bdev))) {
|
||||
dmz_dev_warn(dmz_dev, "Backing device queue dying");
|
||||
dmz_dev->flags |= DMZ_BDEV_DYING;
|
||||
} else if (disk->fops->check_events) {
|
||||
if (disk->fops->check_events(disk, 0) &
|
||||
DISK_EVENT_MEDIA_CHANGE) {
|
||||
dmz_dev_warn(dmz_dev, "Backing device offline");
|
||||
dmz_dev->flags |= DMZ_BDEV_DYING;
|
||||
}
|
||||
}
|
||||
if (dmz_dev->flags & DMZ_CHECK_BDEV)
|
||||
return !dmz_check_bdev(dmz_dev);
|
||||
|
||||
if (blk_queue_dying(bdev_get_queue(dmz_dev->bdev))) {
|
||||
dmz_dev_warn(dmz_dev, "Backing device queue dying");
|
||||
dmz_dev->flags |= DMZ_BDEV_DYING;
|
||||
}
|
||||
|
||||
return dmz_dev->flags & DMZ_BDEV_DYING;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the backing device availability. This detects such events as
|
||||
* backing device going offline due to errors, media removals, etc.
|
||||
* This check is less efficient than dmz_bdev_is_dying() and should
|
||||
* only be performed as a part of error handling.
|
||||
*/
|
||||
bool dmz_check_bdev(struct dmz_dev *dmz_dev)
|
||||
{
|
||||
struct gendisk *disk;
|
||||
|
||||
dmz_dev->flags &= ~DMZ_CHECK_BDEV;
|
||||
|
||||
if (dmz_bdev_is_dying(dmz_dev))
|
||||
return false;
|
||||
|
||||
disk = dmz_dev->bdev->bd_disk;
|
||||
if (disk->fops->check_events &&
|
||||
disk->fops->check_events(disk, 0) & DISK_EVENT_MEDIA_CHANGE) {
|
||||
dmz_dev_warn(dmz_dev, "Backing device offline");
|
||||
dmz_dev->flags |= DMZ_BDEV_DYING;
|
||||
}
|
||||
|
||||
return !(dmz_dev->flags & DMZ_BDEV_DYING);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a new BIO.
|
||||
*/
|
||||
|
@ -902,8 +924,8 @@ static int dmz_prepare_ioctl(struct dm_target *ti, struct block_device **bdev)
|
|||
{
|
||||
struct dmz_target *dmz = ti->private;
|
||||
|
||||
if (dmz_bdev_is_dying(dmz->dev))
|
||||
return -ENODEV;
|
||||
if (!dmz_check_bdev(dmz->dev))
|
||||
return -EIO;
|
||||
|
||||
*bdev = dmz->dev->bdev;
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ struct dmz_dev {
|
|||
|
||||
/* Device flags. */
|
||||
#define DMZ_BDEV_DYING (1 << 0)
|
||||
#define DMZ_CHECK_BDEV (2 << 0)
|
||||
|
||||
/*
|
||||
* Zone descriptor.
|
||||
|
@ -254,5 +255,6 @@ void dmz_schedule_reclaim(struct dmz_reclaim *zrc);
|
|||
* Functions defined in dm-zoned-target.c
|
||||
*/
|
||||
bool dmz_bdev_is_dying(struct dmz_dev *dmz_dev);
|
||||
bool dmz_check_bdev(struct dmz_dev *dmz_dev);
|
||||
|
||||
#endif /* DM_ZONED_H */
|
||||
|
|
|
@ -252,10 +252,9 @@ static bool linear_make_request(struct mddev *mddev, struct bio *bio)
|
|||
sector_t start_sector, end_sector, data_offset;
|
||||
sector_t bio_sector = bio->bi_iter.bi_sector;
|
||||
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
|
||||
md_flush_request(mddev, bio);
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)
|
||||
&& md_flush_request(mddev, bio))
|
||||
return true;
|
||||
}
|
||||
|
||||
tmp_dev = which_dev(mddev, bio_sector);
|
||||
start_sector = tmp_dev->end_sector - tmp_dev->rdev->sectors;
|
||||
|
|
|
@ -112,10 +112,9 @@ static bool multipath_make_request(struct mddev *mddev, struct bio * bio)
|
|||
struct multipath_bh * mp_bh;
|
||||
struct multipath_info *multipath;
|
||||
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
|
||||
md_flush_request(mddev, bio);
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)
|
||||
&& md_flush_request(mddev, bio))
|
||||
return true;
|
||||
}
|
||||
|
||||
mp_bh = mempool_alloc(&conf->pool, GFP_NOIO);
|
||||
|
||||
|
|
|
@ -487,7 +487,13 @@ static void md_submit_flush_data(struct work_struct *ws)
|
|||
}
|
||||
}
|
||||
|
||||
void md_flush_request(struct mddev *mddev, struct bio *bio)
|
||||
/*
|
||||
* Manages consolidation of flushes and submitting any flushes needed for
|
||||
* a bio with REQ_PREFLUSH. Returns true if the bio is finished or is
|
||||
* being finished in another context. Returns false if the flushing is
|
||||
* complete but still needs the I/O portion of the bio to be processed.
|
||||
*/
|
||||
bool md_flush_request(struct mddev *mddev, struct bio *bio)
|
||||
{
|
||||
ktime_t start = ktime_get_boottime();
|
||||
spin_lock_irq(&mddev->lock);
|
||||
|
@ -512,9 +518,10 @@ void md_flush_request(struct mddev *mddev, struct bio *bio)
|
|||
bio_endio(bio);
|
||||
else {
|
||||
bio->bi_opf &= ~REQ_PREFLUSH;
|
||||
mddev->pers->make_request(mddev, bio);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
EXPORT_SYMBOL(md_flush_request);
|
||||
|
||||
|
|
|
@ -532,7 +532,7 @@ struct md_personality
|
|||
int level;
|
||||
struct list_head list;
|
||||
struct module *owner;
|
||||
bool (*make_request)(struct mddev *mddev, struct bio *bio);
|
||||
bool __must_check (*make_request)(struct mddev *mddev, struct bio *bio);
|
||||
/*
|
||||
* start up works that do NOT require md_thread. tasks that
|
||||
* requires md_thread should go into start()
|
||||
|
@ -684,7 +684,7 @@ extern void md_error(struct mddev *mddev, struct md_rdev *rdev);
|
|||
extern void md_finish_reshape(struct mddev *mddev);
|
||||
|
||||
extern int mddev_congested(struct mddev *mddev, int bits);
|
||||
extern void md_flush_request(struct mddev *mddev, struct bio *bio);
|
||||
extern bool __must_check md_flush_request(struct mddev *mddev, struct bio *bio);
|
||||
extern void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
|
||||
sector_t sector, int size, struct page *page);
|
||||
extern int md_super_wait(struct mddev *mddev);
|
||||
|
|
|
@ -580,10 +580,9 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio)
|
|||
unsigned chunk_sects;
|
||||
unsigned sectors;
|
||||
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
|
||||
md_flush_request(mddev, bio);
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)
|
||||
&& md_flush_request(mddev, bio))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (unlikely((bio_op(bio) == REQ_OP_DISCARD))) {
|
||||
raid0_handle_discard(mddev, bio);
|
||||
|
|
|
@ -1537,10 +1537,9 @@ static bool raid1_make_request(struct mddev *mddev, struct bio *bio)
|
|||
{
|
||||
sector_t sectors;
|
||||
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
|
||||
md_flush_request(mddev, bio);
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)
|
||||
&& md_flush_request(mddev, bio))
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
* There is a limit to the maximum size, but
|
||||
|
|
|
@ -1562,10 +1562,9 @@ static bool raid10_make_request(struct mddev *mddev, struct bio *bio)
|
|||
int chunk_sects = chunk_mask + 1;
|
||||
int sectors = bio_sectors(bio);
|
||||
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)) {
|
||||
md_flush_request(mddev, bio);
|
||||
if (unlikely(bio->bi_opf & REQ_PREFLUSH)
|
||||
&& md_flush_request(mddev, bio))
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!md_write_start(mddev, bio))
|
||||
return false;
|
||||
|
|
|
@ -5590,8 +5590,8 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
|
|||
if (ret == 0)
|
||||
return true;
|
||||
if (ret == -ENODEV) {
|
||||
md_flush_request(mddev, bi);
|
||||
return true;
|
||||
if (md_flush_request(mddev, bi))
|
||||
return true;
|
||||
}
|
||||
/* ret == -EAGAIN, fallback */
|
||||
/*
|
||||
|
@ -5724,7 +5724,7 @@ static bool raid5_make_request(struct mddev *mddev, struct bio * bi)
|
|||
do_flush = false;
|
||||
}
|
||||
|
||||
if (!sh->batch_head)
|
||||
if (!sh->batch_head || sh == sh->batch_head)
|
||||
set_bit(STRIPE_HANDLE, &sh->state);
|
||||
clear_bit(STRIPE_DELAYED, &sh->state);
|
||||
if ((!sh->batch_head || sh == sh->batch_head) &&
|
||||
|
|
|
@ -1115,9 +1115,6 @@ static const struct v4l2_file_operations vdec_fops = {
|
|||
.unlocked_ioctl = video_ioctl2,
|
||||
.poll = v4l2_m2m_fop_poll,
|
||||
.mmap = v4l2_m2m_fop_mmap,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl32 = v4l2_compat_ioctl32,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int vdec_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -1220,9 +1220,6 @@ static const struct v4l2_file_operations venc_fops = {
|
|||
.unlocked_ioctl = video_ioctl2,
|
||||
.poll = v4l2_m2m_fop_poll,
|
||||
.mmap = v4l2_m2m_fop_mmap,
|
||||
#ifdef CONFIG_COMPAT
|
||||
.compat_ioctl32 = v4l2_compat_ioctl32,
|
||||
#endif
|
||||
};
|
||||
|
||||
static int venc_probe(struct platform_device *pdev)
|
||||
|
|
|
@ -651,8 +651,7 @@ static int bdisp_release(struct file *file)
|
|||
|
||||
dev_dbg(bdisp->dev, "%s\n", __func__);
|
||||
|
||||
if (mutex_lock_interruptible(&bdisp->lock))
|
||||
return -ERESTARTSYS;
|
||||
mutex_lock(&bdisp->lock);
|
||||
|
||||
v4l2_m2m_ctx_release(ctx->fh.m2m_ctx);
|
||||
|
||||
|
|
|
@ -243,10 +243,7 @@ static void vimc_comp_unbind(struct device *master)
|
|||
|
||||
static int vimc_comp_compare(struct device *comp, void *data)
|
||||
{
|
||||
const struct platform_device *pdev = to_platform_device(comp);
|
||||
const char *name = data;
|
||||
|
||||
return !strcmp(pdev->dev.platform_data, name);
|
||||
return comp == data;
|
||||
}
|
||||
|
||||
static struct component_match *vimc_add_subdevs(struct vimc_device *vimc)
|
||||
|
@ -276,7 +273,7 @@ static struct component_match *vimc_add_subdevs(struct vimc_device *vimc)
|
|||
}
|
||||
|
||||
component_match_add(&vimc->pdev.dev, &match, vimc_comp_compare,
|
||||
(void *)vimc->pipe_cfg->ents[i].name);
|
||||
&vimc->subdevs[i]->dev);
|
||||
}
|
||||
|
||||
return match;
|
||||
|
|
|
@ -1156,8 +1156,7 @@ static int wl1273_fm_fops_release(struct file *file)
|
|||
if (radio->rds_users > 0) {
|
||||
radio->rds_users--;
|
||||
if (radio->rds_users == 0) {
|
||||
if (mutex_lock_interruptible(&core->lock))
|
||||
return -EINTR;
|
||||
mutex_lock(&core->lock);
|
||||
|
||||
radio->irq_flags &= ~WL1273_RDS_EVENT;
|
||||
|
||||
|
|
|
@ -1661,6 +1661,36 @@ static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card)
|
|||
|
||||
if (mmc_pdata(host)->init_card)
|
||||
mmc_pdata(host)->init_card(card);
|
||||
else if (card->type == MMC_TYPE_SDIO ||
|
||||
card->type == MMC_TYPE_SD_COMBO) {
|
||||
struct device_node *np = mmc_dev(mmc)->of_node;
|
||||
|
||||
/*
|
||||
* REVISIT: should be moved to sdio core and made more
|
||||
* general e.g. by expanding the DT bindings of child nodes
|
||||
* to provide a mechanism to provide this information:
|
||||
* Documentation/devicetree/bindings/mmc/mmc-card.txt
|
||||
*/
|
||||
|
||||
np = of_get_compatible_child(np, "ti,wl1251");
|
||||
if (np) {
|
||||
/*
|
||||
* We have TI wl1251 attached to MMC3. Pass this
|
||||
* information to the SDIO core because it can't be
|
||||
* probed by normal methods.
|
||||
*/
|
||||
|
||||
dev_info(host->dev, "found wl1251\n");
|
||||
card->quirks |= MMC_QUIRK_NONSTD_SDIO;
|
||||
card->cccr.wide_bus = 1;
|
||||
card->cis.vendor = 0x104c;
|
||||
card->cis.device = 0x9066;
|
||||
card->cis.blksize = 512;
|
||||
card->cis.max_dtr = 24000000;
|
||||
card->ocr = 0x80;
|
||||
of_node_put(np);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
|
||||
|
|
|
@ -592,6 +592,26 @@ static int spear_mtd_read(struct mtd_info *mtd, loff_t from, size_t len,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* The purpose of this function is to ensure a memcpy_toio() with byte writes
|
||||
* only. Its structure is inspired from the ARM implementation of _memcpy_toio()
|
||||
* which also does single byte writes but cannot be used here as this is just an
|
||||
* implementation detail and not part of the API. Not mentioning the comment
|
||||
* stating that _memcpy_toio() should be optimized.
|
||||
*/
|
||||
static void spear_smi_memcpy_toio_b(volatile void __iomem *dest,
|
||||
const void *src, size_t len)
|
||||
{
|
||||
const unsigned char *from = src;
|
||||
|
||||
while (len) {
|
||||
len--;
|
||||
writeb(*from, dest);
|
||||
from++;
|
||||
dest++;
|
||||
}
|
||||
}
|
||||
|
||||
static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
|
||||
void __iomem *dest, const void *src, size_t len)
|
||||
{
|
||||
|
@ -614,7 +634,23 @@ static inline int spear_smi_cpy_toio(struct spear_smi *dev, u32 bank,
|
|||
ctrlreg1 = readl(dev->io_base + SMI_CR1);
|
||||
writel((ctrlreg1 | WB_MODE) & ~SW_MODE, dev->io_base + SMI_CR1);
|
||||
|
||||
memcpy_toio(dest, src, len);
|
||||
/*
|
||||
* In Write Burst mode (WB_MODE), the specs states that writes must be:
|
||||
* - incremental
|
||||
* - of the same size
|
||||
* The ARM implementation of memcpy_toio() will optimize the number of
|
||||
* I/O by using as much 4-byte writes as possible, surrounded by
|
||||
* 2-byte/1-byte access if:
|
||||
* - the destination is not 4-byte aligned
|
||||
* - the length is not a multiple of 4-byte.
|
||||
* Avoid this alternance of write access size by using our own 'byte
|
||||
* access' helper if at least one of the two conditions above is true.
|
||||
*/
|
||||
if (IS_ALIGNED(len, sizeof(u32)) &&
|
||||
IS_ALIGNED((uintptr_t)dest, sizeof(u32)))
|
||||
memcpy_toio(dest, src, len);
|
||||
else
|
||||
spear_smi_memcpy_toio_b(dest, src, len);
|
||||
|
||||
writel(ctrlreg1, dev->io_base + SMI_CR1);
|
||||
|
||||
|
|
|
@ -173,8 +173,12 @@ void hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo)
|
|||
if (!id)
|
||||
continue;
|
||||
|
||||
/* ae_dev init should set flag */
|
||||
if (!ae_algo->ops) {
|
||||
dev_err(&ae_dev->pdev->dev, "ae_algo ops are null\n");
|
||||
continue;
|
||||
}
|
||||
ae_dev->ops = ae_algo->ops;
|
||||
|
||||
ret = ae_algo->ops->init_ae_dev(ae_dev);
|
||||
if (ret) {
|
||||
dev_err(&ae_dev->pdev->dev,
|
||||
|
@ -182,6 +186,7 @@ void hnae3_register_ae_algo(struct hnae3_ae_algo *ae_algo)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* ae_dev init should set flag */
|
||||
hnae3_set_bit(ae_dev->flag, HNAE3_DEV_INITED_B, 1);
|
||||
|
||||
/* check the client list for the match with this ae_dev type and
|
||||
|
@ -239,7 +244,7 @@ EXPORT_SYMBOL(hnae3_unregister_ae_algo);
|
|||
* @ae_dev: the AE device
|
||||
* NOTE: the duplicated name will not be checked
|
||||
*/
|
||||
void hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
|
||||
int hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
|
||||
{
|
||||
const struct pci_device_id *id;
|
||||
struct hnae3_ae_algo *ae_algo;
|
||||
|
@ -256,14 +261,13 @@ void hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
|
|||
if (!id)
|
||||
continue;
|
||||
|
||||
ae_dev->ops = ae_algo->ops;
|
||||
|
||||
if (!ae_dev->ops) {
|
||||
dev_err(&ae_dev->pdev->dev, "ae_dev ops are null\n");
|
||||
if (!ae_algo->ops) {
|
||||
dev_err(&ae_dev->pdev->dev, "ae_algo ops are null\n");
|
||||
ret = -EOPNOTSUPP;
|
||||
goto out_err;
|
||||
}
|
||||
ae_dev->ops = ae_algo->ops;
|
||||
|
||||
/* ae_dev init should set flag */
|
||||
ret = ae_dev->ops->init_ae_dev(ae_dev);
|
||||
if (ret) {
|
||||
dev_err(&ae_dev->pdev->dev,
|
||||
|
@ -271,6 +275,7 @@ void hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
|
|||
goto out_err;
|
||||
}
|
||||
|
||||
/* ae_dev init should set flag */
|
||||
hnae3_set_bit(ae_dev->flag, HNAE3_DEV_INITED_B, 1);
|
||||
break;
|
||||
}
|
||||
|
@ -286,8 +291,15 @@ void hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev)
|
|||
ret);
|
||||
}
|
||||
|
||||
out_err:
|
||||
mutex_unlock(&hnae3_common_lock);
|
||||
|
||||
return 0;
|
||||
|
||||
out_err:
|
||||
list_del(&ae_dev->node);
|
||||
mutex_unlock(&hnae3_common_lock);
|
||||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(hnae3_register_ae_dev);
|
||||
|
||||
|
|
|
@ -513,7 +513,7 @@ struct hnae3_handle {
|
|||
#define hnae3_get_bit(origin, shift) \
|
||||
hnae3_get_field((origin), (0x1 << (shift)), (shift))
|
||||
|
||||
void hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev);
|
||||
int hnae3_register_ae_dev(struct hnae3_ae_dev *ae_dev);
|
||||
void hnae3_unregister_ae_dev(struct hnae3_ae_dev *ae_dev);
|
||||
|
||||
void hnae3_unregister_ae_algo(struct hnae3_ae_algo *ae_algo);
|
||||
|
|
|
@ -1604,9 +1604,13 @@ static int hns3_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||
ae_dev->dev_type = HNAE3_DEV_KNIC;
|
||||
pci_set_drvdata(pdev, ae_dev);
|
||||
|
||||
hnae3_register_ae_dev(ae_dev);
|
||||
ret = hnae3_register_ae_dev(ae_dev);
|
||||
if (ret) {
|
||||
devm_kfree(&pdev->dev, ae_dev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* hns3_remove - Device removal routine
|
||||
|
@ -1620,6 +1624,7 @@ static void hns3_remove(struct pci_dev *pdev)
|
|||
hns3_disable_sriov(pdev);
|
||||
|
||||
hnae3_unregister_ae_dev(ae_dev);
|
||||
pci_set_drvdata(pdev, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1345,8 +1345,8 @@ static inline int e100_load_ucode_wait(struct nic *nic)
|
|||
|
||||
fw = e100_request_firmware(nic);
|
||||
/* If it's NULL, then no ucode is required */
|
||||
if (!fw || IS_ERR(fw))
|
||||
return PTR_ERR(fw);
|
||||
if (IS_ERR_OR_NULL(fw))
|
||||
return PTR_ERR_OR_ZERO(fw);
|
||||
|
||||
if ((err = e100_exec_cb(nic, (void *)fw, e100_setup_ucode)))
|
||||
netif_err(nic, probe, nic->netdev,
|
||||
|
|
|
@ -1320,7 +1320,7 @@ static int mlx5e_get_module_info(struct net_device *netdev,
|
|||
break;
|
||||
case MLX5_MODULE_ID_SFP:
|
||||
modinfo->type = ETH_MODULE_SFF_8472;
|
||||
modinfo->eeprom_len = MLX5_EEPROM_PAGE_LENGTH;
|
||||
modinfo->eeprom_len = ETH_MODULE_SFF_8472_LEN;
|
||||
break;
|
||||
default:
|
||||
netdev_err(priv->netdev, "%s: cable type not recognized:0x%x\n",
|
||||
|
|
|
@ -2228,7 +2228,7 @@ static void mlxsw_sp_router_probe_unresolved_nexthops(struct work_struct *work)
|
|||
static void
|
||||
mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp *mlxsw_sp,
|
||||
struct mlxsw_sp_neigh_entry *neigh_entry,
|
||||
bool removing);
|
||||
bool removing, bool dead);
|
||||
|
||||
static enum mlxsw_reg_rauht_op mlxsw_sp_rauht_op(bool adding)
|
||||
{
|
||||
|
@ -2359,7 +2359,8 @@ static void mlxsw_sp_router_neigh_event_work(struct work_struct *work)
|
|||
|
||||
memcpy(neigh_entry->ha, ha, ETH_ALEN);
|
||||
mlxsw_sp_neigh_entry_update(mlxsw_sp, neigh_entry, entry_connected);
|
||||
mlxsw_sp_nexthop_neigh_update(mlxsw_sp, neigh_entry, !entry_connected);
|
||||
mlxsw_sp_nexthop_neigh_update(mlxsw_sp, neigh_entry, !entry_connected,
|
||||
dead);
|
||||
|
||||
if (!neigh_entry->connected && list_empty(&neigh_entry->nexthop_list))
|
||||
mlxsw_sp_neigh_entry_destroy(mlxsw_sp, neigh_entry);
|
||||
|
@ -3323,13 +3324,79 @@ static void __mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp_nexthop *nh,
|
|||
nh->update = 1;
|
||||
}
|
||||
|
||||
static int
|
||||
mlxsw_sp_nexthop_dead_neigh_replace(struct mlxsw_sp *mlxsw_sp,
|
||||
struct mlxsw_sp_neigh_entry *neigh_entry)
|
||||
{
|
||||
struct neighbour *n, *old_n = neigh_entry->key.n;
|
||||
struct mlxsw_sp_nexthop *nh;
|
||||
bool entry_connected;
|
||||
u8 nud_state, dead;
|
||||
int err;
|
||||
|
||||
nh = list_first_entry(&neigh_entry->nexthop_list,
|
||||
struct mlxsw_sp_nexthop, neigh_list_node);
|
||||
|
||||
n = neigh_lookup(nh->nh_grp->neigh_tbl, &nh->gw_addr, nh->rif->dev);
|
||||
if (!n) {
|
||||
n = neigh_create(nh->nh_grp->neigh_tbl, &nh->gw_addr,
|
||||
nh->rif->dev);
|
||||
if (IS_ERR(n))
|
||||
return PTR_ERR(n);
|
||||
neigh_event_send(n, NULL);
|
||||
}
|
||||
|
||||
mlxsw_sp_neigh_entry_remove(mlxsw_sp, neigh_entry);
|
||||
neigh_entry->key.n = n;
|
||||
err = mlxsw_sp_neigh_entry_insert(mlxsw_sp, neigh_entry);
|
||||
if (err)
|
||||
goto err_neigh_entry_insert;
|
||||
|
||||
read_lock_bh(&n->lock);
|
||||
nud_state = n->nud_state;
|
||||
dead = n->dead;
|
||||
read_unlock_bh(&n->lock);
|
||||
entry_connected = nud_state & NUD_VALID && !dead;
|
||||
|
||||
list_for_each_entry(nh, &neigh_entry->nexthop_list,
|
||||
neigh_list_node) {
|
||||
neigh_release(old_n);
|
||||
neigh_clone(n);
|
||||
__mlxsw_sp_nexthop_neigh_update(nh, !entry_connected);
|
||||
mlxsw_sp_nexthop_group_refresh(mlxsw_sp, nh->nh_grp);
|
||||
}
|
||||
|
||||
neigh_release(n);
|
||||
|
||||
return 0;
|
||||
|
||||
err_neigh_entry_insert:
|
||||
neigh_entry->key.n = old_n;
|
||||
mlxsw_sp_neigh_entry_insert(mlxsw_sp, neigh_entry);
|
||||
neigh_release(n);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void
|
||||
mlxsw_sp_nexthop_neigh_update(struct mlxsw_sp *mlxsw_sp,
|
||||
struct mlxsw_sp_neigh_entry *neigh_entry,
|
||||
bool removing)
|
||||
bool removing, bool dead)
|
||||
{
|
||||
struct mlxsw_sp_nexthop *nh;
|
||||
|
||||
if (list_empty(&neigh_entry->nexthop_list))
|
||||
return;
|
||||
|
||||
if (dead) {
|
||||
int err;
|
||||
|
||||
err = mlxsw_sp_nexthop_dead_neigh_replace(mlxsw_sp,
|
||||
neigh_entry);
|
||||
if (err)
|
||||
dev_err(mlxsw_sp->bus_info->dev, "Failed to replace dead neigh\n");
|
||||
return;
|
||||
}
|
||||
|
||||
list_for_each_entry(nh, &neigh_entry->nexthop_list,
|
||||
neigh_list_node) {
|
||||
__mlxsw_sp_nexthop_neigh_update(nh, removing);
|
||||
|
|
|
@ -255,7 +255,8 @@ static int ar5523_cmd(struct ar5523 *ar, u32 code, const void *idata,
|
|||
|
||||
if (flags & AR5523_CMD_FLAG_MAGIC)
|
||||
hdr->magic = cpu_to_be32(1 << 24);
|
||||
memcpy(hdr + 1, idata, ilen);
|
||||
if (ilen)
|
||||
memcpy(hdr + 1, idata, ilen);
|
||||
|
||||
cmd->odata = odata;
|
||||
cmd->olen = olen;
|
||||
|
|
|
@ -2052,6 +2052,11 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
|
|||
|
||||
ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot hif stop\n");
|
||||
|
||||
ath10k_pci_irq_disable(ar);
|
||||
ath10k_pci_irq_sync(ar);
|
||||
napi_synchronize(&ar->napi);
|
||||
napi_disable(&ar->napi);
|
||||
|
||||
/* Most likely the device has HTT Rx ring configured. The only way to
|
||||
* prevent the device from accessing (and possible corrupting) host
|
||||
* memory is to reset the chip now.
|
||||
|
@ -2065,10 +2070,6 @@ static void ath10k_pci_hif_stop(struct ath10k *ar)
|
|||
*/
|
||||
ath10k_pci_safe_chip_reset(ar);
|
||||
|
||||
ath10k_pci_irq_disable(ar);
|
||||
ath10k_pci_irq_sync(ar);
|
||||
napi_synchronize(&ar->napi);
|
||||
napi_disable(&ar->napi);
|
||||
ath10k_pci_flush(ar);
|
||||
|
||||
spin_lock_irqsave(&ar_pci->ps_lock, flags);
|
||||
|
|
|
@ -1198,6 +1198,7 @@ void rtl92de_enable_interrupt(struct ieee80211_hw *hw)
|
|||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
|
||||
rtlpci->irq_enabled = true;
|
||||
}
|
||||
|
||||
void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
||||
|
@ -1207,7 +1208,7 @@ void rtl92de_disable_interrupt(struct ieee80211_hw *hw)
|
|||
|
||||
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
|
||||
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
|
||||
synchronize_irq(rtlpci->pdev->irq);
|
||||
rtlpci->irq_enabled = false;
|
||||
}
|
||||
|
||||
static void _rtl92de_poweroff_adapter(struct ieee80211_hw *hw)
|
||||
|
@ -1373,7 +1374,7 @@ void rtl92de_set_beacon_related_registers(struct ieee80211_hw *hw)
|
|||
|
||||
bcn_interval = mac->beacon_interval;
|
||||
atim_window = 2;
|
||||
/*rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_ATIMWND, atim_window);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
rtl_write_word(rtlpriv, REG_BCNTCFG, 0x660f);
|
||||
|
@ -1393,9 +1394,9 @@ void rtl92de_set_beacon_interval(struct ieee80211_hw *hw)
|
|||
|
||||
RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
|
||||
"beacon_interval:%d\n", bcn_interval);
|
||||
/* rtl92de_disable_interrupt(hw); */
|
||||
rtl92de_disable_interrupt(hw);
|
||||
rtl_write_word(rtlpriv, REG_BCN_INTERVAL, bcn_interval);
|
||||
/* rtl92de_enable_interrupt(hw); */
|
||||
rtl92de_enable_interrupt(hw);
|
||||
}
|
||||
|
||||
void rtl92de_update_interrupt_mask(struct ieee80211_hw *hw,
|
||||
|
|
|
@ -238,6 +238,7 @@ static struct rtl_hal_ops rtl8192de_hal_ops = {
|
|||
.led_control = rtl92de_led_control,
|
||||
.set_desc = rtl92de_set_desc,
|
||||
.get_desc = rtl92de_get_desc,
|
||||
.is_tx_desc_closed = rtl92de_is_tx_desc_closed,
|
||||
.tx_polling = rtl92de_tx_polling,
|
||||
.enable_hw_sec = rtl92de_enable_hw_security_config,
|
||||
.set_key = rtl92de_set_key,
|
||||
|
|
|
@ -840,13 +840,15 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
|
||||
switch (desc_name) {
|
||||
case HW_DESC_OWN:
|
||||
ret = GET_RX_DESC_OWN(pdesc);
|
||||
ret = GET_RX_DESC_OWN(p_desc);
|
||||
break;
|
||||
case HW_DESC_RXPKT_LEN:
|
||||
ret = GET_RX_DESC_PKT_LEN(pdesc);
|
||||
ret = GET_RX_DESC_PKT_LEN(p_desc);
|
||||
break;
|
||||
case HW_DESC_RXBUFF_ADDR:
|
||||
ret = GET_RX_DESC_BUFF_ADDR(p_desc);
|
||||
break;
|
||||
default:
|
||||
WARN_ONCE(true, "rtl8192de: ERR rxdesc :%d not processed\n",
|
||||
|
@ -857,6 +859,23 @@ u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
|||
return ret;
|
||||
}
|
||||
|
||||
bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||
u8 hw_queue, u16 index)
|
||||
{
|
||||
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
|
||||
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
|
||||
u8 *entry = (u8 *)(&ring->desc[ring->idx]);
|
||||
u8 own = (u8)rtl92de_get_desc(hw, entry, true, HW_DESC_OWN);
|
||||
|
||||
/* a beacon packet will only use the first
|
||||
* descriptor by defaut, and the own bit may not
|
||||
* be cleared by the hardware
|
||||
*/
|
||||
if (own)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
|
||||
{
|
||||
struct rtl_priv *rtlpriv = rtl_priv(hw);
|
||||
|
|
|
@ -737,6 +737,8 @@ void rtl92de_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
|
|||
u8 desc_name, u8 *val);
|
||||
u64 rtl92de_get_desc(struct ieee80211_hw *hw,
|
||||
u8 *p_desc, bool istx, u8 desc_name);
|
||||
bool rtl92de_is_tx_desc_closed(struct ieee80211_hw *hw,
|
||||
u8 hw_queue, u16 index);
|
||||
void rtl92de_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
|
||||
void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
|
||||
bool b_firstseg, bool b_lastseg,
|
||||
|
|
|
@ -305,7 +305,6 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
|
|||
{
|
||||
struct property *new_prop = NULL, *prop;
|
||||
int ret = 0;
|
||||
bool check_for_non_overlay_node = false;
|
||||
|
||||
if (target->in_livetree)
|
||||
if (!of_prop_cmp(overlay_prop->name, "name") ||
|
||||
|
@ -318,6 +317,25 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
|
|||
else
|
||||
prop = NULL;
|
||||
|
||||
if (prop) {
|
||||
if (!of_prop_cmp(prop->name, "#address-cells")) {
|
||||
if (!of_prop_val_eq(prop, overlay_prop)) {
|
||||
pr_err("ERROR: changing value of #address-cells is not allowed in %pOF\n",
|
||||
target->np);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
|
||||
} else if (!of_prop_cmp(prop->name, "#size-cells")) {
|
||||
if (!of_prop_val_eq(prop, overlay_prop)) {
|
||||
pr_err("ERROR: changing value of #size-cells is not allowed in %pOF\n",
|
||||
target->np);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
if (is_symbols_prop) {
|
||||
if (prop)
|
||||
return -EINVAL;
|
||||
|
@ -330,33 +348,18 @@ static int add_changeset_property(struct overlay_changeset *ovcs,
|
|||
return -ENOMEM;
|
||||
|
||||
if (!prop) {
|
||||
check_for_non_overlay_node = true;
|
||||
if (!target->in_livetree) {
|
||||
new_prop->next = target->np->deadprops;
|
||||
target->np->deadprops = new_prop;
|
||||
}
|
||||
ret = of_changeset_add_property(&ovcs->cset, target->np,
|
||||
new_prop);
|
||||
} else if (!of_prop_cmp(prop->name, "#address-cells")) {
|
||||
if (!of_prop_val_eq(prop, new_prop)) {
|
||||
pr_err("ERROR: changing value of #address-cells is not allowed in %pOF\n",
|
||||
target->np);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
} else if (!of_prop_cmp(prop->name, "#size-cells")) {
|
||||
if (!of_prop_val_eq(prop, new_prop)) {
|
||||
pr_err("ERROR: changing value of #size-cells is not allowed in %pOF\n",
|
||||
target->np);
|
||||
ret = -EINVAL;
|
||||
}
|
||||
} else {
|
||||
check_for_non_overlay_node = true;
|
||||
ret = of_changeset_update_property(&ovcs->cset, target->np,
|
||||
new_prop);
|
||||
}
|
||||
|
||||
if (check_for_non_overlay_node &&
|
||||
!of_node_check_flag(target->np, OF_OVERLAY))
|
||||
if (!of_node_check_flag(target->np, OF_OVERLAY))
|
||||
pr_err("WARNING: memory leak will occur if overlay removed, property: %pOF/%s\n",
|
||||
target->np, new_prop->name);
|
||||
|
||||
|
|
|
@ -1133,8 +1133,10 @@ static void attach_node_and_children(struct device_node *np)
|
|||
full_name = kasprintf(GFP_KERNEL, "%pOF", np);
|
||||
|
||||
if (!strcmp(full_name, "/__local_fixups__") ||
|
||||
!strcmp(full_name, "/__fixups__"))
|
||||
!strcmp(full_name, "/__fixups__")) {
|
||||
kfree(full_name);
|
||||
return;
|
||||
}
|
||||
|
||||
dup = of_find_node_by_path(full_name);
|
||||
kfree(full_name);
|
||||
|
|
|
@ -93,8 +93,11 @@
|
|||
#define LINK_SPEED_2_5GTS (1 << 16)
|
||||
#define LINK_SPEED_5_0GTS (2 << 16)
|
||||
#define MACCTLR 0x011058
|
||||
#define MACCTLR_NFTS_MASK GENMASK(23, 16) /* The name is from SH7786 */
|
||||
#define SPEED_CHANGE BIT(24)
|
||||
#define SCRAMBLE_DISABLE BIT(27)
|
||||
#define LTSMDIS BIT(31)
|
||||
#define MACCTLR_INIT_VAL (LTSMDIS | MACCTLR_NFTS_MASK)
|
||||
#define PMSR 0x01105c
|
||||
#define MACS2R 0x011078
|
||||
#define MACCGSPSETR 0x011084
|
||||
|
@ -615,6 +618,8 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
|
|||
if (IS_ENABLED(CONFIG_PCI_MSI))
|
||||
rcar_pci_write_reg(pcie, 0x801f0000, PCIEMSITXR);
|
||||
|
||||
rcar_pci_write_reg(pcie, MACCTLR_INIT_VAL, MACCTLR);
|
||||
|
||||
/* Finish initialization - establish a PCI Express link */
|
||||
rcar_pci_write_reg(pcie, CFINIT, PCIETCTLR);
|
||||
|
||||
|
@ -1237,6 +1242,7 @@ static int rcar_pcie_resume_noirq(struct device *dev)
|
|||
return 0;
|
||||
|
||||
/* Re-establish the PCIe link */
|
||||
rcar_pci_write_reg(pcie, MACCTLR_INIT_VAL, MACCTLR);
|
||||
rcar_pci_write_reg(pcie, CFINIT, PCIETCTLR);
|
||||
return rcar_pcie_wait_for_dl(pcie);
|
||||
}
|
||||
|
|
|
@ -449,8 +449,15 @@ static void acpiphp_native_scan_bridge(struct pci_dev *bridge)
|
|||
|
||||
/* Scan non-hotplug bridges that need to be reconfigured */
|
||||
for_each_pci_bridge(dev, bus) {
|
||||
if (!hotplug_is_native(dev))
|
||||
max = pci_scan_bridge(bus, dev, max, 1);
|
||||
if (hotplug_is_native(dev))
|
||||
continue;
|
||||
|
||||
max = pci_scan_bridge(bus, dev, max, 1);
|
||||
if (dev->subordinate) {
|
||||
pcibios_resource_survey_bus(dev->subordinate);
|
||||
pci_bus_size_bridges(dev->subordinate);
|
||||
pci_bus_assign_resources(dev->subordinate);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,7 +487,6 @@ static void enable_slot(struct acpiphp_slot *slot, bool bridge)
|
|||
if (PCI_SLOT(dev->devfn) == slot->device)
|
||||
acpiphp_native_scan_bridge(dev);
|
||||
}
|
||||
pci_assign_unassigned_bridge_resources(bus->self);
|
||||
} else {
|
||||
LIST_HEAD(add_list);
|
||||
int max, pass;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
#include <linux/regulator/consumer.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/usb/of.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
|
@ -241,9 +242,9 @@ static ssize_t role_store(struct device *dev, struct device_attribute *attr,
|
|||
if (!ch->has_otg_pins || !ch->phy->init_count)
|
||||
return -EIO;
|
||||
|
||||
if (!strncmp(buf, "host", strlen("host")))
|
||||
if (sysfs_streq(buf, "host"))
|
||||
new_mode = PHY_MODE_USB_HOST;
|
||||
else if (!strncmp(buf, "peripheral", strlen("peripheral")))
|
||||
else if (sysfs_streq(buf, "peripheral"))
|
||||
new_mode = PHY_MODE_USB_DEVICE;
|
||||
else
|
||||
return -EINVAL;
|
||||
|
|
|
@ -592,10 +592,10 @@ static int armada_37xx_irq_set_type(struct irq_data *d, unsigned int type)
|
|||
regmap_read(info->regmap, in_reg, &in_val);
|
||||
|
||||
/* Set initial polarity based on current input level. */
|
||||
if (in_val & d->mask)
|
||||
val |= d->mask; /* falling */
|
||||
if (in_val & BIT(d->hwirq % GPIO_PER_REG))
|
||||
val |= BIT(d->hwirq % GPIO_PER_REG); /* falling */
|
||||
else
|
||||
val &= ~d->mask; /* rising */
|
||||
val &= ~(BIT(d->hwirq % GPIO_PER_REG)); /* rising */
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -494,8 +494,10 @@ int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
|
|||
if (match) {
|
||||
irq_chip = kmemdup(match->data,
|
||||
sizeof(*irq_chip), GFP_KERNEL);
|
||||
if (!irq_chip)
|
||||
if (!irq_chip) {
|
||||
of_node_put(np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
wkup_np = np;
|
||||
break;
|
||||
}
|
||||
|
@ -512,6 +514,7 @@ int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
|
|||
bank->nr_pins, &exynos_eint_irqd_ops, bank);
|
||||
if (!bank->irq_domain) {
|
||||
dev_err(dev, "wkup irq domain add failed\n");
|
||||
of_node_put(wkup_np);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
@ -526,8 +529,10 @@ int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
|
|||
weint_data = devm_kcalloc(dev,
|
||||
bank->nr_pins, sizeof(*weint_data),
|
||||
GFP_KERNEL);
|
||||
if (!weint_data)
|
||||
if (!weint_data) {
|
||||
of_node_put(wkup_np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
for (idx = 0; idx < bank->nr_pins; ++idx) {
|
||||
irq = irq_of_parse_and_map(bank->of_node, idx);
|
||||
|
@ -544,10 +549,13 @@ int exynos_eint_wkup_init(struct samsung_pinctrl_drv_data *d)
|
|||
}
|
||||
}
|
||||
|
||||
if (!muxed_banks)
|
||||
if (!muxed_banks) {
|
||||
of_node_put(wkup_np);
|
||||
return 0;
|
||||
}
|
||||
|
||||
irq = irq_of_parse_and_map(wkup_np, 0);
|
||||
of_node_put(wkup_np);
|
||||
if (!irq) {
|
||||
dev_err(dev, "irq number for muxed EINTs not found\n");
|
||||
return 0;
|
||||
|
|
|
@ -490,8 +490,10 @@ static int s3c24xx_eint_init(struct samsung_pinctrl_drv_data *d)
|
|||
return -ENODEV;
|
||||
|
||||
eint_data = devm_kzalloc(dev, sizeof(*eint_data), GFP_KERNEL);
|
||||
if (!eint_data)
|
||||
if (!eint_data) {
|
||||
of_node_put(eint_np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
eint_data->drvdata = d;
|
||||
|
||||
|
@ -503,12 +505,14 @@ static int s3c24xx_eint_init(struct samsung_pinctrl_drv_data *d)
|
|||
irq = irq_of_parse_and_map(eint_np, i);
|
||||
if (!irq) {
|
||||
dev_err(dev, "failed to get wakeup EINT IRQ %d\n", i);
|
||||
of_node_put(eint_np);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
eint_data->parents[i] = irq;
|
||||
irq_set_chained_handler_and_data(irq, handlers[i], eint_data);
|
||||
}
|
||||
of_node_put(eint_np);
|
||||
|
||||
bank = d->pin_banks;
|
||||
for (i = 0; i < d->nr_banks; ++i, ++bank) {
|
||||
|
|
|
@ -704,8 +704,10 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d)
|
|||
return -ENODEV;
|
||||
|
||||
data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
|
||||
if (!data)
|
||||
if (!data) {
|
||||
of_node_put(eint0_np);
|
||||
return -ENOMEM;
|
||||
}
|
||||
data->drvdata = d;
|
||||
|
||||
for (i = 0; i < NUM_EINT0_IRQ; ++i) {
|
||||
|
@ -714,6 +716,7 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d)
|
|||
irq = irq_of_parse_and_map(eint0_np, i);
|
||||
if (!irq) {
|
||||
dev_err(dev, "failed to get wakeup EINT IRQ %d\n", i);
|
||||
of_node_put(eint0_np);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
|
@ -721,6 +724,7 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d)
|
|||
s3c64xx_eint0_handlers[i],
|
||||
data);
|
||||
}
|
||||
of_node_put(eint0_np);
|
||||
|
||||
bank = d->pin_banks;
|
||||
for (i = 0; i < d->nr_banks; ++i, ++bank) {
|
||||
|
|
|
@ -272,6 +272,7 @@ static int samsung_dt_node_to_map(struct pinctrl_dev *pctldev,
|
|||
&reserved_maps, num_maps);
|
||||
if (ret < 0) {
|
||||
samsung_dt_free_map(pctldev, *map, *num_maps);
|
||||
of_node_put(np);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
@ -785,8 +786,10 @@ static struct samsung_pmx_func *samsung_pinctrl_create_functions(
|
|||
if (!of_get_child_count(cfg_np)) {
|
||||
ret = samsung_pinctrl_create_function(dev, drvdata,
|
||||
cfg_np, func);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(cfg_np);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
if (ret > 0) {
|
||||
++func;
|
||||
++func_cnt;
|
||||
|
@ -797,8 +800,11 @@ static struct samsung_pmx_func *samsung_pinctrl_create_functions(
|
|||
for_each_child_of_node(cfg_np, func_np) {
|
||||
ret = samsung_pinctrl_create_function(dev, drvdata,
|
||||
func_np, func);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
of_node_put(func_np);
|
||||
of_node_put(cfg_np);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
if (ret > 0) {
|
||||
++func;
|
||||
++func_cnt;
|
||||
|
|
|
@ -82,7 +82,7 @@ struct cpcap_battery_config {
|
|||
};
|
||||
|
||||
struct cpcap_coulomb_counter_data {
|
||||
s32 sample; /* 24-bits */
|
||||
s32 sample; /* 24 or 32 bits */
|
||||
s32 accumulator;
|
||||
s16 offset; /* 10-bits */
|
||||
};
|
||||
|
@ -213,7 +213,7 @@ static int cpcap_battery_get_current(struct cpcap_battery_ddata *ddata)
|
|||
* TI or ST coulomb counter in the PMIC.
|
||||
*/
|
||||
static int cpcap_battery_cc_raw_div(struct cpcap_battery_ddata *ddata,
|
||||
u32 sample, s32 accumulator,
|
||||
s32 sample, s32 accumulator,
|
||||
s16 offset, u32 divider)
|
||||
{
|
||||
s64 acc;
|
||||
|
@ -224,7 +224,6 @@ static int cpcap_battery_cc_raw_div(struct cpcap_battery_ddata *ddata,
|
|||
if (!divider)
|
||||
return 0;
|
||||
|
||||
sample &= 0xffffff; /* 24-bits, unsigned */
|
||||
offset &= 0x7ff; /* 10-bits, signed */
|
||||
|
||||
switch (ddata->vendor) {
|
||||
|
@ -259,7 +258,7 @@ static int cpcap_battery_cc_raw_div(struct cpcap_battery_ddata *ddata,
|
|||
|
||||
/* 3600000μAms = 1μAh */
|
||||
static int cpcap_battery_cc_to_uah(struct cpcap_battery_ddata *ddata,
|
||||
u32 sample, s32 accumulator,
|
||||
s32 sample, s32 accumulator,
|
||||
s16 offset)
|
||||
{
|
||||
return cpcap_battery_cc_raw_div(ddata, sample,
|
||||
|
@ -268,7 +267,7 @@ static int cpcap_battery_cc_to_uah(struct cpcap_battery_ddata *ddata,
|
|||
}
|
||||
|
||||
static int cpcap_battery_cc_to_ua(struct cpcap_battery_ddata *ddata,
|
||||
u32 sample, s32 accumulator,
|
||||
s32 sample, s32 accumulator,
|
||||
s16 offset)
|
||||
{
|
||||
return cpcap_battery_cc_raw_div(ddata, sample,
|
||||
|
@ -312,6 +311,8 @@ cpcap_battery_read_accumulated(struct cpcap_battery_ddata *ddata,
|
|||
/* Sample value CPCAP_REG_CCS1 & 2 */
|
||||
ccd->sample = (buf[1] & 0x0fff) << 16;
|
||||
ccd->sample |= buf[0];
|
||||
if (ddata->vendor == CPCAP_VENDOR_TI)
|
||||
ccd->sample = sign_extend32(24, ccd->sample);
|
||||
|
||||
/* Accumulator value CPCAP_REG_CCA1 & 2 */
|
||||
ccd->accumulator = ((s16)buf[3]) << 16;
|
||||
|
|
|
@ -12,7 +12,7 @@ obj-$(CONFIG_REGULATOR_USERSPACE_CONSUMER) += userspace-consumer.o
|
|||
obj-$(CONFIG_REGULATOR_PROXY_CONSUMER) += proxy-consumer.o
|
||||
|
||||
obj-$(CONFIG_REGULATOR_88PG86X) += 88pg86x.o
|
||||
obj-$(CONFIG_REGULATOR_88PM800) += 88pm800.o
|
||||
obj-$(CONFIG_REGULATOR_88PM800) += 88pm800-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_88PM8607) += 88pm8607.o
|
||||
obj-$(CONFIG_REGULATOR_CPCAP) += cpcap-regulator.o
|
||||
obj-$(CONFIG_REGULATOR_AAT2870) += aat2870-regulator.o
|
||||
|
|
|
@ -127,7 +127,7 @@ EXPORT_SYMBOL_GPL(rtc_read_time);
|
|||
|
||||
int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
|
||||
{
|
||||
int err;
|
||||
int err, uie;
|
||||
|
||||
err = rtc_valid_tm(tm);
|
||||
if (err != 0)
|
||||
|
@ -139,6 +139,17 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
|
|||
|
||||
rtc_subtract_offset(rtc, tm);
|
||||
|
||||
#ifdef CONFIG_RTC_INTF_DEV_UIE_EMUL
|
||||
uie = rtc->uie_rtctimer.enabled || rtc->uie_irq_active;
|
||||
#else
|
||||
uie = rtc->uie_rtctimer.enabled;
|
||||
#endif
|
||||
if (uie) {
|
||||
err = rtc_update_irq_enable(rtc, 0);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
err = mutex_lock_interruptible(&rtc->ops_lock);
|
||||
if (err)
|
||||
return err;
|
||||
|
@ -162,6 +173,12 @@ int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm)
|
|||
/* A timer might have just expired */
|
||||
schedule_work(&rtc->irqwork);
|
||||
|
||||
if (uie) {
|
||||
err = rtc_update_irq_enable(rtc, 1);
|
||||
if (err)
|
||||
return err;
|
||||
}
|
||||
|
||||
trace_rtc_set_time(rtc_tm_to_time64(tm), err);
|
||||
return err;
|
||||
}
|
||||
|
|
|
@ -94,11 +94,9 @@ void zfcp_dbf_hba_fsf_res(char *tag, int level, struct zfcp_fsf_req *req)
|
|||
memcpy(rec->u.res.fsf_status_qual, &q_head->fsf_status_qual,
|
||||
FSF_STATUS_QUALIFIER_SIZE);
|
||||
|
||||
if (req->fsf_command != FSF_QTCB_FCP_CMND) {
|
||||
rec->pl_len = q_head->log_length;
|
||||
zfcp_dbf_pl_write(dbf, (char *)q_pref + q_head->log_start,
|
||||
rec->pl_len, "fsf_res", req->req_id);
|
||||
}
|
||||
rec->pl_len = q_head->log_length;
|
||||
zfcp_dbf_pl_write(dbf, (char *)q_pref + q_head->log_start,
|
||||
rec->pl_len, "fsf_res", req->req_id);
|
||||
|
||||
debug_event(dbf->hba, level, rec, sizeof(*rec));
|
||||
spin_unlock_irqrestore(&dbf->hba_lock, flags);
|
||||
|
|
|
@ -220,7 +220,7 @@ struct hisi_sas_hw {
|
|||
int (*slot_index_alloc)(struct hisi_hba *hisi_hba, int *slot_idx,
|
||||
struct domain_device *device);
|
||||
struct hisi_sas_device *(*alloc_dev)(struct domain_device *device);
|
||||
void (*sl_notify)(struct hisi_hba *hisi_hba, int phy_no);
|
||||
void (*sl_notify_ssp)(struct hisi_hba *hisi_hba, int phy_no);
|
||||
int (*get_free_slot)(struct hisi_hba *hisi_hba, struct hisi_sas_dq *dq);
|
||||
void (*start_delivery)(struct hisi_sas_dq *dq);
|
||||
void (*prep_ssp)(struct hisi_hba *hisi_hba,
|
||||
|
|
|
@ -716,7 +716,8 @@ static void hisi_sas_phyup_work(struct work_struct *work)
|
|||
struct asd_sas_phy *sas_phy = &phy->sas_phy;
|
||||
int phy_no = sas_phy->id;
|
||||
|
||||
hisi_hba->hw->sl_notify(hisi_hba, phy_no); /* This requires a sleep */
|
||||
if (phy->identify.target_port_protocols == SAS_PROTOCOL_SSP)
|
||||
hisi_hba->hw->sl_notify_ssp(hisi_hba, phy_no);
|
||||
hisi_sas_bytes_dmaed(hisi_hba, phy_no);
|
||||
}
|
||||
|
||||
|
@ -885,7 +886,7 @@ static int hisi_sas_queue_command(struct sas_task *task, gfp_t gfp_flags)
|
|||
return hisi_sas_task_exec(task, gfp_flags, 0, NULL);
|
||||
}
|
||||
|
||||
static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
|
||||
static int hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
|
||||
struct sas_phy_linkrates *r)
|
||||
{
|
||||
struct sas_phy_linkrates _r;
|
||||
|
@ -894,6 +895,9 @@ static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
|
|||
struct asd_sas_phy *sas_phy = &phy->sas_phy;
|
||||
enum sas_linkrate min, max;
|
||||
|
||||
if (r->minimum_linkrate > SAS_LINK_RATE_1_5_GBPS)
|
||||
return -EINVAL;
|
||||
|
||||
if (r->maximum_linkrate == SAS_LINK_RATE_UNKNOWN) {
|
||||
max = sas_phy->phy->maximum_linkrate;
|
||||
min = r->minimum_linkrate;
|
||||
|
@ -901,7 +905,7 @@ static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
|
|||
max = r->maximum_linkrate;
|
||||
min = sas_phy->phy->minimum_linkrate;
|
||||
} else
|
||||
return;
|
||||
return -EINVAL;
|
||||
|
||||
_r.maximum_linkrate = max;
|
||||
_r.minimum_linkrate = min;
|
||||
|
@ -913,6 +917,8 @@ static void hisi_sas_phy_set_linkrate(struct hisi_hba *hisi_hba, int phy_no,
|
|||
msleep(100);
|
||||
hisi_hba->hw->phy_set_linkrate(hisi_hba, phy_no, &_r);
|
||||
hisi_hba->hw->phy_start(hisi_hba, phy_no);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
|
||||
|
@ -938,8 +944,7 @@ static int hisi_sas_control_phy(struct asd_sas_phy *sas_phy, enum phy_func func,
|
|||
break;
|
||||
|
||||
case PHY_FUNC_SET_LINK_RATE:
|
||||
hisi_sas_phy_set_linkrate(hisi_hba, phy_no, funcdata);
|
||||
break;
|
||||
return hisi_sas_phy_set_linkrate(hisi_hba, phy_no, funcdata);
|
||||
case PHY_FUNC_GET_EVENTS:
|
||||
if (hisi_hba->hw->get_events) {
|
||||
hisi_hba->hw->get_events(hisi_hba, phy_no);
|
||||
|
|
|
@ -834,7 +834,7 @@ static void phys_init_v1_hw(struct hisi_hba *hisi_hba)
|
|||
mod_timer(timer, jiffies + HZ);
|
||||
}
|
||||
|
||||
static void sl_notify_v1_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
static void sl_notify_ssp_v1_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
{
|
||||
u32 sl_control;
|
||||
|
||||
|
@ -1822,7 +1822,7 @@ static struct scsi_host_template sht_v1_hw = {
|
|||
static const struct hisi_sas_hw hisi_sas_v1_hw = {
|
||||
.hw_init = hisi_sas_v1_init,
|
||||
.setup_itct = setup_itct_v1_hw,
|
||||
.sl_notify = sl_notify_v1_hw,
|
||||
.sl_notify_ssp = sl_notify_ssp_v1_hw,
|
||||
.clear_itct = clear_itct_v1_hw,
|
||||
.prep_smp = prep_smp_v1_hw,
|
||||
.prep_ssp = prep_ssp_v1_hw,
|
||||
|
|
|
@ -1584,7 +1584,7 @@ static void phys_init_v2_hw(struct hisi_hba *hisi_hba)
|
|||
}
|
||||
}
|
||||
|
||||
static void sl_notify_v2_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
static void sl_notify_ssp_v2_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
{
|
||||
u32 sl_control;
|
||||
|
||||
|
@ -3575,7 +3575,7 @@ static const struct hisi_sas_hw hisi_sas_v2_hw = {
|
|||
.setup_itct = setup_itct_v2_hw,
|
||||
.slot_index_alloc = slot_index_alloc_quirk_v2_hw,
|
||||
.alloc_dev = alloc_dev_quirk_v2_hw,
|
||||
.sl_notify = sl_notify_v2_hw,
|
||||
.sl_notify_ssp = sl_notify_ssp_v2_hw,
|
||||
.get_wideport_bitmap = get_wideport_bitmap_v2_hw,
|
||||
.clear_itct = clear_itct_v2_hw,
|
||||
.free_device = free_device_v2_hw,
|
||||
|
|
|
@ -827,7 +827,7 @@ static void phys_init_v3_hw(struct hisi_hba *hisi_hba)
|
|||
}
|
||||
}
|
||||
|
||||
static void sl_notify_v3_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
static void sl_notify_ssp_v3_hw(struct hisi_hba *hisi_hba, int phy_no)
|
||||
{
|
||||
u32 sl_control;
|
||||
|
||||
|
@ -2127,7 +2127,7 @@ static const struct hisi_sas_hw hisi_sas_v3_hw = {
|
|||
.get_wideport_bitmap = get_wideport_bitmap_v3_hw,
|
||||
.complete_hdr_size = sizeof(struct hisi_sas_complete_v3_hdr),
|
||||
.clear_itct = clear_itct_v3_hw,
|
||||
.sl_notify = sl_notify_v3_hw,
|
||||
.sl_notify_ssp = sl_notify_ssp_v3_hw,
|
||||
.prep_ssp = prep_ssp_v3_hw,
|
||||
.prep_smp = prep_smp_v3_hw,
|
||||
.prep_stp = prep_ata_v3_hw,
|
||||
|
|
|
@ -966,7 +966,8 @@ struct lpfc_hba {
|
|||
struct list_head port_list;
|
||||
struct lpfc_vport *pport; /* physical lpfc_vport pointer */
|
||||
uint16_t max_vpi; /* Maximum virtual nports */
|
||||
#define LPFC_MAX_VPI 0xFFFF /* Max number of VPI supported */
|
||||
#define LPFC_MAX_VPI 0xFF /* Max number VPI supported 0 - 0xff */
|
||||
#define LPFC_MAX_VPORTS 0x100 /* Max vports per port, with pport */
|
||||
uint16_t max_vports; /*
|
||||
* For IOV HBAs max_vpi can change
|
||||
* after a reset. max_vports is max
|
||||
|
|
|
@ -1632,6 +1632,9 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
|
|||
max_vpi = (bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) > 0) ?
|
||||
(bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config) - 1) : 0;
|
||||
|
||||
/* Limit the max we support */
|
||||
if (max_vpi > LPFC_MAX_VPI)
|
||||
max_vpi = LPFC_MAX_VPI;
|
||||
if (mvpi)
|
||||
*mvpi = max_vpi;
|
||||
if (avpi)
|
||||
|
@ -1647,8 +1650,13 @@ lpfc_get_hba_info(struct lpfc_hba *phba,
|
|||
*axri = pmb->un.varRdConfig.avail_xri;
|
||||
if (mvpi)
|
||||
*mvpi = pmb->un.varRdConfig.max_vpi;
|
||||
if (avpi)
|
||||
*avpi = pmb->un.varRdConfig.avail_vpi;
|
||||
if (avpi) {
|
||||
/* avail_vpi is only valid if link is up and ready */
|
||||
if (phba->link_state == LPFC_HBA_READY)
|
||||
*avpi = pmb->un.varRdConfig.avail_vpi;
|
||||
else
|
||||
*avpi = pmb->un.varRdConfig.max_vpi;
|
||||
}
|
||||
}
|
||||
|
||||
mempool_free(pmboxq, phba->mbox_mem_pool);
|
||||
|
@ -3841,8 +3849,9 @@ lpfc_topology_store(struct device *dev, struct device_attribute *attr,
|
|||
val);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC &&
|
||||
val == 4) {
|
||||
if ((phba->pcidev->device == PCI_DEVICE_ID_LANCER_G6_FC ||
|
||||
phba->pcidev->device == PCI_DEVICE_ID_LANCER_G7_FC) &&
|
||||
val == 4) {
|
||||
lpfc_printf_vlog(vport, KERN_ERR, LOG_INIT,
|
||||
"3114 Loop mode not supported\n");
|
||||
return -EINVAL;
|
||||
|
|
|
@ -7766,6 +7766,9 @@ lpfc_sli4_read_config(struct lpfc_hba *phba)
|
|||
bf_get(lpfc_mbx_rd_conf_xri_base, rd_config);
|
||||
phba->sli4_hba.max_cfg_param.max_vpi =
|
||||
bf_get(lpfc_mbx_rd_conf_vpi_count, rd_config);
|
||||
/* Limit the max we support */
|
||||
if (phba->sli4_hba.max_cfg_param.max_vpi > LPFC_MAX_VPORTS)
|
||||
phba->sli4_hba.max_cfg_param.max_vpi = LPFC_MAX_VPORTS;
|
||||
phba->sli4_hba.max_cfg_param.vpi_base =
|
||||
bf_get(lpfc_mbx_rd_conf_vpi_base, rd_config);
|
||||
phba->sli4_hba.max_cfg_param.max_rpi =
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue