Re: [PATCH 12/15] qedf: Move some prints to a debug level so they do not print when no debugging is enabled.

2017-05-24 Thread Bart Van Assche
On Tue, 2017-05-23 at 06:19 -0700, Dupuis, Chad wrote:
>   if (lport->port_id != ntoh24(fh->fh_d_id) && !vn_port) {
> - QEDF_ERR(&(qedf->dbg_ctx), "Dropping frame due to "
> - "destination mismatch: lport->port_id=%x "
> - "fh->d_id=%x.\n",
> + QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2,
> + "Dropping frame due to destination mismatch: "
> + "lport->port_id=%x fh->d_id=%x.\n",
>   lport->port_id, ntoh24(fh->fh_d_id));
>   kfree_skb(skb);
>   return;

Hello Chad,

Please consider to keep the above error message on a single line.

Thanks,

Bart.

[PATCH 12/15] qedf: Move some prints to a debug level so they do not print when no debugging is enabled.

2017-05-23 Thread Dupuis, Chad
Signed-off-by: Chad Dupuis 
---
 drivers/scsi/qedf/qedf_main.c | 19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 7d1a953..340cf74 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -442,7 +442,8 @@ static void qedf_link_update(void *dev, struct 
qed_link_output *link)
qedf_update_link_speed(qedf, link);
 
if (atomic_read(&qedf->dcbx) == QEDF_DCBX_DONE) {
-   QEDF_ERR(&(qedf->dbg_ctx), "DCBx done.\n");
+   QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_DISC,
+"DCBx done.\n");
if (atomic_read(&qedf->link_down_tmo_valid) > 0)
queue_delayed_work(qedf->link_update_wq,
&qedf->link_recovery, 0);
@@ -2156,16 +2157,16 @@ static void qedf_recv_frame(struct qedf_ctx *qedf,
}
 
if (ntoh24(&dest_mac[3]) != ntoh24(fh->fh_d_id)) {
-   QEDF_ERR(&(qedf->dbg_ctx), "FC frame d_id mismatch with MAC "
-   "%pM.\n", dest_mac);
+   QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2,
+   "FC frame d_id mismatch with MAC %pM.\n", dest_mac);
return;
}
 
if (qedf->ctlr.state) {
if (!ether_addr_equal(mac, qedf->ctlr.dest_addr)) {
-   QEDF_ERR(&(qedf->dbg_ctx), "Wrong source address: "
-   "mac:%pM dest_addr:%pM.\n", mac,
-   qedf->ctlr.dest_addr);
+   QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2,
+   "Wrong source address: mac:%pM dest_addr:%pM.\n",
+   mac, qedf->ctlr.dest_addr);
kfree_skb(skb);
return;
}
@@ -2179,9 +2180,9 @@ static void qedf_recv_frame(struct qedf_ctx *qedf,
 * empty then this is not addressed to our port so simply drop it.
 */
if (lport->port_id != ntoh24(fh->fh_d_id) && !vn_port) {
-   QEDF_ERR(&(qedf->dbg_ctx), "Dropping frame due to "
-   "destination mismatch: lport->port_id=%x "
-   "fh->d_id=%x.\n",
+   QEDF_INFO(&(qedf->dbg_ctx), QEDF_LOG_LL2,
+   "Dropping frame due to destination mismatch: "
+   "lport->port_id=%x fh->d_id=%x.\n",
lport->port_id, ntoh24(fh->fh_d_id));
kfree_skb(skb);
return;
-- 
1.8.5.6