mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common into android13-5.4-lahaina
https://source.android.com/docs/security/bulletin/2025-10-01 * tag 'ASB-2025-10-06_11-5.4' of https://android.googlesource.com/kernel/common: UPSTREAM: vsock: Do not allow binding to VMADDR_PORT_ANY Linux 5.4.299 dmaengine: mediatek: Fix a flag reuse error in mtk_cqdma_tx_status() cifs: fix integer overflow in match_server() spi: spi-fsl-lpspi: Reset FIFO and disable module on transfer abort spi: spi-fsl-lpspi: Set correct chip-select polarity bit spi: spi-fsl-lpspi: Fix transmissions when using CONT pcmcia: Add error handling for add_interval() in do_validate_mem() ALSA: hda/hdmi: Add pin fix for another HP EliteDesk 800 G4 model randstruct: gcc-plugin: Fix attribute addition randstruct: gcc-plugin: Remove bogus void member vmxnet3: update MTU after device quiesce net: dsa: microchip: linearize skb for tail-tagging switches net: dsa: microchip: update tag_ksz masks for KSZ9477 family dmaengine: mediatek: Fix a possible deadlock error in mtk_cqdma_tx_status() ALSA: hda/realtek - Add new HP ZBook laptop with micmute led fixup gpio: pca953x: fix IRQ storm on system wake up iio: light: opt3001: fix deadlock due to concurrent flag access iio: chemical: pms7003: use aligned_s64 for timestamp KVM: x86: Take irqfds.lock when adding/deleting IRQ bypass producer cpufreq/sched: Explicitly synchronize limits_changed flag handling mm/slub: avoid accessing metadata when pointer is invalid in object_err() scsi: lpfc: Fix buffer free/clear order in deferred receive path mm/khugepaged: fix ->anon_vma race e1000e: fix heap overflow in e1000_set_eeprom batman-adv: fix OOB read/write in network-coding decode drm/amdgpu: drop hw access in non-DC audio fini wifi: mwifiex: Initialize the chan_stats array to zero pcmcia: Fix a NULL pointer dereference in __iodyn_find_io_region() ALSA: usb-audio: Add mute TLV for playback volumes on some devices ppp: fix memory leak in pad_compress_skb net: atm: fix memory leak in atm_register_sysfs when device_register fail ax25: properly unshare skbs in ax25_kiss_rcv() ipv4: Fix NULL vs error pointer check in inet_blackhole_dev_init() net: thunder_bgx: decrement cleanup index before use net: thunder_bgx: add a missing of_node_put wifi: libertas: cap SSID len in lbs_associate() wifi: cw1200: cap SSID length in cw1200_do_join() net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets i40e: Fix potential invalid access when MAC list is empty icmp: fix icmp_ndo_send address translation for reply direction mISDN: Fix memory leak in dsp_hwec_enable() xirc2ps_cs: fix register access when enabling FullDuplex Bluetooth: Fix use-after-free in l2cap_sock_cleanup_listen() netfilter: conntrack: helper: Replace -EEXIST by -EBUSY wifi: cfg80211: fix use-after-free in cmp_bss() powerpc: boot: Remove leading zero in label in udelay() Linux 5.4.298 Revert "drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS" net: usb: qmi_wwan: add Telit Cinterion LE910C4-WWX new compositions Revert "drm/amdgpu: fix incorrect vm flags to map bo" HID: hid-ntrig: fix unable to handle page fault in ntrig_report_version() HID: wacom: Add a new Art Pen 2 HID: asus: fix UAF via HID_CLAIMED_INPUT validation KVM: x86: use array_index_nospec with indices that come from guest efivarfs: Fix slab-out-of-bounds in efivarfs_d_compare sctp: initialize more fields in sctp_v6_from_sk() net: stmmac: xgmac: Do not enable RX FIFO Overflow interrupts net/mlx5e: Set local Xoff after FW update net/mlx5e: Update and set Xon/Xoff upon port speed set net/mlx5e: Update and set Xon/Xoff upon MTU set net: dlink: fix multicast stats being counted incorrectly atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). net/atm: remove the atmdev_ops {get, set}sockopt methods Bluetooth: hci_event: Detect if HCI_EV_NUM_COMP_PKTS is unbalanced powerpc/kvm: Fix ifdef to remove build warning net: ipv4: fix regression in local-broadcast routes vhost/net: Protect ubufs with rcu read lock in vhost_net_ubuf_put() scsi: core: sysfs: Correct sysfs attributes access rights ftrace: Fix potential warning in trace_printk_seq during ftrace_dump pinctrl: STMFX: add missing HAS_IOMEM dependency Revert "PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports" Revert "PM: runtime: Clear power.needs_force_resume in pm_runtime_reinit()" Linux 5.4.297 alloc_fdtable(): change calling conventions. s390/hypfs: Enable limited access during lockdown s390/hypfs: Avoid unnecessary ioctl registration in debugfs ALSA: usb-audio: Use correct sub-type for UAC3 feature unit validation net/sched: Remove unnecessary WARNING condition for empty child qdisc in htb_activate net/sched: Make cake_enqueue return NET_XMIT_CN when past buffer_limit ixgbe: xsk: resolve the negative overflow of budget in ixgbe_xmit_zc ipv6: sr: validate HMAC algorithm ID in seg6_hmac_info_add ALSA: usb-audio: Fix size validation in convert_chmap_v3() scsi: qla4xxx: Prevent a potential error pointer dereference usb: xhci: Fix slot_id resource race conflict nfs: fix UAF in direct writes NFS: Fix up commit deadlocks cifs: Fix UAF in cifs_demultiplex_thread() Bluetooth: fix use-after-free in device_for_each_child() act_mirred: use the backlog for nested calls to mirred ingress net/sched: act_mirred: better wording on protection against excessive stack growth net/sched: act_mirred: refactor the handle of xmit selftests: forwarding: tc_actions.sh: add matchall mirror test net: sched: don't expose action qstats to skb_tc_reinsert() net: sched: extract qstats update code into functions net: sched: extract bstats update code into function net: sched: extract common action counters update code into function mm: perform the mapping_map_writable() check after call_mmap() mm: update memfd seal write check to include F_SEAL_WRITE mm: drop the assumption that VM_SHARED always implies writable codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog() sch_qfq: make qfq_qlen_notify() idempotent sch_hfsc: make hfsc_qlen_notify() idempotent sch_drr: make drr_qlen_notify() idempotent btrfs: populate otime when logging an inode item media: venus: hfi: explicitly release IRQ during teardown f2fs: fix to avoid out-of-boundary access in dnode page media: venus: protect against spurious interrupts during probe media: qcom: camss: cleanup media device allocated resource on error path media: venus: vdec: Clamp param smaller than 1fps and bigger than 240. drm/dp: Change AUX DPCD probe address from DPCD_REV to LANE0_1_STATUS pwm: mediatek: Fix duty and period setting pwm: mediatek: Handle hardware enable and clock enable separately pwm: mediatek: Implement .apply() callback media: rainshadow-cec: fix TOCTOU race condition in rain_interrupt() media: v4l2-ctrls: Don't reset handler's error in v4l2_ctrl_handler_free() media: v4l2-ctrls: always copy the controls on completion ata: Fix SATA_MOBILE_LPM_POLICY description in Kconfig soc: qcom: mdt_loader: Ensure we don't read past the ELF header rtc: ds1307: handle oscillator stop flag (OSF) for ds1341 usb: musb: omap2430: fix device leak at unbind NFS: Fix the setting of capabilities when automounting a new filesystem NFS: Fix up handling of outstanding layoutcommit in nfs_update_inode() NFSv4: Fix nfs4_bitmap_copy_adjust() usb: typec: fusb302: cache PD RX state cdc-acm: fix race between initial clearing halt and open USB: cdc-acm: do not log successful probe on later errors mm/kmemleak: avoid deadlock by moving pr_warn() outside kmemleak_lock mm/kmemleak: turn kmemleak_lock and object->lock to raw_spinlock_t ALSA: scarlett2: Add retry on -EPROTO from scarlett2_usb_tx() x86/fpu: Delay instruction pointer fixup until after warning mm/hmm: move pmd_to_hmm_pfn_flags() to the respective #ifdeffery nfsd: handle get_client_locked() failure in nfsd4_setclientid_confirm() pmdomain: governor: Consider CPU latency tolerance from pm_domain_cpu_gov tracing: Add down_write(trace_event_sem) when adding trace event usb: hub: Don't try to recover devices lost during warm reset. usb: hub: avoid warm port reset during USB3 disconnect x86/mce/amd: Add default names for MCA banks and blocks iio: hid-sensor-prox: Fix incorrect OFFSET calculation f2fs: fix to do sanity check on ino and xnid mm/zsmalloc: do not pass __GFP_MOVABLE if CONFIG_COMPACTION=n mm/zsmalloc.c: convert to use kmem_cache_zalloc in cache_alloc_zspage() drm/sched: Remove optimization that causes hang when killing dependent jobs ice: Fix a null pointer dereference in ice_copy_and_init_pkg() net: usbnet: Fix the wrong netif_carrier_on() call net: usbnet: Avoid potential RCU stall on LINK_CHANGE event PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports ACPI: processor: idle: Check acpi_fetch_acpi_dev() return value comedi: Fail COMEDI_INSNLIST ioctl if n_insns is too large comedi: Fix initialization of data for instructions that write to subdevice kbuild: Add KBUILD_CPPFLAGS to as-option invocation kbuild: add $(CLANG_FLAGS) to KBUILD_CPPFLAGS kbuild: Add CLANG_FLAGS to as-instr mips: Include KBUILD_CPPFLAGS in CHECKFLAGS invocation kbuild: Update assembler calls to use proper flags and language target ARM: 9448/1: Use an absolute path to unified.h in KBUILD_AFLAGS usb: dwc3: Ignore late xferNotReady event to prevent halt timeout USB: storage: Ignore driver CD mode for Realtek multi-mode Wi-Fi dongles usb: storage: realtek_cr: Use correct byte order for bcs->Residue USB: storage: Add unusual-devs entry for Novatek NTK96550-based camera usb: quirks: Add DELAY_INIT quick for another SanDisk 3.2Gen1 Flash Drive iio: proximity: isl29501: fix buffered read on big-endian systems ftrace: Also allocate and copy hash for reading of filter files fpga: zynq_fpga: Fix the wrong usage of dma_map_sgtable() use uniform permission checks for all mount propagation changes move_mount: allow to add a mount into an existing group fs/buffer: fix use-after-free when call bh_read() helper drm/amd/display: Find first CRTC and its line time in dce110_fill_display_configs drm/amd/display: Fix fractional fb divider in set_pixel_clock_v3 squashfs: fix memory leak in squashfs_fill_super memstick: Fix deadlock by moving removing flag earlier media: venus: Add a check for packet size after reading from shared memory media: ov2659: Fix memory leaks in ov2659_probe() media: usbtv: Lock resolution while streaming media: imx: fix a potential memory leak in imx_media_csc_scaler_device_init() media: gspca: Add bounds checking to firmware parser soc/tegra: pmc: Ensure power-domains are in a known state jbd2: prevent softlockup in jbd2_log_do_checkpoint() PCI: endpoint: Fix configfs group removal on driver teardown PCI: endpoint: Fix configfs group list head handling mtd: rawnand: fsmc: Add missing check after DMA map pwm: imx-tpm: Reset counter if CMOD is 0 wifi: brcmsmac: Remove const from tbl_ptr parameter in wlc_lcnphy_common_read_table() zynq_fpga: use sgtable-based scatterlist wrappers ata: libata-scsi: Fix ata_to_sense_error() status handling ext4: fix reserved gdt blocks handling in fsmap ext4: fix fsmap end of range reporting with bigalloc ext4: check fast symlink for ea_inode correctly Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()" vt: defkeymap: Map keycodes above 127 to K_HOLE vt: keyboard: Don't process Unicode characters in K_OFF mode usb: dwc3: meson-g12a: fix device leaks at unbind usb: gadget: udc: renesas_usb3: fix device leak at unbind usb: atm: cxacru: Merge cxacru_upload_firmware() into cxacru_heavy_init() m68k: Fix lost column on framebuffer debug console cpufreq: armada-8k: Fix off by one in armada_8k_cpufreq_free_table() serial: 8250: fix panic due to PSLVERR media: uvcvideo: Do not mark valid metadata as invalid media: uvcvideo: Fix 1-byte out-of-bounds read in uvc_parse_format() mm/kmemleak: avoid soft lockup in __kmemleak_do_cleanup() parisc: Makefile: fix a typo in palo.conf btrfs: fix log tree replay failure due to file with 0 links and extents thunderbolt: Fix copy+paste error in match_service_id() comedi: fix race between polling and detaching misc: rtsx: usb: Ensure mmc child device is active when card is present drm/amdgpu: fix incorrect vm flags to map bo scsi: lpfc: Remove redundant assignment to avoid memory leak rtc: ds1307: remove clear of oscillator stop flag (OSF) in probe pNFS: Fix uninited ptr deref in block/scsi layout pNFS: Handle RPC size limit for layoutcommits pNFS: Fix disk addr range check in block/scsi layout pNFS: Fix stripe mapping in block/scsi layout net: phy: smsc: add proper reset flags for LAN8710A ipmi: Fix strcpy source and destination the same kconfig: lxdialog: fix 'space' to (de)select options kconfig: gconf: fix potential memory leak in renderer_edited() kconfig: gconf: avoid hardcoding model2 in on_treeview2_cursor_changed() ipmi: Use dev_warn_ratelimited() for incorrect message warnings scsi: aacraid: Stop using PCI_IRQ_AFFINITY scsi: Fix sas_user_scan() to handle wildcard and multi-channel scans kconfig: nconf: Ensure null termination where strncpy is used kconfig: lxdialog: replace strcpy() with strncpy() in inputbox.c i3c: don't fail if GETHDRCAP is unsupported PCI: pnv_php: Work around switches with broken presence detection i3c: add missing include to internal header media: uvcvideo: Fix bandwidth issue for Alcor camera media: dvb-frontends: w7090p: fix null-ptr-deref in w7090p_tuner_write_serpar and w7090p_tuner_read_serpar media: dvb-frontends: dib7090p: fix null-ptr-deref in dib7090p_rw_on_apb() media: usb: hdpvr: disable zero-length read messages media: tc358743: Increase FIFO trigger level to 374 media: tc358743: Return an appropriate colorspace from tc358743_set_fmt media: tc358743: Check I2C succeeded during probe pinctrl: stm32: Manage irq affinity settings scsi: mpt3sas: Correctly handle ATA device errors scsi: lpfc: Check for hdwq null ptr when cleaning up lpfc_vport structure RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask() MIPS: Don't crash in stack_top() for tasks without ABI or vDSO jfs: upper bound check of tree index in dbAllocAG jfs: Regular file corruption check jfs: truncate good inode pages when hard link is 0 scsi: bfa: Double-free fix MIPS: vpe-mt: add missing prototypes for vpe_{alloc,start,stop,free} watchdog: dw_wdt: Fix default timeout fs/orangefs: use snprintf() instead of sprintf() scsi: libiscsi: Initialize iscsi_conn->dd_data only if memory is allocated ext4: do not BUG when INLINE_DATA_FL lacks system.data xattr cifs: Fix calling CIFSFindFirst() for root path without msearch vhost: fail early when __vhost_add_used() fails net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325 uapi: in6: restore visibility of most IPv6 socket options net: ncsi: Fix buffer overflow in fetching version id net: dsa: b53: prevent SWITCH_CTRL access on BCM5325 net: dsa: b53: fix b53_imp_vlan_setup for BCM5325 net: vlan: Replace BUG() with WARN_ON_ONCE() in vlan_dev_* stubs wifi: iwlegacy: Check rate_idx range after addition netmem: fix skb_frag_address_safe with unreadable skbs wifi: rtlwifi: fix possible skb memory leak in `_rtl_pci_rx_interrupt()`. wifi: iwlwifi: fw: Fix possible memory leak in iwl_fw_dbg_collect wifi: iwlwifi: dvm: fix potential overflow in rs_fill_link_cmd() net: fec: allow disable coalescing (powerpc/512) Fix possible `dma_unmap_single()` on uninitialized pointer s390/stp: Remove udelay from stp_sync_clock() wifi: iwlwifi: mvm: fix scan request validation net: thunderx: Fix format-truncation warning in bgx_acpi_match_id() net: ipv4: fix incorrect MTU in broadcast routes wifi: cfg80211: Fix interface type validation rcu: Protect ->defer_qs_iw_pending from data race net: ag71xx: Add missing check after DMA map et131x: Add missing check after DMA map be2net: Use correct byte order and format string for TCP seq and ack_seq s390/time: Use monotonic clock in get_cycles() wifi: cfg80211: reject HTC bit for management frames ktest.pl: Prevent recursion of default variable options ASoC: codecs: rt5640: Retry DEVICE_ID verification ALSA: usb-audio: Avoid precedence issues in mixer_quirks macros ALSA: hda/ca0132: Fix buffer overflow in add_tuning_control platform/x86: thinkpad_acpi: Handle KCOV __init vs inline mismatches pm: cpupower: Fix the snapshot-order of tsc,mperf, clock in mperf_stop() usb: core: usb_submit_urb: downgrade type check ALSA: intel8x0: Fix incorrect codec index usage in mixer for ICH4 ASoC: hdac_hdmi: Rate limit logging on connection and disconnection mmc: rtsx_usb_sdmmc: Fix error-path in sd_set_power_mode() ACPI: APEI: GHES: add TAINT_MACHINE_CHECK on GHES panic path ACPI: processor: fix acpi_object initialization PM: sleep: console: Fix the black screen issue thermal: sysfs: Return ENODATA instead of EAGAIN for reads PM: runtime: Clear power.needs_force_resume in pm_runtime_reinit() selftests: tracing: Use mutex_unlock for testing glob filter ARM: tegra: Use I/O memcpy to write to IRAM gpio: tps65912: check the return value of regmap_update_bits() ASoC: soc-dapm: set bias_level if snd_soc_dapm_set_bias_level() was successed ARM: rockchip: fix kernel hang during smp initialization cpufreq: Exit governor when failed to start old governor usb: xhci: Avoid showing errors during surprise removal usb: xhci: Set avg_trb_len = 8 for EP0 during Address Device Command usb: xhci: Avoid showing warnings for dying controller selftests/futex: Define SYS_futex on 32-bit architectures with 64-bit time_t usb: xhci: print xhci->xhc_state when queue_command failed securityfs: don't pin dentries twice, once is enough... hfs: fix not erasing deleted b-tree node issue drbd: add missing kref_get in handle_write_conflicts udf: Verify partition map count arm64: Handle KCOV __init vs inline mismatches hfsplus: don't use BUG_ON() in hfsplus_create_attributes_file() hfsplus: fix slab-out-of-bounds read in hfsplus_uni2asc() hfsplus: fix slab-out-of-bounds in hfsplus_bnode_read() hfs: fix slab-out-of-bounds in hfs_bnode_read() sctp: linearize cloned gso packets in sctp_rcv netfilter: ctnetlink: fix refcount leak on table dump udp: also consider secpath when evaluating ipsec use for checksumming ACPI: processor: perflib: Move problematic pr->performance check ACPI: processor: perflib: Fix initial _PPC limit application Documentation: ACPI: Fix parent device references fs: Prevent file descriptor table allocations exceeding INT_MAX sunvdc: Balance device refcount in vdc_port_mpgroup_check NFSD: detect mismatch of file handle and delegation stateid in OPEN op net: dpaa: fix device leak when querying time stamp info net: gianfar: fix device leak when querying time stamp info netlink: avoid infinite retry looping in netlink_unicast() ALSA: usb-audio: Validate UAC3 cluster segment descriptors ALSA: usb-audio: Validate UAC3 power domain descriptors, too io_uring: don't use int for ABI usb: gadget : fix use-after-free in composite_dev_cleanup() MIPS: mm: tlb-r4k: Uniquify TLB entries on init USB: serial: option: add Foxconn T99W709 vsock: Do not allow binding to VMADDR_PORT_ANY net/packet: fix a race in packet_set_ring() and packet_notifier() perf/core: Prevent VMA split of buffer mappings perf/core: Exit early on perf_mmap() fail perf/core: Don't leak AUX buffer refcount on allocation failure pptp: fix pptp_xmit() error path smb: client: let recv_done() cleanup before notifying the callers. benet: fix BUG when creating VFs net: drop UFO packets in udp_rcv_segment() ipv6: reject malicious packets in ipv6_gso_segment() pptp: ensure minimal skb length in pptp_xmit() netpoll: prevent hanging NAPI when netcons gets enabled NFS: Fix filehandle bounds checking in nfs_fh_to_dentry() pci/hotplug/pnv-php: Wrap warnings in macro pci/hotplug/pnv-php: Improve error msg on power state change failure usb: chipidea: udc: fix sleeping function called from invalid context f2fs: fix to avoid out-of-boundary access in devs.path f2fs: fix to avoid panic in f2fs_evict_inode f2fs: fix to avoid UAF in f2fs_sync_inode_meta() rtc: pcf8563: fix incorrect maximum clock rate handling rtc: hym8563: fix incorrect maximum clock rate handling rtc: ds1307: fix incorrect maximum clock rate handling module: Restore the moduleparam prefix length check bpf: Check flow_dissector ctx accesses are aligned mtd: rawnand: atmel: set pmecc data setup time mtd: rawnand: atmel: Fix dma_mapping_error() address jfs: fix metapage reference count leak in dbAllocCtl fbdev: imxfb: Check fb_add_videomode to prevent null-ptr-deref crypto: qat - fix seq_file position update in adf_ring_next() dmaengine: nbpfaxi: Add missing check after DMA map dmaengine: mv_xor: Fix missing check after DMA map and missing unmap fs/orangefs: Allow 2 more characters in do_c_string() soundwire: stream: restore params when prepare ports fail crypto: img-hash - Fix dma_unmap_sg() nents value hwrng: mtk - handle devm_pm_runtime_enable errors watchdog: ziirave_wdt: check record length in ziirave_firm_verify() scsi: isci: Fix dma_unmap_sg() nents value scsi: mvsas: Fix dma_unmap_sg() nents value scsi: ibmvscsi_tgt: Fix dma_unmap_sg() nents value clk: sunxi-ng: v3s: Fix de clock definition perf tests bp_account: Fix leaked file descriptor crypto: ccp - Fix crash when rebind ccp device for ccp.ko pinctrl: sunxi: Fix memory leak on krealloc failure power: supply: max14577: Handle NULL pdata when CONFIG_OF is not set clk: davinci: Add NULL check in davinci_lpsc_clk_register() mtd: fix possible integer overflow in erase_xfer() crypto: marvell/cesa - Fix engine load inaccuracy PCI: rockchip-host: Fix "Unexpected Completion" log message vrf: Drop existing dst reference in vrf_ip6_input_dst selftests: rtnetlink.sh: remove esp4_offload after test netfilter: xt_nfacct: don't assume acct name is null-terminated can: kvaser_usb: Assign netdev.dev_port based on device channel index can: kvaser_pciefd: Store device channel index wifi: brcmfmac: fix P2P discovery failure in P2P peer due to missing P2P IE Reapply "wifi: mac80211: Update skb's control block key in ieee80211_tx_dequeue()" mwl8k: Add missing check after DMA map wifi: rtl8xxxu: Fix RX skb size for aggregation disabled net/sched: Restrict conditions for adding duplicating netems to qdisc tree arch: powerpc: defconfig: Drop obsolete CONFIG_NET_CLS_TCINDEX netfilter: nf_tables: adjust lockdep assertions handling drm/amd/pm/powerplay/hwmgr/smu_helper: fix order of mask and value m68k: Don't unregister boot console needlessly tcp: fix tcp_ofo_queue() to avoid including too much DUP SACK range iwlwifi: Add missing check for alloc_ordered_workqueue wifi: iwlwifi: Fix memory leak in iwl_mvm_init() wifi: rtl818x: Kill URBs before clearing tx status queue caif: reduce stack size, again bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure bpf, ktls: Fix data corruption when using bpf_msg_pop_data() in ktls staging: nvec: Fix incorrect null termination of battery manufacturer samples: mei: Fix building on musl libc cpufreq: Init policy->rwsem before it may be possibly used ARM: dts: imx6ul-kontron-bl-common: Fix RTS polarity for RS485 interface usb: early: xhci-dbc: Fix early_ioremap leak Revert "vmci: Prevent the dispatching of uninitialized payloads" pps: fix poll support vmci: Prevent the dispatching of uninitialized payloads staging: fbtft: fix potential memory leak in fbtft_framebuffer_alloc() ARM: dts: vfxxx: Correctly use two tuples for timer address ASoC: ops: dynamically allocate struct snd_ctl_elem_value hfsplus: remove mutex_lock check in hfsplus_free_extents ASoC: Intel: fix SND_SOC_SOF dependencies ethernet: intel: fix building with large NR_CPUS usb: phy: mxs: disconnect line when USB charger is attached usb: chipidea: add USB PHY event usb: chipidea: introduce CI_HDRC_CONTROLLER_VBUS_EVENT glue layer use usb: chipidea: udc: protect usb interrupt enable usb: chipidea: udc: add new API ci_hdrc_gadget_connect ALSA: hda: Add missing NVIDIA HDA codec IDs comedi: comedi_test: Fix possible deletion of uninitialized timers nilfs2: reject invalid file types when reading inodes i2c: qup: jump out of the loop in case of timeout net/sched: sch_qfq: Avoid triggering might_sleep in atomic context in qfq_delete_class net: appletalk: Fix use-after-free in AARP proxy probe net: appletalk: fix kerneldoc warnings RDMA/core: Rate limit GID cache warning messages regulator: core: fix NULL dereference on unbind due to stale coupling data usb: hub: Fix flushing and scheduling of delayed work that tunes runtime pm usb: hub: fix detection of high tier USB3 devices behind suspended hubs net_sched: sch_sfq: reject invalid perturb period net_sched: sch_sfq: move the limit validation net_sched: sch_sfq: use a temporary work area for validating configuration net_sched: sch_sfq: don't allow 1 packet limit net_sched: sch_sfq: handle bigger packets net_sched: sch_sfq: annotate data-races around q->perturb_period power: supply: bq24190: Fix use after free bug in bq24190_remove due to race condition power: supply: bq24190_charger: using pm_runtime_resume_and_get instead of pm_runtime_get_sync power: supply: bq24190_charger: Fix runtime PM imbalance on error xhci: Disable stream for xHC controller with XHCI_BROKEN_STREAMS virtio-net: ensure the received length does not exceed allocated size ASoC: fsl_sai: Force a software reset when starting in consumer mode usb: dwc3: qcom: Don't leave BCR asserted usb: musb: fix gadget state on disconnect net/sched: Return NULL when htb_lookup_leaf encounters an empty rbtree net: vlan: fix VLAN 0 refcount imbalance of toggling filtering during runtime Bluetooth: L2CAP: Fix attempting to adjust outgoing MTU Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout Bluetooth: SMP: If an unallowed command is received consider it a failure Bluetooth: Fix null-ptr-deref in l2cap_sock_resume_cb() usb: net: sierra: check for no status endpoint net/sched: sch_qfq: Fix race condition on qfq_aggregate net: emaclite: Fix missing pointer increment in aligned_read() comedi: Fix use of uninitialized data in insn_rw_emulate_bits() comedi: Fix some signed shift left operations comedi: das6402: Fix bit shift out of bounds comedi: das16m1: Fix bit shift out of bounds comedi: aio_iiro_16: Fix bit shift out of bounds comedi: pcl812: Fix bit shift out of bounds iio: adc: stm32-adc: Fix race in installing chained IRQ handler iio: adc: max1363: Reorder mode_list[] entries iio: adc: max1363: Fix MAX1363_4X_CHANS/MAX1363_8X_CHANS[] soc: aspeed: lpc-snoop: Don't disable channels that aren't enabled soc: aspeed: lpc-snoop: Cleanup resources in stack-order mmc: sdhci_am654: Workaround for Errata i2312 mmc: sdhci-pci: Quirk for broken command queuing on Intel GLK-based Positivo models mmc: bcm2835: Fix dma_unmap_sg() nents value memstick: core: Zero initialize id_reg in h_memstick_read_dev_id() isofs: Verify inode mode when loading from disk dmaengine: nbpfaxi: Fix memory corruption in probe() af_packet: fix soft lockup issue caused by tpacket_snd() af_packet: fix the SO_SNDTIMEO constraint not effective on tpacked_snd() phonet/pep: Move call to pn_skb_get_dst_sockaddr() earlier in pep_sock_accept() HID: core: do not bypass hid_hw_raw_request HID: core: ensure __hid_request reserves the report ID as the first byte HID: core: ensure the allocated report buffer can contain the reserved report ID pch_uart: Fix dma_sync_sg_for_device() nents value Input: xpad - set correct controller type for Acer NGR200 i2c: stm32: fix the device used for the DMA map usb: gadget: configfs: Fix OOB read on empty string write USB: serial: ftdi_sio: add support for NDI EMGUIDE GEMINI USB: serial: option: add Foxconn T99W640 USB: serial: option: add Telit Cinterion FE910C04 (ECM) composition Conflicts: drivers/soc/qcom/mdt_loader.c drivers/usb/dwc3/dwc3-qcom.c drivers/usb/host/xhci-plat.c mm/slub.c mm/zsmalloc.c Change-Id: I83183b507249a323eba0ecec4c7b4b04d76cc7f6
This commit is contained in:
commit
b31d93f6d6
428 changed files with 3865 additions and 1775 deletions
|
|
@ -984,94 +984,6 @@ cleanup:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void cxacru_upload_firmware(struct cxacru_data *instance,
|
||||
const struct firmware *fw,
|
||||
const struct firmware *bp)
|
||||
{
|
||||
int ret;
|
||||
struct usbatm_data *usbatm = instance->usbatm;
|
||||
struct usb_device *usb_dev = usbatm->usb_dev;
|
||||
__le16 signature[] = { usb_dev->descriptor.idVendor,
|
||||
usb_dev->descriptor.idProduct };
|
||||
__le32 val;
|
||||
|
||||
usb_dbg(usbatm, "%s\n", __func__);
|
||||
|
||||
/* FirmwarePllFClkValue */
|
||||
val = cpu_to_le32(instance->modem_type->pll_f_clk);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLFCLK_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "FirmwarePllFClkValue failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* FirmwarePllBClkValue */
|
||||
val = cpu_to_le32(instance->modem_type->pll_b_clk);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLBCLK_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "FirmwarePllBClkValue failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Enable SDRAM */
|
||||
val = cpu_to_le32(SDRAM_ENA);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SDRAMEN_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Enable SDRAM failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Firmware */
|
||||
usb_info(usbatm, "loading firmware\n");
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw->data, fw->size);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Firmware upload failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Boot ROM patch */
|
||||
if (instance->modem_type->boot_rom_patch) {
|
||||
usb_info(usbatm, "loading boot ROM patch\n");
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Boot ROM patching failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* Signature */
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) signature, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Signature storing failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
usb_info(usbatm, "starting device\n");
|
||||
if (instance->modem_type->boot_rom_patch) {
|
||||
val = cpu_to_le32(BR_ADDR);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_STACK_ADDR, (u8 *) &val, 4);
|
||||
} else {
|
||||
ret = cxacru_fw(usb_dev, FW_GOTO_MEM, 0x0, 0x0, FW_ADDR, NULL, 0);
|
||||
}
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Passing control to firmware failed: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Delay to allow firmware to start up. */
|
||||
msleep_interruptible(1000);
|
||||
|
||||
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD));
|
||||
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_CMD));
|
||||
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_DATA));
|
||||
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_DATA));
|
||||
|
||||
ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
|
||||
if (ret < 0) {
|
||||
usb_err(usbatm, "modem failed to initialize: %d\n", ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static int cxacru_find_firmware(struct cxacru_data *instance,
|
||||
char *phase, const struct firmware **fw_p)
|
||||
|
|
@ -1098,8 +1010,14 @@ static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,
|
|||
{
|
||||
const struct firmware *fw, *bp;
|
||||
struct cxacru_data *instance = usbatm_instance->driver_data;
|
||||
int ret = cxacru_find_firmware(instance, "fw", &fw);
|
||||
struct usbatm_data *usbatm = instance->usbatm;
|
||||
struct usb_device *usb_dev = usbatm->usb_dev;
|
||||
__le16 signature[] = { usb_dev->descriptor.idVendor,
|
||||
usb_dev->descriptor.idProduct };
|
||||
__le32 val;
|
||||
int ret;
|
||||
|
||||
ret = cxacru_find_firmware(instance, "fw", &fw);
|
||||
if (ret) {
|
||||
usb_warn(usbatm_instance, "firmware (cxacru-fw.bin) unavailable (system misconfigured?)\n");
|
||||
return ret;
|
||||
|
|
@ -1114,8 +1032,82 @@ static int cxacru_heavy_init(struct usbatm_data *usbatm_instance,
|
|||
}
|
||||
}
|
||||
|
||||
cxacru_upload_firmware(instance, fw, bp);
|
||||
/* FirmwarePllFClkValue */
|
||||
val = cpu_to_le32(instance->modem_type->pll_f_clk);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLFCLK_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "FirmwarePllFClkValue failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* FirmwarePllBClkValue */
|
||||
val = cpu_to_le32(instance->modem_type->pll_b_clk);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, PLLBCLK_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "FirmwarePllBClkValue failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Enable SDRAM */
|
||||
val = cpu_to_le32(SDRAM_ENA);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SDRAMEN_ADDR, (u8 *) &val, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Enable SDRAM failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Firmware */
|
||||
usb_info(usbatm, "loading firmware\n");
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, FW_ADDR, fw->data, fw->size);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Firmware upload failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Boot ROM patch */
|
||||
if (instance->modem_type->boot_rom_patch) {
|
||||
usb_info(usbatm, "loading boot ROM patch\n");
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_ADDR, bp->data, bp->size);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Boot ROM patching failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
/* Signature */
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, SIG_ADDR, (u8 *) signature, 4);
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Signature storing failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
usb_info(usbatm, "starting device\n");
|
||||
if (instance->modem_type->boot_rom_patch) {
|
||||
val = cpu_to_le32(BR_ADDR);
|
||||
ret = cxacru_fw(usb_dev, FW_WRITE_MEM, 0x2, 0x0, BR_STACK_ADDR, (u8 *) &val, 4);
|
||||
} else {
|
||||
ret = cxacru_fw(usb_dev, FW_GOTO_MEM, 0x0, 0x0, FW_ADDR, NULL, 0);
|
||||
}
|
||||
if (ret) {
|
||||
usb_err(usbatm, "Passing control to firmware failed: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Delay to allow firmware to start up. */
|
||||
msleep_interruptible(1000);
|
||||
|
||||
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_CMD));
|
||||
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_CMD));
|
||||
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, CXACRU_EP_DATA));
|
||||
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, CXACRU_EP_DATA));
|
||||
|
||||
ret = cxacru_cm(instance, CM_REQUEST_CARD_GET_STATUS, NULL, 0, NULL, 0);
|
||||
if (ret < 0) {
|
||||
usb_err(usbatm, "modem failed to initialize: %d\n", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
done:
|
||||
if (instance->modem_type->boot_rom_patch)
|
||||
release_firmware(bp);
|
||||
release_firmware(fw);
|
||||
|
|
|
|||
|
|
@ -277,8 +277,19 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role)
|
|||
return -ENXIO;
|
||||
|
||||
ret = ci->roles[role]->start(ci);
|
||||
if (!ret)
|
||||
ci->role = role;
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ci->role = role;
|
||||
|
||||
if (ci->usb_phy) {
|
||||
if (role == CI_ROLE_HOST)
|
||||
usb_phy_set_event(ci->usb_phy, USB_EVENT_ID);
|
||||
else
|
||||
/* in device mode but vbus is invalid*/
|
||||
usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -292,6 +303,9 @@ static inline void ci_role_stop(struct ci_hdrc *ci)
|
|||
ci->role = CI_ROLE_END;
|
||||
|
||||
ci->roles[role]->stop(ci);
|
||||
|
||||
if (ci->usb_phy)
|
||||
usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
|
||||
}
|
||||
|
||||
static inline enum usb_role ci_role_to_usb_role(struct ci_hdrc *ci)
|
||||
|
|
|
|||
|
|
@ -1533,44 +1533,68 @@ static const struct usb_ep_ops usb_ep_ops = {
|
|||
/******************************************************************************
|
||||
* GADGET block
|
||||
*****************************************************************************/
|
||||
/**
|
||||
* ci_hdrc_gadget_connect: caller makes sure gadget driver is binded
|
||||
*/
|
||||
static void ci_hdrc_gadget_connect(struct usb_gadget *_gadget, int is_active)
|
||||
{
|
||||
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
|
||||
|
||||
if (is_active) {
|
||||
pm_runtime_get_sync(&_gadget->dev);
|
||||
hw_device_reset(ci);
|
||||
spin_lock_irq(&ci->lock);
|
||||
if (ci->driver) {
|
||||
hw_device_state(ci, ci->ep0out->qh.dma);
|
||||
usb_gadget_set_state(_gadget, USB_STATE_POWERED);
|
||||
spin_unlock_irq(&ci->lock);
|
||||
usb_udc_vbus_handler(_gadget, true);
|
||||
} else {
|
||||
spin_unlock_irq(&ci->lock);
|
||||
}
|
||||
} else {
|
||||
usb_udc_vbus_handler(_gadget, false);
|
||||
if (ci->driver)
|
||||
ci->driver->disconnect(&ci->gadget);
|
||||
hw_device_state(ci, 0);
|
||||
if (ci->platdata->notify_event)
|
||||
ci->platdata->notify_event(ci,
|
||||
CI_HDRC_CONTROLLER_STOPPED_EVENT);
|
||||
_gadget_stop_activity(&ci->gadget);
|
||||
pm_runtime_put_sync(&_gadget->dev);
|
||||
usb_gadget_set_state(_gadget, USB_STATE_NOTATTACHED);
|
||||
}
|
||||
}
|
||||
|
||||
static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active)
|
||||
{
|
||||
struct ci_hdrc *ci = container_of(_gadget, struct ci_hdrc, gadget);
|
||||
unsigned long flags;
|
||||
int gadget_ready = 0;
|
||||
int ret = 0;
|
||||
|
||||
spin_lock_irqsave(&ci->lock, flags);
|
||||
ci->vbus_active = is_active;
|
||||
if (ci->driver)
|
||||
gadget_ready = 1;
|
||||
spin_unlock_irqrestore(&ci->lock, flags);
|
||||
|
||||
if (ci->usb_phy)
|
||||
usb_phy_set_charger_state(ci->usb_phy, is_active ?
|
||||
USB_CHARGER_PRESENT : USB_CHARGER_ABSENT);
|
||||
|
||||
if (gadget_ready) {
|
||||
if (is_active) {
|
||||
pm_runtime_get_sync(&_gadget->dev);
|
||||
hw_device_reset(ci);
|
||||
hw_device_state(ci, ci->ep0out->qh.dma);
|
||||
usb_gadget_set_state(_gadget, USB_STATE_POWERED);
|
||||
usb_udc_vbus_handler(_gadget, true);
|
||||
} else {
|
||||
usb_udc_vbus_handler(_gadget, false);
|
||||
if (ci->driver)
|
||||
ci->driver->disconnect(&ci->gadget);
|
||||
hw_device_state(ci, 0);
|
||||
if (ci->platdata->notify_event)
|
||||
ci->platdata->notify_event(ci,
|
||||
CI_HDRC_CONTROLLER_STOPPED_EVENT);
|
||||
_gadget_stop_activity(&ci->gadget);
|
||||
pm_runtime_put_sync(&_gadget->dev);
|
||||
usb_gadget_set_state(_gadget, USB_STATE_NOTATTACHED);
|
||||
}
|
||||
if (ci->platdata->notify_event)
|
||||
ret = ci->platdata->notify_event(ci,
|
||||
CI_HDRC_CONTROLLER_VBUS_EVENT);
|
||||
|
||||
if (ci->usb_phy) {
|
||||
if (is_active)
|
||||
usb_phy_set_event(ci->usb_phy, USB_EVENT_VBUS);
|
||||
else
|
||||
usb_phy_set_event(ci->usb_phy, USB_EVENT_NONE);
|
||||
}
|
||||
|
||||
return 0;
|
||||
if (ci->driver)
|
||||
ci_hdrc_gadget_connect(_gadget, is_active);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int ci_udc_wakeup(struct usb_gadget *_gadget)
|
||||
|
|
@ -1794,18 +1818,10 @@ static int ci_udc_start(struct usb_gadget *gadget,
|
|||
return retval;
|
||||
}
|
||||
|
||||
pm_runtime_get_sync(&ci->gadget.dev);
|
||||
if (ci->vbus_active) {
|
||||
hw_device_reset(ci);
|
||||
} else {
|
||||
if (ci->vbus_active)
|
||||
ci_hdrc_gadget_connect(gadget, 1);
|
||||
else
|
||||
usb_udc_vbus_handler(&ci->gadget, false);
|
||||
pm_runtime_put_sync(&ci->gadget.dev);
|
||||
return retval;
|
||||
}
|
||||
|
||||
retval = hw_device_state(ci, ci->ep0out->qh.dma);
|
||||
if (retval)
|
||||
pm_runtime_put_sync(&ci->gadget.dev);
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
|
@ -1835,6 +1851,7 @@ static int ci_udc_stop(struct usb_gadget *gadget)
|
|||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&ci->lock, flags);
|
||||
ci->driver = NULL;
|
||||
|
||||
if (ci->vbus_active) {
|
||||
hw_device_state(ci, 0);
|
||||
|
|
@ -1847,7 +1864,6 @@ static int ci_udc_stop(struct usb_gadget *gadget)
|
|||
pm_runtime_put(&ci->gadget.dev);
|
||||
}
|
||||
|
||||
ci->driver = NULL;
|
||||
spin_unlock_irqrestore(&ci->lock, flags);
|
||||
|
||||
ci_udc_stop_for_otg_fsm(ci);
|
||||
|
|
@ -1890,6 +1906,9 @@ static irqreturn_t udc_irq(struct ci_hdrc *ci)
|
|||
if (USBi_PCI & intr) {
|
||||
ci->gadget.speed = hw_port_is_high_speed(ci) ?
|
||||
USB_SPEED_HIGH : USB_SPEED_FULL;
|
||||
if (ci->usb_phy)
|
||||
usb_phy_set_event(ci->usb_phy,
|
||||
USB_EVENT_ENUMERATED);
|
||||
if (ci->suspended) {
|
||||
if (ci->driver->resume) {
|
||||
spin_unlock(&ci->lock);
|
||||
|
|
|
|||
|
|
@ -1520,8 +1520,6 @@ skip_countries:
|
|||
acm->nb_index = 0;
|
||||
acm->nb_size = 0;
|
||||
|
||||
dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);
|
||||
|
||||
acm->line.dwDTERate = cpu_to_le32(9600);
|
||||
acm->line.bDataBits = 8;
|
||||
acm_set_line(acm, &acm->line);
|
||||
|
|
@ -1529,6 +1527,12 @@ skip_countries:
|
|||
usb_driver_claim_interface(&acm_driver, data_interface, acm);
|
||||
usb_set_intfdata(data_interface, acm);
|
||||
|
||||
if (quirks & CLEAR_HALT_CONDITIONS) {
|
||||
/* errors intentionally ignored */
|
||||
usb_clear_halt(usb_dev, acm->in);
|
||||
usb_clear_halt(usb_dev, acm->out);
|
||||
}
|
||||
|
||||
tty_dev = tty_port_register_device(&acm->port, acm_tty_driver, minor,
|
||||
&control_interface->dev);
|
||||
if (IS_ERR(tty_dev)) {
|
||||
|
|
@ -1536,10 +1540,7 @@ skip_countries:
|
|||
goto alloc_fail6;
|
||||
}
|
||||
|
||||
if (quirks & CLEAR_HALT_CONDITIONS) {
|
||||
usb_clear_halt(usb_dev, acm->in);
|
||||
usb_clear_halt(usb_dev, acm->out);
|
||||
}
|
||||
dev_info(&intf->dev, "ttyACM%d: USB ACM device\n", minor);
|
||||
|
||||
return 0;
|
||||
alloc_fail6:
|
||||
|
|
|
|||
|
|
@ -55,6 +55,12 @@
|
|||
#define USB_TP_TRANSMISSION_DELAY_MAX 65535 /* ns */
|
||||
#define USB_PING_RESPONSE_TIME 400 /* ns */
|
||||
|
||||
/*
|
||||
* Give SS hubs 200ms time after wake to train downstream links before
|
||||
* assuming no port activity and allowing hub to runtime suspend back.
|
||||
*/
|
||||
#define USB_SS_PORT_U0_WAKE_TIME 200 /* ms */
|
||||
|
||||
/* Protect struct usb_device->state and ->children members
|
||||
* Note: Both are also protected by ->dev.sem, except that ->state can
|
||||
* change to USB_STATE_NOTATTACHED even when the semaphore isn't held. */
|
||||
|
|
@ -1028,11 +1034,12 @@ int usb_remove_device(struct usb_device *udev)
|
|||
|
||||
enum hub_activation_type {
|
||||
HUB_INIT, HUB_INIT2, HUB_INIT3, /* INITs must come first */
|
||||
HUB_POST_RESET, HUB_RESUME, HUB_RESET_RESUME,
|
||||
HUB_POST_RESET, HUB_RESUME, HUB_RESET_RESUME, HUB_POST_RESUME,
|
||||
};
|
||||
|
||||
static void hub_init_func2(struct work_struct *ws);
|
||||
static void hub_init_func3(struct work_struct *ws);
|
||||
static void hub_post_resume(struct work_struct *ws);
|
||||
|
||||
static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
||||
{
|
||||
|
|
@ -1055,6 +1062,13 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
|||
goto init2;
|
||||
goto init3;
|
||||
}
|
||||
|
||||
if (type == HUB_POST_RESUME) {
|
||||
usb_autopm_put_interface_async(to_usb_interface(hub->intfdev));
|
||||
kref_put(&hub->kref, hub_release);
|
||||
return;
|
||||
}
|
||||
|
||||
kref_get(&hub->kref);
|
||||
|
||||
/* The superspeed hub except for root hub has to use Hub Depth
|
||||
|
|
@ -1303,6 +1317,17 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
|
|||
device_unlock(&hdev->dev);
|
||||
}
|
||||
|
||||
if (type == HUB_RESUME && hub_is_superspeed(hub->hdev)) {
|
||||
/* give usb3 downstream links training time after hub resume */
|
||||
usb_autopm_get_interface_no_resume(
|
||||
to_usb_interface(hub->intfdev));
|
||||
|
||||
INIT_DELAYED_WORK(&hub->init_work, hub_post_resume);
|
||||
queue_delayed_work(system_power_efficient_wq, &hub->init_work,
|
||||
msecs_to_jiffies(USB_SS_PORT_U0_WAKE_TIME));
|
||||
return;
|
||||
}
|
||||
|
||||
kref_put(&hub->kref, hub_release);
|
||||
}
|
||||
|
||||
|
|
@ -1321,6 +1346,13 @@ static void hub_init_func3(struct work_struct *ws)
|
|||
hub_activate(hub, HUB_INIT3);
|
||||
}
|
||||
|
||||
static void hub_post_resume(struct work_struct *ws)
|
||||
{
|
||||
struct usb_hub *hub = container_of(ws, struct usb_hub, init_work.work);
|
||||
|
||||
hub_activate(hub, HUB_POST_RESUME);
|
||||
}
|
||||
|
||||
enum hub_quiescing_type {
|
||||
HUB_DISCONNECT, HUB_PRE_RESET, HUB_SUSPEND
|
||||
};
|
||||
|
|
@ -1346,6 +1378,7 @@ static void hub_quiesce(struct usb_hub *hub, enum hub_quiescing_type type)
|
|||
|
||||
/* Stop hub_wq and related activity */
|
||||
del_timer_sync(&hub->irq_urb_retry);
|
||||
flush_delayed_work(&hub->init_work);
|
||||
usb_kill_urb(hub->urb);
|
||||
if (hub->has_indicators)
|
||||
cancel_delayed_work_sync(&hub->leds);
|
||||
|
|
@ -2759,6 +2792,8 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
|
|||
#define SET_CONFIG_TRIES (2 * (use_both_schemes + 1))
|
||||
#define USE_NEW_SCHEME(i, scheme) ((i) / 2 == (int)(scheme))
|
||||
|
||||
#define DETECT_DISCONNECT_TRIES 5
|
||||
|
||||
#define HUB_ROOT_RESET_TIME 60 /* times are in msec */
|
||||
#define HUB_SHORT_RESET_TIME 10
|
||||
#define HUB_BH_RESET_TIME 50
|
||||
|
|
@ -5394,6 +5429,8 @@ static void port_event(struct usb_hub *hub, int port1)
|
|||
struct usb_device *udev = port_dev->child;
|
||||
struct usb_device *hdev = hub->hdev;
|
||||
u16 portstatus, portchange;
|
||||
int i = 0;
|
||||
int err;
|
||||
|
||||
connect_change = test_bit(port1, hub->change_bits);
|
||||
clear_bit(port1, hub->event_bits);
|
||||
|
|
@ -5470,17 +5507,30 @@ static void port_event(struct usb_hub *hub, int port1)
|
|||
connect_change = 1;
|
||||
|
||||
/*
|
||||
* Warm reset a USB3 protocol port if it's in
|
||||
* SS.Inactive state.
|
||||
* Avoid trying to recover a USB3 SS.Inactive port with a warm reset if
|
||||
* the device was disconnected. A 12ms disconnect detect timer in
|
||||
* SS.Inactive state transitions the port to RxDetect automatically.
|
||||
* SS.Inactive link error state is common during device disconnect.
|
||||
*/
|
||||
if (hub_port_warm_reset_required(hub, port1, portstatus)) {
|
||||
dev_dbg(&port_dev->dev, "do warm reset\n");
|
||||
if (!udev || !(portstatus & USB_PORT_STAT_CONNECTION)
|
||||
while (hub_port_warm_reset_required(hub, port1, portstatus)) {
|
||||
if ((i++ < DETECT_DISCONNECT_TRIES) && udev) {
|
||||
u16 unused;
|
||||
|
||||
msleep(20);
|
||||
hub_port_status(hub, port1, &portstatus, &unused);
|
||||
dev_dbg(&port_dev->dev, "Wait for inactive link disconnect detect\n");
|
||||
continue;
|
||||
} else if (!udev || !(portstatus & USB_PORT_STAT_CONNECTION)
|
||||
|| udev->state == USB_STATE_NOTATTACHED) {
|
||||
if (hub_port_reset(hub, port1, NULL,
|
||||
HUB_BH_RESET_TIME, true) < 0)
|
||||
dev_dbg(&port_dev->dev, "do warm reset, port only\n");
|
||||
err = hub_port_reset(hub, port1, NULL,
|
||||
HUB_BH_RESET_TIME, true);
|
||||
if (!udev && err == -ENOTCONN)
|
||||
connect_change = 0;
|
||||
else if (err < 0)
|
||||
hub_port_disable(hub, port1, 1);
|
||||
} else {
|
||||
dev_dbg(&port_dev->dev, "do warm reset, full device\n");
|
||||
usb_unlock_port(port_dev);
|
||||
usb_lock_device(udev);
|
||||
usb_reset_device(udev);
|
||||
|
|
@ -5488,6 +5538,7 @@ static void port_event(struct usb_hub *hub, int port1)
|
|||
usb_lock_port(port_dev);
|
||||
connect_change = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (connect_change)
|
||||
|
|
|
|||
|
|
@ -368,6 +368,7 @@ static const struct usb_device_id usb_quirk_list[] = {
|
|||
{ USB_DEVICE(0x0781, 0x5591), .driver_info = USB_QUIRK_NO_LPM },
|
||||
|
||||
/* SanDisk Corp. SanDisk 3.2Gen1 */
|
||||
{ USB_DEVICE(0x0781, 0x5596), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
{ USB_DEVICE(0x0781, 0x55a3), .driver_info = USB_QUIRK_DELAY_INIT },
|
||||
|
||||
/* SanDisk Extreme 55AE */
|
||||
|
|
|
|||
|
|
@ -490,7 +490,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
|
|||
|
||||
/* Check that the pipe's type matches the endpoint's type */
|
||||
if (usb_pipe_type_check(urb->dev, urb->pipe))
|
||||
dev_WARN(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
|
||||
dev_warn_once(&dev->dev, "BOGUS urb xfer, pipe %x != type %x\n",
|
||||
usb_pipetype(urb->pipe), pipetypes[xfertype]);
|
||||
|
||||
/* Check against a simple/standard policy */
|
||||
|
|
|
|||
|
|
@ -529,6 +529,9 @@ static int dwc3_meson_g12a_remove(struct platform_device *pdev)
|
|||
|
||||
usb_role_switch_unregister(priv->role_switch);
|
||||
|
||||
put_device(priv->switch_desc.udc);
|
||||
put_device(priv->switch_desc.usb2_port);
|
||||
|
||||
of_platform_depopulate(dev);
|
||||
|
||||
for (i = 0 ; i < PHY_COUNT ; ++i) {
|
||||
|
|
|
|||
|
|
@ -641,13 +641,13 @@ static int dwc3_qcom_probe(struct platform_device *pdev)
|
|||
ret = reset_control_deassert(qcom->resets);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
|
||||
goto reset_assert;
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
|
||||
if (ret) {
|
||||
dev_err(dev, "failed to get clocks\n");
|
||||
goto reset_assert;
|
||||
return ret;
|
||||
}
|
||||
|
||||
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
||||
|
|
@ -729,8 +729,6 @@ clk_disable:
|
|||
if (qcom->gdsc)
|
||||
if (regulator_disable(qcom->gdsc))
|
||||
dev_err(qcom->dev, "unable to disable usb3 gdsc\n");
|
||||
reset_assert:
|
||||
reset_control_assert(qcom->resets);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -754,8 +752,6 @@ static int dwc3_qcom_remove(struct platform_device *pdev)
|
|||
}
|
||||
qcom->num_clocks = 0;
|
||||
|
||||
reset_control_assert(qcom->resets);
|
||||
|
||||
pm_runtime_allow(dev);
|
||||
pm_runtime_disable(dev);
|
||||
|
||||
|
|
|
|||
|
|
@ -3531,6 +3531,15 @@ out:
|
|||
static void dwc3_gadget_endpoint_transfer_not_ready(struct dwc3_ep *dep,
|
||||
const struct dwc3_event_depevt *event)
|
||||
{
|
||||
/*
|
||||
* During a device-initiated disconnect, a late xferNotReady event can
|
||||
* be generated after the End Transfer command resets the event filter,
|
||||
* but before the controller is halted. Ignore it to prevent a new
|
||||
* transfer from starting.
|
||||
*/
|
||||
if (!dep->dwc->connected)
|
||||
return;
|
||||
|
||||
dwc3_gadget_endpoint_frame_from_event(dep, event);
|
||||
(void) __dwc3_gadget_start_isoc(dep);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -678,6 +678,10 @@ int __init early_xdbc_setup_hardware(void)
|
|||
|
||||
xdbc.table_base = NULL;
|
||||
xdbc.out_buf = NULL;
|
||||
|
||||
early_iounmap(xdbc.xhci_base, xdbc.xhci_length);
|
||||
xdbc.xhci_base = NULL;
|
||||
xdbc.xhci_length = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -2322,6 +2322,11 @@ int composite_os_desc_req_prepare(struct usb_composite_dev *cdev,
|
|||
if (!cdev->os_desc_req->buf) {
|
||||
ret = -ENOMEM;
|
||||
usb_ep_free_request(ep0, cdev->os_desc_req);
|
||||
/*
|
||||
* Set os_desc_req to NULL so that composite_dev_cleanup()
|
||||
* will not try to free it again.
|
||||
*/
|
||||
cdev->os_desc_req = NULL;
|
||||
goto end;
|
||||
}
|
||||
cdev->os_desc_req->context = cdev;
|
||||
|
|
|
|||
|
|
@ -938,6 +938,8 @@ static ssize_t os_desc_qw_sign_store(struct config_item *item, const char *page,
|
|||
struct gadget_info *gi = os_desc_item_to_gadget_info(item);
|
||||
int res, l;
|
||||
|
||||
if (!len)
|
||||
return len;
|
||||
l = min((int)len, OS_STRING_QW_SIGN_LEN >> 1);
|
||||
if (page[l - 1] == '\n')
|
||||
--l;
|
||||
|
|
|
|||
|
|
@ -2551,6 +2551,7 @@ static int renesas_usb3_remove(struct platform_device *pdev)
|
|||
struct renesas_usb3 *usb3 = platform_get_drvdata(pdev);
|
||||
|
||||
debugfs_remove_recursive(usb3->dentry);
|
||||
put_device(usb3->host_dev);
|
||||
device_remove_file(&pdev->dev, &dev_attr_role);
|
||||
|
||||
cancel_work_sync(&usb3->role_work);
|
||||
|
|
|
|||
|
|
@ -629,8 +629,7 @@ static int xhci_enter_test_mode(struct xhci_hcd *xhci,
|
|||
if (!xhci->devs[i])
|
||||
continue;
|
||||
|
||||
retval = xhci_disable_slot(xhci, i);
|
||||
xhci_free_virt_device(xhci, i);
|
||||
retval = xhci_disable_and_free_slot(xhci, i);
|
||||
if (retval)
|
||||
xhci_err(xhci, "Failed to disable slot %d, %d. Enter test mode anyway\n",
|
||||
i, retval);
|
||||
|
|
|
|||
|
|
@ -879,21 +879,20 @@ free_tts:
|
|||
* will be manipulated by the configure endpoint, allocate device, or update
|
||||
* hub functions while this function is removing the TT entries from the list.
|
||||
*/
|
||||
void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
|
||||
void xhci_free_virt_device(struct xhci_hcd *xhci, struct xhci_virt_device *dev,
|
||||
int slot_id)
|
||||
{
|
||||
struct xhci_virt_device *dev;
|
||||
int i;
|
||||
int old_active_eps = 0;
|
||||
|
||||
/* Slot ID 0 is reserved */
|
||||
if (slot_id == 0 || !xhci->devs[slot_id])
|
||||
if (slot_id == 0 || !dev)
|
||||
return;
|
||||
|
||||
dev = xhci->devs[slot_id];
|
||||
|
||||
xhci->dcbaa->dev_context_ptrs[slot_id] = 0;
|
||||
if (!dev)
|
||||
return;
|
||||
/* If device ctx array still points to _this_ device, clear it */
|
||||
if (dev->out_ctx &&
|
||||
xhci->dcbaa->dev_context_ptrs[slot_id] == cpu_to_le64(dev->out_ctx->dma))
|
||||
xhci->dcbaa->dev_context_ptrs[slot_id] = 0;
|
||||
|
||||
trace_xhci_free_virt_device(dev);
|
||||
|
||||
|
|
@ -932,8 +931,9 @@ void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id)
|
|||
|
||||
if (dev->udev && dev->udev->slot_id)
|
||||
dev->udev->slot_id = 0;
|
||||
kfree(xhci->devs[slot_id]);
|
||||
xhci->devs[slot_id] = NULL;
|
||||
if (xhci->devs[slot_id] == dev)
|
||||
xhci->devs[slot_id] = NULL;
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -975,7 +975,7 @@ static void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_i
|
|||
out:
|
||||
/* we are now at a leaf device */
|
||||
xhci_debugfs_remove_slot(xhci, slot_id);
|
||||
xhci_free_virt_device(xhci, slot_id);
|
||||
xhci_free_virt_device(xhci, vdev, slot_id);
|
||||
}
|
||||
|
||||
int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id,
|
||||
|
|
@ -1214,6 +1214,8 @@ int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *ud
|
|||
ep0_ctx->deq = cpu_to_le64(dev->eps[0].ring->first_seg->dma |
|
||||
dev->eps[0].ring->cycle_state);
|
||||
|
||||
ep0_ctx->tx_info = cpu_to_le32(EP_AVG_TRB_LENGTH(8));
|
||||
|
||||
trace_xhci_setup_addressable_virt_device(dev);
|
||||
|
||||
/* Steps 7 and 8 were done in xhci_alloc_virt_device() */
|
||||
|
|
|
|||
|
|
@ -358,7 +358,8 @@ static int xhci_plat_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
usb3_hcd = xhci_get_usb3_hcd(xhci);
|
||||
if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4)
|
||||
if (usb3_hcd && HCC_MAX_PSA(xhci->hcc_params) >= 4 &&
|
||||
!(xhci->quirks & XHCI_BROKEN_STREAMS))
|
||||
usb3_hcd->can_do_streams = 1;
|
||||
|
||||
if (xhci->shared_hcd) {
|
||||
|
|
|
|||
|
|
@ -977,12 +977,15 @@ static void xhci_kill_endpoint_urbs(struct xhci_hcd *xhci,
|
|||
*/
|
||||
void xhci_hc_died(struct xhci_hcd *xhci)
|
||||
{
|
||||
bool notify;
|
||||
int i, j;
|
||||
|
||||
if (xhci->xhc_state & XHCI_STATE_DYING)
|
||||
return;
|
||||
|
||||
xhci_err(xhci, "xHCI host controller not responding, assume dead\n");
|
||||
notify = !(xhci->xhc_state & XHCI_STATE_REMOVING);
|
||||
if (notify)
|
||||
xhci_err(xhci, "xHCI host controller not responding, assume dead\n");
|
||||
xhci->xhc_state |= XHCI_STATE_DYING;
|
||||
|
||||
xhci_cleanup_command_queue(xhci);
|
||||
|
|
@ -996,7 +999,7 @@ void xhci_hc_died(struct xhci_hcd *xhci)
|
|||
}
|
||||
|
||||
/* inform usb core hc died if PCI remove isn't already handling it */
|
||||
if (!(xhci->xhc_state & XHCI_STATE_REMOVING))
|
||||
if (notify)
|
||||
usb_hc_died(xhci_to_hcd(xhci));
|
||||
}
|
||||
|
||||
|
|
@ -1259,7 +1262,8 @@ static void xhci_handle_cmd_enable_slot(struct xhci_hcd *xhci, int slot_id,
|
|||
command->slot_id = 0;
|
||||
}
|
||||
|
||||
static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id)
|
||||
static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id,
|
||||
u32 cmd_comp_code)
|
||||
{
|
||||
struct xhci_virt_device *virt_dev;
|
||||
struct xhci_slot_ctx *slot_ctx;
|
||||
|
|
@ -1274,6 +1278,10 @@ static void xhci_handle_cmd_disable_slot(struct xhci_hcd *xhci, int slot_id)
|
|||
if (xhci->quirks & XHCI_EP_LIMIT_QUIRK)
|
||||
/* Delete default control endpoint resources */
|
||||
xhci_free_device_endpoint_resources(xhci, virt_dev, true);
|
||||
if (cmd_comp_code == COMP_SUCCESS) {
|
||||
xhci->dcbaa->dev_context_ptrs[slot_id] = 0;
|
||||
xhci->devs[slot_id] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void xhci_handle_cmd_config_ep(struct xhci_hcd *xhci, int slot_id,
|
||||
|
|
@ -1513,7 +1521,7 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,
|
|||
xhci_handle_cmd_enable_slot(xhci, slot_id, cmd, cmd_comp_code);
|
||||
break;
|
||||
case TRB_DISABLE_SLOT:
|
||||
xhci_handle_cmd_disable_slot(xhci, slot_id);
|
||||
xhci_handle_cmd_disable_slot(xhci, slot_id, cmd_comp_code);
|
||||
break;
|
||||
case TRB_CONFIG_EP:
|
||||
if (!cmd->completion)
|
||||
|
|
@ -4225,7 +4233,8 @@ static int queue_command(struct xhci_hcd *xhci, struct xhci_command *cmd,
|
|||
|
||||
if ((xhci->xhc_state & XHCI_STATE_DYING) ||
|
||||
(xhci->xhc_state & XHCI_STATE_HALTED)) {
|
||||
xhci_dbg(xhci, "xHCI dying or halted, can't queue_command\n");
|
||||
xhci_dbg(xhci, "xHCI dying or halted, can't queue_command. state: 0x%x\n",
|
||||
xhci->xhc_state);
|
||||
return -ESHUTDOWN;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -139,7 +139,8 @@ int xhci_halt(struct xhci_hcd *xhci)
|
|||
ret = xhci_handshake(&xhci->op_regs->status,
|
||||
STS_HALT, STS_HALT, 3 * XHCI_MAX_HALT_USEC);
|
||||
if (ret) {
|
||||
xhci_warn(xhci, "Host halt failed, %d\n", ret);
|
||||
if (!(xhci->xhc_state & XHCI_STATE_DYING))
|
||||
xhci_warn(xhci, "Host halt failed, %d\n", ret);
|
||||
return ret;
|
||||
}
|
||||
xhci->xhc_state |= XHCI_STATE_HALTED;
|
||||
|
|
@ -204,7 +205,8 @@ int xhci_reset(struct xhci_hcd *xhci, u64 timeout_us)
|
|||
state = readl(&xhci->op_regs->status);
|
||||
|
||||
if (state == ~(u32)0) {
|
||||
xhci_warn(xhci, "Host not accessible, reset failed.\n");
|
||||
if (!(xhci->xhc_state & XHCI_STATE_DYING))
|
||||
xhci_warn(xhci, "Host not accessible, reset failed.\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
@ -4130,7 +4132,7 @@ static void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev)
|
|||
xhci_disable_slot(xhci, udev->slot_id);
|
||||
|
||||
spin_lock_irqsave(&xhci->lock, flags);
|
||||
xhci_free_virt_device(xhci, udev->slot_id);
|
||||
xhci_free_virt_device(xhci, virt_dev, udev->slot_id);
|
||||
spin_unlock_irqrestore(&xhci->lock, flags);
|
||||
|
||||
}
|
||||
|
|
@ -4179,6 +4181,16 @@ int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id)
|
|||
return ret;
|
||||
}
|
||||
|
||||
int xhci_disable_and_free_slot(struct xhci_hcd *xhci, u32 slot_id)
|
||||
{
|
||||
struct xhci_virt_device *vdev = xhci->devs[slot_id];
|
||||
int ret;
|
||||
|
||||
ret = xhci_disable_slot(xhci, slot_id);
|
||||
xhci_free_virt_device(xhci, vdev, slot_id);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* Checks if we have enough host controller resources for the default control
|
||||
* endpoint.
|
||||
|
|
@ -4284,8 +4296,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
|
|||
return 1;
|
||||
|
||||
disable_slot:
|
||||
xhci_disable_slot(xhci, udev->slot_id);
|
||||
xhci_free_virt_device(xhci, udev->slot_id);
|
||||
xhci_disable_and_free_slot(xhci, udev->slot_id);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -4414,8 +4425,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
|
|||
dev_warn(&udev->dev, "Device not responding to setup %s.\n", act);
|
||||
|
||||
mutex_unlock(&xhci->mutex);
|
||||
ret = xhci_disable_slot(xhci, udev->slot_id);
|
||||
xhci_free_virt_device(xhci, udev->slot_id);
|
||||
ret = xhci_disable_and_free_slot(xhci, udev->slot_id);
|
||||
if (!ret) {
|
||||
if (xhci_alloc_dev(hcd, udev) == 1)
|
||||
xhci_setup_addressable_virt_dev(xhci, udev);
|
||||
|
|
|
|||
|
|
@ -2031,7 +2031,7 @@ void xhci_dbg_trace(struct xhci_hcd *xhci, void (*trace)(struct va_format *),
|
|||
/* xHCI memory management */
|
||||
void xhci_mem_cleanup(struct xhci_hcd *xhci);
|
||||
int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags);
|
||||
void xhci_free_virt_device(struct xhci_hcd *xhci, int slot_id);
|
||||
void xhci_free_virt_device(struct xhci_hcd *xhci, struct xhci_virt_device *dev, int slot_id);
|
||||
int xhci_alloc_virt_device(struct xhci_hcd *xhci, int slot_id, struct usb_device *udev, gfp_t flags);
|
||||
int xhci_setup_addressable_virt_dev(struct xhci_hcd *xhci, struct usb_device *udev);
|
||||
void xhci_copy_ep0_dequeue_into_input_ctx(struct xhci_hcd *xhci,
|
||||
|
|
@ -2123,6 +2123,7 @@ void xhci_reset_bandwidth(struct usb_hcd *hcd, struct usb_device *udev);
|
|||
int xhci_update_hub_device(struct usb_hcd *hcd, struct usb_device *hdev,
|
||||
struct usb_tt *tt, gfp_t mem_flags);
|
||||
int xhci_disable_slot(struct xhci_hcd *xhci, u32 slot_id);
|
||||
int xhci_disable_and_free_slot(struct xhci_hcd *xhci, u32 slot_id);
|
||||
int xhci_ext_cap_init(struct xhci_hcd *xhci);
|
||||
|
||||
int xhci_suspend(struct xhci_hcd *xhci, bool do_wakeup);
|
||||
|
|
|
|||
|
|
@ -1910,6 +1910,7 @@ static int musb_gadget_stop(struct usb_gadget *g)
|
|||
* gadget driver here and have everything work;
|
||||
* that currently misbehaves.
|
||||
*/
|
||||
usb_gadget_set_state(g, USB_STATE_NOTATTACHED);
|
||||
|
||||
/* Force check of devctl register for PM runtime */
|
||||
schedule_delayed_work(&musb->irq_work, 0);
|
||||
|
|
@ -2018,6 +2019,7 @@ void musb_g_disconnect(struct musb *musb)
|
|||
case OTG_STATE_B_PERIPHERAL:
|
||||
case OTG_STATE_B_IDLE:
|
||||
musb->xceiv->otg->state = OTG_STATE_B_IDLE;
|
||||
usb_gadget_set_state(&musb->g, USB_STATE_NOTATTACHED);
|
||||
break;
|
||||
case OTG_STATE_B_SRP_INIT:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -476,13 +476,13 @@ static int omap2430_probe(struct platform_device *pdev)
|
|||
ARRAY_SIZE(musb_resources));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to add resources\n");
|
||||
goto err2;
|
||||
goto err_put_control_otghs;
|
||||
}
|
||||
|
||||
ret = platform_device_add_data(musb, pdata, sizeof(*pdata));
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to add platform_data\n");
|
||||
goto err2;
|
||||
goto err_put_control_otghs;
|
||||
}
|
||||
|
||||
pm_runtime_enable(glue->dev);
|
||||
|
|
@ -497,7 +497,9 @@ static int omap2430_probe(struct platform_device *pdev)
|
|||
|
||||
err3:
|
||||
pm_runtime_disable(glue->dev);
|
||||
|
||||
err_put_control_otghs:
|
||||
if (!IS_ERR(glue->control_otghs))
|
||||
put_device(glue->control_otghs);
|
||||
err2:
|
||||
platform_device_put(musb);
|
||||
|
||||
|
|
@ -511,6 +513,8 @@ static int omap2430_remove(struct platform_device *pdev)
|
|||
|
||||
platform_device_unregister(glue->musb);
|
||||
pm_runtime_disable(glue->dev);
|
||||
if (!IS_ERR(glue->control_otghs))
|
||||
put_device(glue->control_otghs);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -394,6 +394,7 @@ static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
|
|||
static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
|
||||
{
|
||||
bool vbus_is_on = false;
|
||||
enum usb_phy_events last_event = mxs_phy->phy.last_event;
|
||||
|
||||
/* If the SoCs don't need to disconnect line without vbus, quit */
|
||||
if (!(mxs_phy->data->flags & MXS_PHY_DISCONNECT_LINE_WITHOUT_VBUS))
|
||||
|
|
@ -405,7 +406,8 @@ static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)
|
|||
|
||||
vbus_is_on = mxs_phy_get_vbus_status(mxs_phy);
|
||||
|
||||
if (on && !vbus_is_on && !mxs_phy_is_otg_host(mxs_phy))
|
||||
if (on && ((!vbus_is_on && !mxs_phy_is_otg_host(mxs_phy))
|
||||
|| (last_event == USB_EVENT_VBUS)))
|
||||
__mxs_phy_disconnect_line(mxs_phy, true);
|
||||
else
|
||||
__mxs_phy_disconnect_line(mxs_phy, false);
|
||||
|
|
|
|||
|
|
@ -781,6 +781,8 @@ static const struct usb_device_id id_table_combined[] = {
|
|||
.driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_NDI_AURORA_SCU_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
|
||||
{ USB_DEVICE(FTDI_NDI_VID, FTDI_NDI_EMGUIDE_GEMINI_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_NDI_device_quirk },
|
||||
{ USB_DEVICE(TELLDUS_VID, TELLDUS_TELLSTICK_PID) },
|
||||
{ USB_DEVICE(NOVITUS_VID, NOVITUS_BONO_E_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, RTSYSTEMS_USB_VX8_PID) },
|
||||
|
|
|
|||
|
|
@ -197,6 +197,9 @@
|
|||
#define FTDI_NDI_FUTURE_3_PID 0xDA73 /* NDI future device #3 */
|
||||
#define FTDI_NDI_AURORA_SCU_PID 0xDA74 /* NDI Aurora SCU */
|
||||
|
||||
#define FTDI_NDI_VID 0x23F2
|
||||
#define FTDI_NDI_EMGUIDE_GEMINI_PID 0x0003 /* NDI Emguide Gemini */
|
||||
|
||||
/*
|
||||
* ChamSys Limited (www.chamsys.co.uk) USB wing/interface product IDs
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1415,6 +1415,9 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = NCTRL(5) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d0, 0xff, 0xff, 0x60) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x30), /* Telit FE910C04 (ECM) */
|
||||
.driver_info = NCTRL(4) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10c7, 0xff, 0xff, 0x40) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x30), /* Telit FN990B (MBIM) */
|
||||
.driver_info = NCTRL(6) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TELIT_VENDOR_ID, 0x10d1, 0xff, 0xff, 0x40) },
|
||||
|
|
@ -2343,6 +2346,10 @@ static const struct usb_device_id option_ids[] = {
|
|||
.driver_info = RSVD(3) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe145, 0xff), /* Foxconn T99W651 RNDIS */
|
||||
.driver_info = RSVD(5) | RSVD(6) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe15f, 0xff), /* Foxconn T99W709 */
|
||||
.driver_info = RSVD(5) },
|
||||
{ USB_DEVICE_INTERFACE_CLASS(0x0489, 0xe167, 0xff), /* Foxconn T99W640 MBIM */
|
||||
.driver_info = RSVD(3) },
|
||||
{ USB_DEVICE(0x1508, 0x1001), /* Fibocom NL668 (IOT version) */
|
||||
.driver_info = RSVD(4) | RSVD(5) | RSVD(6) },
|
||||
{ USB_DEVICE(0x1782, 0x4d10) }, /* Fibocom L610 (AT mode) */
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ static int rts51x_bulk_transport(struct us_data *us, u8 lun,
|
|||
return USB_STOR_TRANSPORT_ERROR;
|
||||
}
|
||||
|
||||
residue = bcs->Residue;
|
||||
residue = le32_to_cpu(bcs->Residue);
|
||||
if (bcs->Tag != us->tag)
|
||||
return USB_STOR_TRANSPORT_ERROR;
|
||||
|
||||
|
|
|
|||
|
|
@ -934,6 +934,13 @@ UNUSUAL_DEV( 0x05e3, 0x0723, 0x9451, 0x9451,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_SANE_SENSE ),
|
||||
|
||||
/* Added by Maël GUERIN <[email protected]> */
|
||||
UNUSUAL_DEV( 0x0603, 0x8611, 0x0000, 0xffff,
|
||||
"Novatek",
|
||||
"NTK96550-based camera",
|
||||
USB_SC_SCSI, USB_PR_BULK, NULL,
|
||||
US_FL_BULK_IGNORE_TAG ),
|
||||
|
||||
/*
|
||||
* Reported by Hanno Boeck <hanno@gmx.de>
|
||||
* Taken from the Lycoris Kernel
|
||||
|
|
@ -1483,6 +1490,28 @@ UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999,
|
|||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_NO_WP_DETECT ),
|
||||
|
||||
/*
|
||||
* Reported by Zenm Chen <zenmchen@gmail.com>
|
||||
* Ignore driver CD mode, otherwise usb_modeswitch may fail to switch
|
||||
* the device into Wi-Fi mode.
|
||||
*/
|
||||
UNUSUAL_DEV( 0x0bda, 0x1a2b, 0x0000, 0xffff,
|
||||
"Realtek",
|
||||
"DISK",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_DEVICE ),
|
||||
|
||||
/*
|
||||
* Reported by Zenm Chen <zenmchen@gmail.com>
|
||||
* Ignore driver CD mode, otherwise usb_modeswitch may fail to switch
|
||||
* the device into Wi-Fi mode.
|
||||
*/
|
||||
UNUSUAL_DEV( 0x0bda, 0xa192, 0x0000, 0xffff,
|
||||
"Realtek",
|
||||
"DISK",
|
||||
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
|
||||
US_FL_IGNORE_DEVICE ),
|
||||
|
||||
UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999,
|
||||
"Maxtor",
|
||||
"USB to SATA",
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@ struct fusb302_chip {
|
|||
bool vconn_on;
|
||||
bool vbus_on;
|
||||
bool charge_on;
|
||||
bool pd_rx_on;
|
||||
bool vbus_present;
|
||||
enum typec_cc_polarity cc_polarity;
|
||||
enum typec_cc_status cc1;
|
||||
|
|
@ -841,6 +842,11 @@ static int tcpm_set_pd_rx(struct tcpc_dev *dev, bool on)
|
|||
int ret = 0;
|
||||
|
||||
mutex_lock(&chip->lock);
|
||||
if (chip->pd_rx_on == on) {
|
||||
fusb302_log(chip, "pd is already %s", on ? "on" : "off");
|
||||
goto done;
|
||||
}
|
||||
|
||||
ret = fusb302_pd_rx_flush(chip);
|
||||
if (ret < 0) {
|
||||
fusb302_log(chip, "cannot flush pd rx buffer, ret=%d", ret);
|
||||
|
|
@ -863,6 +869,8 @@ static int tcpm_set_pd_rx(struct tcpc_dev *dev, bool on)
|
|||
on ? "on" : "off", ret);
|
||||
goto done;
|
||||
}
|
||||
|
||||
chip->pd_rx_on = on;
|
||||
fusb302_log(chip, "pd := %s", on ? "on" : "off");
|
||||
done:
|
||||
mutex_unlock(&chip->lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue