Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2ad02bdc authored by Ben Boeckel's avatar Ben Boeckel Committed by David S. Miller
Browse files

smc9194: replace printk with netdev_ calls



Also snipes some whitespace errors.

Signed-off-by: default avatarBen Boeckel <mathstuf@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b1a04a62
Loading
Loading
Loading
Loading
+25 −27
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@
 ----------------------------------------------------------------------------*/

static const char version[] =
	"smc9194.c:v0.14 12/15/00 by Erik Stahlman (erik@vt.edu)\n";
	"smc9194.c:v0.14 12/15/00 by Erik Stahlman (erik@vt.edu)";

#include <linux/module.h>
#include <linux/kernel.h>
@@ -612,7 +612,7 @@ static void smc_hardware_send_packet( struct net_device * dev )
	packet_no = inb( ioaddr + PNR_ARR + 1 );
	if ( packet_no & 0x80 ) {
		/* or isn't there?  BAD CHIP! */
		printk(KERN_DEBUG CARDNAME": Memory allocation failed.\n");
		netdev_dbg(dev, CARDNAME": Memory allocation failed.\n");
		dev_kfree_skb_any(skb);
		lp->saved_skb = NULL;
		netif_wake_queue(dev);
@@ -865,7 +865,6 @@ static const struct net_device_ops smc_netdev_ops = {
static int __init smc_probe(struct net_device *dev, int ioaddr)
{
	int i, memory, retval;
	static unsigned version_printed;
	unsigned int bank;

	const char *version_string;
@@ -937,8 +936,7 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)
	   It might be prudent to check a listing of MAC addresses
	   against the hardware address, or do some other tests. */

	if (version_printed++ == 0)
		printk("%s", version);
	pr_info_once("%s\n", version);

	/* fill in some of the fields */
	dev->base_addr = ioaddr;
@@ -1027,19 +1025,19 @@ static int __init smc_probe(struct net_device *dev, int ioaddr)

	/* now, print out the card info, in a short format.. */

	printk("%s: %s(r:%d) at %#3x IRQ:%d INTF:%s MEM:%db ", dev->name,
	netdev_info(dev, "%s(r:%d) at %#3x IRQ:%d INTF:%s MEM:%db ",
		    version_string, revision_register & 0xF, ioaddr, dev->irq,
		    if_string, memory);
	/*
	 . Print the Ethernet address
	*/
	printk("ADDR: %pM\n", dev->dev_addr);
	netdev_info(dev, "ADDR: %pM\n", dev->dev_addr);

	/* Grab the IRQ */
	retval = request_irq(dev->irq, smc_interrupt, 0, DRV_NAME, dev);
	if (retval) {
		printk("%s: unable to get IRQ %d (irqval=%d).\n", DRV_NAME,
			dev->irq, retval);
		netdev_warn(dev, "%s: unable to get IRQ %d (irqval=%d).\n",
			    DRV_NAME, dev->irq, retval);
		goto err_out;
	}

@@ -1061,30 +1059,32 @@ static void print_packet( byte * buf, int length )
	int remainder;
	int lines;

	printk("Packet of length %d\n", length);
	pr_dbg("Packet of length %d\n", length);
	lines = length / 16;
	remainder = length % 16;

	for ( i = 0; i < lines ; i ++ ) {
		int cur;

		printk(KERN_DEBUG);
		for ( cur = 0; cur < 8; cur ++ ) {
			byte a, b;

			a = *(buf ++ );
			b = *(buf ++ );
			printk("%02x%02x ", a, b );
			pr_cont("%02x%02x ", a, b);
		}
		printk("\n");
		pr_cont("\n");
	}
	printk(KERN_DEBUG);
	for ( i = 0; i < remainder/2 ; i++ ) {
		byte a, b;

		a = *(buf ++ );
		b = *(buf ++ );
		printk("%02x%02x ", a, b );
		pr_cont("%02x%02x ", a, b);
	}
	printk("\n");
	pr_cont("\n");
#endif
}
#endif
@@ -1151,9 +1151,8 @@ static void smc_timeout(struct net_device *dev)
{
	/* If we get here, some higher level has decided we are broken.
	   There should really be a "kick me" function call instead. */
	printk(KERN_WARNING CARDNAME": transmit timed out, %s?\n",
		tx_done(dev) ? "IRQ conflict" :
		"network cable problem");
	netdev_warn(dev, CARDNAME": transmit timed out, %s?\n",
		    tx_done(dev) ? "IRQ conflict" : "network cable problem");
	/* "kick" the adaptor */
	smc_reset( dev->base_addr );
	smc_enable( dev->base_addr );
@@ -1323,8 +1322,7 @@ static void smc_tx( struct net_device * dev )
	dev->stats.tx_errors++;
	if ( tx_status & TS_LOSTCAR ) dev->stats.tx_carrier_errors++;
	if ( tx_status & TS_LATCOL  ) {
		printk(KERN_DEBUG CARDNAME
			": Late collision occurred on last xmit.\n");
		netdev_dbg(dev, CARDNAME": Late collision occurred on last xmit.\n");
		dev->stats.tx_window_errors++;
	}
#if 0
@@ -1332,7 +1330,7 @@ static void smc_tx( struct net_device * dev )
#endif

	if ( tx_status & TS_SUCCESS ) {
		printk(CARDNAME": Successful packet caused interrupt\n");
		netdev_info(dev, CARDNAME": Successful packet caused interrupt\n");
	}
	/* re-enable transmit */
	SMC_SELECT_BANK( 0 );