@@ -740,7 +740,7 @@ static int smc91c92_resume(struct pcmcia_device *link)
740740 (smc -> cardid == PRODID_PSION_NET100 ))) {
741741 i = osi_load_firmware (link );
742742 if (i ) {
743- pr_err ( "smc91c92_cs: Failed to load firmware\n" );
743+ netdev_err ( dev , " Failed to load firmware\n" );
744744 return i ;
745745 }
746746 }
@@ -793,7 +793,7 @@ static int check_sig(struct pcmcia_device *link)
793793 }
794794
795795 if (width ) {
796- pr_info ( "using 8-bit IO window\n" );
796+ netdev_info ( dev , "using 8-bit IO window\n" );
797797
798798 smc91c92_suspend (link );
799799 pcmcia_fixup_iowidth (link );
@@ -1036,7 +1036,7 @@ static void smc_dump(struct net_device *dev)
10361036 save = inw (ioaddr + BANK_SELECT );
10371037 for (w = 0 ; w < 4 ; w ++ ) {
10381038 SMC_SELECT_BANK (w );
1039- netdev_printk ( KERN_DEBUG , dev , "bank %d: " , w );
1039+ netdev_dbg ( dev , "bank %d: " , w );
10401040 for (i = 0 ; i < 14 ; i += 2 )
10411041 pr_cont (" %04x" , inw (ioaddr + i ));
10421042 pr_cont ("\n" );
@@ -1213,8 +1213,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
12131213 if (smc -> saved_skb ) {
12141214 /* THIS SHOULD NEVER HAPPEN. */
12151215 dev -> stats .tx_aborted_errors ++ ;
1216- netdev_printk (KERN_DEBUG , dev ,
1217- "Internal error -- sent packet while busy\n" );
1216+ netdev_dbg (dev , "Internal error -- sent packet while busy\n" );
12181217 return NETDEV_TX_BUSY ;
12191218 }
12201219 smc -> saved_skb = skb ;
@@ -1254,7 +1253,7 @@ static netdev_tx_t smc_start_xmit(struct sk_buff *skb,
12541253 }
12551254
12561255 /* Otherwise defer until the Tx-space-allocated interrupt. */
1257- pr_debug ( "%s: memory allocation deferred.\n", dev -> name );
1256+ netdev_dbg ( dev , " memory allocation deferred.\n" );
12581257 outw ((IM_ALLOC_INT << 8 ) | (ir & 0xff00 ), ioaddr + INTERRUPT );
12591258 spin_unlock_irqrestore (& smc -> lock , flags );
12601259
@@ -1317,8 +1316,8 @@ static void smc_eph_irq(struct net_device *dev)
13171316
13181317 SMC_SELECT_BANK (0 );
13191318 ephs = inw (ioaddr + EPH );
1320- pr_debug ( "%s: Ethernet protocol handler interrupt, status"
1321- " %4.4x.\n" , dev -> name , ephs );
1319+ netdev_dbg ( dev , " Ethernet protocol handler interrupt, status %4.4x.\n" ,
1320+ ephs );
13221321 /* Could be a counter roll-over warning: update stats. */
13231322 card_stats = inw (ioaddr + COUNTER );
13241323 /* single collisions */
@@ -1357,17 +1356,17 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
13571356
13581357 ioaddr = dev -> base_addr ;
13591358
1360- pr_debug ( "%s: SMC91c92 interrupt %d at %#x.\n", dev -> name ,
1361- irq , ioaddr );
1359+ netdev_dbg ( dev , " SMC91c92 interrupt %d at %#x.\n" ,
1360+ irq , ioaddr );
13621361
13631362 spin_lock (& smc -> lock );
13641363 smc -> watchdog = 0 ;
13651364 saved_bank = inw (ioaddr + BANK_SELECT );
13661365 if ((saved_bank & 0xff00 ) != 0x3300 ) {
13671366 /* The device does not exist -- the card could be off-line, or
13681367 maybe it has been ejected. */
1369- pr_debug ( "%s: SMC91c92 interrupt %d for non-existent"
1370- "/ejected device.\n" , dev -> name , irq );
1368+ netdev_dbg ( dev , " SMC91c92 interrupt %d for non-existent/ejected device.\n" ,
1369+ irq );
13711370 handled = 0 ;
13721371 goto irq_done ;
13731372 }
@@ -1380,8 +1379,8 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
13801379
13811380 do { /* read the status flag, and mask it */
13821381 status = inw (ioaddr + INTERRUPT ) & 0xff ;
1383- pr_debug ( "%s: Status is %#2.2x (mask %#2.2x).\n", dev -> name ,
1384- status , mask );
1382+ netdev_dbg ( dev , " Status is %#2.2x (mask %#2.2x).\n" ,
1383+ status , mask );
13851384 if ((status & mask ) == 0 ) {
13861385 if (bogus_cnt == INTR_WORK )
13871386 handled = 0 ;
@@ -1425,15 +1424,15 @@ static irqreturn_t smc_interrupt(int irq, void *dev_id)
14251424 smc_eph_irq (dev );
14261425 } while (-- bogus_cnt );
14271426
1428- pr_debug ( " Restoring saved registers mask %2.2x bank %4.4x"
1429- " pointer %4.4x.\n" , mask , saved_bank , saved_pointer );
1427+ netdev_dbg ( dev , " Restoring saved registers mask %2.2x bank %4.4x pointer %4.4x.\n" ,
1428+ mask , saved_bank , saved_pointer );
14301429
14311430 /* restore state register */
14321431 outw ((mask <<8 ), ioaddr + INTERRUPT );
14331432 outw (saved_pointer , ioaddr + POINTER );
14341433 SMC_SELECT_BANK (saved_bank );
14351434
1436- pr_debug ( "%s: Exiting interrupt IRQ%d.\n", dev -> name , irq );
1435+ netdev_dbg ( dev , " Exiting interrupt IRQ%d.\n" , irq );
14371436
14381437irq_done :
14391438
@@ -1491,18 +1490,18 @@ static void smc_rx(struct net_device *dev)
14911490 rx_status = inw (ioaddr + DATA_1 );
14921491 packet_length = inw (ioaddr + DATA_1 ) & 0x07ff ;
14931492
1494- pr_debug ( "%s: Receive status %4.4x length %d.\n" ,
1495- dev -> name , rx_status , packet_length );
1493+ netdev_dbg ( dev , " Receive status %4.4x length %d.\n" ,
1494+ rx_status , packet_length );
14961495
1497- if (!(rx_status & RS_ERRORS )) {
1496+ if (!(rx_status & RS_ERRORS )) {
14981497 /* do stuff to make a new packet */
14991498 struct sk_buff * skb ;
15001499
15011500 /* Note: packet_length adds 5 or 6 extra bytes here! */
15021501 skb = netdev_alloc_skb (dev , packet_length + 2 );
15031502
15041503 if (skb == NULL ) {
1505- pr_debug ( "%s: Low memory, packet dropped.\n", dev -> name );
1504+ netdev_dbg ( dev , " Low memory, packet dropped.\n" );
15061505 dev -> stats .rx_dropped ++ ;
15071506 outw (MC_RELEASE , ioaddr + MMU_CMD );
15081507 return ;
@@ -1643,7 +1642,7 @@ static void smc_reset(struct net_device *dev)
16431642 struct smc_private * smc = netdev_priv (dev );
16441643 int i ;
16451644
1646- pr_debug ( "%s: smc91c92 reset called.\n", dev -> name );
1645+ netdev_dbg ( dev , " smc91c92 reset called.\n" );
16471646
16481647 /* The first interaction must be a write to bring the chip out
16491648 of sleep mode. */
0 commit comments