Skip to content

Commit f5acc36

Browse files
drmiller-cnirleon
authored andcommitted
IB/hfi1: Reduce printing of errors during driver shut down
The driver prints unnecessary prints for error conditions on shutdown remove them to quiet it down. Signed-off-by: Douglas Miller <[email protected]> Signed-off-by: Dennis Dalessandro <[email protected]> Link: https://lore.kernel.org/r/169271327832.1855761.3756156924805531643.stgit@awfm-02.cornelisnetworks.com Signed-off-by: Leon Romanovsky <[email protected]>
1 parent d2c0234 commit f5acc36

File tree

1 file changed

+5
-3
lines changed
  • drivers/infiniband/hw/hfi1

1 file changed

+5
-3
lines changed

drivers/infiniband/hw/hfi1/chip.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,8 @@ static u64 dc_access_lcb_cntr(const struct cntr_entry *entry, void *context,
14611461
ret = write_lcb_csr(dd, csr, data);
14621462

14631463
if (ret) {
1464-
dd_dev_err(dd, "Could not acquire LCB for counter 0x%x", csr);
1464+
if (!(dd->flags & HFI1_SHUTDOWN))
1465+
dd_dev_err(dd, "Could not acquire LCB for counter 0x%x", csr);
14651466
return 0;
14661467
}
14671468

@@ -6160,7 +6161,7 @@ static int request_host_lcb_access(struct hfi1_devdata *dd)
61606161
ret = do_8051_command(dd, HCMD_MISC,
61616162
(u64)HCMD_MISC_REQUEST_LCB_ACCESS <<
61626163
LOAD_DATA_FIELD_ID_SHIFT, NULL);
6163-
if (ret != HCMD_SUCCESS) {
6164+
if (ret != HCMD_SUCCESS && !(dd->flags & HFI1_SHUTDOWN)) {
61646165
dd_dev_err(dd, "%s: command failed with error %d\n",
61656166
__func__, ret);
61666167
}
@@ -6241,7 +6242,8 @@ int acquire_lcb_access(struct hfi1_devdata *dd, int sleep_ok)
62416242
if (dd->lcb_access_count == 0) {
62426243
ret = request_host_lcb_access(dd);
62436244
if (ret) {
6244-
dd_dev_err(dd,
6245+
if (!(dd->flags & HFI1_SHUTDOWN))
6246+
dd_dev_err(dd,
62456247
"%s: unable to acquire LCB access, err %d\n",
62466248
__func__, ret);
62476249
goto done;

0 commit comments

Comments
 (0)