netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/1] qedr: Avoid DB recover entry deletion when device is not active.
@ 2020-04-30 12:41 Sudarsana Reddy Kalluru
  2020-05-01  0:34 ` kbuild test robot
  0 siblings, 1 reply; 2+ messages in thread
From: Sudarsana Reddy Kalluru @ 2020-04-30 12:41 UTC (permalink / raw)
  To: davem; +Cc: netdev, aelior, irusskikh, mkalderon

The doorbell (DB) recovery entries gets deleted by the QED driver when
QEDR device transition to non-active or dead state (e.g., during the
AER recovery phase). The patch adds driver changes to skip deleting
DB recovery entries from QEDR when the device is in non-active state.

Fixes: 731815e720ae ("qede: Add support for handling the pcie errors.")
Signed-off-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
---
 drivers/infiniband/hw/qedr/verbs.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
index a5bd3ad..7e10f3b 100644
--- a/drivers/infiniband/hw/qedr/verbs.c
+++ b/drivers/infiniband/hw/qedr/verbs.c
@@ -672,6 +672,12 @@ static void qedr_db_recovery_del(struct qedr_dev *dev,
 				 void __iomem *db_addr,
 				 void *db_data)
 {
+	if (QEDR_DEAD(dev)) {
+		DP_VERBOSE(dev, QEDR_MSG_FAIL,
+			   "avoiding db rec since device is dead\n");
+		return 0;
+	}
+
 	if (!db_data) {
 		DP_DEBUG(dev, QEDR_MSG_INIT, "avoiding db rec since old lib\n");
 		return;
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next 1/1] qedr: Avoid DB recover entry deletion when device is not active.
  2020-04-30 12:41 [PATCH net-next 1/1] qedr: Avoid DB recover entry deletion when device is not active Sudarsana Reddy Kalluru
@ 2020-05-01  0:34 ` kbuild test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kbuild test robot @ 2020-05-01  0:34 UTC (permalink / raw)
  To: Sudarsana Reddy Kalluru, davem, netdev, aelior, irusskikh,
	mkalderon
  Cc: kbuild-all, netdev, aelior, irusskikh

[-- Attachment #1: Type: text/plain, Size: 3703 bytes --]

Hi Sudarsana,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    https://github.com/0day-ci/linux/commits/Sudarsana-Reddy-Kalluru/qedr-Avoid-DB-recover-entry-deletion-when-device-is-not-active/20200501-033426
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 323e395f197fd0bc1bf7a7a7e4c67d3d7410f24f
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   drivers/infiniband/hw/qedr/verbs.c: In function 'qedr_db_recovery_del':
>> drivers/infiniband/hw/qedr/verbs.c:675:6: error: implicit declaration of function 'QEDR_DEAD' [-Werror=implicit-function-declaration]
     675 |  if (QEDR_DEAD(dev)) {
         |      ^~~~~~~~~
   In file included from include/linux/string.h:6,
                    from include/linux/dma-mapping.h:6,
                    from drivers/infiniband/hw/qedr/verbs.c:32:
>> drivers/infiniband/hw/qedr/verbs.c:676:19: error: 'QEDR_MSG_FAIL' undeclared (first use in this function); did you mean 'QEDR_MSG_INIT'?
     676 |   DP_VERBOSE(dev, QEDR_MSG_FAIL,
         |                   ^~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> drivers/infiniband/hw/qedr/verbs.c:676:3: note: in expansion of macro 'DP_VERBOSE'
     676 |   DP_VERBOSE(dev, QEDR_MSG_FAIL,
         |   ^~~~~~~~~~
   drivers/infiniband/hw/qedr/verbs.c:676:19: note: each undeclared identifier is reported only once for each function it appears in
     676 |   DP_VERBOSE(dev, QEDR_MSG_FAIL,
         |                   ^~~~~~~~~~~~~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
>> drivers/infiniband/hw/qedr/verbs.c:676:3: note: in expansion of macro 'DP_VERBOSE'
     676 |   DP_VERBOSE(dev, QEDR_MSG_FAIL,
         |   ^~~~~~~~~~
>> drivers/infiniband/hw/qedr/verbs.c:678:10: warning: 'return' with a value, in function returning void [-Wreturn-type]
     678 |   return 0;
         |          ^
   drivers/infiniband/hw/qedr/verbs.c:671:13: note: declared here
     671 | static void qedr_db_recovery_del(struct qedr_dev *dev,
         |             ^~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/QEDR_DEAD +675 drivers/infiniband/hw/qedr/verbs.c

   670	
   671	static void qedr_db_recovery_del(struct qedr_dev *dev,
   672					 void __iomem *db_addr,
   673					 void *db_data)
   674	{
 > 675		if (QEDR_DEAD(dev)) {
 > 676			DP_VERBOSE(dev, QEDR_MSG_FAIL,
   677				   "avoiding db rec since device is dead\n");
 > 678			return 0;
   679		}
   680	
   681		if (!db_data) {
   682			DP_DEBUG(dev, QEDR_MSG_INIT, "avoiding db rec since old lib\n");
   683			return;
   684		}
   685	
   686		/* Ignore return code as there is not much we can do about it. Error
   687		 * log will be printed inside.
   688		 */
   689		dev->ops->common->db_recovery_del(dev->cdev, db_addr, db_data);
   690	}
   691	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 63445 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-01  0:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-30 12:41 [PATCH net-next 1/1] qedr: Avoid DB recover entry deletion when device is not active Sudarsana Reddy Kalluru
2020-05-01  0:34 ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).