android_kernel_xiaomi_sm8350/drivers/scsi/ufs/ufs.h
Blagovest Kolenichev c8f071d27c Merge android-5.4-stable.50 (a200ad5) into msm-5.4
* refs/heads/tmp-a200ad5:
  Revert "usb: dwc3: gadget: Properly handle ClearFeature(halt)"
  Revert "ANDROID: kbuild: merge more sections with LTO"
  Revert "FROMLIST: f2fs: fix use-after-free when accessing bio->bi_crypt_context"
  Linux 5.4.50
  Revert "tty: hvc: Fix data abort due to race in hvc_open"
  xfs: add agf freeblocks verify in xfs_agf_verify
  dm writecache: add cond_resched to loop in persistent_memory_claim()
  dm writecache: correct uncommitted_block when discarding uncommitted entry
  xprtrdma: Fix handling of RDMA_ERROR replies
  NFSv4 fix CLOSE not waiting for direct IO compeletion
  pNFS/flexfiles: Fix list corruption if the mirror count changes
  SUNRPC: Properly set the @subbuf parameter of xdr_buf_subsegment()
  sunrpc: fixed rollback in rpc_gssd_dummy_populate()
  Staging: rtl8723bs: prevent buffer overflow in update_sta_support_rate()
  drm/amdgpu: add fw release for sdma v5_0
  drm/radeon: fix fb_div check in ni_init_smc_spll_table()
  drm: rcar-du: Fix build error
  drm/amd: fix potential memleak in err branch
  ring-buffer: Zero out time extend if it is nested and not absolute
  tracing: Fix event trigger to accept redundant spaces
  arm64: dts: imx8mn-ddr4-evk: correct ldo1/ldo2 voltage range
  arm64: dts: imx8mm-evk: correct ldo1/ldo2 voltage range
  arm64: perf: Report the PC value in REGS_ABI_32 mode
  mm/memcontrol.c: add missed css_put()
  ocfs2: fix panic on nfs server over ocfs2
  ocfs2: fix value of OCFS2_INVALID_SLOT
  ocfs2: load global_inode_alloc
  ocfs2: avoid inode removal while nfsd is accessing it
  mm/slab: use memzero_explicit() in kzfree()
  btrfs: fix failure of RWF_NOWAIT write into prealloc extent beyond eof
  btrfs: check if a log root exists before locking the log_mutex on unlink
  btrfs: fix data block group relocation failure due to concurrent scrub
  btrfs: fix bytes_may_use underflow when running balance and scrub in parallel
  x86/asm/64: Align start of __clear_user() loop to 16-bytes
  x86/cpu: Use pinning mask for CR4 bits needing to be 0
  KVM: VMX: Stop context switching MSR_IA32_UMWAIT_CONTROL
  KVM: nVMX: Plumb L2 GPA through to PML emulation
  KVM: X86: Fix MSR range of APIC registers in X2APIC mode
  erofs: fix partially uninitialized misuse in z_erofs_onlinepage_fixup
  ACPI: configfs: Disallow loading ACPI tables when locked down
  ACPI: sysfs: Fix pm_profile_attr type
  ALSA: hda/realtek: Add mute LED and micmute LED support for HP systems
  ALSA: hda/realtek - Add quirk for MSI GE63 laptop
  ALSA: hda: Add NVIDIA codec IDs 9a & 9d through a0 to patch table
  RISC-V: Don't allow write+exec only page mapping request in mmap
  block: update hctx map when use multiple maps
  blktrace: break out of blktrace setup on concurrent calls
  kprobes: Suppress the suspicious RCU warning on kprobes
  recordmcount: support >64k sections
  kbuild: improve cc-option to clean up all temporary files
  arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n
  s390/vdso: fix vDSO clock_getres()
  s390/vdso: Use $(LD) instead of $(CC) to link vDSO
  s390/ptrace: fix setting syscall number
  s390/ptrace: pass invalid syscall numbers to tracing
  pinctrl: tegra: Use noirq suspend/resume callbacks
  pinctrl: qcom: spmi-gpio: fix warning about irq chip reusage
  test_objagg: Fix potential memory leak in error handling
  net: alx: fix race condition in alx_remove
  ibmvnic: Harden device login requests
  hwrng: ks-sa - Fix runtime PM imbalance on error
  riscv/atomic: Fix sign extension for RV64I
  drm/amd/display: Use kfree() to free rgb_user in calculate_user_regamma_ramp()
  ata/libata: Fix usage of page address by page_address in ata_scsi_mode_select_xlat function
  sata_rcar: handle pm_runtime_get_sync failure cases
  sched/core: Fix PI boosting between RT and DEADLINE tasks
  sched/deadline: Initialize ->dl_boosted
  afs: Fix storage of cell names
  i2c: core: check returned size of emulated smbus block read
  i2c: fsi: Fix the port number field in status register
  clk: sifive: allocate sufficient memory for struct __prci_data
  net: bcmgenet: use hardware padding of runt frames
  netfilter: ipset: fix unaligned atomic access
  nvme: don't protect ns mutation with ns->head->lock
  usb: renesas_usbhs: getting residue from callback_result
  usb: gadget: udc: Potential Oops in error handling code
  scsi: lpfc: Avoid another null dereference in lpfc_sli4_hba_unset()
  ARM: imx5: add missing put_device() call in imx_suspend_alloc_ocram()
  cxgb4: move handling L2T ARP failures to caller
  net: qede: fix use-after-free on recovery and AER handling
  net: qede: fix PTP initialization on recovery
  net: qed: fix excessive QM ILT lines consumption
  net: qed: fix NVMe login fails over VFs
  net: qede: stop adding events on an already destroyed workqueue
  net: qed: fix async event callbacks unregistering
  net: qed: fix left elements count calculation
  iommu/vt-d: Update scalable mode paging structure coherency
  iommu/vt-d: Enable PCI ACS for platform opt in hint
  selftests/net: report etf errors correctly
  RDMA/mad: Fix possible memory leak in ib_mad_post_receive_mads()
  s390/qeth: fix error handling for isolation mode cmds
  ASoC: rockchip: Fix a reference count leak.
  RDMA/cma: Protect bind_list and listen_list while finding matching cm id
  RDMA/qedr: Fix KASAN: use-after-free in ucma_event_handler+0x532
  RDMA/rvt: Fix potential memory leak caused by rvt_alloc_rq
  rxrpc: Fix handling of rwind from an ACK packet
  ARM: dts: NSP: Correct FA2 mailbox node
  bpf: Don't return EINVAL from {get,set}sockopt when optlen > PAGE_SIZE
  devmap: Use bpf_map_area_alloc() for allocating hash buckets
  regmap: Fix memory leak from regmap_register_patch
  x86/resctrl: Fix a NULL vs IS_ERR() static checker warning in rdt_cdp_peer_get()
  ARM: dts: Fix duovero smsc interrupt for suspend
  ARM: dts: am335x-pocketbeagle: Fix mmc0 Write Protect
  bpf, xdp, samples: Fix null pointer dereference in *_user code
  samples/bpf: xdp_redirect_cpu: Set MAX_CPUS according to NR_CPUS
  ASoC: fsl_ssi: Fix bclk calculation for mono channel
  RDMA/siw: Fix pointer-to-int-cast warning in siw_rx_pbl()
  regualtor: pfuze100: correct sw1a/sw2 on pfuze3000
  ASoC: qcom: common: set correct directions for dailinks
  ASoc: q6afe: add support to get port direction
  efi/esrt: Fix reference count leak in esre_create_sysfs_entry.
  efi/tpm: Verify event log header before parsing
  ASoC: q6asm: handle EOS correctly
  xfrm: Fix double ESP trailer insertion in IPsec crypto offload.
  ARM: OMAP2+: Fix legacy mode dss_reset
  bus: ti-sysc: Ignore clockactivity unless specified as a quirk
  bus: ti-sysc: Flush posted write on enable and disable
  IB/hfi1: Fix module use count flaw due to leftover module put calls
  IB/mad: Fix use after free when destroying MAD agent
  loop: replace kill_bdev with invalidate_bdev
  cdc-acm: Add DISABLE_ECHO quirk for Microchip/SMSC chip
  xhci: Return if xHCI doesn't support LPM
  xhci: Fix enumeration issue when setting max packet size for FS devices.
  xhci: Fix incorrect EP_STATE_MASK
  cifs/smb3: Fix data inconsistent when zero file range
  cifs/smb3: Fix data inconsistent when punch hole
  cifs: Fix cached_fid refcnt leak in open_shroot
  scsi: zfcp: Fix panic on ERP timeout for previously dismissed ERP action
  scsi: qla2xxx: Keep initiator ports after RSCN
  usb: cdns3: ep0: add spinlock for cdns3_check_new_setup
  usb: cdns3: ep0: fix the test mode set incorrectly
  usb: cdns3: trace: using correct dir value
  ALSA: usb-audio: Fix OOB access of mixer element list
  ALSA: usb-audio: add quirk for Samsung USBC Headset (AKG)
  ALSA: usb-audio: add quirk for Denon DCD-1500RE
  ALSA: usb-audio: Add implicit feedback quirk for SSL2+.
  usb: typec: tcpci_rt1711h: avoid screaming irq causing boot hangs
  usb: host: ehci-exynos: Fix error check in exynos_ehci_probe()
  xhci: Poll for U0 after disabling USB2 LPM
  usb: host: xhci-mtk: avoid runtime suspend when removing hcd
  USB: ehci: reopen solution for Synopsys HC bug
  usb: add USB_QUIRK_DELAY_INIT for Logitech C922
  usb: dwc2: Postponed gadget registration to the udc class driver
  USB: ohci-sm501: Add missed iounmap() in remove
  binder: fix null deref of proc->context
  ALSA: usb-audio: Fix potential use-after-free of streams
  fix a braino in "sparc32: fix register window handling in genregs32_[gs]et()"
  net: sched: export __netdev_watchdog_up()
  btrfs: fix a block group ref counter leak after failure to remove block group
  Revert "i2c: tegra: Fix suspending in active runtime PM state"
  tcp_cubic: fix spurious HYSTART_DELAY exit upon drop in min RTT
  sch_cake: fix a few style nits
  sch_cake: don't call diffserv parsing code when it is not needed
  sch_cake: don't try to reallocate or unshare skb unconditionally
  ip_tunnel: fix use-after-free in ip_tunnel_lookup()
  net: phy: Check harder for errors in get_phy_id()
  ip6_gre: fix use-after-free in ip6gre_tunnel_lookup()
  tg3: driver sleeps indefinitely when EEH errors exceed eeh_max_freezes
  tcp: grow window for OOO packets only for SACK flows
  tcp: don't ignore ECN CWR on pure ACK
  sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
  rxrpc: Fix notification call on completion of discarded calls
  rocker: fix incorrect error handling in dma_rings_init
  openvswitch: take into account de-fragmentation/gso_size in execute_check_pkt_len
  net: usb: ax88179_178a: fix packet alignment padding
  net: increment xmit_recursion level in dev_direct_xmit()
  net: Fix the arp error in some cases
  net: fix memleak in register_netdevice()
  net: Do not clear the sock TX queue in sk_set_socket()
  net: core: reduce recursion limit value
  net: bridge: enfore alignment for ethernet address
  mvpp2: ethtool rxtx stats fix
  mld: fix memory leak in ipv6_mc_destroy_dev()
  ibmveth: Fix max MTU limit
  geneve: allow changing DF behavior after creation
  enetc: Fix tx rings bitmap iteration range, irq handling
  block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed
  ANDROID: GKI: revert part of the ufshcd_* export removals
  ANDROID: GKI: update ABI definitions based on recent wifi backports
  BACKPORT: cfg80211: Configure PMK lifetime and reauth threshold for PMKSA entries
  BACKPORT: nl80211: add no pre-auth attribute and ext. feature flag for ctrl. port
  BACKPORT: nl80211: modify TID-config API
  BACKPORT: nl80211: Add NL command to support TID speicific configurations
  BACKPORT: cfg80211: Support key configuration for Beacon protection (BIGTK)
  BACKPORT: cfg80211: More error messages for key addition failures
  BACKPORT: cfg80211: Enhance the AKM advertizement to support per interface.
  BACKPORT: nl80211: add handling for BSS color
  BACKPORT: cfg80211: VLAN offload support for set_key and set_sta_vlan
  Revert "ANDROID: fscrypt: add key removal notifier chain"
  UPSTREAM: scsi: ufs: Fix imprecise load calculation in devfreq window
  UPSTREAM: scsi: ufs: Add trace event for UIC commands
  UPSTREAM: scsi: ufs: Add DELAY_BEFORE_LPM quirk for Micron devices
  UPSTREAM: scsi: ufs-mediatek: Allow unbound mphy
  UPSTREAM: scsi: ufs-mediatek: Fix unbalanced clock on/off
  UPSTREAM: scsi: ufs-mediatek: Introduce low-power mode for device power supply
  UPSTREAM: scsi: ufs-mediatek: Do not gate clocks if auto-hibern8 is not entered yet
  UPSTREAM: scsi: ufs-mediatek: Fix imprecise waiting time for ref-clk control
  BACKPORT: scsi: ufs: Disable WriteBooster capability in non-supported UFS device
  BACKPORT: scsi: ufs: Fix WriteBooster flush during runtime suspend
  BACKPORT: scsi: ufs: Fix index of attributes query for WriteBooster feature
  BACKPORT: scsi: ufs: Allow WriteBooster on UFS 2.2 devices
  UPSTREAM: scsi: ufs-mediatek: Customize WriteBooster flush policy
  UPSTREAM: scsi: ufs: Customize flush threshold for WriteBooster
  BACKPORT: scsi: ufs: Introduce ufs_hba_variant_params to group customizable parameters
  UPSTREAM: scsi: ufs-mediatek: Make ufs_mtk_fixup_dev_quirks static
  UPSTREAM: scsi: ufs: Cleanup WriteBooster feature
  UPSTREAM: scsi: ufs-mediatek: Enable WriteBooster capability
  BACKPORT: scsi: ufs: Add LU Dedicated buffer mode support for WriteBooster
  BACKPORT: scsi: ufs: Add "index" in parameter list of ufshcd_query_flag()
  UPSTREAM: scsi: ufs-mediatek: Add fixup_dev_quirks vops
  UPSTREAM: scsi: ufs: Export ufs_fixup_device_setup() function
  BACKPORT: scsi: ufs: Introduce fixup_dev_quirks vops
  UPSTREAM: scsi: ufs-mediatek: add error recovery for suspend and resume
  UPSTREAM: scsi: ufs: export ufshcd_link_recovery
  UPSTREAM: scsi: ufs-mediatek: customize the delay for enabling host
  UPSTREAM: scsi: ufs: make HCE polling more compact to improve initialization latency
  BACKPORT: scsi: ufs: allow custom delay prior to host enabling
  UPSTREAM: scsi: ufs-mediatek: use common delay function
  UPSTREAM: scsi: ufs: introduce common and flexible delay function
  UPSTREAM: scsi: ufs: fix uninitialized tx_lanes in ufshcd_disable_tx_lcc()
  UPSTREAM: scsi: ufs-mediatek: fix HOST_PA_TACTIVATE quirk for Samsung UFS Devices
  BACKPORT: scsi: ufs: Add max_lu_supported in struct ufs_dev_info
  ANDROID: GKI: remove ufshcd_* exports from whitelists
  ANDROID: GKI: enable CONFIG_SCSI_UFS_DWC_TC_PLATFORM
  ANDROID: GKI: enable QCOM and HISI UFS drivers
  ANDROID: GKI: enable UFS for x86 gki builds and SCSI_UFSHCD_PCI
  UPSTREAM: amba: Retry adding deferred devices at late_initcall
  ANDROID: GKI: Enable INTERVAL_TREE
  FROMGIT: binder: fix null deref of proc->context
  ANDROID: Makefile: append BUILD_NUMBER to version string when defined
  ANDROID: GKI: update the abi definitions due to 5.4.49 and padding
  ANDROID: GKI: USB: Gadget: add Android ABI padding to struct usb_gadget
  ANDROID: GKI: sound/usb/card.h: add Android ABI padding to struct snd_usb_endpoint
  ANDROID: ext4: Optimize match for casefolded encrypted dirs
  ANDROID: ext4: Handle casefolding with encryption
  Linux 5.4.49
  net: core: device_rename: Use rwsem instead of a seqcount
  sched/rt, net: Use CONFIG_PREEMPTION.patch
  pwm: jz4740: Enhance precision in calculation of duty cycle
  net: octeon: mgmt: Repair filling of RX ring
  e1000e: Do not wake up the system via WOL if device wakeup is disabled
  kretprobe: Prevent triggering kretprobe from within kprobe_flush_task
  kprobes: Fix to protect kick_kprobe_optimizer() by kprobe_mutex
  tracing/probe: Fix memleak in fetch_op_data operations
  crypto: algboss - don't wait during notifier callback
  crypto: algif_skcipher - Cap recv SG list at ctx->used
  Revert "drm/amd/display: disable dcn20 abm feature for bring up"
  drm/i915/icl+: Fix hotplug interrupt disabling after storm detection
  drm/amd/display: Use kvfree() to free coeff in build_regamma()
  drm/connector: notify userspace on hotplug after register complete
  drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
  drm/i915/gem: Avoid iterating an empty list
  drm/msm: Check for powered down HW in the devfreq callbacks
  drm/i915: Fix AUX power domain toggling across TypeC mode resets
  s390: fix syscall_get_error for compat processes
  f2fs: avoid utf8_strncasecmp() with unstable name
  f2fs: split f2fs_d_compare() from f2fs_match_name()
  net/mlx5: DR, Fix freeing in dr_create_rc_qp()
  block: nr_sects_write(): Disable preemption on seqcount write
  x86/boot/compressed: Relax sed symbol type regex for LLVM ld.lld
  drm/amd/display: Use swap() where appropriate
  drm/dp_mst: Increase ACT retry timeout to 3s
  ext4: avoid race conditions when remounting with options that change dax
  jbd2: clean __jbd2_journal_abort_hard() and __journal_abort_soft()
  selinux: fix double free
  drm/amdgpu: Replace invalid device ID with a valid device ID
  drm/qxl: Use correct notify port address when creating cursor ring
  drm/dp_mst: Reformat drm_dp_check_act_status() a bit
  ext4: avoid utf8_strncasecmp() with unstable name
  ext4: fix partial cluster initialization when splitting extent
  drm: encoder_slave: fix refcouting error for modules
  libata: Use per port sync for detach
  arm64: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints
  mvpp2: remove module bugfix
  block: Fix use-after-free in blkdev_get()
  scsi: ufs-bsg: Fix runtime PM imbalance on error
  bnxt_en: Return from timer if interface is not in open state.
  afs: Fix the mapping of the UAEOVERFLOW abort code
  afs: Set error flag rather than return error from file status decode
  afs: Always include dir in bulk status fetch from afs_do_lookup()
  afs: Fix EOF corruption
  afs: afs_write_end() should change i_size under the right lock
  afs: Fix non-setting of mtime when writing into mmap
  powerpc: Fix kernel crash in show_instructions() w/DEBUG_VIRTUAL
  bcache: fix potential deadlock problem in btree_gc_coalesce
  ext4: stop overwrite the errcode in ext4_setup_super
  perf stat: Fix NULL pointer dereference
  perf report: Fix NULL pointer dereference in hists__fprintf_nr_sample_events()
  usb/ehci-platform: Set PM runtime as active on resume
  usb: host: ehci-platform: add a quirk to avoid stuck
  usb/xhci-plat: Set PM runtime as active on resume
  bpf: Fix memlock accounting for sock_hash
  iavf: fix speed reporting over virtchnl
  xdp: Fix xsk_generic_xmit errno
  nfs: set invalid blocks after NFSv4 writes
  nvme-pci: use simple suspend when a HMB is enabled
  net/filter: Permit reading NET in load_bytes_relative when MAC not set
  x86/idt: Keep spurious entries unset in system_vectors
  scsi: acornscsi: Fix an error handling path in acornscsi_probe()
  libbpf: Handle GCC noreturn-turned-volatile quirk
  drm/sun4i: hdmi ddc clk: Fix size of m divider
  tracing/probe: Fix bpf_task_fd_query() for kprobes and uprobes
  bpf, sockhash: Synchronize delete from bucket list on map free
  bpf/sockmap: Fix kernel panic at __tcp_bpf_recvmsg
  ASoC: rt5645: Add platform-data for Asus T101HA
  ASoC: Intel: bytcr_rt5640: Add quirk for Toshiba Encore WT10-A tablet
  ASoC: SOF: nocodec: conditionally set dpcm_capture/dpcm_playback flags
  ASoC: core: only convert non DPCM link to DPCM link
  afs: Fix memory leak in afs_put_sysnames()
  f2fs: don't return vmalloc() memory from f2fs_kmalloc()
  selftests/net: in timestamping, strncpy needs to preserve null byte
  drivers/perf: hisi: Fix wrong value for all counters enable
  i2c: icy: Fix build with CONFIG_AMIGA_PCMCIA=n
  NTB: ntb_test: Fix bug when counting remote files
  NTB: perf: Fix race condition when run with ntb_test
  NTB: perf: Fix support for hardware that doesn't have port numbers
  NTB: perf: Don't require one more memory window than number of peers
  NTB: Revert the change to use the NTB device dev for DMA allocations
  NTB: ntb_tool: reading the link file should not end in a NULL byte
  ntb_tool: pass correct struct device to dma_alloc_coherent
  ntb_perf: pass correct struct device to dma_alloc_coherent
  net: marvell: Fix OF_MDIO config check
  gfs2: fix use-after-free on transaction ail lists
  blktrace: fix endianness for blk_log_remap()
  blktrace: fix endianness in get_pdu_int()
  blktrace: use errno instead of bi_status
  selftests/vm/pkeys: fix alloc_random_pkey() to make it really random
  include/linux/bitops.h: avoid clang shift-count-overflow warnings
  lib/zlib: remove outdated and incorrect pre-increment optimization
  geneve: change from tx_error to tx_dropped on missing metadata
  crypto: omap-sham - add proper load balancing support for multicore
  drm/amd/display: Revalidate bandwidth before commiting DC updates
  nfsd: safer handling of corrupted c_type
  pinctrl: freescale: imx: Fix an error handling path in 'imx_pinctrl_probe()'
  pinctrl: imxl: Fix an error handling path in 'imx1_pinctrl_core_probe()'
  scsi: ufs: Don't update urgent bkops level when toggling auto bkops
  scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
  gfs2: Allow lock_nolock mount to specify jid=X
  nfsd4: make drc_slab global, not per-net
  ceph: don't return -ESTALE if there's still an open file
  drm/nouveau/disp/gm200-: fix NV_PDISP_SOR_HDMI2_CTRL(n) selection
  openrisc: Fix issue with argument clobbering for clone/fork
  rxrpc: Adjust /proc/net/rxrpc/calls to display call->debug_id not user_ID
  mailbox: zynqmp-ipi: Fix NULL vs IS_ERR() check in zynqmp_ipi_mbox_probe()
  rtc: rv3028: Add missed check for devm_regmap_init_i2c()
  vfio/mdev: Fix reference count leak in add_mdev_supported_type
  ASoC: fsl_asrc_dma: Fix dma_chan leak when config DMA channel failed
  extcon: adc-jack: Fix an error handling path in 'adc_jack_probe()'
  powerpc/4xx: Don't unmap NULL mbase
  input: i8042 - Remove special PowerPC handling
  of: Fix a refcounting bug in __of_attach_node_sysfs()
  NFSv4.1 fix rpc_call_done assignment for BIND_CONN_TO_SESSION
  net: sunrpc: Fix off-by-one issues in 'rpc_ntop6'
  /dev/mem: Revoke mappings when a driver claims the region
  misc: xilinx-sdfec: improve get_user_pages_fast() error handling
  clk: ast2600: Fix AHB clock divider for A1
  clk: sprd: return correct type of value for _sprd_pll_recalc_rate
  KVM: PPC: Book3S: Fix some RCU-list locks
  KVM: PPC: Book3S HV: Ignore kmemleak false positives
  scsi: ufs-qcom: Fix scheduling while atomic issue
  clk: bcm2835: Fix return type of bcm2835_register_gate
  scsi: target: tcmu: Fix a use after free in tcmu_check_expired_queue_cmd()
  ASoC: fix incomplete error-handling in img_i2s_in_probe.
  powerpc/32s: Don't warn when mapping RO data ROX.
  mfd: stmfx: Disable IRQ in suspend to avoid spurious interrupt
  mfd: stmfx: Fix stmfx_irq_init error path
  mfd: stmfx: Reset chip on resume as supply was disabled
  x86/apic: Make TSC deadline timer detection message visible
  RDMA/iw_cxgb4: cleanup device debugfs entries on ULD remove
  scripts: headers_install: Exit with error on config leak
  usb: gadget: Fix issue with config_ep_by_speed function
  usb: gadget: fix potential double-free in m66592_probe.
  usb: gadget: lpc32xx_udc: don't dereference ep pointer before null check
  USB: gadget: udc: s3c2410_udc: Remove pointless NULL check in s3c2410_udc_nuke
  usb: dwc2: gadget: move gadget resume after the core is in L0 state
  watchdog: da9062: No need to ping manually before setting timeout
  IB/cma: Fix ports memory leak in cma_configfs
  PCI: amlogic: meson: Don't use FAST_LINK_MODE to set up link
  PCI: dwc: Fix inner MSI IRQ domain registration
  PCI/PTM: Inherit Switch Downstream Port PTM settings from Upstream Port
  dm zoned: return NULL if dmz_get_zone_for_reclaim() fails to find a zone
  powerpc/64s/pgtable: fix an undefined behaviour
  arm64: tegra: Fix flag for 64-bit resources in 'ranges' property
  arm64: tegra: Fix ethernet phy-mode for Jetson Xavier
  fuse: copy_file_range should truncate cache
  fuse: fix copy_file_range cache issues
  firmware: imx: scu: Fix possible memory leak in imx_scu_probe()
  scsi: target: tcmu: Userspace must not complete queued commands
  RDMA/hns: Fix cmdq parameter of querying pf timer resource
  RDMA/hns: Bugfix for querying qkey
  clk: samsung: exynos5433: Add IGNORE_UNUSED flag to sclk_i2s1
  fpga: dfl: afu: Corrected error handling levels
  tty: n_gsm: Fix bogus i++ in gsm_data_kick
  USB: host: ehci-mxc: Add error handling in ehci_mxc_drv_probe()
  ASoC: Intel: bytcr_rt5640: Add quirk for Toshiba Encore WT8-A tablet
  drm/msm/mdp5: Fix mdp5_init error path for failed mdp5_kms allocation
  usb/ohci-platform: Fix a warning when hibernating
  vfio-pci: Mask cap zero
  powerpc/ps3: Fix kexec shutdown hang
  drivers: phy: sr-usb: do not use internal fsm for USB2 phy init
  powerpc/pseries/ras: Fix FWNMI_VALID off by one
  powerpc/64s/exception: Fix machine check no-loss idle wakeup
  ipmi: use vzalloc instead of kmalloc for user creation
  habanalabs: increase timeout during reset
  PCI/PM: Assume ports without DLL Link Active train links in 100 ms
  HID: Add quirks for Trust Panora Graphic Tablet
  ALSA: usb-audio: Add duplex sound support for USB devices using implicit feedback
  tty: n_gsm: Fix waking up upper tty layer when room available
  tty: n_gsm: Fix SOF skipping
  powerpc/64: Don't initialise init_task->thread.regs
  PCI: Fix pci_register_host_bridge() device_register() error handling
  clk: ti: composite: fix memory leak
  USB: ohci-sm501: fix error return code in ohci_hcd_sm501_drv_probe()
  dlm: remove BUG() before panic()
  pinctrl: rockchip: fix memleak in rockchip_dt_node_to_map
  ASoC: ti: omap-mcbsp: Fix an error handling path in 'asoc_mcbsp_probe()'
  ASoC: ux500: mop500: Fix some refcounted resources issues
  SoC: rsnd: add interrupt support for SSI BUSIF buffer
  scsi: mpt3sas: Fix double free warnings
  scsi: target: loopback: Fix READ with data and sensebytes
  arm64: dts: msm8996: Fix CSI IRQ types
  ASoC: SOF: core: fix error return code in sof_probe_continue()
  power: supply: smb347-charger: IRQSTAT_D is volatile
  power: supply: lp8788: Fix an error handling path in 'lp8788_charger_probe()'
  ALSA: firewire-lib: fix invalid assignment to union data for directional parameter
  scsi: qla2xxx: Fix warning after FC target reset
  PCI/ASPM: Allow ASPM on links to PCIe-to-PCI/PCI-X Bridges
  PCI: rcar: Fix incorrect programming of OB windows
  drivers: base: Fix NULL pointer exception in __platform_driver_probe() if a driver developer is foolish
  serial: amba-pl011: Make sure we initialize the port.lock spinlock
  i2c: pxa: fix i2c_pxa_scream_blue_murder() debug output
  PCI: v3-semi: Fix a memory leak in v3_pci_probe() error handling paths
  staging: sm750fb: add missing case while setting FB_VISUAL
  staging: wilc1000: Increase the size of wid_list array
  usb: dwc3: gadget: Properly handle failed kick_transfer
  usb: dwc3: gadget: Properly handle ClearFeature(halt)
  HID: intel-ish-hid: avoid bogus uninitialized-variable warning
  soundwire: slave: don't init debugfs on device registration error
  ASoC: max98373: reorder max98373_reset() in resume
  clk: meson: meson8b: Don't rely on u-boot to init all GP_PLL registers
  thermal/drivers/ti-soc-thermal: Avoid dereferencing ERR_PTR
  gpio: pca953x: fix handling of automatic address incrementing
  clk: meson: meson8b: Fix the vclk_div{1, 2, 4, 6, 12}_en gate bits
  clk: meson: meson8b: Fix the polarity of the RESET_N lines
  clk: meson: meson8b: Fix the first parent of vid_pll_in_sel
  slimbus: ngd: get drvdata from correct device
  tty: hvc: Fix data abort due to race in hvc_open
  s390/qdio: put thinint indicator after early error
  ALSA: usb-audio: Fix racy list management in output queue
  ALSA: usb-audio: Improve frames size computation
  staging: gasket: Fix mapping refcnt leak when register/store fails
  staging: gasket: Fix mapping refcnt leak when put attribute fails
  firmware: qcom_scm: fix bogous abuse of dma-direct internals
  arm64: dts: qcom: fix pm8150 gpio interrupts
  virtiofs: schedule blocking async replies in separate worker
  pinctrl: rza1: Fix wrong array assignment of rza1l_swio_entries
  scsi: qedf: Fix crash when MFW calls for protocol stats while function is still probing
  gpio: dwapb: Append MODULE_ALIAS for platform driver
  RDMA/mlx5: Fix udata response upon SRQ creation
  ARM: dts: sun8i-h2-plus-bananapi-m2-zero: Fix led polarity
  arm64: dts: qcom: msm8916: remove unit name for thermal trip points
  scsi: qedi: Do not flush offload work if ARP not resolved
  arm64: dts: mt8173: fix unit name warnings
  staging: greybus: fix a missing-check bug in gb_lights_light_config()
  x86/purgatory: Disable various profiling and sanitizing options
  apparmor: fix nnp subset test for unconfined
  scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
  scsi: sr: Fix sr_probe() missing deallocate of device minor
  bpf, sockhash: Fix memory leak when unlinking sockets in sock_hash_free
  ASoC: meson: add missing free_irq() in error path
  f2fs: handle readonly filesystem in f2fs_ioc_shutdown()
  apparmor: check/put label on apparmor_sk_clone_security()
  net: dsa: lantiq_gswip: fix and improve the unsupported interface error
  apparmor: fix introspection of of task mode for unconfined tasks
  mksysmap: Fix the mismatch of '.L' symbols in System.map
  NTB: Fix the default port and peer numbers for legacy drivers
  NTB: ntb_pingpong: Choose doorbells based on port number
  yam: fix possible memory leak in yam_init_driver
  sparc32: mm: Don't try to free page-table pages if ctor() fails
  pwm: img: Call pm_runtime_put() in pm_runtime_get_sync() failed case
  powerpc/crashkernel: Take "mem=" option into account
  ASoC: qcom: q6asm-dai: kCFI fix
  cifs: set up next DFS target before generic_ip_connect()
  RDMA/core: Fix several reference count leaks.
  PCI: vmd: Filter resource type bits from shadow register
  nfsd: Fix svc_xprt refcnt leak when setup callback client failed
  powerpc/perf/hv-24x7: Fix inconsistent output values incase multiple hv-24x7 events run
  IB/mlx5: Fix DEVX support for MLX5_CMD_OP_INIT2INIT_QP command
  clk: clk-flexgen: fix clock-critical handling
  scsi: vhost: Notify TCM about the maximum sg entries supported per command
  scsi: lpfc: Fix lpfc_nodelist leak when processing unsolicited event
  clk: zynqmp: fix memory leak in zynqmp_register_clocks
  scsi: cxgb3i: Fix some leaks in init_act_open()
  mfd: wm8994: Fix driver operation if loaded as modules
  powerpc/ptdump: Add _PAGE_COHERENT flag
  usb: gadget: core: sync interrupt before unbind the udc
  gpio: dwapb: Call acpi_gpiochip_free_interrupts() on GPIO chip de-registration
  m68k/PCI: Fix a memory leak in an error handling path
  PCI: pci-bridge-emul: Fix PCIe bit conflicts
  scsi: hisi_sas: Do not reset phy timer to wait for stray phy up
  RDMA/mlx5: Add init2init as a modify command
  coresight: tmc: Fix TMC mode read in tmc_read_prepare_etb()
  vfio/pci: fix memory leaks in alloc_perm_bits()
  arm64: dts: fvp/juno: Fix node address fields
  ps3disk: use the default segment boundary
  PCI: aardvark: Don't blindly enable ASPM L0s and don't write to read-only register
  arm64: dts: fvp: Fix GIC child nodes
  ASoC: SOF: Do nothing when DSP PM callbacks are not set
  clk: renesas: cpg-mssr: Fix STBCR suspend/resume handling
  pinctrl: ocelot: Fix GPIO interrupt decoding on Jaguar2
  arm64: dts: juno: Fix GIC child nodes
  arm64: dts: armada-3720-turris-mox: fix SFP binding
  arm64: dts: armada-3720-turris-mox: forbid SDR104 on SDIO for FCC purposes
  dm mpath: switch paths in dm_blk_ioctl() code path
  misc: fastrpc: fix potential fastrpc_invoke_ctx leak
  misc: fastrpc: Fix an incomplete memory release in fastrpc_rpmsg_probe()
  serial: 8250: Fix max baud limit in generic 8250 port
  usblp: poison URBs upon disconnect
  clk: samsung: Mark top ISP and CAM clocks on Exynos542x as critical
  remoteproc: qcom_q6v5_mss: map/unmap mpss segments before/after use
  i2c: pxa: clear all master action bits in i2c_pxa_stop_message()
  f2fs: report delalloc reserve as non-free in statfs for project quota
  iio: bmp280: fix compensation of humidity
  rtc: mc13xxx: fix a double-unlock issue
  powerpc/kasan: Fix stack overflow by increasing THREAD_SHIFT
  Input: edt-ft5x06 - fix get_default register write access
  scsi: qla2xxx: Fix issue with adapter's stopping state
  PCI: Allow pci_resize_resource() for devices on root bus
  ALSA: isa/wavefront: prevent out of bounds write in ioctl
  ALSA: hda/realtek - Introduce polarity for micmute LED GPIO
  arm64: dts: meson: fixup SCP sram nodes
  scsi: qedi: Check for buffer overflow in qedi_set_path()
  scsi: core: free sgtables in case command setup fails
  ARM: dts: stm32: Add missing ethernet PHY reset on AV96
  ARM: integrator: Add some Kconfig selections
  ASoC: davinci-mcasp: Fix dma_chan refcnt leak when getting dma type
  ARM: dts: renesas: Fix IOMMU device node names
  backlight: lp855x: Ensure regulators are disabled on probe failure
  ASoC: fsl_esai: Disable exception interrupt before scheduling tasklet
  clk: qcom: msm8916: Fix the address location of pll->config_reg
  remoteproc: Fix IDR initialisation in rproc_alloc()
  iio: pressure: bmp280: Tolerate IRQ before registering
  ASoC: SOF: imx8: Fix randbuild error
  i2c: piix4: Detect secondary SMBus controller on AMD AM4 chipsets
  ASoC: tegra: tegra_wm8903: Support nvidia, headset property
  clk: sunxi: Fix incorrect usage of round_down()
  power: supply: bq24257_charger: Replace depends on REGMAP_I2C with select
  ANDROID: abi_gki_aarch64_qcom_whitelist: Add reboot_mode
  ANDROID: Update kabi for db845c (following moving pinctrl to a module)
  ANDROID: GKI: Remove msm_pinctrl-* symbols from the abi lists
  ANDROID: db845c_gki.fragment: Add PINCTRL_MSM=m
  ANDROID: GKI: Remove PINCTRL_MSM as built in driver
  ANDROID: pinctrl: qcom: Allow pinctrl-msm code to be loadable as a module
  ANDROID: GKI: update ABI after struct vm_fault changes
  ANDROID: GKI: mm: add struct vm_fault fields for SPECULATIVE_PAGE_FAULTS
  FROMLIST: f2fs: fix use-after-free when accessing bio->bi_crypt_context
  ANDROID: GKI: Update ABI for incremental fs
  ANDROID: GKI: Update whitelist and defconfig for incfs
  ANDROID: gki_defconfig: x86: Enable KERNEL_LZ4
  ANDROID: GKI: scripts: Makefile: update the lz4 command
  ANDROID: Use depmod from the hermetic toolchain
  ANDROID: ABI/Whitelist: update symbols of unisoc whitelist
  Linux 5.4.48
  perf symbols: Fix kernel maps for kcore and eBPF
  perf symbols: Fix debuginfo search for Ubuntu
  perf probe: Check address correctness by map instead of _etext
  perf probe: Fix to check blacklist address correctly
  perf probe: Do not show the skipped events
  f2fs: fix checkpoint=disable:%u%%
  w1: omap-hdq: cleanup to add missing newline for some dev_dbg
  mtd: rawnand: tmio: Fix the probe error path
  mtd: rawnand: mtk: Fix the probe error path
  mtd: rawnand: pasemi: Fix the probe error path
  mtd: rawnand: plat_nand: Fix the probe error path
  mtd: rawnand: sunxi: Fix the probe error path
  mtd: rawnand: oxnas: Fix the probe error path
  mtd: rawnand: socrates: Fix the probe error path
  mtd: rawnand: orion: Fix the probe error path
  mtd: rawnand: xway: Fix the probe error path
  mtd: rawnand: ingenic: Fix the probe error path
  mtd: rawnand: sharpsl: Fix the probe error path
  mtd: rawnand: diskonchip: Fix the probe error path
  mtd: rawnand: brcmnand: fix hamming oob layout
  mtd: rawnand: onfi: Fix redundancy detection check
  mtd: rawnand: Fix nand_gpio_waitrdy()
  sunrpc: clean up properly in gss_mech_unregister()
  sunrpc: svcauth_gss_register_pseudoflavor must reject duplicate registrations.
  kbuild: force to build vmlinux if CONFIG_MODVERSION=y
  powerpc/64s: Save FSCR to init_task.thread.fscr after feature init
  powerpc/64s: Don't let DT CPU features set FSCR_DSCR
  powerpc/32: Disable KASAN with pages bigger than 16k
  powerpc/kasan: Fix shadow pages allocation failure
  powerpc/kasan: Fix issues by lowering KASAN_SHADOW_END
  powerpc/32s: Fix another build failure with CONFIG_PPC_KUAP_DEBUG
  drivers/macintosh: Fix memleak in windfarm_pm112 driver
  ARM: dts: s5pv210: Set keep-power-in-suspend for SDHCI1 on Aries
  ARM: dts: at91: sama5d2_ptc_ek: fix vbus pin
  ARM: dts: exynos: Fix GPIO polarity for thr GalaxyS3 CM36651 sensor's bus
  soc/tegra: pmc: Select GENERIC_PINCONF
  ARM: tegra: Correct PL310 Auxiliary Control Register initialization
  kernel/cpu_pm: Fix uninitted local in cpu_pm
  powerpc/fadump: Account for memory_limit while reserving memory
  powerpc/fadump: consider reserved ranges while reserving memory
  powerpc/fadump: use static allocation for reserved memory ranges
  alpha: fix memory barriers so that they conform to the specification
  dm crypt: avoid truncating the logical block size
  sparc64: fix misuses of access_process_vm() in genregs32_[sg]et()
  sparc32: fix register window handling in genregs32_[gs]et()
  gnss: sirf: fix error return code in sirf_probe()
  pinctrl: samsung: Save/restore eint_mask over suspend for EINT_TYPE GPIOs
  pinctrl: samsung: Correct setting of eint wakeup mask on s5pv210
  power: supply: core: fix memory leak in HWMON error path
  power: supply: core: fix HWMON temperature labels
  power: vexpress: add suppress_bind_attrs to true
  EDAC/amd64: Add AMD family 17h model 60h PCI IDs
  hwmon: (k10temp) Add AMD family 17h model 60h PCI match
  igb: Report speed and duplex as unknown when device is runtime suspended
  clk: mediatek: assign the initial value to clk_init_data of mtk_mux
  media: ov5640: fix use of destroyed mutex
  b43_legacy: Fix connection problem with WPA3
  b43: Fix connection problem with WPA3
  b43legacy: Fix case where channel status is corrupted
  Bluetooth: hci_bcm: fix freeing not-requested IRQ
  serial: 8250: Avoid error message on reprobe
  media: cedrus: Program output format during each run
  media: go7007: fix a miss of snd_card_free
  carl9170: remove P2P_GO support
  e1000e: Relax condition to trigger reset for ME workaround
  e1000e: Disable TSO for buffer overrun workaround
  PCI: Program MPS for RCiEP devices
  ima: Set again build_ima_appraise variable
  ima: Remove redundant policy rule set in add_rules()
  x86/amd_nb: Add AMD family 17h model 60h PCI IDs
  serial: 8250_pci: Move Pericom IDs to pci_ids.h
  PCI: Add Loongson vendor ID
  x86/amd_nb: Add Family 19h PCI IDs
  PCI: vmd: Add device id for VMD device 8086:9A0B
  PCI: Add ACS quirk for Intel Root Complex Integrated Endpoints
  PCI: Avoid FLR for AMD Starship USB 3.0
  PCI: Avoid FLR for AMD Matisse HD Audio & USB 3.0
  PCI: Avoid Pericom USB controller OHCI/EHCI PME# defect
  ext4: fix race between ext4_sync_parent() and rename()
  ext4: fix error pointer dereference
  ext4: fix EXT_MAX_EXTENT/INDEX to check for zeroed eh_max
  evm: Fix possible memory leak in evm_calc_hmac_or_hash()
  ima: Remove __init annotation from ima_pcrread()
  ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init()
  ima: Directly assign the ima_default_policy pointer to ima_rules
  ima: Evaluate error in init_ima()
  ima: Switch to ima_hash_algo for boot aggregate
  ima: Fix ima digest hash table key calculation
  mm: call cond_resched() from deferred_init_memmap()
  mm/pagealloc.c: call touch_nmi_watchdog() on max order boundaries in deferred init
  mm: initialize deferred pages with interrupts enabled
  mm: thp: make the THP mapcount atomic against __split_huge_pmd_locked()
  powerpc/mm: Fix conditions to perform MMU specific management by blocks on PPC32.
  btrfs: fix space_info bytes_may_use underflow during space cache writeout
  btrfs: fix space_info bytes_may_use underflow after nocow buffered write
  btrfs: fix wrong file range cleanup after an error filling dealloc range
  btrfs: fix error handling when submitting direct I/O bio
  btrfs: force chunk allocation if our global rsv is larger than metadata
  btrfs: send: emit file capabilities after chown
  btrfs: include non-missing as a qualifier for the latest_bdev
  btrfs: free alien device after device add
  string.h: fix incompatibility between FORTIFY_SOURCE and KASAN
  kasan: stop tests being eliminated as dead code with FORTIFY_SOURCE
  selftests/bpf, flow_dissector: Close TAP device FD after the test
  bpf: Fix running sk_skb program types with ktls
  bpf: Refactor sockmap redirect code so its easy to reuse
  bpf: Fix map permissions check
  libbpf: Fix perf_buffer__free() API for sparse allocs
  platform/x86: asus_wmi: Reserve more space for struct bias_args
  platform/x86: intel-vbtn: Only blacklist SW_TABLET_MODE on the 9 / "Laptop" chasis-type
  platform/x86: intel-hid: Add a quirk to support HP Spectre X2 (2015)
  platform/x86: hp-wmi: Convert simple_strtoul() to kstrtou32()
  cpuidle: Fix three reference count leaks
  spi: dw: Return any value retrieved from the dma_transfer callback
  mmc: sdhci-esdhc-imx: fix the mask for tuning start point
  iwlwifi: mvm: fix aux station leak
  ixgbe: fix signed-integer-overflow warning
  ice: fix potential double free in probe unrolling
  mmc: via-sdmmc: Respect the cmd->busy_timeout from the mmc core
  staging: greybus: sdio: Respect the cmd->busy_timeout from the mmc core
  mmc: sdhci-msm: Set SDHCI_QUIRK_MULTIBLOCK_READ_ACMD12 quirk
  bcache: fix refcount underflow in bcache_device_free()
  MIPS: Fix IRQ tracing when call handle_fpe() and handle_msa_fpe()
  PCI: Don't disable decoding when mmio_always_on is set
  macvlan: Skip loopback packets in RX handler
  btrfs: qgroup: mark qgroup inconsistent if we're inherting snapshot to a new qgroup
  btrfs: improve global reserve stealing logic
  m68k: mac: Don't call via_flush_cache() on Mac IIfx
  MIPS: tools: Fix resource leak in elf-entry.c
  x86/mm: Stop printing BRK addresses
  selftests/bpf: CONFIG_IPV6_SEG6_BPF required for test_seg6_loop.o
  drm/amdgpu: Sync with VM root BO when switching VM to CPU update mode
  drm/amd/powerpay: Disable gfxoff when setting manual mode on picasso and raven
  crypto: stm32/crc32 - fix multi-instance
  crypto: stm32/crc32 - fix run-time self test issue.
  crypto: stm32/crc32 - fix ext4 chksum BUG_ON()
  mips: Add udelay lpj numbers adjustment
  mips: MAAR: Use more precise address mask
  sched: Defend cfs and rt bandwidth quota against overflow
  x86/boot: Correct relocation destination on old linkers
  kgdboc: Use a platform device to handle tty drivers showing up late
  mwifiex: Fix memory corruption in dump_station
  rtlwifi: Fix a double free in _rtl_usb_tx_urb_setup()
  net/mlx5e: IPoIB, Drop multicast packets that this interface sent
  veth: Adjust hard_start offset on redirect XDP frames
  iocost: don't let vrate run wild while there's no saturation signal
  raid5: remove gfp flags from scribble_alloc()
  md: don't flush workqueue unconditionally in md_open
  mt76: avoid rx reorder buffer overflow
  drm/mcde: dsi: Fix return value check in mcde_dsi_bind()
  net: qed*: Reduce RX and TX default ring count when running inside kdump kernel
  wcn36xx: Fix error handling path in 'wcn36xx_probe()'
  ath10k: Remove msdu from idr when management pkt send fails
  nvme-tcp: use bh_lock in data_ready
  nvme-pci: align io queue count with allocted nvme_queue in nvme_probe
  nvme: refine the Qemu Identify CNS quirk
  iwlwifi: avoid debug max amsdu config overwriting itself
  platform/x86: intel-vbtn: Also handle tablet-mode switch on "Detachable" and "Portable" chassis-types
  platform/x86: intel-vbtn: Do not advertise switches to userspace if they are not there
  platform/x86: intel-vbtn: Split keymap into buttons and switches parts
  platform/x86: intel-vbtn: Use acpi_evaluate_integer()
  xfs: fix duplicate verification from xfs_qm_dqflush()
  xfs: reset buffer write failure state on successful completion
  kgdb: Fix spurious true from in_dbg_master()
  mips: cm: Fix an invalid error code of INTVN_*_ERR
  MIPS: Truncate link address into 32bit for 32bit kernel
  Crypto/chcr: fix for ccm(aes) failed test
  xfs: clean up the error handling in xfs_swap_extents
  libertas_tf: avoid a null dereference in pointer priv
  powerpc/spufs: fix copy_to_user while atomic
  net: allwinner: Fix use correct return type for ndo_start_xmit()
  media: cec: silence shift wrapping warning in __cec_s_log_addrs()
  drivers: net: davinci_mdio: fix potential NULL dereference in davinci_mdio_probe()
  selinux: fix error return code in policydb_read()
  net: lpc-enet: fix error return code in lpc_mii_init()
  iocost_monitor: drop string wrap around numbers when outputting json
  drivers/perf: hisi: Fix typo in events attribute array
  sched/core: Fix illegal RCU from offline CPUs
  exit: Move preemption fixup up, move blocking operations down
  lib/mpi: Fix 64-bit MIPS build with Clang
  net: bcmgenet: Fix WoL with password after deep sleep
  net: bcmgenet: set Rx mode before starting netif
  selftests/bpf: Fix memory leak in extract_build_id()
  netfilter: nft_nat: return EOPNOTSUPP if type or flags are not supported
  dpaa2-eth: fix return codes used in ndo_setup_tc
  Drivers: hv: vmbus: Always handle the VMBus messages on CPU0
  audit: fix a net reference leak in audit_list_rules_send()
  Bluetooth: btbcm: Add 2 missing models to subver tables
  ath10k: add flush tx packets for SDIO chip
  MIPS: Make sparse_init() using top-down allocation
  media: platform: fcp: Set appropriate DMA parameters
  media: dvb: return -EREMOTEIO on i2c transfer failure.
  audit: fix a net reference leak in audit_send_reply()
  drm/mediatek: set dpi pin mode to gpio low to avoid leakage current
  dt-bindings: display: mediatek: control dpi pins mode to avoid leakage
  e1000: Distribute switch variables for initialization
  tools api fs: Make xxx__mountpoint() more scalable
  regulator: qcom-rpmh: Fix typos in pm8150 and pm8150l
  brcmfmac: fix wrong location to get firmware feature
  spi: Respect DataBitLength field of SpiSerialBusV2() ACPI resource
  media: staging/intel-ipu3: Implement lock for stream on/off operations
  ath10k: fix kernel null pointer dereference
  staging: android: ion: use vmap instead of vm_map_ram
  x86: fix vmap arguments in map_irq_stack
  net: vmxnet3: fix possible buffer overflow caused by bad DMA value in vmxnet3_get_rss()
  x86/kvm/hyper-v: Explicitly align hcall param for kvm_hyperv_exit
  spi: dw: Fix Rx-only DMA transfers
  Bluetooth: btmtkuart: Improve exception handling in btmtuart_probe()
  mmc: meson-mx-sdio: trigger a soft reset after a timeout or CRC error
  ice: Fix for memory leaks and modify ICE_FREE_CQ_BUFS
  ice: Fix memory leak
  batman-adv: Revert "disable ethtool link speed detection when auto negotiation off"
  ARM: 8978/1: mm: make act_mm() respect THREAD_SIZE
  btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums
  btrfs: account for trans_block_rsv in may_commit_transaction
  media: dvbdev: Fix tuner->demod media controller link
  clocksource: dw_apb_timer_of: Fix missing clockevent timers
  clocksource: dw_apb_timer: Make CPU-affiliation being optional
  spi: dw: Enable interrupts in accordance with DMA xfer mode
  mips: Fix cpu_has_mips64r1/2 activation for MIPS32 CPUs
  ACPI/IORT: Fix PMCG node single ID mapping handling
  pmu/smmuv3: Clear IRQ affinity hint on device removal
  kgdb: Prevent infinite recursive entries to the debugger
  kgdb: Disable WARN_CONSOLE_UNLOCKED for all kgdb
  Bluetooth: Add SCO fallback for invalid LMP parameters error
  MIPS: Loongson: Build ATI Radeon GPU driver as module
  platform/x86: dell-laptop: don't register micmute LED if there is no token
  ixgbe: Fix XDP redirect on archs with PAGE_SIZE above 4K
  lockdown: Allow unprivileged users to see lockdown status
  drm: rcar-du: Set primary plane zpos immutably at initializing
  block: reset mapping if failed to update hardware queue count
  arm64: insn: Fix two bugs in encoding 32-bit logical immediates
  block: alloc map and request for new hardware queue
  ACPICA: Dispatcher: add status checks
  spi: dw: Zero DMA Tx and Rx configurations on stack
  rtw88: fix an issue about leak system resources
  media: staging: ipu3: Fix stale list entries on parameter queue failure
  arm64: cacheflush: Fix KGDB trap detection
  ath10k: remove the max_sched_scan_reqs value
  efi/libstub/x86: Work around LLVM ELF quirk build regression
  net: ena: fix error returning in ena_com_get_hash_function()
  net: atlantic: make hw_get_regs optional
  sched/fair: Refill bandwidth before scaling
  x86,smap: Fix smap_{save,restore}() alternatives
  spi: pxa2xx: Apply CS clk quirk to BXT
  libbpf: Fix memory leak and possible double-free in hashmap__clear
  arm64/kernel: Fix range on invalidating dcache for boot page tables
  drm/amdgpu: Init data to avoid oops while reading pp_num_states.
  spi: spi-mem: Fix Dual/Quad modes on Octal-capable devices
  objtool: Ignore empty alternatives
  media: si2157: Better check for running tuner in init
  media: vicodec: Fix error codes in probe function
  crypto: ccp -- don't "select" CONFIG_DMADEVICES
  media: imx: imx7-mipi-csis: Cleanup and fix subdev pad format handling
  media: staging: imgu: do not hold spinlock during freeing mmu page table
  drm: bridge: adv7511: Extend list of audio sample rates
  ath10k: Fix the race condition in firmware dump work queue
  drm/amdgpu: fix and cleanup amdgpu_gem_object_close v4
  ACPI: GED: use correct trigger type field in _Exx / _Lxx handling
  writeback: Drop I_DIRTY_TIME_EXPIRE
  writeback: Fix sync livelock due to b_dirty_time processing
  writeback: Avoid skipping inode writeback
  writeback: Protect inode->i_io_list with inode->i_lock
  Revert "writeback: Avoid skipping inode writeback"
  ANDROID: GKI: enable some more USB configfs options
  Linux 5.4.47
  KVM: arm64: Save the host's PtrAuth keys in non-preemptible context
  KVM: arm64: Synchronize sysreg state on injecting an AArch32 exception
  xen/pvcalls-back: test for errors when calling backend_connect()
  block/floppy: fix contended case in floppy_queue_rq()
  mmc: sdio: Fix several potential memory leaks in mmc_sdio_init_card()
  mmc: sdio: Fix potential NULL pointer error in mmc_sdio_init_card()
  ARM: dts: at91: sama5d2_ptc_ek: fix sdmmc0 node description
  mmc: uniphier-sd: call devm_request_irq() after tmio_mmc_host_probe()
  mmc: tmio: Further fixup runtime PM management at remove
  mmc: mmci_sdmmc: fix DMA API warning overlapping mappings
  mmc: sdhci-msm: Clear tuning done flag while hs400 tuning
  agp/intel: Reinforce the barrier after GTT updates
  perf: Add cond_resched() to task_function_call()
  fat: don't allow to mount if the FAT length == 0
  mm/slub: fix a memory leak in sysfs_slab_add()
  drm/vkms: Hold gem object while still in-use
  Smack: slab-out-of-bounds in vsscanf
  ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb
  ath9x: Fix stack-out-of-bounds Write in ath9k_hif_usb_rx_cb
  ath9k: Fix use-after-free Write in ath9k_htc_rx_msg
  ath9k: Fix use-after-free Read in ath9k_wmi_ctrl_rx
  ath9k: Fix use-after-free Read in htc_connect_service
  selftests/ftrace: Return unsupported if no error_log file
  scsi: lpfc: Fix negation of else clause in lpfc_prep_node_fc4type
  scsi: megaraid_sas: TM command refire leads to controller firmware crash
  KVM: arm64: Make vcpu_cp1x() work on Big Endian hosts
  KVM: arm64: Stop writing aarch32's CSSELR into ACTLR
  KVM: MIPS: Fix VPN2_MASK definition for variable cpu_vmbits
  KVM: MIPS: Define KVM_ENTRYHI_ASID to cpu_asid_mask(&boot_cpu_data)
  KVM: nVMX: Consult only the "basic" exit reason when routing nested exit
  KVM: nSVM: leave ASID aside in copy_vmcb_control_area
  KVM: nSVM: fix condition for filtering async PF
  KVM: nVMX: Skip IBPB when switching between vmcs01 and vmcs02
  video: fbdev: w100fb: Fix a potential double free.
  video: vt8500lcdfb: fix fallthrough warning
  EDAC/skx: Use the mcmtr register to retrieve close_pg/bank_xor_enable
  cpufreq: Fix up cpufreq_boost_set_sw()
  remoteproc: Fix and restore the parenting hierarchy for vdev
  remoteproc: Fall back to using parent memory pool if no dedicated available
  proc: Use new_inode not new_inode_pseudo
  ovl: initialize error in ovl_copy_xattr
  net/mlx5e: Fix repeated XSK usage on one channel
  net/mlx5: Fix fatal error handling during device load
  net/mlx5: drain health workqueue in case of driver load error
  selftests/net: in rxtimestamp getopt_long needs terminating null entry
  dccp: Fix possible memleak in dccp_init and dccp_fini
  crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req()
  crypto: virtio: Fix src/dst scatterlist calculation in __virtio_crypto_skcipher_do_req()
  crypto: virtio: Fix use-after-free in virtio_crypto_skcipher_finalize_req()
  firmware: imx: scu: Fix corruption of header
  firmware: imx-scu: Support one TX and one RX
  firmware: imx: warn on unexpected RX
  x86/{mce,mm}: Unmap the entire page if the whole page is affected and poisoned
  crypto: drbg - fix error return code in drbg_alloc_state()
  crypto: algapi - Avoid spurious modprobe on LOADED
  crypto: cavium/nitrox - Fix 'nitrox_get_first_device()' when ndevlist is fully iterated
  gup: document and work around "COW can break either way" issue
  PM: runtime: clk: Fix clk_pm_runtime_get() error path
  spi: bcm-qspi: when tx/rx buffer is NULL set to 0
  spi: bcm-qspi: Handle clock probe deferral
  spi: bcm2835aux: Fix controller unregister order
  spi: bcm2835: Fix controller unregister order
  spi: pxa2xx: Fix runtime PM ref imbalance on probe error
  spi: pxa2xx: Fix controller unregister order
  spi: Fix controller unregister order
  spi: dw: Fix controller unregister order
  nilfs2: fix null pointer dereference at nilfs_segctor_do_construct()
  lib/lzo: fix ambiguous encoding bug in lzo-rle
  arm64: acpi: fix UBSAN warning
  ACPI: PM: Avoid using power resources if there are none for D0
  ACPI: GED: add support for _Exx / _Lxx handler methods
  ACPI: CPPC: Fix reference count leak in acpi_cppc_processor_probe()
  ACPI: sysfs: Fix reference count leak in acpi_sysfs_add_hotplug_profile()
  ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock
  ALSA: usb-audio: Fix inconsistent card PM state after resume
  ALSA: pcm: fix snd_pcm_link() lockdep splat
  ALSA: pcm: disallow linking stream to itself
  ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines
  ALSA: fireface: fix configuration error for nominal sampling transfer frequency
  ALSA: es1688: Add the missed snd_card_free()
  watchdog: imx_sc_wdt: Fix reboot on crash
  smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl
  smb3: fix incorrect number of credits when ioctl MaxOutputResponse > 64K
  efi/efivars: Add missing kobject_put() in sysfs entry creation error path
  io_uring: use kvfree() in io_sqe_buffer_register()
  ASoC: max9867: fix volume controls
  powerpc/ptdump: Properly handle non standard page size
  KVM: x86: Fix APIC page invalidation race
  KVM: x86: respect singlestep when emulating instruction
  KVM: x86/mmu: Set mmio_value to '0' if reserved #PF can't be generated
  perf/x86/intel: Add more available bits for OFFCORE_RESPONSE of Intel Tremont
  x86/reboot/quirks: Add MacBook6,1 reboot quirk
  x86/speculation: PR_SPEC_FORCE_DISABLE enforcement for indirect branches.
  x86/speculation: Avoid force-disabling IBPB based on STIBP and enhanced IBRS.
  x86/speculation: Prevent rogue cross-process SSBD shutdown
  x86/PCI: Mark Intel C620 MROMs as having non-compliant BARs
  x86_64: Fix jiffies ODR violation
  sctp: fix refcount bug in sctp_wfree
  sctp: fix possibly using a bad saddr with a given dst
  iwlwifi: mvm: fix NVM check for 3168 devices
  ipv4: fix a RCU-list lock in fib_triestat_seq_show
  aio: fix async fsync creds
  fanotify: fix ignore mask logic for events on child and on dir
  selftests: fix flower parent qdisc
  mm: add kvfree_sensitive() for freeing sensitive data objects
  perf probe: Accept the instance number of kretprobe event
  PCI/PM: Adjust pcie_wait_for_link_delay() for caller delay
  KVM: x86: only do L1TF workaround on affected processors
  x86/cpu/amd: Make erratum #1054 a legacy erratum
  s390/pci: Log new handle in clp_disable_fh()
  padata: add separate cpuhp node for CPUHP_PADATA_DEAD
  RDMA/uverbs: Make the event_queue fds return POLLERR when disassociated
  smack: avoid unused 'sip' variable warning
  ath9k_htc: Silence undersized packet warnings
  spi: dw: Fix native CS being unset
  powerpc/xive: Clear the page tables for the ESB IO mapping
  drivers/net/ibmvnic: Update VNIC protocol version reporting
  gfs2: Even more gfs2_find_jhead fixes
  csky: Fixup abiv2 syscall_trace break a4 & a5
  Input: synaptics - add a second working PNP_ID for Lenovo T470s
  sched/fair: Don't NUMA balance for kthreads
  ARM: 8977/1: ptrace: Fix mask for thumb breakpoint hook
  Input: mms114 - fix handling of mms345l
  elfnote: mark all .note sections SHF_ALLOC
  bpf: Support llvm-objcopy for vmlinux BTF
  vxlan: Avoid infinite loop when suppressing NS messages with invalid options
  bridge: Avoid infinite loop when suppressing NS messages with invalid options
  tun: correct header offsets in napi frags mode
  net_failover: fixed rollback in net_failover_open()
  mlxsw: core: Use different get_trend() callbacks for different thermal zones
  ipv6: fix IPV6_ADDRFORM operation logic
  fs-verity: remove unnecessary extern keywords
  fs-verity: fix all kerneldoc warnings
  fscrypt: add support for IV_INO_LBLK_32 policies
  fscrypt: make test_dummy_encryption use v2 by default
  fscrypt: support test_dummy_encryption=v2
  fscrypt: add fscrypt_add_test_dummy_key()
  linux/parser.h: add include guards
  fscrypt: remove unnecessary extern keywords
  fscrypt: name all function parameters
  fscrypt: fix all kerneldoc warnings
  ANDROID: GKI: enable CONFIG_EXT4_FS_POSIX_ACL.
  ANDROID: arch: arm: Increase kernel command line size
  ANDROID: arch: arm64: Increase kernel command line size
  ANDROID: ABI: Add typec symbols to QCOM ABI whitelist
  UPSTREAM: usb: typec: Remove the callback members from struct typec_capability
  UPSTREAM: usb: typec: ucsi: Start using struct typec_operations
  UPSTREAM: usb: typec: tps6598x: Start using struct typec_operations
  UPSTREAM: usb: typec: tcpm: Start using struct typec_operations
  UPSTREAM: usb: typec: Separate the operations vector
  UPSTREAM: usb: typec: Introduce typec_get_drvdata()
  UPSTREAM: usb: typec: Copy everything from struct typec_capability during registration
  ANDROID: kbuild: merge more sections with LTO
  UPSTREAM: driver core: Remove unnecessary is_fwnode_dev variable in device_add()
  UPSTREAM: driver core: Remove check in driver_deferred_probe_force_trigger()
  UPSTREAM: of: platform: Batch fwnode parsing when adding all top level devices
  BACKPORT: driver core: fw_devlink: Add support for batching fwnode parsing
  BACKPORT: driver core: Look for waiting consumers only for a fwnode's primary device
  UPSTREAM: usb: musb: Add support for MediaTek musb controller
  UPSTREAM: usb: musb: Add musb_clearb/w() interface
  UPSTREAM: usb: musb: Add noirq type of dma create interface
  UPSTREAM: usb: musb: Add get/set toggle hooks
  UPSTREAM: dt-bindings: usb: musb: Add support for MediaTek musb controller
  Revert "ANDROID: Remove default y on BRIDGE_IGMP_SNOOPING"
  Linux 5.4.46
  Revert "net/mlx5: Annotate mutex destroy for root ns"
  uprobes: ensure that uprobe->offset and ->ref_ctr_offset are properly aligned
  x86/speculation: Add Ivy Bridge to affected list
  x86/speculation: Add SRBDS vulnerability and mitigation documentation
  x86/speculation: Add Special Register Buffer Data Sampling (SRBDS) mitigation
  x86/cpu: Add 'table' argument to cpu_matches()
  x86/cpu: Add a steppings field to struct x86_cpu_id
  x86/speculation/spectre_v2: Exclude Zhaoxin CPUs from SPECTRE_V2
  nvmem: qfprom: remove incorrect write support
  CDC-ACM: heed quirk also in error handling
  staging: rtl8712: Fix IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK
  tty: hvc_console, fix crashes on parallel open/close
  vt: keyboard: avoid signed integer overflow in k_ascii
  usb: musb: Fix runtime PM imbalance on error
  usb: musb: start session in resume for host port
  iio: adc: stm32-adc: fix a wrong error message when probing interrupts
  iio:chemical:pms7003: Fix timestamp alignment and prevent data leak.
  iio: vcnl4000: Fix i2c swapped word reading.
  iio:chemical:sps30: Fix timestamp alignment
  USB: serial: ch341: add basis for quirk detection
  USB: serial: option: add Telit LE910C1-EUX compositions
  USB: serial: usb_wwan: do not resubmit rx urb on fatal errors
  USB: serial: qcserial: add DW5816e QDL support
  net: be more gentle about silly gso requests coming from user
  net: check untrusted gso_size at kernel entry
  vsock: fix timeout in vsock_accept()
  nfp: flower: fix used time of merge flow statistics
  NFC: st21nfca: add missed kfree_skb() in an error path
  net: usb: qmi_wwan: add Telit LE910C1-EUX composition
  net: stmmac: enable timestamp snapshot for required PTP packets in dwmac v5.10a
  net/mlx5: Fix crash upon suspend/resume
  l2tp: do not use inet_hash()/inet_unhash()
  l2tp: add sk_family checks to l2tp_validate_socket
  devinet: fix memleak in inetdev_init()
  ANDROID: GKI: Update ABI after scsi/ufs changes
  FROMLIST: Documentation:sysfs-ufs: Add WriteBooster documentation
  FROMGIT: scsi: ufs-qcom: Configure write booster type
  FROMGIT: scsi: ufs: sysfs: Add sysfs entries for write booster
  BACKPORT: FROMGIT: scsi: ufs: Add write booster feature support
  ANDROID: ABI/Whitelist: update symbols of unisoc whitelist
  BACKPORT: FROMGIT: scsi: ufs: Remove unnecessary memset for dev_info
  ANDROID: staging: ion: Fix potential memory corruption
  ANDROID: staging: ion: optimize cache operation for non-cached buffer
  ANDROID: staging: ion: Skip sync if not mapped
  ANDROID: staging: ion: use dma_[un]map_sg_attrs
  ANDROID: arch: arm64: vdso: export the symbols for time()
  ANDROID: dm-bow: Add block_size option
  ANDROID: GKI: remove squashfs-needed symbols from exported abi
  ANDROID: GKI: remove erofs symbols from exported abi
  ANDROID: GKI: enable CONFIG_EROFS_FS=y
  ANDROID: scs: fix recursive spinlock in scs_check_usage
  f2fs: attach IO flags to the missing cases
  f2fs: add node_io_flag for bio flags likewise data_io_flag
  f2fs: remove unused parameter of f2fs_put_rpages_mapping()
  f2fs: handle readonly filesystem in f2fs_ioc_shutdown()
  f2fs: avoid utf8_strncasecmp() with unstable name
  f2fs: don't return vmalloc() memory from f2fs_kmalloc()
  ANDROID: GKI: set CONFIG_BLK_DEV_LOOP_MIN_COUNT to 16
  ANDROID: Incremental fs: Remove dependency on PKCS7_MESSAGE_PARSER
  ANDROID: Incremental fs: Cache successful hash calculations
  ANDROID: Incremental fs: Fix four error-path bugs
  f2fs: fix retry logic in f2fs_write_cache_pages()
  f2fs: fix wrong discard space
  f2fs: compress: don't compress any datas after cp stop
  f2fs: remove unneeded return value of __insert_discard_tree()
  f2fs: fix wrong value of tracepoint parameter
  f2fs: protect new segment allocation in expand_inode_data
  f2fs: code cleanup by removing ifdef macro surrounding
  writeback: Avoid skipping inode writeback
  f2fs: avoid inifinite loop to wait for flushing node pages at cp_error
  f2fs: compress: fix zstd data corruption
  f2fs: add compressed/gc data read IO stat
  f2fs: fix potential use-after-free issue
  f2fs: compress: don't handle non-compressed data in workqueue
  f2fs: remove redundant assignment to variable err
  f2fs: refactor resize_fs to avoid meta updates in progress
  f2fs: use round_up to enhance calculation
  f2fs: introduce F2FS_IOC_RESERVE_COMPRESS_BLOCKS
  f2fs: Avoid double lock for cp_rwsem during checkpoint
  f2fs: report delalloc reserve as non-free in statfs for project quota
  f2fs: Fix wrong stub helper update_sit_info
  f2fs: compress: let lz4 compressor handle output buffer budget properly
  f2fs: remove blk_plugging in block_operations
  f2fs: introduce F2FS_IOC_RELEASE_COMPRESS_BLOCKS
  f2fs: shrink spinlock coverage
  f2fs: correctly fix the parent inode number during fsync()
  f2fs: compress: support lzo-rle compress algorithm
  f2fs: introduce mempool for {,de}compress intermediate page allocation
  f2fs: introduce f2fs_bmap_compress()
  f2fs: support fiemap on compressed inode
  f2fs: support partial truncation on compressed inode
  f2fs: remove redundant compress inode check
  f2fs: use strcmp() in parse_options()
  f2fs: Use the correct style for SPDX License Identifier

Conflicts:
	Documentation/devicetree/bindings
	Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.txt
	abi_gki_aarch64_qcom_whitelist
	arch/x86/configs/gki_defconfig
	build.config.common
	drivers/hwtracing/coresight/coresight-tmc-etf.c
	drivers/mmc/host/sdhci-msm.c
	drivers/pinctrl/qcom/Kconfig
	drivers/pinctrl/qcom/pinctrl-msm.c
	drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
	drivers/scsi/ufs/ufs-qcom.c
	drivers/scsi/ufs/ufs-sysfs.c
	drivers/scsi/ufs/ufs.h
	drivers/scsi/ufs/ufs_quirks.h
	drivers/scsi/ufs/ufshcd.c
	drivers/scsi/ufs/ufshcd.h
	drivers/usb/dwc3/gadget.c
	drivers/usb/host/xhci-plat.c
	drivers/usb/typec/ucsi/ucsi.c
	include/linux/usb/composite.h
	include/linux/usb/gadget.h
	init/Kconfig.gki
	net/wireless/nl80211.c
	scripts/headers_install.sh

Change-Id: Iadbe19b28a1d459bc7378e0b9060219a92a408b6
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
2020-07-20 19:22:16 -07:00

623 lines
18 KiB
C

/*
* Universal Flash Storage Host controller driver
*
* This code is based on drivers/scsi/ufs/ufs.h
* Copyright (C) 2011-2013 Samsung India Software Operations
*
* Authors:
* Santosh Yaraganavi <santosh.sy@samsung.com>
* Vinayak Holikatti <h.vinayak@samsung.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* See the COPYING file in the top-level directory or visit
* <http://www.gnu.org/licenses/gpl-2.0.html>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This program is provided "AS IS" and "WITH ALL FAULTS" and
* without warranty of any kind. You are solely responsible for
* determining the appropriateness of using and distributing
* the program and assume all risks associated with your exercise
* of rights with respect to the program, including but not limited
* to infringement of third party rights, the risks and costs of
* program errors, damage to or loss of data, programs or equipment,
* and unavailability or interruption of operations. Under no
* circumstances will the contributor of this Program be liable for
* any damages of any kind arising from your use or distribution of
* this program.
*/
#ifndef _UFS_H
#define _UFS_H
#include <linux/mutex.h>
#include <linux/types.h>
#include <uapi/scsi/scsi_bsg_ufs.h>
#ifdef CONFIG_SCSI_UFSHCD_QTI
#define MAX_QUERY_IDN 0x12
#define MAX_CDB_SIZE 16
#endif
#define GENERAL_UPIU_REQUEST_SIZE (sizeof(struct utp_upiu_req))
#define QUERY_DESC_MAX_SIZE 255
#define QUERY_DESC_MIN_SIZE 2
#define QUERY_DESC_HDR_SIZE 2
#define QUERY_OSF_SIZE (GENERAL_UPIU_REQUEST_SIZE - \
(sizeof(struct utp_upiu_header)))
#define UFS_SENSE_SIZE 18
#define UPIU_HEADER_DWORD(byte3, byte2, byte1, byte0)\
cpu_to_be32((byte3 << 24) | (byte2 << 16) |\
(byte1 << 8) | (byte0))
/*
* UFS device may have standard LUs and LUN id could be from 0x00 to
* 0x7F. Standard LUs use "Peripheral Device Addressing Format".
* UFS device may also have the Well Known LUs (also referred as W-LU)
* which again could be from 0x00 to 0x7F. For W-LUs, device only use
* the "Extended Addressing Format" which means the W-LUNs would be
* from 0xc100 (SCSI_W_LUN_BASE) onwards.
* This means max. LUN number reported from UFS device could be 0xC17F.
*/
#define UFS_UPIU_MAX_UNIT_NUM_ID 0x7F
#define UFS_MAX_LUNS (SCSI_W_LUN_BASE + UFS_UPIU_MAX_UNIT_NUM_ID)
#define UFS_UPIU_WLUN_ID (1 << 7)
#define UFS_UPIU_MAX_GENERAL_LUN 8
/* WriteBooster buffer is available only for the logical unit from 0 to 7 */
#define UFS_UPIU_MAX_WB_LUN_ID 8
/* Well known logical unit id in LUN field of UPIU */
enum {
UFS_UPIU_REPORT_LUNS_WLUN = 0x81,
UFS_UPIU_UFS_DEVICE_WLUN = 0xD0,
UFS_UPIU_BOOT_WLUN = 0xB0,
UFS_UPIU_RPMB_WLUN = 0xC4,
};
/*
* UFS Protocol Information Unit related definitions
*/
/* Task management functions */
enum {
UFS_ABORT_TASK = 0x01,
UFS_ABORT_TASK_SET = 0x02,
UFS_CLEAR_TASK_SET = 0x04,
UFS_LOGICAL_RESET = 0x08,
UFS_QUERY_TASK = 0x80,
UFS_QUERY_TASK_SET = 0x81,
};
/* UTP UPIU Transaction Codes Initiator to Target */
enum {
UPIU_TRANSACTION_NOP_OUT = 0x00,
UPIU_TRANSACTION_COMMAND = 0x01,
UPIU_TRANSACTION_DATA_OUT = 0x02,
UPIU_TRANSACTION_TASK_REQ = 0x04,
UPIU_TRANSACTION_QUERY_REQ = 0x16,
};
/* UTP UPIU Transaction Codes Target to Initiator */
enum {
UPIU_TRANSACTION_NOP_IN = 0x20,
UPIU_TRANSACTION_RESPONSE = 0x21,
UPIU_TRANSACTION_DATA_IN = 0x22,
UPIU_TRANSACTION_TASK_RSP = 0x24,
UPIU_TRANSACTION_READY_XFER = 0x31,
UPIU_TRANSACTION_QUERY_RSP = 0x36,
UPIU_TRANSACTION_REJECT_UPIU = 0x3F,
};
/* UPIU Read/Write flags */
enum {
UPIU_CMD_FLAGS_NONE = 0x00,
UPIU_CMD_FLAGS_WRITE = 0x20,
UPIU_CMD_FLAGS_READ = 0x40,
};
/* UPIU Task Attributes */
enum {
UPIU_TASK_ATTR_SIMPLE = 0x00,
UPIU_TASK_ATTR_ORDERED = 0x01,
UPIU_TASK_ATTR_HEADQ = 0x02,
UPIU_TASK_ATTR_ACA = 0x03,
};
/* UPIU Query request function */
enum {
UPIU_QUERY_FUNC_STANDARD_READ_REQUEST = 0x01,
UPIU_QUERY_FUNC_STANDARD_WRITE_REQUEST = 0x81,
};
/* Flag idn for Query Requests*/
enum flag_idn {
QUERY_FLAG_IDN_FDEVICEINIT = 0x01,
QUERY_FLAG_IDN_PERMANENT_WPE = 0x02,
QUERY_FLAG_IDN_PWR_ON_WPE = 0x03,
QUERY_FLAG_IDN_BKOPS_EN = 0x04,
QUERY_FLAG_IDN_LIFE_SPAN_MODE_ENABLE = 0x05,
QUERY_FLAG_IDN_PURGE_ENABLE = 0x06,
QUERY_FLAG_IDN_RESERVED2 = 0x07,
QUERY_FLAG_IDN_FPHYRESOURCEREMOVAL = 0x08,
QUERY_FLAG_IDN_BUSY_RTC = 0x09,
QUERY_FLAG_IDN_RESERVED3 = 0x0A,
QUERY_FLAG_IDN_PERMANENTLY_DISABLE_FW_UPDATE = 0x0B,
QUERY_FLAG_IDN_WB_EN = 0x0E,
QUERY_FLAG_IDN_WB_BUFF_FLUSH_EN = 0x0F,
QUERY_FLAG_IDN_WB_BUFF_FLUSH_DURING_HIBERN8 = 0x10,
};
/* Attribute idn for Query requests */
enum attr_idn {
QUERY_ATTR_IDN_BOOT_LU_EN = 0x00,
QUERY_ATTR_IDN_RESERVED = 0x01,
QUERY_ATTR_IDN_POWER_MODE = 0x02,
QUERY_ATTR_IDN_ACTIVE_ICC_LVL = 0x03,
QUERY_ATTR_IDN_OOO_DATA_EN = 0x04,
QUERY_ATTR_IDN_BKOPS_STATUS = 0x05,
QUERY_ATTR_IDN_PURGE_STATUS = 0x06,
QUERY_ATTR_IDN_MAX_DATA_IN = 0x07,
QUERY_ATTR_IDN_MAX_DATA_OUT = 0x08,
QUERY_ATTR_IDN_DYN_CAP_NEEDED = 0x09,
QUERY_ATTR_IDN_REF_CLK_FREQ = 0x0A,
QUERY_ATTR_IDN_CONF_DESC_LOCK = 0x0B,
QUERY_ATTR_IDN_MAX_NUM_OF_RTT = 0x0C,
QUERY_ATTR_IDN_EE_CONTROL = 0x0D,
QUERY_ATTR_IDN_EE_STATUS = 0x0E,
QUERY_ATTR_IDN_SECONDS_PASSED = 0x0F,
QUERY_ATTR_IDN_CNTX_CONF = 0x10,
QUERY_ATTR_IDN_CORR_PRG_BLK_NUM = 0x11,
QUERY_ATTR_IDN_RESERVED2 = 0x12,
QUERY_ATTR_IDN_RESERVED3 = 0x13,
QUERY_ATTR_IDN_FFU_STATUS = 0x14,
QUERY_ATTR_IDN_PSA_STATE = 0x15,
QUERY_ATTR_IDN_PSA_DATA_SIZE = 0x16,
QUERY_ATTR_IDN_REF_CLK_GATING_WAIT_TIME = 0x17,
QUERY_ATTR_IDN_WB_FLUSH_STATUS = 0x1C,
QUERY_ATTR_IDN_AVAIL_WB_BUFF_SIZE = 0x1D,
QUERY_ATTR_IDN_WB_BUFF_LIFE_TIME_EST = 0x1E,
QUERY_ATTR_IDN_CURR_WB_BUFF_SIZE = 0x1F,
};
/* Descriptor idn for Query requests */
enum desc_idn {
QUERY_DESC_IDN_DEVICE = 0x0,
QUERY_DESC_IDN_CONFIGURATION = 0x1,
QUERY_DESC_IDN_UNIT = 0x2,
QUERY_DESC_IDN_RFU_0 = 0x3,
QUERY_DESC_IDN_INTERCONNECT = 0x4,
QUERY_DESC_IDN_STRING = 0x5,
QUERY_DESC_IDN_RFU_1 = 0x6,
QUERY_DESC_IDN_GEOMETRY = 0x7,
QUERY_DESC_IDN_POWER = 0x8,
QUERY_DESC_IDN_HEALTH = 0x9,
QUERY_DESC_IDN_MAX,
};
enum desc_header_offset {
QUERY_DESC_LENGTH_OFFSET = 0x00,
QUERY_DESC_DESC_TYPE_OFFSET = 0x01,
};
enum ufs_desc_def_size {
QUERY_DESC_DEVICE_DEF_SIZE = 0x59,
QUERY_DESC_CONFIGURATION_DEF_SIZE = 0x90,
QUERY_DESC_UNIT_DEF_SIZE = 0x2D,
QUERY_DESC_INTERCONNECT_DEF_SIZE = 0x06,
QUERY_DESC_GEOMETRY_DEF_SIZE = 0x48,
QUERY_DESC_POWER_DEF_SIZE = 0x62,
QUERY_DESC_HEALTH_DEF_SIZE = 0x25,
};
/* Unit descriptor parameters offsets in bytes*/
enum unit_desc_param {
UNIT_DESC_PARAM_LEN = 0x0,
UNIT_DESC_PARAM_TYPE = 0x1,
UNIT_DESC_PARAM_UNIT_INDEX = 0x2,
UNIT_DESC_PARAM_LU_ENABLE = 0x3,
UNIT_DESC_PARAM_BOOT_LUN_ID = 0x4,
UNIT_DESC_PARAM_LU_WR_PROTECT = 0x5,
UNIT_DESC_PARAM_LU_Q_DEPTH = 0x6,
UNIT_DESC_PARAM_PSA_SENSITIVE = 0x7,
UNIT_DESC_PARAM_MEM_TYPE = 0x8,
UNIT_DESC_PARAM_DATA_RELIABILITY = 0x9,
UNIT_DESC_PARAM_LOGICAL_BLK_SIZE = 0xA,
UNIT_DESC_PARAM_LOGICAL_BLK_COUNT = 0xB,
UNIT_DESC_PARAM_ERASE_BLK_SIZE = 0x13,
UNIT_DESC_PARAM_PROVISIONING_TYPE = 0x17,
UNIT_DESC_PARAM_PHY_MEM_RSRC_CNT = 0x18,
UNIT_DESC_PARAM_CTX_CAPABILITIES = 0x20,
UNIT_DESC_PARAM_LARGE_UNIT_SIZE_M1 = 0x22,
UNIT_DESC_PARAM_WB_BUF_ALLOC_UNITS = 0x29,
};
/* Device descriptor parameters offsets in bytes*/
enum device_desc_param {
DEVICE_DESC_PARAM_LEN = 0x0,
DEVICE_DESC_PARAM_TYPE = 0x1,
DEVICE_DESC_PARAM_DEVICE_TYPE = 0x2,
DEVICE_DESC_PARAM_DEVICE_CLASS = 0x3,
DEVICE_DESC_PARAM_DEVICE_SUB_CLASS = 0x4,
DEVICE_DESC_PARAM_PRTCL = 0x5,
DEVICE_DESC_PARAM_NUM_LU = 0x6,
DEVICE_DESC_PARAM_NUM_WLU = 0x7,
DEVICE_DESC_PARAM_BOOT_ENBL = 0x8,
DEVICE_DESC_PARAM_DESC_ACCSS_ENBL = 0x9,
DEVICE_DESC_PARAM_INIT_PWR_MODE = 0xA,
DEVICE_DESC_PARAM_HIGH_PR_LUN = 0xB,
DEVICE_DESC_PARAM_SEC_RMV_TYPE = 0xC,
DEVICE_DESC_PARAM_SEC_LU = 0xD,
DEVICE_DESC_PARAM_BKOP_TERM_LT = 0xE,
DEVICE_DESC_PARAM_ACTVE_ICC_LVL = 0xF,
DEVICE_DESC_PARAM_SPEC_VER = 0x10,
DEVICE_DESC_PARAM_MANF_DATE = 0x12,
DEVICE_DESC_PARAM_MANF_NAME = 0x14,
DEVICE_DESC_PARAM_PRDCT_NAME = 0x15,
DEVICE_DESC_PARAM_SN = 0x16,
DEVICE_DESC_PARAM_OEM_ID = 0x17,
DEVICE_DESC_PARAM_MANF_ID = 0x18,
DEVICE_DESC_PARAM_UD_OFFSET = 0x1A,
DEVICE_DESC_PARAM_UD_LEN = 0x1B,
DEVICE_DESC_PARAM_RTT_CAP = 0x1C,
DEVICE_DESC_PARAM_FRQ_RTC = 0x1D,
DEVICE_DESC_PARAM_UFS_FEAT = 0x1F,
DEVICE_DESC_PARAM_FFU_TMT = 0x20,
DEVICE_DESC_PARAM_Q_DPTH = 0x21,
DEVICE_DESC_PARAM_DEV_VER = 0x22,
DEVICE_DESC_PARAM_NUM_SEC_WPA = 0x24,
DEVICE_DESC_PARAM_PSA_MAX_DATA = 0x25,
DEVICE_DESC_PARAM_PSA_TMT = 0x29,
DEVICE_DESC_PARAM_PRDCT_REV = 0x2A,
DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP = 0x4F,
DEVICE_DESC_PARAM_WB_PRESRV_USRSPC_EN = 0x53,
DEVICE_DESC_PARAM_WB_TYPE = 0x54,
DEVICE_DESC_PARAM_WB_SHARED_ALLOC_UNITS = 0x55,
};
/* Interconnect descriptor parameters offsets in bytes*/
enum interconnect_desc_param {
INTERCONNECT_DESC_PARAM_LEN = 0x0,
INTERCONNECT_DESC_PARAM_TYPE = 0x1,
INTERCONNECT_DESC_PARAM_UNIPRO_VER = 0x2,
INTERCONNECT_DESC_PARAM_MPHY_VER = 0x4,
};
/* Geometry descriptor parameters offsets in bytes*/
enum geometry_desc_param {
GEOMETRY_DESC_PARAM_LEN = 0x0,
GEOMETRY_DESC_PARAM_TYPE = 0x1,
GEOMETRY_DESC_PARAM_DEV_CAP = 0x4,
GEOMETRY_DESC_PARAM_MAX_NUM_LUN = 0xC,
GEOMETRY_DESC_PARAM_SEG_SIZE = 0xD,
GEOMETRY_DESC_PARAM_ALLOC_UNIT_SIZE = 0x11,
GEOMETRY_DESC_PARAM_MIN_BLK_SIZE = 0x12,
GEOMETRY_DESC_PARAM_OPT_RD_BLK_SIZE = 0x13,
GEOMETRY_DESC_PARAM_OPT_WR_BLK_SIZE = 0x14,
GEOMETRY_DESC_PARAM_MAX_IN_BUF_SIZE = 0x15,
GEOMETRY_DESC_PARAM_MAX_OUT_BUF_SIZE = 0x16,
GEOMETRY_DESC_PARAM_RPMB_RW_SIZE = 0x17,
GEOMETRY_DESC_PARAM_DYN_CAP_RSRC_PLC = 0x18,
GEOMETRY_DESC_PARAM_DATA_ORDER = 0x19,
GEOMETRY_DESC_PARAM_MAX_NUM_CTX = 0x1A,
GEOMETRY_DESC_PARAM_TAG_UNIT_SIZE = 0x1B,
GEOMETRY_DESC_PARAM_TAG_RSRC_SIZE = 0x1C,
GEOMETRY_DESC_PARAM_SEC_RM_TYPES = 0x1D,
GEOMETRY_DESC_PARAM_MEM_TYPES = 0x1E,
GEOMETRY_DESC_PARAM_SCM_MAX_NUM_UNITS = 0x20,
GEOMETRY_DESC_PARAM_SCM_CAP_ADJ_FCTR = 0x24,
GEOMETRY_DESC_PARAM_NPM_MAX_NUM_UNITS = 0x26,
GEOMETRY_DESC_PARAM_NPM_CAP_ADJ_FCTR = 0x2A,
GEOMETRY_DESC_PARAM_ENM1_MAX_NUM_UNITS = 0x2C,
GEOMETRY_DESC_PARAM_ENM1_CAP_ADJ_FCTR = 0x30,
GEOMETRY_DESC_PARAM_ENM2_MAX_NUM_UNITS = 0x32,
GEOMETRY_DESC_PARAM_ENM2_CAP_ADJ_FCTR = 0x36,
GEOMETRY_DESC_PARAM_ENM3_MAX_NUM_UNITS = 0x38,
GEOMETRY_DESC_PARAM_ENM3_CAP_ADJ_FCTR = 0x3C,
GEOMETRY_DESC_PARAM_ENM4_MAX_NUM_UNITS = 0x3E,
GEOMETRY_DESC_PARAM_ENM4_CAP_ADJ_FCTR = 0x42,
GEOMETRY_DESC_PARAM_OPT_LOG_BLK_SIZE = 0x44,
GEOMETRY_DESC_PARAM_WB_MAX_ALLOC_UNITS = 0x4F,
GEOMETRY_DESC_PARAM_WB_MAX_WB_LUNS = 0x53,
GEOMETRY_DESC_PARAM_WB_BUFF_CAP_ADJ = 0x54,
GEOMETRY_DESC_PARAM_WB_SUP_RED_TYPE = 0x55,
GEOMETRY_DESC_PARAM_WB_SUP_WB_TYPE = 0x56,
};
/* Health descriptor parameters offsets in bytes*/
enum health_desc_param {
HEALTH_DESC_PARAM_LEN = 0x0,
HEALTH_DESC_PARAM_TYPE = 0x1,
HEALTH_DESC_PARAM_EOL_INFO = 0x2,
HEALTH_DESC_PARAM_LIFE_TIME_EST_A = 0x3,
HEALTH_DESC_PARAM_LIFE_TIME_EST_B = 0x4,
};
/* WriteBooster buffer mode */
enum {
WB_BUF_MODE_LU_DEDICATED = 0x0,
WB_BUF_MODE_SHARED = 0x1,
};
/*
* Logical Unit Write Protect
* 00h: LU not write protected
* 01h: LU write protected when fPowerOnWPEn =1
* 02h: LU permanently write protected when fPermanentWPEn =1
*/
enum ufs_lu_wp_type {
UFS_LU_NO_WP = 0x00,
UFS_LU_POWER_ON_WP = 0x01,
UFS_LU_PERM_WP = 0x02,
};
/* bActiveICCLevel parameter current units */
enum {
UFSHCD_NANO_AMP = 0,
UFSHCD_MICRO_AMP = 1,
UFSHCD_MILI_AMP = 2,
UFSHCD_AMP = 3,
};
/* Possible values for dExtendedUFSFeaturesSupport */
enum {
UFS_DEV_WRITE_BOOSTER_SUP = BIT(8),
};
#define POWER_DESC_MAX_SIZE 0x62
#define POWER_DESC_MAX_ACTV_ICC_LVLS 16
/* Attribute bActiveICCLevel parameter bit masks definitions */
#define ATTR_ICC_LVL_UNIT_OFFSET 14
#define ATTR_ICC_LVL_UNIT_MASK (0x3 << ATTR_ICC_LVL_UNIT_OFFSET)
#define ATTR_ICC_LVL_VALUE_MASK 0x3FF
/* Power descriptor parameters offsets in bytes */
enum power_desc_param_offset {
PWR_DESC_LEN = 0x0,
PWR_DESC_TYPE = 0x1,
PWR_DESC_ACTIVE_LVLS_VCC_0 = 0x2,
PWR_DESC_ACTIVE_LVLS_VCCQ_0 = 0x22,
PWR_DESC_ACTIVE_LVLS_VCCQ2_0 = 0x42,
};
/* Exception event mask values */
enum {
MASK_EE_STATUS = 0xFFFF,
MASK_EE_URGENT_BKOPS = (1 << 2),
};
/* Background operation status */
enum bkops_status {
BKOPS_STATUS_NO_OP = 0x0,
BKOPS_STATUS_NON_CRITICAL = 0x1,
BKOPS_STATUS_PERF_IMPACT = 0x2,
BKOPS_STATUS_CRITICAL = 0x3,
BKOPS_STATUS_MAX = BKOPS_STATUS_CRITICAL,
};
/* UTP QUERY Transaction Specific Fields OpCode */
enum query_opcode {
UPIU_QUERY_OPCODE_NOP = 0x0,
UPIU_QUERY_OPCODE_READ_DESC = 0x1,
UPIU_QUERY_OPCODE_WRITE_DESC = 0x2,
UPIU_QUERY_OPCODE_READ_ATTR = 0x3,
UPIU_QUERY_OPCODE_WRITE_ATTR = 0x4,
UPIU_QUERY_OPCODE_READ_FLAG = 0x5,
UPIU_QUERY_OPCODE_SET_FLAG = 0x6,
UPIU_QUERY_OPCODE_CLEAR_FLAG = 0x7,
UPIU_QUERY_OPCODE_TOGGLE_FLAG = 0x8,
#ifdef CONFIG_SCSI_UFSHCD_QTI
UPIU_QUERY_OPCODE_MAX,
#endif
};
/* bRefClkFreq attribute values */
enum ufs_ref_clk_freq {
REF_CLK_FREQ_19_2_MHZ = 0,
REF_CLK_FREQ_26_MHZ = 1,
REF_CLK_FREQ_38_4_MHZ = 2,
REF_CLK_FREQ_52_MHZ = 3,
REF_CLK_FREQ_INVAL = -1,
};
struct ufs_ref_clk {
unsigned long freq_hz;
enum ufs_ref_clk_freq val;
};
/* Query response result code */
enum {
QUERY_RESULT_SUCCESS = 0x00,
QUERY_RESULT_NOT_READABLE = 0xF6,
QUERY_RESULT_NOT_WRITEABLE = 0xF7,
QUERY_RESULT_ALREADY_WRITTEN = 0xF8,
QUERY_RESULT_INVALID_LENGTH = 0xF9,
QUERY_RESULT_INVALID_VALUE = 0xFA,
QUERY_RESULT_INVALID_SELECTOR = 0xFB,
QUERY_RESULT_INVALID_INDEX = 0xFC,
QUERY_RESULT_INVALID_IDN = 0xFD,
QUERY_RESULT_INVALID_OPCODE = 0xFE,
QUERY_RESULT_GENERAL_FAILURE = 0xFF,
};
/* UTP Transfer Request Command Type (CT) */
enum {
UPIU_COMMAND_SET_TYPE_SCSI = 0x0,
UPIU_COMMAND_SET_TYPE_UFS = 0x1,
UPIU_COMMAND_SET_TYPE_QUERY = 0x2,
};
/* UTP Transfer Request Command Offset */
#define UPIU_COMMAND_TYPE_OFFSET 28
/* Offset of the response code in the UPIU header */
#define UPIU_RSP_CODE_OFFSET 8
enum {
MASK_SCSI_STATUS = 0xFF,
MASK_TASK_RESPONSE = 0xFF00,
MASK_RSP_UPIU_RESULT = 0xFFFF,
MASK_QUERY_DATA_SEG_LEN = 0xFFFF,
MASK_RSP_UPIU_DATA_SEG_LEN = 0xFFFF,
MASK_RSP_EXCEPTION_EVENT = 0x10000,
MASK_TM_SERVICE_RESP = 0xFF,
MASK_TM_FUNC = 0xFF,
};
/* Task management service response */
enum {
UPIU_TASK_MANAGEMENT_FUNC_COMPL = 0x00,
UPIU_TASK_MANAGEMENT_FUNC_NOT_SUPPORTED = 0x04,
UPIU_TASK_MANAGEMENT_FUNC_SUCCEEDED = 0x08,
UPIU_TASK_MANAGEMENT_FUNC_FAILED = 0x05,
UPIU_INCORRECT_LOGICAL_UNIT_NO = 0x09,
};
/* UFS device power modes */
enum ufs_dev_pwr_mode {
UFS_ACTIVE_PWR_MODE = 1,
UFS_SLEEP_PWR_MODE = 2,
UFS_POWERDOWN_PWR_MODE = 3,
};
#define UFS_WB_BUF_REMAIN_PERCENT(val) ((val) / 10)
/**
* struct utp_cmd_rsp - Response UPIU structure
* @residual_transfer_count: Residual transfer count DW-3
* @reserved: Reserved double words DW-4 to DW-7
* @sense_data_len: Sense data length DW-8 U16
* @sense_data: Sense data field DW-8 to DW-12
*/
struct utp_cmd_rsp {
__be32 residual_transfer_count;
__be32 reserved[4];
__be16 sense_data_len;
u8 sense_data[UFS_SENSE_SIZE];
};
/**
* struct utp_upiu_rsp - general upiu response structure
* @header: UPIU header structure DW-0 to DW-2
* @sr: fields structure for scsi command DW-3 to DW-12
* @qr: fields structure for query request DW-3 to DW-7
*/
struct utp_upiu_rsp {
struct utp_upiu_header header;
union {
struct utp_cmd_rsp sr;
struct utp_upiu_query qr;
};
};
/**
* struct ufs_query_req - parameters for building a query request
* @query_func: UPIU header query function
* @upiu_req: the query request data
*/
struct ufs_query_req {
u8 query_func;
struct utp_upiu_query upiu_req;
};
/**
* struct ufs_query_resp - UPIU QUERY
* @response: device response code
* @upiu_res: query response data
*/
struct ufs_query_res {
u8 response;
struct utp_upiu_query upiu_res;
};
#define UFS_VREG_VCC_MIN_UV 2700000 /* uV */
#define UFS_VREG_VCC_MAX_UV 3600000 /* uV */
#define UFS_VREG_VCC_1P8_MIN_UV 1700000 /* uV */
#define UFS_VREG_VCC_1P8_MAX_UV 1950000 /* uV */
#define UFS_VREG_VCCQ_MIN_UV 1140000 /* uV */
#define UFS_VREG_VCCQ_MAX_UV 1260000 /* uV */
#define UFS_VREG_VCCQ2_MIN_UV 1700000 /* uV */
#define UFS_VREG_VCCQ2_MAX_UV 1950000 /* uV */
/*
* VCCQ & VCCQ2 current requirement when UFS device is in sleep state
* and link is in Hibern8 state.
*/
#define UFS_VREG_LPM_LOAD_UA 1000 /* uA */
struct ufs_vreg {
struct regulator *reg;
const char *name;
bool enabled;
int min_uV;
int max_uV;
int max_uA;
#ifdef CONFIG_SCSI_UFSHCD_QTI
bool low_voltage_sup;
bool low_voltage_active;
bool sys_suspend_pwr_off;
int min_uA;
bool unused;
#endif
};
struct ufs_vreg_info {
struct ufs_vreg *vcc;
struct ufs_vreg *vccq;
struct ufs_vreg *vccq2;
struct ufs_vreg *vdd_hba;
};
#ifdef CONFIG_SCSI_UFSHCD_QTI
enum {
UFS_DEV_EMBEDDED_BOOTABLE = 0x00,
UFS_DEV_EMBEDDED_NON_BOOTABLE = 0x01,
UFS_DEV_REMOVABLE_BOOTABLE = 0x02,
UFS_DEV_REMOVABLE_NON_BOOTABLE = 0x03,
};
#endif
struct ufs_dev_info {
bool f_power_on_wp_en;
/* Keeps information if any of the LU is power on write protected */
bool is_lu_power_on_wp;
#ifdef CONFIG_SCSI_UFSHCD_QTI
u8 b_device_sub_class;
u8 i_product_name;
/* is Unit Attention Condition cleared on UFS Device LUN? */
unsigned is_ufs_dev_wlun_ua_cleared:1;
#endif
/* Maximum number of general LU supported by the UFS device */
u8 max_lu_supported;
u8 wb_dedicated_lu;
u16 wmanufacturerid;
/*UFS device Product Name */
u8 *model;
u16 wspecversion;
u32 clk_gating_wait_us;
u32 d_ext_ufs_feature_sup;
u8 b_wb_buffer_type;
u32 d_wb_alloc_units;
bool b_rpm_dev_flush_capable;
u8 b_presrv_uspc_en;
};
/**
* ufs_is_valid_unit_desc_lun - checks if the given LUN has a unit descriptor
* @lun: LU number to check
* @return: true if the lun has a matching unit descriptor, false otherwise
*/
static inline bool ufs_is_valid_unit_desc_lun(u8 lun)
{
return lun == UFS_UPIU_RPMB_WLUN || (lun < UFS_UPIU_MAX_GENERAL_LUN);
}
#endif /* End of Header */