[PATCH for-next] RDMA/core: Add a debug print when a driver is marked as non-kverbs provider

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a debug print which is emitted when a certain driver is marked as
non-kverbs provider. This allows for easier understanding of why kverbs
functionality isn't working in such cases.

In addition, print the name of the first mandatory verb that is missing.
This brings back use for the unused name field.

Signed-off-by: Gal Pressman <galpress@xxxxxxxxxx>
---
 drivers/infiniband/core/device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index d293b826acbc..dc5896040df9 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -293,6 +293,10 @@ static void ib_device_check_mandatory(struct ib_device *device)
 	for (i = 0; i < ARRAY_SIZE(mandatory_table); ++i) {
 		if (!*(void **) ((void *) &device->ops +
 				 mandatory_table[i].offset)) {
+			ibdev_dbg(
+				device,
+				"Marking as non-kverbs provider due to missing mandatory verb %s",
+				mandatory_table[i].name);
 			device->kverbs_provider = false;
 			break;
 		}
-- 
2.28.0




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux