Skip to content

Commit 525ef5c

Browse files
Yuval Mintzdavem330
authored andcommitted
qed*: Add and modify some prints
This patch touches various prints in the driver - it reduces the verbosity of some prints [which were previously logged by default] while adding several new debug prints and modifying others. Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 83aeb93 commit 525ef5c

6 files changed

Lines changed: 53 additions & 24 deletions

File tree

‎drivers/net/ethernet/qlogic/qed/qed_dev.c‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ static int qed_reg_assert(struct qed_hwfn *p_hwfn,
12061206
u32 assert_val = qed_rd(p_hwfn, p_ptt, reg);
12071207

12081208
if (assert_val != expected) {
1209-
DP_NOTICE(p_hwfn, "Value at address 0x%x != 0x%08x\n",
1209+
DP_NOTICE(p_hwfn, "Value at address 0x%08x != 0x%08x\n",
12101210
reg, expected);
12111211
return -EINVAL;
12121212
}
@@ -1306,6 +1306,10 @@ static void get_function_id(struct qed_hwfn *p_hwfn)
13061306
PXP_CONCRETE_FID_PFID);
13071307
p_hwfn->port_id = GET_FIELD(p_hwfn->hw_info.concrete_fid,
13081308
PXP_CONCRETE_FID_PORT);
1309+
1310+
DP_VERBOSE(p_hwfn, NETIF_MSG_PROBE,
1311+
"Read ME register: Concrete 0x%08x Opaque 0x%04x\n",
1312+
p_hwfn->hw_info.concrete_fid, p_hwfn->hw_info.opaque_fid);
13091313
}
13101314

13111315
static void qed_hw_set_feat(struct qed_hwfn *p_hwfn)
@@ -1605,10 +1609,10 @@ static void qed_get_num_funcs(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
16051609

16061610
DP_VERBOSE(p_hwfn,
16071611
NETIF_MSG_PROBE,
1608-
"PF [rel_id %d, abs_id %d] within the %d enabled functions on the engine\n",
1612+
"PF [rel_id %d, abs_id %d] occupies index %d within the %d enabled functions on the engine\n",
16091613
p_hwfn->rel_pf_id,
16101614
p_hwfn->abs_pf_id,
1611-
p_hwfn->num_funcs_on_engine);
1615+
p_hwfn->enabled_func_idx, p_hwfn->num_funcs_on_engine);
16121616
}
16131617

16141618
static int

‎drivers/net/ethernet/qlogic/qed/qed_int.c‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2576,8 +2576,12 @@ static u16 qed_get_igu_sb_id(struct qed_hwfn *p_hwfn, u16 sb_id)
25762576
else
25772577
igu_sb_id = qed_vf_get_igu_sb_id(p_hwfn, sb_id);
25782578

2579-
DP_VERBOSE(p_hwfn, NETIF_MSG_INTR, "SB [%s] index is 0x%04x\n",
2580-
(sb_id == QED_SP_SB_ID) ? "DSB" : "non-DSB", igu_sb_id);
2579+
if (sb_id == QED_SP_SB_ID)
2580+
DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
2581+
"Slowpath SB index in IGU is 0x%04x\n", igu_sb_id);
2582+
else
2583+
DP_VERBOSE(p_hwfn, NETIF_MSG_INTR,
2584+
"SB [%04x] <--> IGU SB [%04x]\n", sb_id, igu_sb_id);
25812585

25822586
return igu_sb_id;
25832587
}

‎drivers/net/ethernet/qlogic/qed/qed_main.c‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ MODULE_FIRMWARE(QED_FW_FILE_NAME);
5151

5252
static int __init qed_init(void)
5353
{
54-
pr_notice("qed_init called\n");
55-
5654
pr_info("%s", version);
5755

5856
return 0;
@@ -437,6 +435,11 @@ static int qed_set_int_mode(struct qed_dev *cdev, bool force_mode)
437435
}
438436

439437
out:
438+
if (!rc)
439+
DP_INFO(cdev, "Using %s interrupts\n",
440+
int_params->out.int_mode == QED_INT_MODE_INTA ?
441+
"INTa" : int_params->out.int_mode == QED_INT_MODE_MSI ?
442+
"MSI" : "MSIX");
440443
cdev->int_coalescing_mode = QED_COAL_MODE_ENABLE;
441444

442445
return rc;
@@ -512,19 +515,18 @@ static irqreturn_t qed_single_int(int irq, void *dev_instance)
512515
int qed_slowpath_irq_req(struct qed_hwfn *hwfn)
513516
{
514517
struct qed_dev *cdev = hwfn->cdev;
518+
u32 int_mode;
515519
int rc = 0;
516520
u8 id;
517521

518-
if (cdev->int_params.out.int_mode == QED_INT_MODE_MSIX) {
522+
int_mode = cdev->int_params.out.int_mode;
523+
if (int_mode == QED_INT_MODE_MSIX) {
519524
id = hwfn->my_id;
520525
snprintf(hwfn->name, NAME_SIZE, "sp-%d-%02x:%02x.%02x",
521526
id, cdev->pdev->bus->number,
522527
PCI_SLOT(cdev->pdev->devfn), hwfn->abs_pf_id);
523528
rc = request_irq(cdev->int_params.msix_table[id].vector,
524529
qed_msix_sp_int, 0, hwfn->name, hwfn->sp_dpc);
525-
if (!rc)
526-
DP_VERBOSE(hwfn, (NETIF_MSG_INTR | QED_MSG_SP),
527-
"Requested slowpath MSI-X\n");
528530
} else {
529531
unsigned long flags = 0;
530532

@@ -539,6 +541,13 @@ int qed_slowpath_irq_req(struct qed_hwfn *hwfn)
539541
flags, cdev->name, cdev);
540542
}
541543

544+
if (rc)
545+
DP_NOTICE(cdev, "request_irq failed, rc = %d\n", rc);
546+
else
547+
DP_VERBOSE(hwfn, (NETIF_MSG_INTR | QED_MSG_SP),
548+
"Requested slowpath %s\n",
549+
(int_mode == QED_INT_MODE_MSIX) ? "MSI-X" : "IRQ");
550+
542551
return rc;
543552
}
544553

‎drivers/net/ethernet/qlogic/qed/qed_mcp.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ static int qed_do_mcp_cmd(struct qed_hwfn *p_hwfn,
317317
*o_mcp_param = DRV_MB_RD(p_hwfn, p_ptt, fw_mb_param);
318318
} else {
319319
/* FW BUG! */
320-
DP_ERR(p_hwfn, "MFW failed to respond!\n");
320+
DP_ERR(p_hwfn, "MFW failed to respond [cmd 0x%x param 0x%x]\n",
321+
cmd, param);
321322
*o_mcp_resp = 0;
322323
rc = -EAGAIN;
323324
}
@@ -333,7 +334,7 @@ static int qed_mcp_cmd_and_union(struct qed_hwfn *p_hwfn,
333334

334335
/* MCP not initialized */
335336
if (!qed_mcp_is_init(p_hwfn)) {
336-
DP_NOTICE(p_hwfn, "MFW is not initialized !\n");
337+
DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
337338
return -EBUSY;
338339
}
339340

@@ -935,7 +936,7 @@ int qed_mcp_get_media_type(struct qed_dev *cdev, u32 *p_media_type)
935936
return -EINVAL;
936937

937938
if (!qed_mcp_is_init(p_hwfn)) {
938-
DP_NOTICE(p_hwfn, "MFW is not initialized !\n");
939+
DP_NOTICE(p_hwfn, "MFW is not initialized!\n");
939940
return -EBUSY;
940941
}
941942

‎drivers/net/ethernet/qlogic/qed/qed_spq.c‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,15 +824,22 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
824824

825825
if (!found) {
826826
DP_NOTICE(p_hwfn,
827-
"Failed to find an entry this EQE completes\n");
827+
"Failed to find an entry this EQE [echo %04x] completes\n",
828+
le16_to_cpu(echo));
828829
return -EEXIST;
829830
}
830831

831-
DP_VERBOSE(p_hwfn, QED_MSG_SPQ, "Complete: func %p cookie %p)\n",
832+
DP_VERBOSE(p_hwfn, QED_MSG_SPQ,
833+
"Complete EQE [echo %04x]: func %p cookie %p)\n",
834+
le16_to_cpu(echo),
832835
p_ent->comp_cb.function, p_ent->comp_cb.cookie);
833836
if (found->comp_cb.function)
834837
found->comp_cb.function(p_hwfn, found->comp_cb.cookie, p_data,
835838
fw_return_code);
839+
else
840+
DP_VERBOSE(p_hwfn,
841+
QED_MSG_SPQ,
842+
"Got a completion without a callback function\n");
836843

837844
if ((found->comp_mode != QED_SPQ_MODE_EBLOCK) ||
838845
(found->queue == &p_spq->unlimited_pending))

‎drivers/net/ethernet/qlogic/qede/qede_main.c‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ int __init qede_init(void)
222222
{
223223
int ret;
224224

225-
pr_notice("qede_init: %s\n", version);
225+
pr_info("qede_init: %s\n", version);
226226

227227
qed_ops = qed_get_eth_ops();
228228
if (!qed_ops) {
@@ -253,7 +253,8 @@ int __init qede_init(void)
253253

254254
static void __exit qede_cleanup(void)
255255
{
256-
pr_notice("qede_cleanup called\n");
256+
if (debug & QED_LOG_INFO_MASK)
257+
pr_info("qede_cleanup called\n");
257258

258259
unregister_netdevice_notifier(&qede_netdev_notifier);
259260
pci_unregister_driver(&qede_pci_driver);
@@ -1453,7 +1454,7 @@ static int qede_rx_int(struct qede_fastpath *fp, int budget)
14531454
skb = netdev_alloc_skb(edev->ndev, QEDE_RX_HDR_SIZE);
14541455
if (unlikely(!skb)) {
14551456
DP_NOTICE(edev,
1456-
"Build_skb failed, dropping incoming packet\n");
1457+
"skb allocation failed, dropping incoming packet\n");
14571458
qede_recycle_rx_bd_ring(rxq, edev, fp_cqe->bd_num);
14581459
rxq->rx_alloc_errors++;
14591460
goto next_cqe;
@@ -2130,7 +2131,7 @@ static void qede_udp_tunnel_add(struct net_device *dev,
21302131

21312132
edev->vxlan_dst_port = t_port;
21322133

2133-
DP_VERBOSE(edev, QED_MSG_DEBUG, "Added vxlan port=%d",
2134+
DP_VERBOSE(edev, QED_MSG_DEBUG, "Added vxlan port=%d\n",
21342135
t_port);
21352136

21362137
set_bit(QEDE_SP_VXLAN_PORT_CONFIG, &edev->sp_flags);
@@ -2141,7 +2142,7 @@ static void qede_udp_tunnel_add(struct net_device *dev,
21412142

21422143
edev->geneve_dst_port = t_port;
21432144

2144-
DP_VERBOSE(edev, QED_MSG_DEBUG, "Added geneve port=%d",
2145+
DP_VERBOSE(edev, QED_MSG_DEBUG, "Added geneve port=%d\n",
21452146
t_port);
21462147
set_bit(QEDE_SP_GENEVE_PORT_CONFIG, &edev->sp_flags);
21472148
break;
@@ -2165,7 +2166,7 @@ static void qede_udp_tunnel_del(struct net_device *dev,
21652166

21662167
edev->vxlan_dst_port = 0;
21672168

2168-
DP_VERBOSE(edev, QED_MSG_DEBUG, "Deleted vxlan port=%d",
2169+
DP_VERBOSE(edev, QED_MSG_DEBUG, "Deleted vxlan port=%d\n",
21692170
t_port);
21702171

21712172
set_bit(QEDE_SP_VXLAN_PORT_CONFIG, &edev->sp_flags);
@@ -2176,7 +2177,7 @@ static void qede_udp_tunnel_del(struct net_device *dev,
21762177

21772178
edev->geneve_dst_port = 0;
21782179

2179-
DP_VERBOSE(edev, QED_MSG_DEBUG, "Deleted geneve port=%d",
2180+
DP_VERBOSE(edev, QED_MSG_DEBUG, "Deleted geneve port=%d\n",
21802181
t_port);
21812182
set_bit(QEDE_SP_GENEVE_PORT_CONFIG, &edev->sp_flags);
21822183
break;
@@ -2243,6 +2244,9 @@ static struct qede_dev *qede_alloc_etherdev(struct qed_dev *cdev,
22432244
edev->q_num_rx_buffers = NUM_RX_BDS_DEF;
22442245
edev->q_num_tx_buffers = NUM_TX_BDS_DEF;
22452246

2247+
DP_INFO(edev, "Allocated netdev with %d tx queues and %d rx queues\n",
2248+
info->num_queues, info->num_queues);
2249+
22462250
SET_NETDEV_DEV(ndev, &pdev->dev);
22472251

22482252
memset(&edev->stats, 0, sizeof(edev->stats));
@@ -2568,7 +2572,7 @@ static void __qede_remove(struct pci_dev *pdev, enum qede_remove_mode mode)
25682572
qed_ops->common->slowpath_stop(cdev);
25692573
qed_ops->common->remove(cdev);
25702574

2571-
pr_notice("Ending successfully qede_remove\n");
2575+
dev_info(&pdev->dev, "Ending qede_remove successfully\n");
25722576
}
25732577

25742578
static void qede_remove(struct pci_dev *pdev)

0 commit comments

Comments
 (0)