Merge tag 'ASB-2022-06-05_4.19-stable' of https://android.googlesource.com/kernel/common into lineage-21
https://source.android.com/security/bulletin/2022-01-01 CVE-2022-24958 CVE-2022-20136 CVE-2022-23960 CVE-2022-20141 CVE-2021-4154 CVE-2022-20132 * tag 'ASB-2022-06-05_4.19-stable' of https://android.googlesource.com/kernel/common: Linux 4.19.246 bpf: Enlarge offset check value to INT_MAX in bpf_skb_{load,store}_bytes NFSD: Fix possible sleep during nfsd4_release_lockowner() docs: submitting-patches: Fix crossref to 'The canonical patch format' tpm: ibmvtpm: Correct the return value in tpm_ibmvtpm_probe() tpm: Fix buffer access in tpm2_get_tpm_pt() HID: multitouch: Add support for Google Whiskers Touchpad dm verity: set DM_TARGET_IMMUTABLE feature flag dm stats: add cond_resched when looping over entries dm crypt: make printing of the key constant-time dm integrity: fix error code in dm_integrity_ctr() zsmalloc: fix races between asynchronous zspage free and page migration netfilter: conntrack: re-fetch conntrack after insertion exec: Force single empty string when argv is empty block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern drm/i915: Fix -Wstringop-overflow warning in call to intel_read_wm_latency() perf tests bp_account: Make global variable static perf bench: Share some global variables to fix build with gcc 10 libtraceevent: Fix build with binutils 2.35 cfg80211: set custom regdomain after wiphy registration assoc_array: Fix BUG_ON during garbage collect drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers i2c: ismt: Provide a DMA buffer for Interrupt Cause Logging net: ftgmac100: Disable hardware checksum on AST2600 net: af_key: check encryption module availability consistency ACPI: sysfs: Fix BERT error region memory mapping ACPI: sysfs: Make sparse happy about address space in use secure_seq: use the 64 bits of the siphash for port offset calculation tcp: change source port randomizarion at connect() time staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan() x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests Linux 4.19.245 afs: Fix afs_getattr() to refetch file status if callback break occurred Reinstate some of "swiotlb: rework "fix info leak with DMA_FROM_DEVICE"" swiotlb: fix info leak with DMA_FROM_DEVICE net: atlantic: verify hw_head_ lies within TX buffer ring net: stmmac: fix missing pci_disable_device() on error in stmmac_pci_probe() ethernet: tulip: fix missing pci_disable_device() on error in tulip_init_one() mac80211: fix rx reordering with non explicit / psmp ack policy scsi: qla2xxx: Fix missed DMA unmap for aborted commands perf bench numa: Address compiler error on s390 gpio: mvebu/pwm: Refuse requests with inverted polarity gpio: gpio-vf610: do not touch other bits when set the target bit net: bridge: Clear offload_fwd_mark when passing frame up bridge interface. igb: skip phy status check where unavailable ARM: 9197/1: spectre-bhb: fix loop8 sequence for Thumb2 ARM: 9196/1: spectre-bhb: enable for Cortex-A15 net: af_key: add check for pfkey_broadcast in function pfkey_process net/mlx5e: Properly block LRO when XDP is enabled NFC: nci: fix sleep in atomic context bugs caused by nci_skb_alloc net/qla3xxx: Fix a test in ql_reset_work() clk: at91: generated: consider range when calculating best rate net: vmxnet3: fix possible NULL pointer dereference in vmxnet3_rq_cleanup() net: vmxnet3: fix possible use-after-free bugs in vmxnet3_rq_alloc_rx_buf() net/sched: act_pedit: sanitize shift argument before usage net: macb: Increment rx bd head after allocating skb and buffer mmc: core: Default to generic_cmd6_time as timeout in __mmc_switch() mmc: block: Use generic_cmd6_time when modifying INAND_CMD38_ARG_EXT_CSD mmc: core: Specify timeouts for BKOPS and CACHE_FLUSH for eMMC mmc: core: Cleanup BKOPS support drm/dp/mst: fix a possible memory leak in fetch_monitor_name() crypto: qcom-rng - fix infinite loop on requests not multiple of WORD_SZ PCI/PM: Avoid putting Elo i2 PCIe Ports in D3cold Fix double fget() in vhost_net_set_backend() perf: Fix sys_perf_event_open() race against self ALSA: wavefront: Proper check of get_user() error nilfs2: fix lockdep warnings during disk space reclamation nilfs2: fix lockdep warnings in page operations for btree nodes ARM: 9191/1: arm/stacktrace, kasan: Silence KASAN warnings in unwind_frame() drbd: remove usage of list iterator variable after loop MIPS: lantiq: check the return value of kzalloc() crypto: stm32 - fix reference leak in stm32_crc_remove Input: stmfts - fix reference leak in stmfts_input_open Input: add bounds checking to input_set_capability() um: Cleanup syscall_handler_t definition/cast, fix warning floppy: use a statically allocated error counter ANDROID: fix up abi issue with struct snd_pcm_runtime Linux 4.19.244 tty/serial: digicolor: fix possible null-ptr-deref in digicolor_uart_probe() ping: fix address binding wrt vrf MIPS: fix allmodconfig build with latest mkimage drm/vmwgfx: Initialize drm_mode_fb_cmd2 cgroup/cpuset: Remove cpus_allowed/mems_allowed setup in cpuset_init_smp() slimbus: qcom: Fix IRQ check in qcom_slim_probe USB: serial: option: add Fibocom MA510 modem USB: serial: option: add Fibocom L610 modem USB: serial: qcserial: add support for Sierra Wireless EM7590 USB: serial: pl2303: add device id for HP LM930 Display usb: typec: tcpci: Don't skip cleanup in .remove() on error usb: cdc-wdm: fix reading stuck on device close tcp: resalt the secret every 10 seconds s390: disable -Warray-bounds ASoC: ops: Validate input values in snd_soc_put_volsw_range() ASoC: max98090: Generate notifications on changes for custom control ASoC: max98090: Reject invalid values in custom control put() hwmon: (f71882fg) Fix negative temperature gfs2: Fix filesystem block deallocation for short writes net: sfc: ef10: fix memory leak in efx_ef10_mtd_probe() net/smc: non blocking recvmsg() return -EAGAIN when no data and signal_pending net/sched: act_pedit: really ensure the skb is writable s390/lcs: fix variable dereferenced before check s390/ctcm: fix potential memory leak s390/ctcm: fix variable dereferenced before check hwmon: (ltq-cputemp) restrict it to SOC_XWAY mac80211_hwsim: call ieee80211_tx_prepare_skb under RCU protection netlink: do not reset transport header in netlink_recvmsg() ipv4: drop dst in multicast routing path net: Fix features skip in for_each_netdev_feature() hwmon: (tmp401) Add OF device ID table batman-adv: Don't skb_split skbuffs with frag_list Linux 4.19.243 VFS: Fix memory leak caused by concurrently mounting fs with subtype mm: userfaultfd: fix missing cache flush in mcopy_atomic_pte() and __mcopy_atomic() mm: hugetlb: fix missing cache flush in copy_huge_page_from_user() ALSA: pcm: Fix potential AB/BA lock with buffer_mutex and mmap_lock ALSA: pcm: Fix races among concurrent prealloc proc writes ALSA: pcm: Fix races among concurrent prepare and hw_params/hw_free calls ALSA: pcm: Fix races among concurrent read/write and buffer changes ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Bluetooth: Fix the creation of hdev->name can: grcan: only use the NAPI poll budget for RX can: grcan: grcan_probe(): fix broken system id check for errata workaround needs nfp: bpf: silence bitwise vs. logical OR warning drm/amd/display/dc/gpio/gpio_service: Pass around correct dce_{version, environment} types block: drbd: drbd_nl: Make conversion to 'enum drbd_ret_code' explicit MIPS: Use address-of operator on section symbols ANDROID: GKI: update the abi .xml file due to hex_to_bin() changes Linux 4.19.242 mmc: rtsx: add 74 Clocks in power on flow PCI: aardvark: Fix reading MSI interrupt number PCI: aardvark: Clear all MSIs at setup dm: interlock pending dm_io and dm_wait_for_bios_completion dm: fix mempool NULL pointer race when completing IO tcp: make sure treq->af_specific is initialized mm: fix unexpected zeroed page mapping with zram swap kvm: x86/cpuid: Only provide CPUID leaf 0xA if host has architectural PMU net: igmp: respect RCU rules in ip_mc_source() and ip_mc_msfilter() btrfs: always log symlinks in full mode smsc911x: allow using IRQ0 selftests: mirror_gre_bridge_1q: Avoid changing PVID while interface is operational net: emaclite: Add error handling for of_address_to_resource() net: stmmac: dwmac-sun8i: add missing of_node_put() in sun8i_dwmac_register_mdio_mux() ASoC: dmaengine: Restore NULL prepare_slave_config() callback hwmon: (adt7470) Fix warning on module removal NFC: netlink: fix sleep in atomic bug when firmware download timeout nfc: nfcmrvl: main: reorder destructive operations in nfcmrvl_nci_unregister_dev to avoid bugs nfc: replace improper check device_is_registered() in netlink related functions can: grcan: use ofdev->dev when allocating DMA memory can: grcan: grcan_close(): fix deadlock ASoC: wm8958: Fix change notifications for DSP controls genirq: Synchronize interrupt thread startup firewire: core: extend card->lock in fw_core_handle_bus_reset firewire: remove check of list iterator against head past the loop body firewire: fix potential uaf in outbound_phy_packet_callback() Revert "SUNRPC: attempt AF_LOCAL connect on setup" gpiolib: of: fix bounds check for 'gpio-reserved-ranges' ALSA: fireworks: fix wrong return count shorter than expected by 4 bytes parisc: Merge model and model name into one line in /proc/cpuinfo MIPS: Fix CP0 counter erratum detection for R4k CPUs drm/vgem: Close use-after-free race in vgem_gem_create tty: n_gsm: fix incorrect UA handling tty: n_gsm: fix wrong command frame length field encoding tty: n_gsm: fix wrong command retry handling tty: n_gsm: fix missing explicit ldisc flush tty: n_gsm: fix insufficient txframe size netfilter: nft_socket: only do sk lookups when indev is available tty: n_gsm: fix malformed counter for out of frame data tty: n_gsm: fix wrong signal octet encoding in convergence layer type 2 x86/cpu: Load microcode during restore_processor_state() drivers: net: hippi: Fix deadlock in rr_close() cifs: destage any unwritten data to the server before calling copychunk_write x86: __memcpy_flushcache: fix wrong alignment if size > 2^32 ip6_gre: Avoid updating tunnel->tun_hlen in __gre6_xmit() ASoC: wm8731: Disable the regulator when probing fails bnx2x: fix napi API usage sequence net: bcmgenet: hide status block before TX timestamping clk: sunxi: sun9i-mmc: check return value after calling platform_get_resource() bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create() tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT ip_gre: Make o_seqno start from 0 in native mode net: hns3: add validity check for message data length pinctrl: pistachio: fix use of irq_of_parse_and_map() ARM: dts: imx6ull-colibri: fix vqmmc regulator sctp: check asoc strreset_chunk in sctp_generate_reconf_event tcp: md5: incorrect tcp_header_len for incoming connections mtd: rawnand: Fix return value check of wait_for_completion_timeout ipvs: correctly print the memory size of ip_vs_conn_tab ARM: dts: logicpd-som-lv: Fix wrong pinmuxing on OMAP35 ARM: dts: Fix mmc order for omap3-gta04 ARM: OMAP2+: Fix refcount leak in omap_gic_of_init phy: samsung: exynos5250-sata: fix missing device put in probe error paths phy: samsung: Fix missing of_node_put() in exynos_sata_phy_probe ARM: dts: imx6qdl-apalis: Fix sgtl5000 detection issue USB: Fix xhci event ring dequeue pointer ERDP update issue mtd: rawnand: fix ecc parameters for mt7622 hex2bin: fix access beyond string end hex2bin: make the function hex_to_bin constant-time serial: 8250: Correct the clock for EndRun PTP/1588 PCIe device serial: 8250: Also set sticky MCR bits in console restoration serial: imx: fix overrun interrupts in DMA mode usb: dwc3: gadget: Return proper request status usb: dwc3: core: Fix tx/rx threshold settings usb: gadget: configfs: clear deactivation flag in configfs_composite_unbind() usb: gadget: uvc: Fix crash when encoding data for usb request usb: misc: fix improper handling of refcount in uss720_probe() iio: magnetometer: ak8975: Fix the error handling in ak8975_power_on() iio: dac: ad5446: Fix read_raw not returning set value iio: dac: ad5592r: Fix the missing return value. xhci: stop polling roothubs after shutdown USB: serial: option: add Telit 0x1057, 0x1058, 0x1075 compositions USB: serial: option: add support for Cinterion MV32-WA/MV32-WB USB: serial: cp210x: add PIDs for Kamstrup USB Meter Reader USB: serial: whiteheat: fix heap overflow in WHITEHEAT_GET_DTR_RTS USB: quirks: add STRING quirk for VCOM device USB: quirks: add a Realtek card reader usb: mtu3: fix USB 3.0 dual-role-switch from device to host ANDROID: dm-bow: Protect Ranges fetched and erased from the RB tree Conflicts: drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c (used theirs) drivers/usb/gadget/configfs.c Change-Id: I866bc2e6eeac655aec170127c0c20a7cd3c82f38 Signed-off-by: bengris32 <bengris32@protonmail.ch>
This commit is contained in:
@@ -133,7 +133,7 @@ as you intend it to.
|
||||
|
||||
The maintainer will thank you if you write your patch description in a
|
||||
form which can be easily pulled into Linux's source code management
|
||||
system, ``git``, as a "commit log". See :ref:`explicit_in_reply_to`.
|
||||
system, ``git``, as a "commit log". See :ref:`the_canonical_patch_format`.
|
||||
|
||||
Solve only one problem per patch. If your description starts to get
|
||||
long, that's a sign that you probably need to split up your patch.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 19
|
||||
SUBLEVEL = 241
|
||||
SUBLEVEL = 246
|
||||
EXTRAVERSION =
|
||||
NAME = "People's Front"
|
||||
|
||||
|
||||
142594
android/abi_gki_aarch64.xml
142594
android/abi_gki_aarch64.xml
File diff suppressed because it is too large
Load Diff
@@ -313,6 +313,8 @@
|
||||
codec: sgtl5000@a {
|
||||
compatible = "fsl,sgtl5000";
|
||||
reg = <0x0a>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_sgtl5000>;
|
||||
clocks = <&clks IMX6QDL_CLK_CKO>;
|
||||
VDDA-supply = <®_module_3v3_audio>;
|
||||
VDDIO-supply = <®_module_3v3>;
|
||||
@@ -540,8 +542,6 @@
|
||||
MX6QDL_PAD_DISP0_DAT21__AUD4_TXD 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT22__AUD4_TXFS 0x130b0
|
||||
MX6QDL_PAD_DISP0_DAT23__AUD4_RXD 0x130b0
|
||||
/* SGTL5000 sys_mclk */
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
@@ -807,6 +807,12 @@
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_sgtl5000: sgtl5000grp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_5__CCM_CLKO1 0x130b0
|
||||
>;
|
||||
};
|
||||
|
||||
pinctrl_spdif: spdifgrp {
|
||||
fsl,pins = <
|
||||
MX6QDL_PAD_GPIO_16__SPDIF_IN 0x1b0b0
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
reg_sd1_vmmc: regulator-sd1-vmmc {
|
||||
compatible = "regulator-gpio";
|
||||
gpio = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
gpios = <&gpio5 9 GPIO_ACTIVE_HIGH>;
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_snvs_reg_sd>;
|
||||
regulator-always-on;
|
||||
|
||||
@@ -15,3 +15,18 @@
|
||||
model = "LogicPD Zoom OMAP35xx SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3430_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3430_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3430_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3430_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3430_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3430_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -15,3 +15,18 @@
|
||||
model = "LogicPD Zoom DM3730 SOM-LV Development Kit";
|
||||
compatible = "logicpd,dm3730-som-lv-devkit", "ti,omap3630", "ti,omap3";
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -269,21 +269,6 @@
|
||||
};
|
||||
};
|
||||
|
||||
&omap3_pmx_core2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&hsusb2_2_pins>;
|
||||
hsusb2_2_pins: pinmux_hsusb2_2_pins {
|
||||
pinctrl-single,pins = <
|
||||
OMAP3630_CORE2_IOPAD(0x25f0, PIN_OUTPUT | MUX_MODE3) /* etk_d10.hsusb2_clk */
|
||||
OMAP3630_CORE2_IOPAD(0x25f2, PIN_OUTPUT | MUX_MODE3) /* etk_d11.hsusb2_stp */
|
||||
OMAP3630_CORE2_IOPAD(0x25f4, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d12.hsusb2_dir */
|
||||
OMAP3630_CORE2_IOPAD(0x25f6, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d13.hsusb2_nxt */
|
||||
OMAP3630_CORE2_IOPAD(0x25f8, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d14.hsusb2_data0 */
|
||||
OMAP3630_CORE2_IOPAD(0x25fa, PIN_INPUT_PULLDOWN | MUX_MODE3) /* etk_d15.hsusb2_data1 */
|
||||
>;
|
||||
};
|
||||
};
|
||||
|
||||
&uart2 {
|
||||
interrupts-extended = <&intc 73 &omap3_pmx_core OMAP3_UART2_RX>;
|
||||
pinctrl-names = "default";
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
aliases {
|
||||
display0 = &lcd;
|
||||
display1 = &tv0;
|
||||
/delete-property/ mmc2;
|
||||
/delete-property/ mmc3;
|
||||
};
|
||||
|
||||
/* fixed 26MHz oscillator */
|
||||
|
||||
@@ -1067,7 +1067,7 @@ vector_bhb_loop8_\name:
|
||||
|
||||
@ bhb workaround
|
||||
mov r0, #8
|
||||
3: b . + 4
|
||||
3: W(b) . + 4
|
||||
subs r0, r0, #1
|
||||
bne 3b
|
||||
dsb
|
||||
|
||||
@@ -52,17 +52,17 @@ int notrace unwind_frame(struct stackframe *frame)
|
||||
return -EINVAL;
|
||||
|
||||
frame->sp = frame->fp;
|
||||
frame->fp = *(unsigned long *)(fp);
|
||||
frame->pc = *(unsigned long *)(fp + 4);
|
||||
frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp));
|
||||
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp + 4));
|
||||
#else
|
||||
/* check current frame pointer is within bounds */
|
||||
if (fp < low + 12 || fp > high - 4)
|
||||
return -EINVAL;
|
||||
|
||||
/* restore the registers from the stack frame */
|
||||
frame->fp = *(unsigned long *)(fp - 12);
|
||||
frame->sp = *(unsigned long *)(fp - 8);
|
||||
frame->pc = *(unsigned long *)(fp - 4);
|
||||
frame->fp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 12));
|
||||
frame->sp = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 8));
|
||||
frame->pc = READ_ONCE_NOCHECK(*(unsigned long *)(fp - 4));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -318,10 +318,12 @@ void __init omap_gic_of_init(void)
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-gic");
|
||||
gic_dist_base_addr = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!gic_dist_base_addr);
|
||||
|
||||
np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-twd-timer");
|
||||
twd_base = of_iomap(np, 0);
|
||||
of_node_put(np);
|
||||
WARN_ON(!twd_base);
|
||||
|
||||
skip_errata_init:
|
||||
|
||||
@@ -302,6 +302,7 @@ void cpu_v7_ca15_ibe(void)
|
||||
{
|
||||
if (check_spectre_auxcr(this_cpu_ptr(&spectre_warned), BIT(0)))
|
||||
cpu_v7_spectre_v2_init();
|
||||
cpu_v7_spectre_bhb_init();
|
||||
}
|
||||
|
||||
void cpu_v7_bugs_init(void)
|
||||
|
||||
@@ -174,7 +174,7 @@ void __init plat_mem_setup(void)
|
||||
dtb = phys_to_virt(fw_arg2);
|
||||
else if (fw_passed_dtb) /* UHI interface */
|
||||
dtb = (void *)fw_passed_dtb;
|
||||
else if (__dtb_start != __dtb_end)
|
||||
else if (&__dtb_start != &__dtb_end)
|
||||
dtb = (void *)__dtb_start;
|
||||
else
|
||||
panic("no dtb found");
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */
|
||||
/ {
|
||||
images {
|
||||
fdt@ocelot_pcb123 {
|
||||
fdt-ocelot_pcb123 {
|
||||
description = "MSCC Ocelot PCB123 Device Tree";
|
||||
data = /incbin/("boot/dts/mscc/ocelot_pcb123.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "mips";
|
||||
compression = "none";
|
||||
hash@0 {
|
||||
hash {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
conf@ocelot_pcb123 {
|
||||
conf-ocelot_pcb123 {
|
||||
description = "Ocelot Linux kernel";
|
||||
kernel = "kernel@0";
|
||||
fdt = "fdt@ocelot_pcb123";
|
||||
kernel = "kernel";
|
||||
fdt = "fdt-ocelot_pcb123";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
typedef unsigned int cycles_t;
|
||||
|
||||
/*
|
||||
* On R4000/R4400 before version 5.0 an erratum exists such that if the
|
||||
* cycle counter is read in the exact moment that it is matching the
|
||||
* compare register, no interrupt will be generated.
|
||||
* On R4000/R4400 an erratum exists such that if the cycle counter is
|
||||
* read in the exact moment that it is matching the compare register,
|
||||
* no interrupt will be generated.
|
||||
*
|
||||
* There is a suggested workaround and also the erratum can't strike if
|
||||
* the compare interrupt isn't being used as the clock source device.
|
||||
@@ -63,7 +63,7 @@ static inline int can_use_mips_counter(unsigned int prid)
|
||||
if (!__builtin_constant_p(cpu_has_counter))
|
||||
asm volatile("" : "=m" (cpu_data[0].options));
|
||||
if (likely(cpu_has_counter &&
|
||||
prid >= (PRID_IMP_R4000 | PRID_REV_ENCODE_44(5, 0))))
|
||||
prid > (PRID_IMP_R4000 | PRID_REV_ENCODE_44(15, 15))))
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
|
||||
@@ -140,15 +140,10 @@ static __init int cpu_has_mfc0_count_bug(void)
|
||||
case CPU_R4400MC:
|
||||
/*
|
||||
* The published errata for the R4400 up to 3.0 say the CPU
|
||||
* has the mfc0 from count bug.
|
||||
* has the mfc0 from count bug. This seems the last version
|
||||
* produced.
|
||||
*/
|
||||
if ((current_cpu_data.processor_id & 0xff) <= 0x30)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* we assume newer revisions are ok
|
||||
*/
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -169,6 +169,8 @@ static inline void clkdev_add_sys(const char *dev, unsigned int module,
|
||||
{
|
||||
struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
|
||||
if (!clk)
|
||||
return;
|
||||
clk->cl.dev_id = dev;
|
||||
clk->cl.con_id = NULL;
|
||||
clk->cl.clk = clk;
|
||||
|
||||
@@ -81,7 +81,7 @@ void __init plat_mem_setup(void)
|
||||
|
||||
if (fw_passed_dtb) /* UHI interface */
|
||||
dtb = (void *)fw_passed_dtb;
|
||||
else if (__dtb_start != __dtb_end)
|
||||
else if (&__dtb_start != &__dtb_end)
|
||||
dtb = (void *)__dtb_start;
|
||||
else
|
||||
panic("no dtb found");
|
||||
|
||||
@@ -124,6 +124,8 @@ static inline void clkdev_add_gptu(struct device *dev, const char *con,
|
||||
{
|
||||
struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
|
||||
if (!clk)
|
||||
return;
|
||||
clk->cl.dev_id = dev_name(dev);
|
||||
clk->cl.con_id = con;
|
||||
clk->cl.clk = clk;
|
||||
|
||||
@@ -313,6 +313,8 @@ static void clkdev_add_pmu(const char *dev, const char *con, bool deactivate,
|
||||
{
|
||||
struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
|
||||
if (!clk)
|
||||
return;
|
||||
clk->cl.dev_id = dev;
|
||||
clk->cl.con_id = con;
|
||||
clk->cl.clk = clk;
|
||||
@@ -336,6 +338,8 @@ static void clkdev_add_cgu(const char *dev, const char *con,
|
||||
{
|
||||
struct clk *clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
|
||||
if (!clk)
|
||||
return;
|
||||
clk->cl.dev_id = dev;
|
||||
clk->cl.con_id = con;
|
||||
clk->cl.clk = clk;
|
||||
@@ -354,24 +358,28 @@ static void clkdev_add_pci(void)
|
||||
struct clk *clk_ext = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
|
||||
/* main pci clock */
|
||||
clk->cl.dev_id = "17000000.pci";
|
||||
clk->cl.con_id = NULL;
|
||||
clk->cl.clk = clk;
|
||||
clk->rate = CLOCK_33M;
|
||||
clk->rates = valid_pci_rates;
|
||||
clk->enable = pci_enable;
|
||||
clk->disable = pmu_disable;
|
||||
clk->module = 0;
|
||||
clk->bits = PMU_PCI;
|
||||
clkdev_add(&clk->cl);
|
||||
if (clk) {
|
||||
clk->cl.dev_id = "17000000.pci";
|
||||
clk->cl.con_id = NULL;
|
||||
clk->cl.clk = clk;
|
||||
clk->rate = CLOCK_33M;
|
||||
clk->rates = valid_pci_rates;
|
||||
clk->enable = pci_enable;
|
||||
clk->disable = pmu_disable;
|
||||
clk->module = 0;
|
||||
clk->bits = PMU_PCI;
|
||||
clkdev_add(&clk->cl);
|
||||
}
|
||||
|
||||
/* use internal/external bus clock */
|
||||
clk_ext->cl.dev_id = "17000000.pci";
|
||||
clk_ext->cl.con_id = "external";
|
||||
clk_ext->cl.clk = clk_ext;
|
||||
clk_ext->enable = pci_ext_enable;
|
||||
clk_ext->disable = pci_ext_disable;
|
||||
clkdev_add(&clk_ext->cl);
|
||||
if (clk_ext) {
|
||||
clk_ext->cl.dev_id = "17000000.pci";
|
||||
clk_ext->cl.con_id = "external";
|
||||
clk_ext->cl.clk = clk_ext;
|
||||
clk_ext->enable = pci_ext_enable;
|
||||
clk_ext->disable = pci_ext_disable;
|
||||
clkdev_add(&clk_ext->cl);
|
||||
}
|
||||
}
|
||||
|
||||
/* xway socs can generate clocks on gpio pins */
|
||||
@@ -391,9 +399,15 @@ static void clkdev_add_clkout(void)
|
||||
char *name;
|
||||
|
||||
name = kzalloc(sizeof("clkout0"), GFP_KERNEL);
|
||||
if (!name)
|
||||
continue;
|
||||
sprintf(name, "clkout%d", i);
|
||||
|
||||
clk = kzalloc(sizeof(struct clk), GFP_KERNEL);
|
||||
if (!clk) {
|
||||
kfree(name);
|
||||
continue;
|
||||
}
|
||||
clk->cl.dev_id = "1f103000.cgu";
|
||||
clk->cl.con_id = name;
|
||||
clk->cl.clk = clk;
|
||||
|
||||
@@ -36,7 +36,7 @@ static ulong get_fdtaddr(void)
|
||||
if (fw_passed_dtb && !fw_arg2 && !fw_arg3)
|
||||
return (ulong)fw_passed_dtb;
|
||||
|
||||
if (__dtb_start < __dtb_end)
|
||||
if (&__dtb_start < &__dtb_end)
|
||||
ftaddr = (ulong)__dtb_start;
|
||||
|
||||
return ftaddr;
|
||||
|
||||
@@ -79,7 +79,7 @@ void __init plat_mem_setup(void)
|
||||
*/
|
||||
if (fw_passed_dtb)
|
||||
dtb = (void *)fw_passed_dtb;
|
||||
else if (__dtb_start != __dtb_end)
|
||||
else if (&__dtb_start != &__dtb_end)
|
||||
dtb = (void *)__dtb_start;
|
||||
|
||||
__dt_setup_arch(dtb);
|
||||
|
||||
@@ -423,8 +423,7 @@ show_cpuinfo (struct seq_file *m, void *v)
|
||||
}
|
||||
seq_printf(m, " (0x%02lx)\n", boot_cpu_data.pdc.capabilities);
|
||||
|
||||
seq_printf(m, "model\t\t: %s\n"
|
||||
"model name\t: %s\n",
|
||||
seq_printf(m, "model\t\t: %s - %s\n",
|
||||
boot_cpu_data.pdc.sys_model_name,
|
||||
cpuinfo->dev ?
|
||||
cpuinfo->dev->name : "Unknown");
|
||||
|
||||
@@ -27,6 +27,16 @@ KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-option,-ffreestanding)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, address-of-packed-member)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO),-g)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(if $(CONFIG_DEBUG_INFO_DWARF4), $(call cc-option, -gdwarf-4,))
|
||||
|
||||
ifdef CONFIG_CC_IS_GCC
|
||||
ifeq ($(call cc-ifversion, -ge, 1200, y), y)
|
||||
ifeq ($(call cc-ifversion, -lt, 1300, y), y)
|
||||
KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds)
|
||||
KBUILD_CFLAGS_DECOMPRESSOR += $(call cc-disable-warning, array-bounds)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
UTS_MACHINE := s390x
|
||||
STACK_SIZE := 16384
|
||||
CHECKFLAGS += -D__s390__ -D__s390x__
|
||||
|
||||
@@ -133,11 +133,13 @@ extern void load_ucode_ap(void);
|
||||
void reload_early_microcode(void);
|
||||
extern bool get_builtin_firmware(struct cpio_data *cd, const char *name);
|
||||
extern bool initrd_gone;
|
||||
void microcode_bsp_resume(void);
|
||||
#else
|
||||
static inline int __init microcode_init(void) { return 0; };
|
||||
static inline void __init load_ucode_bsp(void) { }
|
||||
static inline void load_ucode_ap(void) { }
|
||||
static inline void reload_early_microcode(void) { }
|
||||
static inline void microcode_bsp_resume(void) { }
|
||||
static inline bool
|
||||
get_builtin_firmware(struct cpio_data *cd, const char *name) { return false; }
|
||||
#endif
|
||||
|
||||
@@ -773,9 +773,9 @@ static struct subsys_interface mc_cpu_interface = {
|
||||
};
|
||||
|
||||
/**
|
||||
* mc_bp_resume - Update boot CPU microcode during resume.
|
||||
* microcode_bsp_resume - Update boot CPU microcode during resume.
|
||||
*/
|
||||
static void mc_bp_resume(void)
|
||||
void microcode_bsp_resume(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
struct ucode_cpu_info *uci = ucode_cpu_info + cpu;
|
||||
@@ -787,7 +787,7 @@ static void mc_bp_resume(void)
|
||||
}
|
||||
|
||||
static struct syscore_ops mc_syscore_ops = {
|
||||
.resume = mc_bp_resume,
|
||||
.resume = microcode_bsp_resume,
|
||||
};
|
||||
|
||||
static int mc_cpu_starting(unsigned int cpu)
|
||||
|
||||
@@ -532,6 +532,11 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
|
||||
union cpuid10_eax eax;
|
||||
union cpuid10_edx edx;
|
||||
|
||||
if (!static_cpu_has(X86_FEATURE_ARCH_PERFMON)) {
|
||||
entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
perf_get_x86_pmu_capability(&cap);
|
||||
|
||||
/*
|
||||
|
||||
@@ -161,7 +161,7 @@ void memcpy_flushcache(void *_dst, const void *_src, size_t size)
|
||||
|
||||
/* cache copy and flush to align dest */
|
||||
if (!IS_ALIGNED(dest, 8)) {
|
||||
unsigned len = min_t(unsigned, size, ALIGN(dest, 8) - dest);
|
||||
size_t len = min_t(size_t, size, ALIGN(dest, 8) - dest);
|
||||
|
||||
memcpy((void *) dest, (void *) source, len);
|
||||
clean_cache_range((void *) dest, len);
|
||||
|
||||
@@ -441,6 +441,11 @@ void __init xen_msi_init(void)
|
||||
|
||||
x86_msi.setup_msi_irqs = xen_hvm_setup_msi_irqs;
|
||||
x86_msi.teardown_msi_irq = xen_teardown_msi_irq;
|
||||
/*
|
||||
* With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely
|
||||
* controlled by the hypervisor.
|
||||
*/
|
||||
pci_msi_ignore_mask = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <asm/cpu.h>
|
||||
#include <asm/mmu_context.h>
|
||||
#include <asm/cpu_device_id.h>
|
||||
#include <asm/microcode.h>
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
__visible unsigned long saved_context_ebx;
|
||||
@@ -268,6 +269,13 @@ static void notrace __restore_processor_state(struct saved_context *ctxt)
|
||||
x86_platform.restore_sched_clock_state();
|
||||
mtrr_bp_restore();
|
||||
perf_restore_debug_store();
|
||||
|
||||
microcode_bsp_resume();
|
||||
|
||||
/*
|
||||
* This needs to happen after the microcode has been updated upon resume
|
||||
* because some of the MSRs are "emulated" in microcode.
|
||||
*/
|
||||
msr_restore_context(ctxt);
|
||||
}
|
||||
|
||||
|
||||
@@ -10,13 +10,12 @@
|
||||
#include <linux/msg.h>
|
||||
#include <linux/shm.h>
|
||||
|
||||
typedef long syscall_handler_t(void);
|
||||
typedef long syscall_handler_t(long, long, long, long, long, long);
|
||||
|
||||
extern syscall_handler_t *sys_call_table[];
|
||||
|
||||
#define EXECUTE_SYSCALL(syscall, regs) \
|
||||
(((long (*)(long, long, long, long, long, long)) \
|
||||
(*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \
|
||||
(((*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \
|
||||
UPT_SYSCALL_ARG2(®s->regs), \
|
||||
UPT_SYSCALL_ARG3(®s->regs), \
|
||||
UPT_SYSCALL_ARG4(®s->regs), \
|
||||
|
||||
@@ -1537,7 +1537,7 @@ struct bio *bio_copy_kern(struct request_queue *q, void *data, unsigned int len,
|
||||
if (bytes > len)
|
||||
bytes = len;
|
||||
|
||||
page = alloc_page(q->bounce_gfp | gfp_mask);
|
||||
page = alloc_page(q->bounce_gfp | __GFP_ZERO | gfp_mask);
|
||||
if (!page)
|
||||
goto cleanup;
|
||||
|
||||
|
||||
@@ -439,18 +439,29 @@ static ssize_t acpi_data_show(struct file *filp, struct kobject *kobj,
|
||||
{
|
||||
struct acpi_data_attr *data_attr;
|
||||
void __iomem *base;
|
||||
ssize_t rc;
|
||||
ssize_t size;
|
||||
|
||||
data_attr = container_of(bin_attr, struct acpi_data_attr, attr);
|
||||
size = data_attr->attr.size;
|
||||
|
||||
base = acpi_os_map_memory(data_attr->addr, data_attr->attr.size);
|
||||
if (offset < 0)
|
||||
return -EINVAL;
|
||||
|
||||
if (offset >= size)
|
||||
return 0;
|
||||
|
||||
if (count > size - offset)
|
||||
count = size - offset;
|
||||
|
||||
base = acpi_os_map_iomem(data_attr->addr, size);
|
||||
if (!base)
|
||||
return -ENOMEM;
|
||||
rc = memory_read_from_buffer(buf, count, &offset, base,
|
||||
data_attr->attr.size);
|
||||
acpi_os_unmap_memory(base, data_attr->attr.size);
|
||||
|
||||
return rc;
|
||||
memcpy_fromio(buf, base + offset, count);
|
||||
|
||||
acpi_os_unmap_iomem(base, size);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
static int acpi_bert_data_init(void *th, struct acpi_data_attr *data_attr)
|
||||
|
||||
@@ -195,7 +195,7 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr,
|
||||
unsigned int set_size)
|
||||
{
|
||||
struct drbd_request *r;
|
||||
struct drbd_request *req = NULL;
|
||||
struct drbd_request *req = NULL, *tmp = NULL;
|
||||
int expect_epoch = 0;
|
||||
int expect_size = 0;
|
||||
|
||||
@@ -249,8 +249,11 @@ void tl_release(struct drbd_connection *connection, unsigned int barrier_nr,
|
||||
* to catch requests being barrier-acked "unexpectedly".
|
||||
* It usually should find the same req again, or some READ preceding it. */
|
||||
list_for_each_entry(req, &connection->transfer_log, tl_requests)
|
||||
if (req->epoch == expect_epoch)
|
||||
if (req->epoch == expect_epoch) {
|
||||
tmp = req;
|
||||
break;
|
||||
}
|
||||
req = list_prepare_entry(tmp, &connection->transfer_log, tl_requests);
|
||||
list_for_each_entry_safe_from(req, r, &connection->transfer_log, tl_requests) {
|
||||
if (req->epoch != expect_epoch)
|
||||
break;
|
||||
|
||||
@@ -774,9 +774,11 @@ int drbd_adm_set_role(struct sk_buff *skb, struct genl_info *info)
|
||||
mutex_lock(&adm_ctx.resource->adm_mutex);
|
||||
|
||||
if (info->genlhdr->cmd == DRBD_ADM_PRIMARY)
|
||||
retcode = drbd_set_role(adm_ctx.device, R_PRIMARY, parms.assume_uptodate);
|
||||
retcode = (enum drbd_ret_code)drbd_set_role(adm_ctx.device,
|
||||
R_PRIMARY, parms.assume_uptodate);
|
||||
else
|
||||
retcode = drbd_set_role(adm_ctx.device, R_SECONDARY, 0);
|
||||
retcode = (enum drbd_ret_code)drbd_set_role(adm_ctx.device,
|
||||
R_SECONDARY, 0);
|
||||
|
||||
mutex_unlock(&adm_ctx.resource->adm_mutex);
|
||||
genl_lock();
|
||||
@@ -1941,7 +1943,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
|
||||
drbd_flush_workqueue(&connection->sender_work);
|
||||
|
||||
rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE);
|
||||
retcode = rv; /* FIXME: Type mismatch. */
|
||||
retcode = (enum drbd_ret_code)rv;
|
||||
drbd_resume_io(device);
|
||||
if (rv < SS_SUCCESS)
|
||||
goto fail;
|
||||
@@ -2671,7 +2673,8 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
|
||||
}
|
||||
rcu_read_unlock();
|
||||
|
||||
retcode = conn_request_state(connection, NS(conn, C_UNCONNECTED), CS_VERBOSE);
|
||||
retcode = (enum drbd_ret_code)conn_request_state(connection,
|
||||
NS(conn, C_UNCONNECTED), CS_VERBOSE);
|
||||
|
||||
conn_reconfig_done(connection);
|
||||
mutex_unlock(&adm_ctx.resource->adm_mutex);
|
||||
@@ -2777,7 +2780,7 @@ int drbd_adm_disconnect(struct sk_buff *skb, struct genl_info *info)
|
||||
mutex_lock(&adm_ctx.resource->adm_mutex);
|
||||
rv = conn_try_disconnect(connection, parms.force_disconnect);
|
||||
if (rv < SS_SUCCESS)
|
||||
retcode = rv; /* FIXME: Type mismatch. */
|
||||
retcode = (enum drbd_ret_code)rv;
|
||||
else
|
||||
retcode = NO_ERROR;
|
||||
mutex_unlock(&adm_ctx.resource->adm_mutex);
|
||||
|
||||
@@ -520,8 +520,8 @@ static unsigned long fdc_busy;
|
||||
static DECLARE_WAIT_QUEUE_HEAD(fdc_wait);
|
||||
static DECLARE_WAIT_QUEUE_HEAD(command_done);
|
||||
|
||||
/* Errors during formatting are counted here. */
|
||||
static int format_errors;
|
||||
/* errors encountered on the current (or last) request */
|
||||
static int floppy_errors;
|
||||
|
||||
/* Format request descriptor. */
|
||||
static struct format_descr format_req;
|
||||
@@ -541,7 +541,6 @@ static struct format_descr format_req;
|
||||
static char *floppy_track_buffer;
|
||||
static int max_buffer_sectors;
|
||||
|
||||
static int *errors;
|
||||
typedef void (*done_f)(int);
|
||||
static const struct cont_t {
|
||||
void (*interrupt)(void);
|
||||
@@ -1434,7 +1433,7 @@ static int interpret_errors(void)
|
||||
if (DP->flags & FTD_MSG)
|
||||
DPRINT("Over/Underrun - retrying\n");
|
||||
bad = 0;
|
||||
} else if (*errors >= DP->max_errors.reporting) {
|
||||
} else if (floppy_errors >= DP->max_errors.reporting) {
|
||||
print_errors();
|
||||
}
|
||||
if (ST2 & ST2_WC || ST2 & ST2_BC)
|
||||
@@ -2054,7 +2053,7 @@ static void bad_flp_intr(void)
|
||||
if (!next_valid_format())
|
||||
return;
|
||||
}
|
||||
err_count = ++(*errors);
|
||||
err_count = ++floppy_errors;
|
||||
INFBOUND(DRWE->badness, err_count);
|
||||
if (err_count > DP->max_errors.abort)
|
||||
cont->done(0);
|
||||
@@ -2199,9 +2198,8 @@ static int do_format(int drive, struct format_descr *tmp_format_req)
|
||||
return -EINVAL;
|
||||
}
|
||||
format_req = *tmp_format_req;
|
||||
format_errors = 0;
|
||||
cont = &format_cont;
|
||||
errors = &format_errors;
|
||||
floppy_errors = 0;
|
||||
ret = wait_til_done(redo_format, true);
|
||||
if (ret == -EINTR)
|
||||
return -EINTR;
|
||||
@@ -2684,7 +2682,7 @@ static int make_raw_rw_request(void)
|
||||
*/
|
||||
if (!direct ||
|
||||
(indirect * 2 > direct * 3 &&
|
||||
*errors < DP->max_errors.read_track &&
|
||||
floppy_errors < DP->max_errors.read_track &&
|
||||
((!probing ||
|
||||
(DP->read_track & (1 << DRS->probed_format)))))) {
|
||||
max_size = blk_rq_sectors(current_req);
|
||||
@@ -2818,7 +2816,7 @@ static int set_next_request(void)
|
||||
if (q) {
|
||||
current_req = blk_fetch_request(q);
|
||||
if (current_req) {
|
||||
current_req->error_count = 0;
|
||||
floppy_errors = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2880,7 +2878,6 @@ do_request:
|
||||
_floppy = floppy_type + DP->autodetect[DRS->probed_format];
|
||||
} else
|
||||
probing = 0;
|
||||
errors = &(current_req->error_count);
|
||||
tmp = make_raw_rw_request();
|
||||
if (tmp < 2) {
|
||||
request_done(tmp);
|
||||
|
||||
@@ -224,6 +224,8 @@ static struct sunxi_rsb_device *sunxi_rsb_device_create(struct sunxi_rsb *rsb,
|
||||
|
||||
dev_dbg(&rdev->dev, "device %s registered\n", dev_name(&rdev->dev));
|
||||
|
||||
return rdev;
|
||||
|
||||
err_device_add:
|
||||
put_device(&rdev->dev);
|
||||
|
||||
|
||||
@@ -717,7 +717,16 @@ ssize_t tpm2_get_tpm_pt(struct tpm_chip *chip, u32 property_id, u32 *value,
|
||||
if (!rc) {
|
||||
out = (struct tpm2_get_cap_out *)
|
||||
&buf.data[TPM_HEADER_SIZE];
|
||||
*value = be32_to_cpu(out->value);
|
||||
/*
|
||||
* To prevent failing boot up of some systems, Infineon TPM2.0
|
||||
* returns SUCCESS on TPM2_Startup in field upgrade mode. Also
|
||||
* the TPM2_Getcapability command returns a zero length list
|
||||
* in field upgrade mode.
|
||||
*/
|
||||
if (be32_to_cpu(out->property_cnt) > 0)
|
||||
*value = be32_to_cpu(out->value);
|
||||
else
|
||||
rc = -ENODATA;
|
||||
}
|
||||
tpm_buf_destroy(&buf);
|
||||
return rc;
|
||||
|
||||
@@ -692,6 +692,7 @@ static int tpm_ibmvtpm_probe(struct vio_dev *vio_dev,
|
||||
if (!wait_event_timeout(ibmvtpm->crq_queue.wq,
|
||||
ibmvtpm->rtce_buf != NULL,
|
||||
HZ)) {
|
||||
rc = -ENODEV;
|
||||
dev_err(dev, "CRQ response timed out\n");
|
||||
goto init_irq_cleanup;
|
||||
}
|
||||
|
||||
@@ -119,6 +119,10 @@ static void clk_generated_best_diff(struct clk_rate_request *req,
|
||||
tmp_rate = parent_rate;
|
||||
else
|
||||
tmp_rate = parent_rate / div;
|
||||
|
||||
if (tmp_rate < req->min_rate || tmp_rate > req->max_rate)
|
||||
return;
|
||||
|
||||
tmp_diff = abs(req->rate - tmp_rate);
|
||||
|
||||
if (*best_diff < 0 || *best_diff > tmp_diff) {
|
||||
|
||||
@@ -117,6 +117,8 @@ static int sun9i_a80_mmc_config_clk_probe(struct platform_device *pdev)
|
||||
spin_lock_init(&data->lock);
|
||||
|
||||
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
if (!r)
|
||||
return -EINVAL;
|
||||
/* one clock/reset pair per word */
|
||||
count = DIV_ROUND_UP((resource_size(r)), SUN9I_MMC_WIDTH);
|
||||
data->membase = devm_ioremap_resource(&pdev->dev, r);
|
||||
|
||||
@@ -64,6 +64,7 @@ static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max)
|
||||
} else {
|
||||
/* copy only remaining bytes */
|
||||
memcpy(data, &val, max - currsize);
|
||||
break;
|
||||
}
|
||||
} while (currsize < max);
|
||||
|
||||
|
||||
@@ -334,8 +334,10 @@ static int stm32_crc_remove(struct platform_device *pdev)
|
||||
struct stm32_crc *crc = platform_get_drvdata(pdev);
|
||||
int ret = pm_runtime_get_sync(crc->dev);
|
||||
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
pm_runtime_put_noidle(crc->dev);
|
||||
return ret;
|
||||
}
|
||||
|
||||
spin_lock(&crc_list.lock);
|
||||
list_del(&crc->list);
|
||||
|
||||
@@ -681,6 +681,7 @@ EXPORT_SYMBOL_GPL(fw_card_release);
|
||||
void fw_core_remove_card(struct fw_card *card)
|
||||
{
|
||||
struct fw_card_driver dummy_driver = dummy_driver_template;
|
||||
unsigned long flags;
|
||||
|
||||
card->driver->update_phy_reg(card, 4,
|
||||
PHY_LINK_ACTIVE | PHY_CONTENDER, 0);
|
||||
@@ -695,7 +696,9 @@ void fw_core_remove_card(struct fw_card *card)
|
||||
dummy_driver.stop_iso = card->driver->stop_iso;
|
||||
card->driver = &dummy_driver;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
fw_destroy_nodes(card);
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
/* Wait for all users, especially device workqueue jobs, to finish. */
|
||||
fw_card_put(card);
|
||||
|
||||
@@ -1495,6 +1495,7 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
|
||||
{
|
||||
struct outbound_phy_packet_event *e =
|
||||
container_of(packet, struct outbound_phy_packet_event, p);
|
||||
struct client *e_client;
|
||||
|
||||
switch (status) {
|
||||
/* expected: */
|
||||
@@ -1511,9 +1512,10 @@ static void outbound_phy_packet_callback(struct fw_packet *packet,
|
||||
}
|
||||
e->phy_packet.data[0] = packet->timestamp;
|
||||
|
||||
e_client = e->client;
|
||||
queue_event(e->client, &e->event, &e->phy_packet,
|
||||
sizeof(e->phy_packet) + e->phy_packet.length, NULL, 0);
|
||||
client_put(e->client);
|
||||
client_put(e_client);
|
||||
}
|
||||
|
||||
static int ioctl_send_phy_packet(struct client *client, union ioctl_arg *arg)
|
||||
|
||||
@@ -386,16 +386,13 @@ static void report_found_node(struct fw_card *card,
|
||||
card->bm_retries = 0;
|
||||
}
|
||||
|
||||
/* Must be called with card->lock held */
|
||||
void fw_destroy_nodes(struct fw_card *card)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
card->color++;
|
||||
if (card->local_node != NULL)
|
||||
for_each_fw_node(card, card->local_node, report_lost_node);
|
||||
card->local_node = NULL;
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
}
|
||||
|
||||
static void move_tree(struct fw_node *node0, struct fw_node *node1, int port)
|
||||
@@ -521,6 +518,8 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
|
||||
struct fw_node *local_node;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
|
||||
/*
|
||||
* If the selfID buffer is not the immediate successor of the
|
||||
* previously processed one, we cannot reliably compare the
|
||||
@@ -532,8 +531,6 @@ void fw_core_handle_bus_reset(struct fw_card *card, int node_id, int generation,
|
||||
card->bm_retries = 0;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
|
||||
card->broadcast_channel_allocated = card->broadcast_channel_auto_allocated;
|
||||
card->node_id = node_id;
|
||||
/*
|
||||
|
||||
@@ -86,24 +86,25 @@ static int try_cancel_split_timeout(struct fw_transaction *t)
|
||||
static int close_transaction(struct fw_transaction *transaction,
|
||||
struct fw_card *card, int rcode)
|
||||
{
|
||||
struct fw_transaction *t;
|
||||
struct fw_transaction *t = NULL, *iter;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(t, &card->transaction_list, link) {
|
||||
if (t == transaction) {
|
||||
if (!try_cancel_split_timeout(t)) {
|
||||
list_for_each_entry(iter, &card->transaction_list, link) {
|
||||
if (iter == transaction) {
|
||||
if (!try_cancel_split_timeout(iter)) {
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
goto timed_out;
|
||||
}
|
||||
list_del_init(&t->link);
|
||||
card->tlabel_mask &= ~(1ULL << t->tlabel);
|
||||
list_del_init(&iter->link);
|
||||
card->tlabel_mask &= ~(1ULL << iter->tlabel);
|
||||
t = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
if (&t->link != &card->transaction_list) {
|
||||
if (t) {
|
||||
t->callback(card, rcode, NULL, 0, t->callback_data);
|
||||
return 0;
|
||||
}
|
||||
@@ -938,7 +939,7 @@ EXPORT_SYMBOL(fw_core_handle_request);
|
||||
|
||||
void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
|
||||
{
|
||||
struct fw_transaction *t;
|
||||
struct fw_transaction *t = NULL, *iter;
|
||||
unsigned long flags;
|
||||
u32 *data;
|
||||
size_t data_length;
|
||||
@@ -950,20 +951,21 @@ void fw_core_handle_response(struct fw_card *card, struct fw_packet *p)
|
||||
rcode = HEADER_GET_RCODE(p->header[1]);
|
||||
|
||||
spin_lock_irqsave(&card->lock, flags);
|
||||
list_for_each_entry(t, &card->transaction_list, link) {
|
||||
if (t->node_id == source && t->tlabel == tlabel) {
|
||||
if (!try_cancel_split_timeout(t)) {
|
||||
list_for_each_entry(iter, &card->transaction_list, link) {
|
||||
if (iter->node_id == source && iter->tlabel == tlabel) {
|
||||
if (!try_cancel_split_timeout(iter)) {
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
goto timed_out;
|
||||
}
|
||||
list_del_init(&t->link);
|
||||
card->tlabel_mask &= ~(1ULL << t->tlabel);
|
||||
list_del_init(&iter->link);
|
||||
card->tlabel_mask &= ~(1ULL << iter->tlabel);
|
||||
t = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&card->lock, flags);
|
||||
|
||||
if (&t->link == &card->transaction_list) {
|
||||
if (!t) {
|
||||
timed_out:
|
||||
fw_notice(card, "unsolicited response (source %x, tlabel %x)\n",
|
||||
source, tlabel);
|
||||
|
||||
@@ -421,7 +421,7 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
|
||||
void *payload, size_t length, void *callback_data)
|
||||
{
|
||||
struct sbp2_logical_unit *lu = callback_data;
|
||||
struct sbp2_orb *orb;
|
||||
struct sbp2_orb *orb = NULL, *iter;
|
||||
struct sbp2_status status;
|
||||
unsigned long flags;
|
||||
|
||||
@@ -446,17 +446,18 @@ static void sbp2_status_write(struct fw_card *card, struct fw_request *request,
|
||||
|
||||
/* Lookup the orb corresponding to this status write. */
|
||||
spin_lock_irqsave(&lu->tgt->lock, flags);
|
||||
list_for_each_entry(orb, &lu->orb_list, link) {
|
||||
list_for_each_entry(iter, &lu->orb_list, link) {
|
||||
if (STATUS_GET_ORB_HIGH(status) == 0 &&
|
||||
STATUS_GET_ORB_LOW(status) == orb->request_bus) {
|
||||
orb->rcode = RCODE_COMPLETE;
|
||||
list_del(&orb->link);
|
||||
STATUS_GET_ORB_LOW(status) == iter->request_bus) {
|
||||
iter->rcode = RCODE_COMPLETE;
|
||||
list_del(&iter->link);
|
||||
orb = iter;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&lu->tgt->lock, flags);
|
||||
|
||||
if (&orb->link != &lu->orb_list) {
|
||||
if (orb) {
|
||||
orb->callback(orb, &status);
|
||||
kref_put(&orb->kref, free_orb); /* orb callback reference */
|
||||
} else {
|
||||
|
||||
@@ -690,6 +690,9 @@ static int mvebu_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
|
||||
unsigned long flags;
|
||||
unsigned int on, off;
|
||||
|
||||
if (state->polarity != PWM_POLARITY_NORMAL)
|
||||
return -EINVAL;
|
||||
|
||||
val = (unsigned long long) mvpwm->clk_rate * state->duty_cycle;
|
||||
do_div(val, NSEC_PER_SEC);
|
||||
if (val > UINT_MAX)
|
||||
|
||||
@@ -135,9 +135,13 @@ static int vf610_gpio_direction_output(struct gpio_chip *chip, unsigned gpio,
|
||||
{
|
||||
struct vf610_gpio_port *port = gpiochip_get_data(chip);
|
||||
unsigned long mask = BIT(gpio);
|
||||
u32 val;
|
||||
|
||||
if (port->sdata && port->sdata->have_paddr)
|
||||
vf610_gpio_writel(mask, port->gpio_base + GPIO_PDDR);
|
||||
if (port->sdata && port->sdata->have_paddr) {
|
||||
val = vf610_gpio_readl(port->gpio_base + GPIO_PDDR);
|
||||
val |= mask;
|
||||
vf610_gpio_writel(val, port->gpio_base + GPIO_PDDR);
|
||||
}
|
||||
|
||||
vf610_gpio_set(chip, gpio, value);
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ static void of_gpiochip_init_valid_mask(struct gpio_chip *chip)
|
||||
i, &start);
|
||||
of_property_read_u32_index(np, "gpio-reserved-ranges",
|
||||
i + 1, &count);
|
||||
if (start >= chip->ngpio || start + count >= chip->ngpio)
|
||||
if (start >= chip->ngpio || start + count > chip->ngpio)
|
||||
continue;
|
||||
|
||||
bitmap_clear(chip->valid_mask, start, count);
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
*/
|
||||
|
||||
struct gpio_service *dal_gpio_service_create(
|
||||
enum dce_version dce_version_major,
|
||||
enum dce_version dce_version_minor,
|
||||
enum dce_version dce_version,
|
||||
enum dce_environment dce_environment,
|
||||
struct dc_context *ctx)
|
||||
{
|
||||
struct gpio_service *service;
|
||||
@@ -66,14 +66,14 @@ struct gpio_service *dal_gpio_service_create(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (!dal_hw_translate_init(&service->translate, dce_version_major,
|
||||
dce_version_minor)) {
|
||||
if (!dal_hw_translate_init(&service->translate, dce_version,
|
||||
dce_environment)) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
goto failure_1;
|
||||
}
|
||||
|
||||
if (!dal_hw_factory_init(&service->factory, dce_version_major,
|
||||
dce_version_minor)) {
|
||||
if (!dal_hw_factory_init(&service->factory, dce_version,
|
||||
dce_environment)) {
|
||||
BREAK_TO_DEBUGGER();
|
||||
goto failure_1;
|
||||
}
|
||||
|
||||
@@ -42,8 +42,8 @@ void dal_gpio_destroy(
|
||||
struct gpio **ptr);
|
||||
|
||||
struct gpio_service *dal_gpio_service_create(
|
||||
enum dce_version dce_version_major,
|
||||
enum dce_version dce_version_minor,
|
||||
enum dce_version dce_version,
|
||||
enum dce_environment dce_environment,
|
||||
struct dc_context *ctx);
|
||||
|
||||
struct gpio *dal_gpio_service_create_irq(
|
||||
|
||||
@@ -3048,6 +3048,7 @@ static void fetch_monitor_name(struct drm_dp_mst_topology_mgr *mgr,
|
||||
|
||||
mst_edid = drm_dp_mst_get_edid(port->connector, mgr, port);
|
||||
drm_edid_get_monitor_name(mst_edid, name, namelen);
|
||||
kfree(mst_edid);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -2814,7 +2814,7 @@ hsw_compute_linetime_wm(const struct intel_crtc_state *cstate)
|
||||
}
|
||||
|
||||
static void intel_read_wm_latency(struct drm_i915_private *dev_priv,
|
||||
uint16_t wm[8])
|
||||
uint16_t wm[])
|
||||
{
|
||||
if (INTEL_GEN(dev_priv) >= 9) {
|
||||
uint32_t val;
|
||||
|
||||
@@ -189,9 +189,10 @@ static struct drm_gem_object *vgem_gem_create(struct drm_device *dev,
|
||||
return ERR_CAST(obj);
|
||||
|
||||
ret = drm_gem_handle_create(file, &obj->base, handle);
|
||||
drm_gem_object_put_unlocked(&obj->base);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
drm_gem_object_put_unlocked(&obj->base);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
return &obj->base;
|
||||
}
|
||||
@@ -214,7 +215,9 @@ static int vgem_gem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
args->size = gem_object->size;
|
||||
args->pitch = pitch;
|
||||
|
||||
DRM_DEBUG_DRIVER("Created object of size %lld\n", size);
|
||||
drm_gem_object_put_unlocked(gem_object);
|
||||
|
||||
DRM_DEBUG_DRIVER("Created object of size %llu\n", args->size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -498,7 +498,7 @@ static int vmw_fb_kms_detach(struct vmw_fb_par *par,
|
||||
|
||||
static int vmw_fb_kms_framebuffer(struct fb_info *info)
|
||||
{
|
||||
struct drm_mode_fb_cmd2 mode_cmd;
|
||||
struct drm_mode_fb_cmd2 mode_cmd = {0};
|
||||
struct vmw_fb_par *par = info->par;
|
||||
struct fb_var_screeninfo *var = &info->var;
|
||||
struct drm_framebuffer *cur_fb;
|
||||
|
||||
@@ -2111,6 +2111,9 @@ static const struct hid_device_id mt_devices[] = {
|
||||
{ .driver_data = MT_CLS_GOOGLE,
|
||||
HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_GOOGLE,
|
||||
USB_DEVICE_ID_GOOGLE_TOUCH_ROSE) },
|
||||
{ .driver_data = MT_CLS_GOOGLE,
|
||||
HID_DEVICE(BUS_USB, HID_GROUP_MULTITOUCH_WIN_8, USB_VENDOR_ID_GOOGLE,
|
||||
USB_DEVICE_ID_GOOGLE_WHISKERS) },
|
||||
|
||||
/* Generic MT device */
|
||||
{ HID_DEVICE(HID_BUS_ANY, HID_GROUP_MULTITOUCH, HID_ANY_ID, HID_ANY_ID) },
|
||||
|
||||
@@ -791,7 +791,7 @@ config SENSORS_LTC4261
|
||||
|
||||
config SENSORS_LTQ_CPUTEMP
|
||||
bool "Lantiq cpu temperature sensor driver"
|
||||
depends on LANTIQ
|
||||
depends on SOC_XWAY
|
||||
help
|
||||
If you say yes here you get support for the temperature
|
||||
sensor inside your CPU.
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/util_macros.h>
|
||||
#include <linux/sched.h>
|
||||
|
||||
/* Addresses to scan */
|
||||
static const unsigned short normal_i2c[] = { 0x2C, 0x2E, 0x2F, I2C_CLIENT_END };
|
||||
@@ -273,11 +274,10 @@ static int adt7470_update_thread(void *p)
|
||||
adt7470_read_temperatures(client, data);
|
||||
mutex_unlock(&data->lock);
|
||||
|
||||
set_current_state(TASK_INTERRUPTIBLE);
|
||||
if (kthread_should_stop())
|
||||
break;
|
||||
|
||||
schedule_timeout(msecs_to_jiffies(data->auto_update_interval));
|
||||
schedule_timeout_interruptible(msecs_to_jiffies(data->auto_update_interval));
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -1590,8 +1590,9 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
|
||||
temp *= 125;
|
||||
if (sign)
|
||||
temp -= 128000;
|
||||
} else
|
||||
temp = data->temp[nr] * 1000;
|
||||
} else {
|
||||
temp = ((s8)data->temp[nr]) * 1000;
|
||||
}
|
||||
|
||||
return sprintf(buf, "%d\n", temp);
|
||||
}
|
||||
|
||||
@@ -756,10 +756,21 @@ static int tmp401_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct of_device_id __maybe_unused tmp4xx_of_match[] = {
|
||||
{ .compatible = "ti,tmp401", },
|
||||
{ .compatible = "ti,tmp411", },
|
||||
{ .compatible = "ti,tmp431", },
|
||||
{ .compatible = "ti,tmp432", },
|
||||
{ .compatible = "ti,tmp435", },
|
||||
{ },
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, tmp4xx_of_match);
|
||||
|
||||
static struct i2c_driver tmp401_driver = {
|
||||
.class = I2C_CLASS_HWMON,
|
||||
.driver = {
|
||||
.name = "tmp401",
|
||||
.of_match_table = of_match_ptr(tmp4xx_of_match),
|
||||
},
|
||||
.probe = tmp401_probe,
|
||||
.id_table = tmp401_id,
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
#define ISMT_DESC_ENTRIES 2 /* number of descriptor entries */
|
||||
#define ISMT_MAX_RETRIES 3 /* number of SMBus retries to attempt */
|
||||
#define ISMT_LOG_ENTRIES 3 /* number of interrupt cause log entries */
|
||||
|
||||
/* Hardware Descriptor Constants - Control Field */
|
||||
#define ISMT_DESC_CWRL 0x01 /* Command/Write Length */
|
||||
@@ -173,6 +174,8 @@ struct ismt_priv {
|
||||
u8 head; /* ring buffer head pointer */
|
||||
struct completion cmp; /* interrupt completion */
|
||||
u8 buffer[I2C_SMBUS_BLOCK_MAX + 16]; /* temp R/W data buffer */
|
||||
dma_addr_t log_dma;
|
||||
u32 *log;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -406,6 +409,9 @@ static int ismt_access(struct i2c_adapter *adap, u16 addr,
|
||||
memset(desc, 0, sizeof(struct ismt_desc));
|
||||
desc->tgtaddr_rw = ISMT_DESC_ADDR_RW(addr, read_write);
|
||||
|
||||
/* Always clear the log entries */
|
||||
memset(priv->log, 0, ISMT_LOG_ENTRIES * sizeof(u32));
|
||||
|
||||
/* Initialize common control bits */
|
||||
if (likely(pci_dev_msi_enabled(priv->pci_dev)))
|
||||
desc->control = ISMT_DESC_INT | ISMT_DESC_FAIR;
|
||||
@@ -695,6 +701,8 @@ static void ismt_hw_init(struct ismt_priv *priv)
|
||||
/* initialize the Master Descriptor Base Address (MDBA) */
|
||||
writeq(priv->io_rng_dma, priv->smba + ISMT_MSTR_MDBA);
|
||||
|
||||
writeq(priv->log_dma, priv->smba + ISMT_GR_SMTICL);
|
||||
|
||||
/* initialize the Master Control Register (MCTRL) */
|
||||
writel(ISMT_MCTRL_MEIE, priv->smba + ISMT_MSTR_MCTRL);
|
||||
|
||||
@@ -784,6 +792,12 @@ static int ismt_dev_init(struct ismt_priv *priv)
|
||||
priv->head = 0;
|
||||
init_completion(&priv->cmp);
|
||||
|
||||
priv->log = dmam_alloc_coherent(&priv->pci_dev->dev,
|
||||
ISMT_LOG_ENTRIES * sizeof(u32),
|
||||
&priv->log_dma, GFP_KERNEL);
|
||||
if (!priv->log)
|
||||
return -ENOMEM;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,6 +208,7 @@ static int thunder_i2c_probe_pci(struct pci_dev *pdev,
|
||||
i2c->adap.bus_recovery_info = &octeon_i2c_recovery_info;
|
||||
i2c->adap.dev.parent = dev;
|
||||
i2c->adap.dev.of_node = pdev->dev.of_node;
|
||||
i2c->adap.dev.fwnode = dev->fwnode;
|
||||
snprintf(i2c->adap.name, sizeof(i2c->adap.name),
|
||||
"Cavium ThunderX i2c adapter at %s", dev_name(dev));
|
||||
i2c_set_adapdata(&i2c->adap, i2c);
|
||||
|
||||
@@ -171,7 +171,7 @@ static int ad5446_read_raw(struct iio_dev *indio_dev,
|
||||
|
||||
switch (m) {
|
||||
case IIO_CHAN_INFO_RAW:
|
||||
*val = st->cached_val;
|
||||
*val = st->cached_val >> chan->scan_type.shift;
|
||||
return IIO_VAL_INT;
|
||||
case IIO_CHAN_INFO_SCALE:
|
||||
*val = st->vref_mv;
|
||||
|
||||
@@ -531,7 +531,7 @@ static int ad5592r_alloc_channels(struct ad5592r_state *st)
|
||||
if (!ret)
|
||||
st->channel_modes[reg] = tmp;
|
||||
|
||||
fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
ret = fwnode_property_read_u32(child, "adi,off-state", &tmp);
|
||||
if (!ret)
|
||||
st->channel_offstate[reg] = tmp;
|
||||
}
|
||||
|
||||
@@ -404,6 +404,7 @@ static int ak8975_power_on(const struct ak8975_data *data)
|
||||
if (ret) {
|
||||
dev_warn(&data->client->dev,
|
||||
"Failed to enable specified Vid supply\n");
|
||||
regulator_disable(data->vdd);
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
|
||||
@@ -50,6 +50,17 @@ static DEFINE_MUTEX(input_mutex);
|
||||
|
||||
static const struct input_value input_value_sync = { EV_SYN, SYN_REPORT, 1 };
|
||||
|
||||
static const unsigned int input_max_code[EV_CNT] = {
|
||||
[EV_KEY] = KEY_MAX,
|
||||
[EV_REL] = REL_MAX,
|
||||
[EV_ABS] = ABS_MAX,
|
||||
[EV_MSC] = MSC_MAX,
|
||||
[EV_SW] = SW_MAX,
|
||||
[EV_LED] = LED_MAX,
|
||||
[EV_SND] = SND_MAX,
|
||||
[EV_FF] = FF_MAX,
|
||||
};
|
||||
|
||||
static inline int is_event_supported(unsigned int code,
|
||||
unsigned long *bm, unsigned int max)
|
||||
{
|
||||
@@ -1963,6 +1974,14 @@ EXPORT_SYMBOL(input_get_timestamp);
|
||||
*/
|
||||
void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code)
|
||||
{
|
||||
if (type < EV_CNT && input_max_code[type] &&
|
||||
code > input_max_code[type]) {
|
||||
pr_err("%s: invalid code %u for type %u\n", __func__, code,
|
||||
type);
|
||||
dump_stack();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case EV_KEY:
|
||||
__set_bit(code, dev->keybit);
|
||||
|
||||
@@ -339,11 +339,11 @@ static int stmfts_input_open(struct input_dev *dev)
|
||||
|
||||
err = pm_runtime_get_sync(&sdata->client->dev);
|
||||
if (err < 0)
|
||||
return err;
|
||||
goto out;
|
||||
|
||||
err = i2c_smbus_write_byte(sdata->client, STMFTS_MS_MT_SENSE_ON);
|
||||
if (err)
|
||||
return err;
|
||||
goto out;
|
||||
|
||||
mutex_lock(&sdata->mutex);
|
||||
sdata->running = true;
|
||||
@@ -366,7 +366,9 @@ static int stmfts_input_open(struct input_dev *dev)
|
||||
"failed to enable touchkey\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
out:
|
||||
pm_runtime_put_noidle(&sdata->client->dev);
|
||||
return err;
|
||||
}
|
||||
|
||||
static void stmfts_input_close(struct input_dev *dev)
|
||||
|
||||
@@ -599,6 +599,7 @@ static void dm_bow_dtr(struct dm_target *ti)
|
||||
struct bow_context *bc = (struct bow_context *) ti->private;
|
||||
struct kobject *kobj;
|
||||
|
||||
mutex_lock(&bc->ranges_lock);
|
||||
while (rb_first(&bc->ranges)) {
|
||||
struct bow_range *br = container_of(rb_first(&bc->ranges),
|
||||
struct bow_range, node);
|
||||
@@ -606,6 +607,8 @@ static void dm_bow_dtr(struct dm_target *ti)
|
||||
rb_erase(&br->node, &bc->ranges);
|
||||
kfree(br);
|
||||
}
|
||||
mutex_unlock(&bc->ranges_lock);
|
||||
|
||||
if (bc->workqueue)
|
||||
destroy_workqueue(bc->workqueue);
|
||||
if (bc->bufio)
|
||||
@@ -1182,6 +1185,7 @@ static void dm_bow_tablestatus(struct dm_target *ti, char *result,
|
||||
return;
|
||||
}
|
||||
|
||||
mutex_lock(&bc->ranges_lock);
|
||||
for (i = rb_first(&bc->ranges); i; i = rb_next(i)) {
|
||||
struct bow_range *br = container_of(i, struct bow_range, node);
|
||||
|
||||
@@ -1189,11 +1193,11 @@ static void dm_bow_tablestatus(struct dm_target *ti, char *result,
|
||||
readable_type[br->type],
|
||||
(unsigned long long)br->sector);
|
||||
if (result >= end)
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
result += scnprintf(result, end - result, "\n");
|
||||
if (result >= end)
|
||||
return;
|
||||
goto unlock;
|
||||
|
||||
if (br->type == TRIMMED)
|
||||
++trimmed_range_count;
|
||||
@@ -1215,19 +1219,22 @@ static void dm_bow_tablestatus(struct dm_target *ti, char *result,
|
||||
if (!rb_next(i)) {
|
||||
scnprintf(result, end - result,
|
||||
"\nERROR: Last range not of type TOP");
|
||||
return;
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (br->sector > range_top(br)) {
|
||||
scnprintf(result, end - result,
|
||||
"\nERROR: sectors out of order");
|
||||
return;
|
||||
goto unlock;
|
||||
}
|
||||
}
|
||||
|
||||
if (trimmed_range_count != trimmed_list_length)
|
||||
scnprintf(result, end - result,
|
||||
"\nERROR: not all trimmed ranges in trimmed list");
|
||||
|
||||
unlock:
|
||||
mutex_unlock(&bc->ranges_lock);
|
||||
}
|
||||
|
||||
static void dm_bow_status(struct dm_target *ti, status_type_t type,
|
||||
|
||||
@@ -3106,6 +3106,11 @@ static int crypt_map(struct dm_target *ti, struct bio *bio)
|
||||
return DM_MAPIO_SUBMITTED;
|
||||
}
|
||||
|
||||
static char hex2asc(unsigned char c)
|
||||
{
|
||||
return c + '0' + ((unsigned)(9 - c) >> 4 & 0x27);
|
||||
}
|
||||
|
||||
static void crypt_status(struct dm_target *ti, status_type_t type,
|
||||
unsigned status_flags, char *result, unsigned maxlen)
|
||||
{
|
||||
@@ -3124,9 +3129,12 @@ static void crypt_status(struct dm_target *ti, status_type_t type,
|
||||
if (cc->key_size > 0) {
|
||||
if (cc->key_string)
|
||||
DMEMIT(":%u:%s", cc->key_size, cc->key_string);
|
||||
else
|
||||
for (i = 0; i < cc->key_size; i++)
|
||||
DMEMIT("%02x", cc->key[i]);
|
||||
else {
|
||||
for (i = 0; i < cc->key_size; i++) {
|
||||
DMEMIT("%c%c", hex2asc(cc->key[i] >> 4),
|
||||
hex2asc(cc->key[i] & 0xf));
|
||||
}
|
||||
}
|
||||
} else
|
||||
DMEMIT("-");
|
||||
|
||||
|
||||
@@ -3565,8 +3565,6 @@ try_smaller_buffer:
|
||||
}
|
||||
|
||||
if (should_write_sb) {
|
||||
int r;
|
||||
|
||||
init_journal(ic, 0, ic->journal_sections, 0);
|
||||
r = dm_integrity_failed(ic);
|
||||
if (unlikely(r)) {
|
||||
|
||||
@@ -224,6 +224,7 @@ void dm_stats_cleanup(struct dm_stats *stats)
|
||||
atomic_read(&shared->in_flight[READ]),
|
||||
atomic_read(&shared->in_flight[WRITE]));
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
dm_stat_free(&s->rcu_head);
|
||||
}
|
||||
@@ -313,6 +314,7 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end,
|
||||
for (ni = 0; ni < n_entries; ni++) {
|
||||
atomic_set(&s->stat_shared[ni].in_flight[READ], 0);
|
||||
atomic_set(&s->stat_shared[ni].in_flight[WRITE], 0);
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
if (s->n_histogram_entries) {
|
||||
@@ -325,6 +327,7 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end,
|
||||
for (ni = 0; ni < n_entries; ni++) {
|
||||
s->stat_shared[ni].tmp.histogram = hi;
|
||||
hi += s->n_histogram_entries + 1;
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -345,6 +348,7 @@ static int dm_stats_create(struct dm_stats *stats, sector_t start, sector_t end,
|
||||
for (ni = 0; ni < n_entries; ni++) {
|
||||
p[ni].histogram = hi;
|
||||
hi += s->n_histogram_entries + 1;
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -474,6 +478,7 @@ static int dm_stats_list(struct dm_stats *stats, const char *program,
|
||||
}
|
||||
DMEMIT("\n");
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
mutex_unlock(&stats->mutex);
|
||||
|
||||
@@ -750,6 +755,7 @@ static void __dm_stat_clear(struct dm_stat *s, size_t idx_start, size_t idx_end,
|
||||
local_irq_enable();
|
||||
}
|
||||
}
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -865,6 +871,8 @@ static int dm_stats_print(struct dm_stats *stats, int id,
|
||||
|
||||
if (unlikely(sz + 1 >= maxlen))
|
||||
goto buffer_overflow;
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
if (clear)
|
||||
|
||||
@@ -1198,6 +1198,7 @@ bad:
|
||||
|
||||
static struct target_type verity_target = {
|
||||
.name = "verity",
|
||||
.features = DM_TARGET_IMMUTABLE,
|
||||
.version = {1, 4, 0},
|
||||
.module = THIS_MODULE,
|
||||
.ctr = verity_ctr,
|
||||
|
||||
@@ -623,21 +623,20 @@ static void start_io_acct(struct dm_io *io)
|
||||
false, 0, &io->stats_aux);
|
||||
}
|
||||
|
||||
static void end_io_acct(struct dm_io *io)
|
||||
static void end_io_acct(struct mapped_device *md, struct bio *bio,
|
||||
unsigned long start_time, struct dm_stats_aux *stats_aux)
|
||||
{
|
||||
struct mapped_device *md = io->md;
|
||||
struct bio *bio = io->orig_bio;
|
||||
unsigned long duration = jiffies - io->start_time;
|
||||
unsigned long duration = jiffies - start_time;
|
||||
int pending;
|
||||
int rw = bio_data_dir(bio);
|
||||
|
||||
generic_end_io_acct(md->queue, bio_op(bio), &dm_disk(md)->part0,
|
||||
io->start_time);
|
||||
start_time);
|
||||
|
||||
if (unlikely(dm_stats_used(&md->stats)))
|
||||
dm_stats_account_io(&md->stats, bio_data_dir(bio),
|
||||
bio->bi_iter.bi_sector, bio_sectors(bio),
|
||||
true, duration, &io->stats_aux);
|
||||
true, duration, stats_aux);
|
||||
|
||||
/*
|
||||
* After this is decremented the bio must not be touched if it is
|
||||
@@ -864,6 +863,8 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
|
||||
blk_status_t io_error;
|
||||
struct bio *bio;
|
||||
struct mapped_device *md = io->md;
|
||||
unsigned long start_time = 0;
|
||||
struct dm_stats_aux stats_aux;
|
||||
|
||||
/* Push-back supersedes any I/O errors */
|
||||
if (unlikely(error)) {
|
||||
@@ -890,8 +891,10 @@ static void dec_pending(struct dm_io *io, blk_status_t error)
|
||||
|
||||
io_error = io->status;
|
||||
bio = io->orig_bio;
|
||||
end_io_acct(io);
|
||||
start_time = io->start_time;
|
||||
stats_aux = io->stats_aux;
|
||||
free_io(md, io);
|
||||
end_io_acct(md, bio, start_time, &stats_aux);
|
||||
|
||||
if (io_error == BLK_STS_DM_REQUEUE)
|
||||
return;
|
||||
@@ -2597,6 +2600,8 @@ static int dm_wait_for_completion(struct mapped_device *md, long task_state)
|
||||
}
|
||||
finish_wait(&md->wait, &wait);
|
||||
|
||||
smp_rmb(); /* paired with atomic_dec_return in end_io_acct */
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
@@ -1164,7 +1164,7 @@ static void mmc_blk_issue_discard_rq(struct mmc_queue *mq, struct request *req)
|
||||
arg == MMC_TRIM_ARG ?
|
||||
INAND_CMD38_ARG_TRIM :
|
||||
INAND_CMD38_ARG_ERASE,
|
||||
0);
|
||||
card->ext_csd.generic_cmd6_time);
|
||||
}
|
||||
if (!err)
|
||||
err = mmc_erase(card, from, nr, arg);
|
||||
@@ -1206,7 +1206,7 @@ retry:
|
||||
arg == MMC_SECURE_TRIM1_ARG ?
|
||||
INAND_CMD38_ARG_SECTRIM1 :
|
||||
INAND_CMD38_ARG_SECERASE,
|
||||
0);
|
||||
card->ext_csd.generic_cmd6_time);
|
||||
if (err)
|
||||
goto out_retry;
|
||||
}
|
||||
@@ -1224,7 +1224,7 @@ retry:
|
||||
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||
INAND_CMD38_ARG_EXT_CSD,
|
||||
INAND_CMD38_ARG_SECTRIM2,
|
||||
0);
|
||||
card->ext_csd.generic_cmd6_time);
|
||||
if (err)
|
||||
goto out_retry;
|
||||
}
|
||||
@@ -2043,7 +2043,7 @@ static void mmc_blk_urgent_bkops(struct mmc_queue *mq,
|
||||
struct mmc_queue_req *mqrq)
|
||||
{
|
||||
if (mmc_blk_urgent_bkops_needed(mq, mqrq))
|
||||
mmc_start_bkops(mq->card, true);
|
||||
mmc_run_bkops(mq->card);
|
||||
}
|
||||
|
||||
void mmc_blk_mq_complete(struct request *req)
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
#define MMC_STATE_BLOCKADDR (1<<2) /* card uses block-addressing */
|
||||
#define MMC_CARD_SDXC (1<<3) /* card is SDXC */
|
||||
#define MMC_CARD_REMOVED (1<<4) /* card has been removed */
|
||||
#define MMC_STATE_DOING_BKOPS (1<<5) /* card is doing BKOPS */
|
||||
#define MMC_STATE_SUSPENDED (1<<6) /* card is suspended */
|
||||
#define MMC_STATE_SUSPENDED (1<<5) /* card is suspended */
|
||||
|
||||
#if defined(CONFIG_MTK_EMMC_CQ_SUPPORT) || defined(CONFIG_MTK_EMMC_HW_CQ)
|
||||
#define MMC_STATE_CMDQ (1<<12) /* card is in cmd queue mode */
|
||||
@@ -35,7 +34,6 @@
|
||||
#define mmc_card_blockaddr(c) ((c)->state & MMC_STATE_BLOCKADDR)
|
||||
#define mmc_card_ext_capacity(c) ((c)->state & MMC_CARD_SDXC)
|
||||
#define mmc_card_removed(c) ((c) && ((c)->state & MMC_CARD_REMOVED))
|
||||
#define mmc_card_doing_bkops(c) ((c)->state & MMC_STATE_DOING_BKOPS)
|
||||
#define mmc_card_suspended(c) ((c)->state & MMC_STATE_SUSPENDED)
|
||||
|
||||
#define mmc_card_set_present(c) ((c)->state |= MMC_STATE_PRESENT)
|
||||
@@ -43,8 +41,6 @@
|
||||
#define mmc_card_set_blockaddr(c) ((c)->state |= MMC_STATE_BLOCKADDR)
|
||||
#define mmc_card_set_ext_capacity(c) ((c)->state |= MMC_CARD_SDXC)
|
||||
#define mmc_card_set_removed(c) ((c)->state |= MMC_CARD_REMOVED)
|
||||
#define mmc_card_set_doing_bkops(c) ((c)->state |= MMC_STATE_DOING_BKOPS)
|
||||
#define mmc_card_clr_doing_bkops(c) ((c)->state &= ~MMC_STATE_DOING_BKOPS)
|
||||
#define mmc_card_set_suspended(c) ((c)->state |= MMC_STATE_SUSPENDED)
|
||||
#define mmc_card_clr_suspended(c) ((c)->state &= ~MMC_STATE_SUSPENDED)
|
||||
|
||||
|
||||
@@ -2076,12 +2076,6 @@ static int _mmc_suspend(struct mmc_host *host, bool is_suspend)
|
||||
if (mmc_card_suspended(host->card))
|
||||
goto out;
|
||||
|
||||
if (mmc_card_doing_bkops(host->card)) {
|
||||
err = mmc_stop_bkops(host->card);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = mmc_flush_cache(host->card);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
@@ -23,7 +23,9 @@
|
||||
#include "host.h"
|
||||
#include "mmc_ops.h"
|
||||
|
||||
#define MMC_OPS_TIMEOUT_MS (10 * 60 * 1000) /* 10 minute timeout */
|
||||
#define MMC_OPS_TIMEOUT_MS (10 * 60 * 1000) /* 10min*/
|
||||
#define MMC_BKOPS_TIMEOUT_MS (120 * 1000) /* 120s */
|
||||
#define MMC_CACHE_FLUSH_TIMEOUT_MS (30 * 1000) /* 30s */
|
||||
|
||||
static const u8 tuning_blk_pattern_4bit[] = {
|
||||
0xff, 0x0f, 0xff, 0x00, 0xff, 0xcc, 0xc3, 0xcc,
|
||||
@@ -456,10 +458,6 @@ static int mmc_poll_for_busy(struct mmc_card *card, unsigned int timeout_ms,
|
||||
bool expired = false;
|
||||
bool busy = false;
|
||||
|
||||
/* We have an unspecified cmd timeout, use the fallback value. */
|
||||
if (!timeout_ms)
|
||||
timeout_ms = MMC_OPS_TIMEOUT_MS;
|
||||
|
||||
/*
|
||||
* In cases when not allowed to poll by using CMD13 or because we aren't
|
||||
* capable of polling by using ->card_busy(), then rely on waiting the
|
||||
@@ -532,6 +530,12 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
|
||||
|
||||
mmc_retune_hold(host);
|
||||
|
||||
if (!timeout_ms) {
|
||||
pr_warn("%s: unspecified timeout for CMD6 - use generic\n",
|
||||
mmc_hostname(host));
|
||||
timeout_ms = card->ext_csd.generic_cmd6_time;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the cmd timeout and the max_busy_timeout of the host are both
|
||||
* specified, let's validate them. A failure means we need to prevent
|
||||
@@ -540,7 +544,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
|
||||
* which also means they are on their own when it comes to deal with the
|
||||
* busy timeout.
|
||||
*/
|
||||
if (!(host->caps & MMC_CAP_NEED_RSP_BUSY) && timeout_ms &&
|
||||
if (!(host->caps & MMC_CAP_NEED_RSP_BUSY) &&
|
||||
host->max_busy_timeout && (timeout_ms > host->max_busy_timeout))
|
||||
use_r1b_resp = false;
|
||||
|
||||
@@ -552,10 +556,6 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
|
||||
cmd.flags = MMC_CMD_AC;
|
||||
if (use_r1b_resp) {
|
||||
cmd.flags |= MMC_RSP_SPI_R1B | MMC_RSP_R1B;
|
||||
/*
|
||||
* A busy_timeout of zero means the host can decide to use
|
||||
* whatever value it finds suitable.
|
||||
*/
|
||||
cmd.busy_timeout = timeout_ms;
|
||||
} else {
|
||||
cmd.flags |= MMC_RSP_SPI_R1 | MMC_RSP_R1;
|
||||
@@ -899,34 +899,6 @@ int mmc_can_ext_csd(struct mmc_card *card)
|
||||
return (card && card->csd.mmca_vsn > CSD_SPEC_VER_3);
|
||||
}
|
||||
|
||||
/**
|
||||
* mmc_stop_bkops - stop ongoing BKOPS
|
||||
* @card: MMC card to check BKOPS
|
||||
*
|
||||
* Send HPI command to stop ongoing background operations to
|
||||
* allow rapid servicing of foreground operations, e.g. read/
|
||||
* writes. Wait until the card comes out of the programming state
|
||||
* to avoid errors in servicing read/write requests.
|
||||
*/
|
||||
int mmc_stop_bkops(struct mmc_card *card)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
err = mmc_interrupt_hpi(card);
|
||||
|
||||
/*
|
||||
* If err is EINVAL, we can't issue an HPI.
|
||||
* It should complete the BKOPS.
|
||||
*/
|
||||
if (!err || (err == -EINVAL)) {
|
||||
mmc_card_clr_doing_bkops(card);
|
||||
mmc_retune_release(card->host);
|
||||
err = 0;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static int mmc_read_bkops_status(struct mmc_card *card)
|
||||
{
|
||||
int err;
|
||||
@@ -943,22 +915,17 @@ static int mmc_read_bkops_status(struct mmc_card *card)
|
||||
}
|
||||
|
||||
/**
|
||||
* mmc_start_bkops - start BKOPS for supported cards
|
||||
* @card: MMC card to start BKOPS
|
||||
* @from_exception: A flag to indicate if this function was
|
||||
* called due to an exception raised by the card
|
||||
* mmc_run_bkops - Run BKOPS for supported cards
|
||||
* @card: MMC card to run BKOPS for
|
||||
*
|
||||
* Start background operations whenever requested.
|
||||
* When the urgent BKOPS bit is set in a R1 command response
|
||||
* then background operations should be started immediately.
|
||||
* Run background operations synchronously for cards having manual BKOPS
|
||||
* enabled and in case it reports urgent BKOPS level.
|
||||
*/
|
||||
void mmc_start_bkops(struct mmc_card *card, bool from_exception)
|
||||
void mmc_run_bkops(struct mmc_card *card)
|
||||
{
|
||||
int err;
|
||||
int timeout;
|
||||
bool use_busy_signal;
|
||||
|
||||
if (!card->ext_csd.man_bkops_en || mmc_card_doing_bkops(card))
|
||||
if (!card->ext_csd.man_bkops_en)
|
||||
return;
|
||||
|
||||
err = mmc_read_bkops_status(card);
|
||||
@@ -968,44 +935,26 @@ void mmc_start_bkops(struct mmc_card *card, bool from_exception)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!card->ext_csd.raw_bkops_status)
|
||||
if (!card->ext_csd.raw_bkops_status ||
|
||||
card->ext_csd.raw_bkops_status < EXT_CSD_BKOPS_LEVEL_2)
|
||||
return;
|
||||
|
||||
if (card->ext_csd.raw_bkops_status < EXT_CSD_BKOPS_LEVEL_2 &&
|
||||
from_exception)
|
||||
return;
|
||||
|
||||
if (card->ext_csd.raw_bkops_status >= EXT_CSD_BKOPS_LEVEL_2) {
|
||||
timeout = MMC_OPS_TIMEOUT_MS;
|
||||
use_busy_signal = true;
|
||||
} else {
|
||||
timeout = 0;
|
||||
use_busy_signal = false;
|
||||
}
|
||||
|
||||
mmc_retune_hold(card->host);
|
||||
|
||||
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||
EXT_CSD_BKOPS_START, 1, timeout, 0,
|
||||
use_busy_signal, true, false);
|
||||
if (err) {
|
||||
/*
|
||||
* For urgent BKOPS status, LEVEL_2 and higher, let's execute
|
||||
* synchronously. Future wise, we may consider to start BKOPS, for less
|
||||
* urgent levels by using an asynchronous background task, when idle.
|
||||
*/
|
||||
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||
EXT_CSD_BKOPS_START, 1, MMC_BKOPS_TIMEOUT_MS);
|
||||
if (err)
|
||||
pr_warn("%s: Error %d starting bkops\n",
|
||||
mmc_hostname(card->host), err);
|
||||
mmc_retune_release(card->host);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* For urgent bkops status (LEVEL_2 and more)
|
||||
* bkops executed synchronously, otherwise
|
||||
* the operation is in progress
|
||||
*/
|
||||
if (!use_busy_signal)
|
||||
mmc_card_set_doing_bkops(card);
|
||||
else
|
||||
mmc_retune_release(card->host);
|
||||
mmc_retune_release(card->host);
|
||||
}
|
||||
EXPORT_SYMBOL(mmc_start_bkops);
|
||||
EXPORT_SYMBOL(mmc_run_bkops);
|
||||
|
||||
/*
|
||||
* Flush the cache to the non-volatile storage.
|
||||
@@ -1016,7 +965,8 @@ int mmc_flush_cache(struct mmc_card *card)
|
||||
|
||||
if (mmc_cache_enabled(card->host)) {
|
||||
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
|
||||
EXT_CSD_FLUSH_CACHE, 1, 0);
|
||||
EXT_CSD_FLUSH_CACHE, 1,
|
||||
MMC_CACHE_FLUSH_TIMEOUT_MS);
|
||||
if (err)
|
||||
pr_err("%s: cache flush error %d\n",
|
||||
mmc_hostname(card->host), err);
|
||||
|
||||
@@ -39,8 +39,7 @@ int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
|
||||
bool use_busy_signal, bool send_status, bool retry_crc_err);
|
||||
int mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
|
||||
unsigned int timeout_ms);
|
||||
int mmc_stop_bkops(struct mmc_card *card);
|
||||
void mmc_start_bkops(struct mmc_card *card, bool from_exception);
|
||||
void mmc_run_bkops(struct mmc_card *card);
|
||||
int mmc_flush_cache(struct mmc_card *card);
|
||||
int mmc_cmdq_enable(struct mmc_card *card);
|
||||
int mmc_cmdq_disable(struct mmc_card *card);
|
||||
|
||||
@@ -49,10 +49,7 @@ struct realtek_pci_sdmmc {
|
||||
bool double_clk;
|
||||
bool eject;
|
||||
bool initial_mode;
|
||||
int power_state;
|
||||
#define SDMMC_POWER_ON 1
|
||||
#define SDMMC_POWER_OFF 0
|
||||
|
||||
int prev_power_state;
|
||||
int sg_count;
|
||||
s32 cookie;
|
||||
int cookie_sg_count;
|
||||
@@ -914,14 +911,21 @@ static int sd_set_bus_width(struct realtek_pci_sdmmc *host,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int sd_power_on(struct realtek_pci_sdmmc *host)
|
||||
static int sd_power_on(struct realtek_pci_sdmmc *host, unsigned char power_mode)
|
||||
{
|
||||
struct rtsx_pcr *pcr = host->pcr;
|
||||
int err;
|
||||
|
||||
if (host->power_state == SDMMC_POWER_ON)
|
||||
if (host->prev_power_state == MMC_POWER_ON)
|
||||
return 0;
|
||||
|
||||
if (host->prev_power_state == MMC_POWER_UP) {
|
||||
rtsx_pci_write_register(pcr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, 0);
|
||||
goto finish;
|
||||
}
|
||||
|
||||
msleep(100);
|
||||
|
||||
rtsx_pci_init_cmd(pcr);
|
||||
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SELECT, 0x07, SD_MOD_SEL);
|
||||
rtsx_pci_add_cmd(pcr, WRITE_REG_CMD, CARD_SHARE_MODE,
|
||||
@@ -940,11 +944,17 @@ static int sd_power_on(struct realtek_pci_sdmmc *host)
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
mdelay(1);
|
||||
|
||||
err = rtsx_pci_write_register(pcr, CARD_OE, SD_OUTPUT_EN, SD_OUTPUT_EN);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
host->power_state = SDMMC_POWER_ON;
|
||||
/* send at least 74 clocks */
|
||||
rtsx_pci_write_register(pcr, SD_BUS_STAT, SD_CLK_TOGGLE_EN, SD_CLK_TOGGLE_EN);
|
||||
|
||||
finish:
|
||||
host->prev_power_state = power_mode;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -953,7 +963,7 @@ static int sd_power_off(struct realtek_pci_sdmmc *host)
|
||||
struct rtsx_pcr *pcr = host->pcr;
|
||||
int err;
|
||||
|
||||
host->power_state = SDMMC_POWER_OFF;
|
||||
host->prev_power_state = MMC_POWER_OFF;
|
||||
|
||||
rtsx_pci_init_cmd(pcr);
|
||||
|
||||
@@ -979,7 +989,7 @@ static int sd_set_power_mode(struct realtek_pci_sdmmc *host,
|
||||
if (power_mode == MMC_POWER_OFF)
|
||||
err = sd_power_off(host);
|
||||
else
|
||||
err = sd_power_on(host);
|
||||
err = sd_power_on(host, power_mode);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -1414,10 +1424,11 @@ static int rtsx_pci_sdmmc_drv_probe(struct platform_device *pdev)
|
||||
|
||||
host = mmc_priv(mmc);
|
||||
host->pcr = pcr;
|
||||
mmc->ios.power_delay_ms = 5;
|
||||
host->mmc = mmc;
|
||||
host->pdev = pdev;
|
||||
host->cookie = -1;
|
||||
host->power_state = SDMMC_POWER_OFF;
|
||||
host->prev_power_state = MMC_POWER_OFF;
|
||||
INIT_WORK(&host->work, sd_request);
|
||||
platform_set_drvdata(pdev, host);
|
||||
pcr->slots[RTSX_SD_CARD].p_dev = pdev;
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
struct mtk_ecc_caps {
|
||||
u32 err_mask;
|
||||
u32 err_shift;
|
||||
const u8 *ecc_strength;
|
||||
const u32 *ecc_regs;
|
||||
u8 num_ecc_strength;
|
||||
@@ -84,7 +85,7 @@ static const u8 ecc_strength_mt2712[] = {
|
||||
};
|
||||
|
||||
static const u8 ecc_strength_mt7622[] = {
|
||||
4, 6, 8, 10, 12, 14, 16
|
||||
4, 6, 8, 10, 12
|
||||
};
|
||||
|
||||
enum mtk_ecc_regs {
|
||||
@@ -229,7 +230,7 @@ void mtk_ecc_get_stats(struct mtk_ecc *ecc, struct mtk_ecc_stats *stats,
|
||||
for (i = 0; i < sectors; i++) {
|
||||
offset = (i >> 2) << 2;
|
||||
err = readl(ecc->regs + ECC_DECENUM0 + offset);
|
||||
err = err >> ((i % 4) * 8);
|
||||
err = err >> ((i % 4) * ecc->caps->err_shift);
|
||||
err &= ecc->caps->err_mask;
|
||||
if (err == ecc->caps->err_mask) {
|
||||
/* uncorrectable errors */
|
||||
@@ -462,6 +463,7 @@ EXPORT_SYMBOL(mtk_ecc_get_parity_bits);
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2701,
|
||||
.ecc_regs = mt2701_ecc_regs,
|
||||
.num_ecc_strength = 20,
|
||||
@@ -472,6 +474,7 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2701 = {
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
.err_mask = 0x7f,
|
||||
.err_shift = 8,
|
||||
.ecc_strength = ecc_strength_mt2712,
|
||||
.ecc_regs = mt2712_ecc_regs,
|
||||
.num_ecc_strength = 23,
|
||||
@@ -481,10 +484,11 @@ static const struct mtk_ecc_caps mtk_ecc_caps_mt2712 = {
|
||||
};
|
||||
|
||||
static const struct mtk_ecc_caps mtk_ecc_caps_mt7622 = {
|
||||
.err_mask = 0x3f,
|
||||
.err_mask = 0x1f,
|
||||
.err_shift = 5,
|
||||
.ecc_strength = ecc_strength_mt7622,
|
||||
.ecc_regs = mt7622_ecc_regs,
|
||||
.num_ecc_strength = 7,
|
||||
.num_ecc_strength = 5,
|
||||
.ecc_mode_shift = 4,
|
||||
.parity_bits = 13,
|
||||
.pg_irq_sel = 0,
|
||||
|
||||
@@ -399,7 +399,8 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
dma_addr_t dma_addr;
|
||||
dma_cookie_t cookie;
|
||||
uint32_t reg;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
unsigned long time_left;
|
||||
|
||||
if (dir == DMA_FROM_DEVICE) {
|
||||
chan = flctl->chan_fifo0_rx;
|
||||
@@ -440,13 +441,14 @@ static int flctl_dma_fifo0_transfer(struct sh_flctl *flctl, unsigned long *buf,
|
||||
goto out;
|
||||
}
|
||||
|
||||
ret =
|
||||
time_left =
|
||||
wait_for_completion_timeout(&flctl->dma_complete,
|
||||
msecs_to_jiffies(3000));
|
||||
|
||||
if (ret <= 0) {
|
||||
if (time_left == 0) {
|
||||
dmaengine_terminate_all(chan);
|
||||
dev_err(&flctl->pdev->dev, "wait_for_completion_timeout\n");
|
||||
ret = -ETIMEDOUT;
|
||||
}
|
||||
|
||||
out:
|
||||
@@ -456,7 +458,7 @@ out:
|
||||
|
||||
dma_unmap_single(chan->device->dev, dma_addr, len, dir);
|
||||
|
||||
/* ret > 0 is success */
|
||||
/* ret == 0 is success */
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -480,7 +482,7 @@ static void read_fiforeg(struct sh_flctl *flctl, int rlen, int offset)
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_rx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_FROM_DEVICE))
|
||||
goto convert; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
@@ -539,7 +541,7 @@ static void write_ec_fiforeg(struct sh_flctl *flctl, int rlen,
|
||||
|
||||
/* initiate DMA transfer */
|
||||
if (flctl->chan_fifo0_tx && rlen >= 32 &&
|
||||
flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE) > 0)
|
||||
!flctl_dma_fifo0_transfer(flctl, buf, rlen, DMA_TO_DEVICE))
|
||||
return; /* DMA success */
|
||||
|
||||
/* do polling transfer */
|
||||
|
||||
@@ -245,13 +245,14 @@ struct grcan_device_config {
|
||||
.rxsize = GRCAN_DEFAULT_BUFFER_SIZE, \
|
||||
}
|
||||
|
||||
#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 0x4100
|
||||
#define GRCAN_TXBUG_SAFE_GRLIB_VERSION 4100
|
||||
#define GRLIB_VERSION_MASK 0xffff
|
||||
|
||||
/* GRCAN private data structure */
|
||||
struct grcan_priv {
|
||||
struct can_priv can; /* must be the first member */
|
||||
struct net_device *dev;
|
||||
struct device *ofdev_dev;
|
||||
struct napi_struct napi;
|
||||
|
||||
struct grcan_registers __iomem *regs; /* ioremap'ed registers */
|
||||
@@ -928,7 +929,7 @@ static void grcan_free_dma_buffers(struct net_device *dev)
|
||||
struct grcan_priv *priv = netdev_priv(dev);
|
||||
struct grcan_dma *dma = &priv->dma;
|
||||
|
||||
dma_free_coherent(&dev->dev, dma->base_size, dma->base_buf,
|
||||
dma_free_coherent(priv->ofdev_dev, dma->base_size, dma->base_buf,
|
||||
dma->base_handle);
|
||||
memset(dma, 0, sizeof(*dma));
|
||||
}
|
||||
@@ -953,7 +954,7 @@ static int grcan_allocate_dma_buffers(struct net_device *dev,
|
||||
|
||||
/* Extra GRCAN_BUFFER_ALIGNMENT to allow for alignment */
|
||||
dma->base_size = lsize + ssize + GRCAN_BUFFER_ALIGNMENT;
|
||||
dma->base_buf = dma_alloc_coherent(&dev->dev,
|
||||
dma->base_buf = dma_alloc_coherent(priv->ofdev_dev,
|
||||
dma->base_size,
|
||||
&dma->base_handle,
|
||||
GFP_KERNEL);
|
||||
@@ -1117,8 +1118,10 @@ static int grcan_close(struct net_device *dev)
|
||||
|
||||
priv->closing = true;
|
||||
if (priv->need_txbug_workaround) {
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
del_timer_sync(&priv->hang_timer);
|
||||
del_timer_sync(&priv->rr_timer);
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
}
|
||||
netif_stop_queue(dev);
|
||||
grcan_stop_hardware(dev);
|
||||
@@ -1138,7 +1141,7 @@ static int grcan_close(struct net_device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int grcan_transmit_catch_up(struct net_device *dev, int budget)
|
||||
static void grcan_transmit_catch_up(struct net_device *dev)
|
||||
{
|
||||
struct grcan_priv *priv = netdev_priv(dev);
|
||||
unsigned long flags;
|
||||
@@ -1146,7 +1149,7 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget)
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
work_done = catch_up_echo_skb(dev, budget, true);
|
||||
work_done = catch_up_echo_skb(dev, -1, true);
|
||||
if (work_done) {
|
||||
if (!priv->resetting && !priv->closing &&
|
||||
!(priv->can.ctrlmode & CAN_CTRLMODE_LISTENONLY))
|
||||
@@ -1160,8 +1163,6 @@ static int grcan_transmit_catch_up(struct net_device *dev, int budget)
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
|
||||
return work_done;
|
||||
}
|
||||
|
||||
static int grcan_receive(struct net_device *dev, int budget)
|
||||
@@ -1243,19 +1244,13 @@ static int grcan_poll(struct napi_struct *napi, int budget)
|
||||
struct net_device *dev = priv->dev;
|
||||
struct grcan_registers __iomem *regs = priv->regs;
|
||||
unsigned long flags;
|
||||
int tx_work_done, rx_work_done;
|
||||
int rx_budget = budget / 2;
|
||||
int tx_budget = budget - rx_budget;
|
||||
int work_done;
|
||||
|
||||
/* Half of the budget for receiveing messages */
|
||||
rx_work_done = grcan_receive(dev, rx_budget);
|
||||
work_done = grcan_receive(dev, budget);
|
||||
|
||||
/* Half of the budget for transmitting messages as that can trigger echo
|
||||
* frames being received
|
||||
*/
|
||||
tx_work_done = grcan_transmit_catch_up(dev, tx_budget);
|
||||
grcan_transmit_catch_up(dev);
|
||||
|
||||
if (rx_work_done < rx_budget && tx_work_done < tx_budget) {
|
||||
if (work_done < budget) {
|
||||
napi_complete(napi);
|
||||
|
||||
/* Guarantee no interference with a running reset that otherwise
|
||||
@@ -1272,7 +1267,7 @@ static int grcan_poll(struct napi_struct *napi, int budget)
|
||||
spin_unlock_irqrestore(&priv->lock, flags);
|
||||
}
|
||||
|
||||
return rx_work_done + tx_work_done;
|
||||
return work_done;
|
||||
}
|
||||
|
||||
/* Work tx bug by waiting while for the risky situation to clear. If that fails,
|
||||
@@ -1604,6 +1599,7 @@ static int grcan_setup_netdev(struct platform_device *ofdev,
|
||||
memcpy(&priv->config, &grcan_module_config,
|
||||
sizeof(struct grcan_device_config));
|
||||
priv->dev = dev;
|
||||
priv->ofdev_dev = &ofdev->dev;
|
||||
priv->regs = base;
|
||||
priv->can.bittiming_const = &grcan_bittiming_const;
|
||||
priv->can.do_set_bittiming = grcan_set_bittiming;
|
||||
@@ -1656,6 +1652,7 @@ exit_free_candev:
|
||||
static int grcan_probe(struct platform_device *ofdev)
|
||||
{
|
||||
struct device_node *np = ofdev->dev.of_node;
|
||||
struct device_node *sysid_parent;
|
||||
struct resource *res;
|
||||
u32 sysid, ambafreq;
|
||||
int irq, err;
|
||||
@@ -1665,10 +1662,15 @@ static int grcan_probe(struct platform_device *ofdev)
|
||||
/* Compare GRLIB version number with the first that does not
|
||||
* have the tx bug (see start_xmit)
|
||||
*/
|
||||
err = of_property_read_u32(np, "systemid", &sysid);
|
||||
if (!err && ((sysid & GRLIB_VERSION_MASK)
|
||||
>= GRCAN_TXBUG_SAFE_GRLIB_VERSION))
|
||||
txbug = false;
|
||||
sysid_parent = of_find_node_by_path("/ambapp0");
|
||||
if (sysid_parent) {
|
||||
of_node_get(sysid_parent);
|
||||
err = of_property_read_u32(sysid_parent, "systemid", &sysid);
|
||||
if (!err && ((sysid & GRLIB_VERSION_MASK) >=
|
||||
GRCAN_TXBUG_SAFE_GRLIB_VERSION))
|
||||
txbug = false;
|
||||
of_node_put(sysid_parent);
|
||||
}
|
||||
|
||||
err = of_property_read_u32(np, "freq", &ambafreq);
|
||||
if (err) {
|
||||
|
||||
@@ -637,6 +637,13 @@ static int hw_atl_b0_hw_ring_tx_head_update(struct aq_hw_s *self,
|
||||
err = -ENXIO;
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
/* Validate that the new hw_head_ is reasonable. */
|
||||
if (hw_head_ >= ring->size) {
|
||||
err = -ENXIO;
|
||||
goto err_exit;
|
||||
}
|
||||
|
||||
ring->hw_head = hw_head_;
|
||||
err = aq_hw_err_from_flags(self);
|
||||
|
||||
|
||||
@@ -14297,10 +14297,6 @@ static int bnx2x_eeh_nic_unload(struct bnx2x *bp)
|
||||
|
||||
/* Stop Tx */
|
||||
bnx2x_tx_disable(bp);
|
||||
/* Delete all NAPI objects */
|
||||
bnx2x_del_all_napi(bp);
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
netdev_reset_tc(bp->dev);
|
||||
|
||||
del_timer_sync(&bp->timer);
|
||||
@@ -14405,6 +14401,11 @@ static pci_ers_result_t bnx2x_io_slot_reset(struct pci_dev *pdev)
|
||||
bnx2x_drain_tx_queues(bp);
|
||||
bnx2x_send_unload_req(bp, UNLOAD_RECOVERY);
|
||||
bnx2x_netif_stop(bp, 1);
|
||||
bnx2x_del_all_napi(bp);
|
||||
|
||||
if (CNIC_LOADED(bp))
|
||||
bnx2x_del_all_napi_cnic(bp);
|
||||
|
||||
bnx2x_free_irq(bp);
|
||||
|
||||
/* Report UNLOAD_DONE to MCP */
|
||||
|
||||
@@ -1549,6 +1549,11 @@ static struct sk_buff *bcmgenet_put_tx_csum(struct net_device *dev,
|
||||
return skb;
|
||||
}
|
||||
|
||||
static void bcmgenet_hide_tsb(struct sk_buff *skb)
|
||||
{
|
||||
__skb_pull(skb, sizeof(struct status_64));
|
||||
}
|
||||
|
||||
static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct bcmgenet_priv *priv = netdev_priv(dev);
|
||||
@@ -1657,6 +1662,8 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
}
|
||||
|
||||
GENET_CB(skb)->last_cb = tx_cb_ptr;
|
||||
|
||||
bcmgenet_hide_tsb(skb);
|
||||
skb_tx_timestamp(skb);
|
||||
|
||||
/* Decrement total BD count and advance our write pointer */
|
||||
|
||||
@@ -915,7 +915,6 @@ static void gem_rx_refill(struct macb_queue *queue)
|
||||
/* Make hw descriptor updates visible to CPU */
|
||||
rmb();
|
||||
|
||||
queue->rx_prepared_head++;
|
||||
desc = macb_rx_desc(queue, entry);
|
||||
|
||||
if (!queue->rx_skbuff[entry]) {
|
||||
@@ -954,6 +953,7 @@ static void gem_rx_refill(struct macb_queue *queue)
|
||||
dma_wmb();
|
||||
desc->addr &= ~MACB_BIT(RX_USED);
|
||||
}
|
||||
queue->rx_prepared_head++;
|
||||
}
|
||||
|
||||
/* Make descriptor updates visible to hardware */
|
||||
|
||||
@@ -1410,8 +1410,10 @@ static int tulip_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
/* alloc_etherdev ensures aligned and zeroed private structures */
|
||||
dev = alloc_etherdev (sizeof (*tp));
|
||||
if (!dev)
|
||||
if (!dev) {
|
||||
pci_disable_device(pdev);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
SET_NETDEV_DEV(dev, &pdev->dev);
|
||||
if (pci_resource_len (pdev, 0) < tulip_tbl[chip_idx].io_size) {
|
||||
@@ -1788,6 +1790,7 @@ err_out_free_res:
|
||||
|
||||
err_out_free_netdev:
|
||||
free_netdev (dev);
|
||||
pci_disable_device(pdev);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
||||
@@ -1869,6 +1869,11 @@ static int ftgmac100_probe(struct platform_device *pdev)
|
||||
/* AST2400 doesn't have working HW checksum generation */
|
||||
if (np && (of_device_is_compatible(np, "aspeed,ast2400-mac")))
|
||||
netdev->hw_features &= ~NETIF_F_HW_CSUM;
|
||||
|
||||
/* AST2600 tx checksum with NCSI is broken */
|
||||
if (priv->use_ncsi && of_device_is_compatible(np, "aspeed,ast2600-mac"))
|
||||
netdev->hw_features &= ~NETIF_F_HW_CSUM;
|
||||
|
||||
if (np && of_get_property(np, "no-hw-checksum", NULL))
|
||||
netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM);
|
||||
netdev->features |= netdev->hw_features;
|
||||
|
||||
@@ -60,6 +60,13 @@ static int hclge_send_mbx_msg(struct hclge_vport *vport, u8 *msg, u16 msg_len,
|
||||
enum hclge_cmd_status status;
|
||||
struct hclge_desc desc;
|
||||
|
||||
if (msg_len > HCLGE_MBX_MAX_MSG_SIZE) {
|
||||
dev_err(&hdev->pdev->dev,
|
||||
"msg data length(=%u) exceeds maximum(=%u)\n",
|
||||
msg_len, HCLGE_MBX_MAX_MSG_SIZE);
|
||||
return -EMSGSIZE;
|
||||
}
|
||||
|
||||
resp_pf_to_vf = (struct hclge_mbx_pf_to_vf_cmd *)desc.data;
|
||||
|
||||
hclge_cmd_setup_basic_desc(&desc, HCLGEVF_OPC_MBX_PF_TO_VF, false);
|
||||
|
||||
@@ -5346,7 +5346,8 @@ static void igb_watchdog_task(struct work_struct *work)
|
||||
break;
|
||||
}
|
||||
|
||||
if (adapter->link_speed != SPEED_1000)
|
||||
if (adapter->link_speed != SPEED_1000 ||
|
||||
!hw->phy.ops.read_reg)
|
||||
goto no_wait;
|
||||
|
||||
/* wait for Remote receiver status OK */
|
||||
|
||||
@@ -3739,6 +3739,13 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,
|
||||
netdev_warn(netdev, "Disabling LRO, not supported in legacy RQ\n");
|
||||
}
|
||||
|
||||
if (params->xdp_prog) {
|
||||
if (features & NETIF_F_LRO) {
|
||||
netdev_warn(netdev, "LRO is incompatible with XDP\n");
|
||||
features &= ~NETIF_F_LRO;
|
||||
}
|
||||
}
|
||||
|
||||
if (MLX5E_GET_PFLAG(params, MLX5E_PFLAG_RX_CQE_COMPRESS)) {
|
||||
features &= ~NETIF_F_RXHASH;
|
||||
if (netdev->features & NETIF_F_RXHASH)
|
||||
|
||||
@@ -226,7 +226,7 @@ int swreg_to_unrestricted(swreg dst, swreg lreg, swreg rreg,
|
||||
}
|
||||
|
||||
reg->dst_lmextn = swreg_lmextn(dst);
|
||||
reg->src_lmextn = swreg_lmextn(lreg) | swreg_lmextn(rreg);
|
||||
reg->src_lmextn = swreg_lmextn(lreg) || swreg_lmextn(rreg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ int swreg_to_restricted(swreg dst, swreg lreg, swreg rreg,
|
||||
}
|
||||
|
||||
reg->dst_lmextn = swreg_lmextn(dst);
|
||||
reg->src_lmextn = swreg_lmextn(lreg) | swreg_lmextn(rreg);
|
||||
reg->src_lmextn = swreg_lmextn(lreg) || swreg_lmextn(rreg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3630,7 +3630,8 @@ static void ql_reset_work(struct work_struct *work)
|
||||
qdev->mem_map_registers;
|
||||
unsigned long hw_flags;
|
||||
|
||||
if (test_bit((QL_RESET_PER_SCSI | QL_RESET_START), &qdev->flags)) {
|
||||
if (test_bit(QL_RESET_PER_SCSI, &qdev->flags) ||
|
||||
test_bit(QL_RESET_START, &qdev->flags)) {
|
||||
clear_bit(QL_LINK_MASTER, &qdev->flags);
|
||||
|
||||
/*
|
||||
|
||||
@@ -6146,6 +6146,11 @@ static int efx_ef10_mtd_probe(struct efx_nic *efx)
|
||||
n_parts++;
|
||||
}
|
||||
|
||||
if (!n_parts) {
|
||||
kfree(parts);
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = efx_mtd_add(efx, &parts[0].common, n_parts, sizeof(*parts));
|
||||
fail:
|
||||
if (rc)
|
||||
|
||||
@@ -2446,7 +2446,7 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
|
||||
if (irq == -EPROBE_DEFER) {
|
||||
retval = -EPROBE_DEFER;
|
||||
goto out_0;
|
||||
} else if (irq <= 0) {
|
||||
} else if (irq < 0) {
|
||||
pr_warn("Could not allocate irq resource\n");
|
||||
retval = -ENODEV;
|
||||
goto out_0;
|
||||
|
||||
@@ -873,6 +873,7 @@ static int sun8i_dwmac_register_mdio_mux(struct stmmac_priv *priv)
|
||||
|
||||
ret = mdio_mux_init(priv->device, mdio_mux, mdio_mux_syscon_switch_fn,
|
||||
&gmac->mux_handle, priv, priv->mii);
|
||||
of_node_put(mdio_mux);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -159,6 +159,12 @@ static const struct dmi_system_id quark_pci_dmi[] = {
|
||||
},
|
||||
.driver_data = (void *)&galileo_stmmac_dmi_data,
|
||||
},
|
||||
/*
|
||||
* There are 2 types of SIMATIC IOT2000: IOT20202 and IOT2040.
|
||||
* The asset tag "6ES7647-0AA00-0YA2" is only for IOT2020 which
|
||||
* has only one pci network device while other asset tags are
|
||||
* for IOT2040 which has two.
|
||||
*/
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
|
||||
@@ -170,8 +176,6 @@ static const struct dmi_system_id quark_pci_dmi[] = {
|
||||
{
|
||||
.matches = {
|
||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "SIMATIC IOT2000"),
|
||||
DMI_EXACT_MATCH(DMI_BOARD_ASSET_TAG,
|
||||
"6ES7647-0AA00-1YA2"),
|
||||
},
|
||||
.driver_data = (void *)&iot2040_stmmac_dmi_data,
|
||||
},
|
||||
@@ -257,7 +261,7 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
|
||||
return -ENOMEM;
|
||||
|
||||
/* Enable pci device */
|
||||
ret = pci_enable_device(pdev);
|
||||
ret = pcim_enable_device(pdev);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "%s: ERROR: failed to enable device\n",
|
||||
__func__);
|
||||
@@ -299,8 +303,16 @@ static int stmmac_pci_probe(struct pci_dev *pdev,
|
||||
*/
|
||||
static void stmmac_pci_remove(struct pci_dev *pdev)
|
||||
{
|
||||
int i;
|
||||
|
||||
stmmac_dvr_remove(&pdev->dev);
|
||||
pci_disable_device(pdev);
|
||||
|
||||
for (i = 0; i <= PCI_STD_RESOURCE_END; i++) {
|
||||
if (pci_resource_len(pdev, i) == 0)
|
||||
continue;
|
||||
pcim_iounmap_regions(pdev, BIT(i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int __maybe_unused stmmac_pci_suspend(struct device *dev)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user