@@ -227,15 +227,14 @@ static void nicvf_handle_mbx_intr(struct nicvf *nic)
227
227
nic -> speed = mbx .link_status .speed ;
228
228
nic -> mac_type = mbx .link_status .mac_type ;
229
229
if (nic -> link_up ) {
230
- netdev_info (nic -> netdev , "%s: Link is Up %d Mbps %s\n" ,
231
- nic -> netdev -> name , nic -> speed ,
230
+ netdev_info (nic -> netdev , "Link is Up %d Mbps %s duplex \n" ,
231
+ nic -> speed ,
232
232
nic -> duplex == DUPLEX_FULL ?
233
- "Full duplex " : "Half duplex " );
233
+ "Full" : "Half" );
234
234
netif_carrier_on (nic -> netdev );
235
235
netif_tx_start_all_queues (nic -> netdev );
236
236
} else {
237
- netdev_info (nic -> netdev , "%s: Link is Down\n" ,
238
- nic -> netdev -> name );
237
+ netdev_info (nic -> netdev , "Link is Down\n" );
239
238
netif_carrier_off (nic -> netdev );
240
239
netif_tx_stop_all_queues (nic -> netdev );
241
240
}
@@ -721,8 +720,7 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev,
721
720
return ;
722
721
723
722
if (netif_msg_pktdata (nic )) {
724
- netdev_info (nic -> netdev , "%s: skb 0x%p, len=%d\n" , netdev -> name ,
725
- skb , skb -> len );
723
+ netdev_info (nic -> netdev , "skb 0x%p, len=%d\n" , skb , skb -> len );
726
724
print_hex_dump (KERN_INFO , "" , DUMP_PREFIX_OFFSET , 16 , 1 ,
727
725
skb -> data , skb -> len , true);
728
726
}
@@ -854,10 +852,8 @@ static int nicvf_cq_intr_handler(struct net_device *netdev, u8 cq_idx,
854
852
netif_tx_wake_queue (txq );
855
853
nic = nic -> pnicvf ;
856
854
this_cpu_inc (nic -> drv_stats -> txq_wake );
857
- if (netif_msg_tx_err (nic ))
858
- netdev_warn (netdev ,
859
- "%s: Transmit queue wakeup SQ%d\n" ,
860
- netdev -> name , txq_idx );
855
+ netif_warn (nic , tx_err , netdev ,
856
+ "Transmit queue wakeup SQ%d\n" , txq_idx );
861
857
}
862
858
}
863
859
@@ -928,9 +924,8 @@ static void nicvf_handle_qs_err(unsigned long data)
928
924
929
925
static void nicvf_dump_intr_status (struct nicvf * nic )
930
926
{
931
- if (netif_msg_intr (nic ))
932
- netdev_info (nic -> netdev , "%s: interrupt status 0x%llx\n" ,
933
- nic -> netdev -> name , nicvf_reg_read (nic , NIC_VF_INT ));
927
+ netif_info (nic , intr , nic -> netdev , "interrupt status 0x%llx\n" ,
928
+ nicvf_reg_read (nic , NIC_VF_INT ));
934
929
}
935
930
936
931
static irqreturn_t nicvf_misc_intr_handler (int irq , void * nicvf_irq )
@@ -1212,10 +1207,8 @@ static netdev_tx_t nicvf_xmit(struct sk_buff *skb, struct net_device *netdev)
1212
1207
netif_tx_wake_queue (txq );
1213
1208
} else {
1214
1209
this_cpu_inc (nic -> drv_stats -> txq_stop );
1215
- if (netif_msg_tx_err (nic ))
1216
- netdev_warn (netdev ,
1217
- "%s: Transmit ring full, stopping SQ%d\n" ,
1218
- netdev -> name , qid );
1210
+ netif_warn (nic , tx_err , netdev ,
1211
+ "Transmit ring full, stopping SQ%d\n" , qid );
1219
1212
}
1220
1213
return NETDEV_TX_BUSY ;
1221
1214
}
@@ -1600,9 +1593,7 @@ static void nicvf_tx_timeout(struct net_device *dev)
1600
1593
{
1601
1594
struct nicvf * nic = netdev_priv (dev );
1602
1595
1603
- if (netif_msg_tx_err (nic ))
1604
- netdev_warn (dev , "%s: Transmit timed out, resetting\n" ,
1605
- dev -> name );
1596
+ netif_warn (nic , tx_err , dev , "Transmit timed out, resetting\n" );
1606
1597
1607
1598
this_cpu_inc (nic -> drv_stats -> tx_timeout );
1608
1599
schedule_work (& nic -> reset_task );
0 commit comments