linux-stable/drivers
Yangyang Li c9eff9a722 RDMA/hns: Add the detection for CMDQ status in the device initialization process
[ Upstream commit e8ea058edc ]

CMDQ may fail during HNS ROCEE initialization. The following is the log
when the execution fails:

  hns3 0000:bd:00.2: In reset process RoCE client reinit.
  hns3 0000:bd:00.2: CMDQ move tail from 840 to 839
  hns3 0000:bd:00.2 hns_2: failed to set gid, ret = -11!
  hns3 0000:bd:00.2: CMDQ move tail from 840 to 839
  <...>
  hns3 0000:bd:00.2: CMDQ move tail from 840 to 839
  hns3 0000:bd:00.2: CMDQ move tail from 840 to 0
  hns3 0000:bd:00.2: [cmd]token 14e mailbox 20 timeout.
  hns3 0000:bd:00.2 hns_2: set HEM step 0 failed!
  hns3 0000:bd:00.2 hns_2: set HEM address to HW failed!
  hns3 0000:bd:00.2 hns_2: failed to alloc mtpt, ret = -16.
  infiniband hns_2: Couldn't create ib_mad PD
  infiniband hns_2: Couldn't open port 1
  hns3 0000:bd:00.2: Reset done, RoCE client reinit finished.

However, even if ib_mad client registration failed, ib_register_device()
still returns success to the driver.

In the device initialization process, CMDQ execution fails because HW/FW
is abnormal. Therefore, if CMDQ fails, the initialization function should
set CMDQ to a fatal error state and return a failure to the caller.

Fixes: 9a4435375c ("IB/hns: Add driver files for hns RoCE driver")
Link: https://lore.kernel.org/r/20220429093104.26687-1-liangwenpeng@huawei.com
Signed-off-by: Yangyang Li <liyangyang20@huawei.com>
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:26:06 +02:00
..
accessibility
acpi ACPI: CPPC: Assume no transition latency if no PCCT 2022-06-09 10:25:29 +02:00
amba
android
ata
atm
auxdisplay
base drivers/base/memory: fix an unlikely reference counting issue in __add_memory_block() 2022-06-09 10:26:05 +02:00
bcma
block virtio_blk: fix the discard_granularity and discard_alignment queue limits 2022-06-09 10:25:46 +02:00
bluetooth Bluetooth: btmtksdio: fix use-after-free at btmtksdio_recv_event 2022-06-09 10:25:52 +02:00
bus bus: sunxi-rsb: Fix the return value of sunxi_rsb_device_create() 2022-05-09 09:16:23 +02:00
cdrom
char hwrng: cn10k - Make check_rng_health() return an error code 2022-06-09 10:26:02 +02:00
clk clk: at91: generated: consider range when calculating best rate 2022-05-25 09:59:08 +02:00
clocksource
comedi
connector
counter
cpufreq Revert "cpufreq: Fix possible race in cpufreq online error path" 2022-06-09 10:25:48 +02:00
cpuidle cpuidle: PSCI: Improve support for suspend-to-RAM for PSCI OSI mode 2022-06-09 10:25:21 +02:00
crypto crypto: ccp - Fix the INIT_EX data file open failure 2022-06-09 10:26:04 +02:00
cxl
dax
dca
devfreq PM / devfreq: rk3399_dmc: Disable edev on remove() 2022-06-09 10:25:32 +02:00
dio
dma
dma-buf dma-buf: ensure unique directory name for dmabuf stats 2022-05-25 09:59:04 +02:00
edac EDAC/dmc520: Don't print an error for each unconfigured interrupt line 2022-06-09 10:25:40 +02:00
eisa
extcon
firewire firewire: core: extend card->lock in fw_core_handle_bus_reset 2022-05-12 12:32:20 +02:00
firmware firmware: arm_ffa: Remove incorrect assignment of driver_data 2022-06-09 10:26:05 +02:00
fpga
fsi
gnss
gpio pinctrl/rockchip: support deferring other gpio params 2022-06-09 10:26:03 +02:00
gpu drm/msm/dpu: fix error check return value of irq_of_parse_and_map() 2022-06-09 10:26:05 +02:00
greybus
hid HID: amd_sfh: Modify the hid name 2022-06-09 10:25:49 +02:00
hsi
hv Drivers: hv: vmbus: Fix handling of messages with transaction ID of zero 2022-06-09 10:26:03 +02:00
hwmon hwmon: (pmbus) Check PEC support before reading other registers 2022-06-09 10:25:57 +02:00
hwspinlock
hwtracing
i2c i2c: ismt: prevent memory corruption in ismt_access() 2022-06-06 08:47:50 +02:00
i3c
idle
iio iio:dac:ad3552r: Fix an IS_ERR() vs NULL check 2022-05-09 09:16:18 +02:00
infiniband RDMA/hns: Add the detection for CMDQ status in the device initialization process 2022-06-09 10:26:06 +02:00
input Input: gpio-keys - cancel delayed work only in case of GPIO 2022-06-09 10:25:35 +02:00
interconnect interconnect: Restore sync state by ignoring ipa-virt in provider count 2022-05-18 10:28:18 +02:00
iommu iommu/vt-d: Add RPLS to quirk list to skip TE disabling 2022-06-09 10:25:17 +02:00
ipack
irqchip irqchip/gic-v3: Fix priority mask handling 2022-06-09 10:25:53 +02:00
isdn
leds
macintosh macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled 2022-06-09 10:25:35 +02:00
mailbox
mcb
md md/bitmap: don't set sb values if can't pass sanity check 2022-06-09 10:25:22 +02:00
media media: i2c: ov5648: fix wrong pointer passed to IS_ERR() and PTR_ERR() 2022-06-09 10:25:54 +02:00
memory memory: samsung: exynos5422-dmc: Avoid some over memory allocation 2022-06-09 10:25:59 +02:00
memstick
message
mfd mfd: ipaq-micro: Fix error check return value of platform_get_irq() 2022-06-09 10:26:03 +02:00
misc misc: ocxl: fix possible double free in ocxl_file_register_afu 2022-06-09 10:26:02 +02:00
mmc drivers: mmc: sdhci_am654: Add the quirk to set TESTCD bit 2022-06-09 10:25:22 +02:00
most
mtd mtd: rawnand: intel: fix possible null-ptr-deref in ebu_nand_probe() 2022-06-09 10:25:44 +02:00
mux
net can: xilinx_can: mark bit timing constants as const 2022-06-09 10:26:01 +02:00
nfc NFC: hci: fix sleep in atomic context bugs in nfc_hci_hcp_message_tx 2022-06-09 10:25:56 +02:00
ntb
nubus
nvdimm nvdimm: Allow overwrite in the presence of disabled dimms 2022-06-09 10:26:04 +02:00
nvme nvme: set dma alignment to dword 2022-06-09 10:25:53 +02:00
nvmem
of of: overlay: do not break notify on NOTIFY_{OK|STOP} 2022-06-09 10:25:43 +02:00
opp
parisc
parport
pci PCI: dwc: Fix setting error return on MSI DMA mapping failure 2022-06-09 10:26:00 +02:00
pcmcia
perf
phy phy: amlogic: fix error path in phy_g12a_usb3_pcie_probe() 2022-05-09 09:16:20 +02:00
pinctrl pinctrl: renesas: core: Fix possible null-ptr-deref in sh_pfc_map_resources() 2022-06-09 10:26:05 +02:00
platform platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:26:01 +02:00
pnp
power
powercap
pps
ps3
ptp ptp: ocp: have adjtime handle negative delta_ns correctly 2022-05-25 09:59:07 +02:00
pwm
rapidio
ras
regulator regulator: scmi: Fix refcount leak in scmi_regulator_probe 2022-06-09 10:25:54 +02:00
remoteproc
reset
rpmsg
rtc rtc: mc146818-lib: Fix the AltCentury for AMD platforms 2022-05-25 09:59:01 +02:00
s390 s390/lcs: fix variable dereferenced before check 2022-05-18 10:28:15 +02:00
sbus
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-09 10:26:03 +02:00
sh
siox
slimbus slimbus: qcom: Fix IRQ check in qcom_slim_probe 2022-05-18 10:28:20 +02:00
soc soc: bcm: Check for NULL return of devm_kzalloc() 2022-06-09 10:26:03 +02:00
soundwire
spi spi: spi-fsl-qspi: check return value after calling platform_get_resource_byname() 2022-06-09 10:25:48 +02:00
spmi
ssb
staging media: rkvdec: h264: Fix bit depth wrap in pps packet 2022-06-09 10:25:54 +02:00
target target: remove an incorrect unmap zeroes data deduction 2022-06-09 10:25:40 +02:00
tc
tee tee: optee: add missing mutext_destroy in optee_ffa_probe 2022-05-09 09:16:17 +02:00
thermal thermal/drivers/imx_sc_thermal: Fix refcount leak in imx_sc_thermal_probe 2022-06-09 10:25:56 +02:00
thunderbolt
tty serial: 8250_mtk: Fix register address for XON/XOFF character 2022-05-18 10:28:20 +02:00
uio
usb xhci: Allow host runtime PM as default for Intel Alder Lake N xHCI 2022-06-09 10:25:15 +02:00
vdpa vdpa/mlx5: Use consistent RQT size 2022-05-25 09:59:11 +02:00
vfio
vhost Fix double fget() in vhost_net_set_backend() 2022-05-25 09:59:03 +02:00
video fbcon: Consistently protect deferred_takeover with console_lock() 2022-06-09 10:25:19 +02:00
virt
virtio
visorbus
vlynq
vme
w1
watchdog Watchdog: sp5100_tco: Enable Family 17h+ CPUs 2022-05-25 09:58:58 +02:00
xen
zorro
Kconfig
Makefile