Skip to content

Commit b2f853c

Browse files
committed
Warn if the application BAR didn't get enumerated
Signed-off-by: Alex Forencich <[email protected]>
1 parent 45a6250 commit b2f853c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/mqnic/mqnic.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,10 @@ struct mqnic *mqnic_open(const char *dev_name)
405405

406406
if (rb) {
407407
dev->app_id = mqnic_reg_read32(rb->regs, MQNIC_RB_APP_INFO_REG_ID);
408+
409+
if (!dev->app_regs) {
410+
fprintf(stderr, "Warning: application section present, but application BAR not mapped\n");
411+
}
408412
}
409413

410414
mqnic_stats_init(dev);

modules/mqnic/mqnic_main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ static int mqnic_common_probe(struct mqnic_dev *mqnic)
309309
if (rb) {
310310
mqnic->app_id = ioread32(rb->regs + MQNIC_RB_APP_INFO_REG_ID);
311311
dev_info(dev, "Application ID: 0x%08x", mqnic->app_id);
312+
313+
if (!mqnic->app_hw_addr) {
314+
dev_warn(dev, "Warning: application section present, but application BAR not mapped");
315+
}
312316
}
313317

314318
mqnic_clk_info_init(mqnic);

0 commit comments

Comments
 (0)