net drivers cleanup
PATCH 1/1 net drivers cleanup
Hi Jeff,
attached new network drivers cleanup patchset:
shaper.c, ac3200.c, e2100.c, lne390.c, ne3210.c, es3210.c, ioc3-eth.c, ni5010.c, ni52.c, hp.c, hp-plus.c, eth16i.c, 3c503.c, 3c505.c, 3c507.c, cs89x0.c, wd.c.
Modifications: request_(irq|region) cleanup, printk() cleanup, named initializers, some labels (like out & out1 :) got more descriptive names.
All patches are against 2.4.0-test11, because i can't use your CVS for 2 reasons:
lack of password and slow internet connection (checkout linux kernel via 33.6 kbps leased line will be very looooooong process :)
Unfortunately I have to make a business trip (new satellite launch mission) so, it's most probably my last patchset for a some weeks at least.
Best regards,
Andrey
Signature · 2 lines
Andrey Panin | Embedded systems software engineer [email protected] | PGP key: http://www.orbita1.ru/~pazke/AndreyPanin.asc
linux/drivers/net/shaper.c renamed from mnt/disk/linux/drivers/net/shaper.c +24 -41
@@ -254,7 +254,7 @@ }#endif if(sh_debug) -printk ("Frame queued.\n" ); +printk (KERN_DEBUG "Frame queued.\n" );if (skb_queue_len (&shaper->sendq)>SHAPER_QLEN ) { ptr=skb_dequeue (&shaper->sendq);
@@ -273,13 +273,13 @@ {struct sk_buff *newskb=skb_clone (skb,GFP_ATOMIC );if (sh_debug) -printk ("Kick frame on %p\n" ,newskb); +printk (KERN_DEBUG "Kick frame on %p\n" ,newskb);if (newskb) { newskb->dev=shaper->dev; newskb->priority=2 ;if (sh_debug) -printk ("Kick new frame to %s, %d\n" , +printk (KERN_DEBUG "Kick new frame to %s, %d\n" , shaper->dev->name,newskb->priority);dev_queue_xmit (newskb);
@@ -287,7 +287,7 @@ shaper->stats.tx_packets++;if (sh_debug) -printk ("Kicked new frame out.\n" ); +printk (KERN_DEBUG "Kicked new frame out.\n" );dev_kfree_skb (skb); } }
@@ -318,7 +318,7 @@if (test_and_set_bit (0 , &shaper->locked)) {if (sh_debug) -printk ("Shaper locked.\n" ); +printk (KERN_DEBUG "Shaper locked.\n" );mod_timer (&shaper->timer, jiffies);return ; }
@@ -336,7 +336,7 @@*/ if (sh_debug) -printk ("Clock = %d, jiffies = %ld\n" ,SHAPERCB (skb)->shapeclock, jiffies); +printk (KERN_DEBUG "Clock = %d, jiffies = %ld\n" ,SHAPERCB (skb)->shapeclock, jiffies);if (time_before_eq (SHAPERCB (skb)->shapeclock - jiffies,SHAPER_BURST )) {/*
@@ -448,7 +448,7 @@struct shaper *sh=dev->priv;int v;if (sh_debug) -printk ("Shaper header\n" ); +printk (KERN_DEBUG "Shaper header\n" ); skb->dev=sh->dev; v=sh->hard_header (skb,sh->dev,type,daddr,saddr,len); skb->dev=dev;
@@ -461,7 +461,7 @@struct net_device *dev=skb->dev;int v;if (sh_debug) -printk ("Shaper rebuild header\n" ); +printk (KERN_DEBUG "Shaper rebuild header\n" ); skb->dev=sh->dev; v=sh->rebuild_header (skb); skb->dev=dev;
@@ -475,7 +475,7 @@struct net_device *tmp;int ret;if (sh_debug) -printk ("Shaper header cache bind\n" ); +printk (KERN_DEBUG "Shaper header cache bind\n" ); tmp=neigh->dev; neigh->dev=sh->dev; ret=sh->hard_header_cache (neigh,hh);
@@ -488,7 +488,7 @@ {struct shaper *sh=dev->priv;if (sh_debug) -printk ("Shaper cache update\n" ); +printk (KERN_DEBUG "Shaper cache update\n" ); sh->header_cache_update (hh, sh->dev, haddr); }#endif
@@ -687,23 +687,17 @@#ifdef MODULE -static struct net_device dev_shape = -{ -"" , -0 ,0 ,0 ,0 , -0 ,0 , -0 ,0 ,0 ,NULL , shaper_probe -}; +static struct net_device dev_shape = { init: shaper_probe };int init_module (void ) {int err=dev_alloc_name (&dev_shape,"shaper%d" );if (err<0 )return err; -printk (SHAPER_BANNER ); + printk(KERN_INFO SHAPER_BANNER);if (register_netdev (&dev_shape) !=0 )return -EIO ; -printk ("Traffic shaper initialised.\n" ); +printk (KERN_INFO "Traffic shaper initialised.\n" );return 0 ; }
@@ -728,38 +722,27 @@#else -static struct net_device dev_sh0 = -{ -"shaper0" , -0 ,0 ,0 ,0 , -0 ,0 , -0 ,0 ,0 ,NULL , shaper_probe +static struct net_device dev_sh0 = { + name:"shaper0" , + init: shaper_probe, }; -static struct net_device dev_sh1 = -{ -"shaper1" , -0 ,0 ,0 ,0 , -0 ,0 , -0 ,0 ,0 ,NULL , shaper_probe +static struct net_device dev_sh1 = { + name:"shaper1" , + init: shaper_probe, }; -static struct net_device dev_sh2 = -{ -"shaper2" , -0 ,0 ,0 ,0 , -0 ,0 , -0 ,0 ,0 ,NULL , shaper_probe +static struct net_device dev_sh2 = { + name:"shaper2" , + init: shaper_probe, };static struct net_device dev_sh3 = { -"shaper3" , -0 ,0 ,0 ,0 , -0 ,0 , -0 ,0 ,0 ,NULL , shaper_probe + name:"shaper3" , + init: shaper_probe, };void shaper_init (void )
linux/drivers/net/ac3200.c renamed from mnt/disk/linux/drivers/net/ac3200.c +6 -6
@@ -140,7 +140,7 @@ inb(ioaddr + AC_ID_PORT + 2), inb(ioaddr + AC_ID_PORT + 3));#endif -printk ("AC3200 in EISA slot %d, node" , ioaddr/0x1000 ); +printk (KERN_INFO "AC3200 in EISA slot %d, node" , ioaddr/0x1000 );for (i =0 ; i <6 ; i++)printk (" %02x" , dev->dev_addr[i] =inb (ioaddr +AC_SA_PROM + i));
@@ -195,7 +195,7 @@ dev->if_port =inb (ioaddr +AC_CONFIG ) >>6 ; dev->mem_start =config2mem (inb (ioaddr +AC_CONFIG )); -printk ("%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n" , +printk (KERN_INFO "%s: AC3200 at %#3x with %dkB memory at physical address %#lx.\n" , dev->name, ioaddr,AC_STOP_PG /4 , dev->mem_start);/*
@@ -220,7 +220,7 @@ goto out2; } ei_status.reg0 =1 ;/* Use as remap flag */ -printk ("ac3200.c: remapped %dkB card memory to virtual address %#lx\n" , +printk (KERN_INFO "ac3200.c: remapped %dkB card memory to virtual address %#lx\n" ,AC_STOP_PG /4 , dev->mem_start); }
@@ -235,7 +235,7 @@ ei_status.word16 =1 ;if (ei_debug >0 ) -printk (version); +printk (KERN_INFO "%s" , version); ei_status.reset_8390 = &ac_reset_8390; ei_status.block_input = &ac_block_input;
@@ -272,7 +272,7 @@ushort ioaddr = dev->base_addr;outb (AC_RESET , ioaddr +AC_RESET_PORT ); -if (ei_debug >1 )printk ("resetting AC3200, t=%ld..." , jiffies); +if (ei_debug >1 )printk (KERN_DEBUG "resetting AC3200, t=%ld..." , jiffies); ei_status.txing =0 ;outb (AC_ENABLE , ioaddr +AC_RESET_PORT );
@@ -323,7 +323,7 @@static int ac_close_card (struct net_device *dev) {if (ei_debug >1 ) -printk ("%s: Shutting down ethercard.\n" , dev->name); +printk (KERN_DEBUG "%s: Shutting down ethercard.\n" , dev->name);#ifdef notyet/* We should someday disable shared memory and interrupts. */
linux/drivers/net/e2100.c renamed from mnt/disk/linux/drivers/net/e2100.c +9 -7
@@ -140,8 +140,8 @@unsigned char *station_addr = dev->dev_addr;static unsigned version_printed =0 ; -if (!request_region (ioaddr,E21_IO_EXTENT ,"e2100" )) -return -ENODEV ; +if (!request_region (ioaddr,E21_IO_EXTENT , dev->name)) +return -EBUSY ;/* First check the station address for the Ctron prefix. */ if (inb(ioaddr + E21_SAPROM + 0) != 0x00
@@ -168,7 +168,7 @@outb (0 , ioaddr +E21_ASIC );/* and disable the secondary interface. */ if (ei_debug && version_printed++ ==0 ) -printk (version); +printk (KERN_INFO "%s" , version);for (i =0 ; i <6 ; i++)printk (" %02X" , station_addr[i]);
@@ -254,10 +254,12 @@static int e21_open (struct net_device *dev) { +int retval;short ioaddr = dev->base_addr; -if (request_irq (dev->irq, ei_interrupt,0 ,"e2100" , dev)) { -return -EBUSY ; +if ((retval =request_irq (dev->irq, ei_interrupt,0 , dev->name, dev))) { +printk (KERN_ERR "%s: unable to get IRQ%d.\n" , dev->name, dev->irq); +return retval; }/* Set the interrupt line and memory base on the hardware. */
@@ -280,7 +282,7 @@short ioaddr = dev->base_addr;outb (0x01 , ioaddr); -if (ei_debug >1 )printk ("resetting the E2180x3 t=%ld..." , jiffies); +if (ei_debug >1 )printk (KERN_DEBUG "resetting the E2180x3 t=%ld..." , jiffies); ei_status.txing =0 ;/* Set up the ASIC registers, just in case something changed them. */
@@ -352,7 +354,7 @@short ioaddr = dev->base_addr;if (ei_debug >1 ) -printk ("%s: Shutting down ethercard.\n" , dev->name); +printk (KERN_DEBUG "%s: Shutting down ethercard.\n" , dev->name);free_irq (dev->irq, dev); dev->irq = ei_status.saved_irq;
linux/drivers/net/lne390.c renamed from mnt/disk/linux/drivers/net/lne390.c +15 -14
@@ -109,7 +109,7 @@int ret;if (ioaddr >0x1ff ) {/* Check a single specified location. */ -if (!request_region (ioaddr,LNE390_IO_EXTENT ,"lne390" )) +if (!request_region (ioaddr,LNE390_IO_EXTENT , dev->name))return -EBUSY ; ret =lne390_probe1 (dev, ioaddr);if (ret)
@@ -121,14 +121,14 @@if (!EISA_bus) {#if LNE390_DEBUG &LNE390_D_PROBE -printk ("lne390-debug: Not an EISA bus. Not probing high ports.\n" ); +printk (kern_debug"lne390-debug: Not an EISA bus. Not probing high ports.\n" );#endif return -ENXIO ; }/* EISA spec allows for up to 16 slots, but 8 is typical. */ for (ioaddr =0x1000 ; ioaddr <0x9000 ; ioaddr +=0x1000 ) { -if (!request_region (ioaddr,LNE390_IO_EXTENT ,"lne390" )) +if (!request_region (ioaddr,LNE390_IO_EXTENT , dev->name))continue ;if (lne390_probe1 (dev, ioaddr) ==0 )return 0 ;
@@ -146,8 +146,9 @@if (inb_p (ioaddr +LNE390_ID_PORT ) ==0xff )return -ENODEV ;#if LNE390_DEBUG &LNE390_D_PROBE -printk ("lne390-debug: probe at %#x, ID %#8x\n" , ioaddr,inl (ioaddr +LNE390_ID_PORT )); -printk ("lne390-debug: config regs: %#x %#x\n" , +printk (KERN_DEBUG "lne390-debug: probe at %#x, ID %#8x\n" , + ioaddr,inl (ioaddr +LNE390_ID_PORT )); +printk (KERN_DEBUG "lne390-debug: config regs: %#x %#x\n" ,inb (ioaddr +LNE390_CFG1 ),inb (ioaddr +LNE390_CFG2 ));#endif
@@ -165,7 +166,7 @@if (inb (ioaddr +LNE390_SA_PROM +0 ) !=LNE390_ADDR0 ||inb (ioaddr +LNE390_SA_PROM +1 ) !=LNE390_ADDR1 ||inb (ioaddr +LNE390_SA_PROM +2 ) !=LNE390_ADDR2 ) { -printk ("lne390.c: card not found" ); +printk (KERN_WARNING "lne390.c: card not found" );for (i =0 ; i <ETHER_ADDR_LEN ; i++)printk (" %02x" ,inb (ioaddr +LNE390_SA_PROM + i));printk (" (invalid prefix).\n" );
@@ -174,11 +175,11 @@#endif /* Allocate dev->priv and fill in 8390 specific dev fields. */ if (ethdev_init (dev)) { -printk ("lne390.c: unable to allocate memory for dev->priv!\n" ); +printk (KERN_ERR "lne390.c: unable to allocate memory for dev->priv!\n" );return -ENOMEM ; } -printk ("lne390.c: LNE390%X in EISA slot %d, address" ,0xa +revision, ioaddr/0x1000 ); +printk (KERN_INFO "lne390.c: LNE390%X in EISA slot %d, address" ,0xa +revision, ioaddr/0x1000 );for (i =0 ; i <ETHER_ADDR_LEN ; i++)printk (" %02x" , (dev->dev_addr[i] =inb (ioaddr +LNE390_SA_PROM + i)));printk (".\nlne390.c: " );
@@ -195,11 +196,11 @@ }printk (" IRQ %d," , dev->irq); -if (request_irq (dev->irq, ei_interrupt,0 ,"lne390" , dev)) { +if ((ret =request_irq (dev->irq, ei_interrupt,0 , dev->name, dev))) {printk (" unable to get IRQ %d.\n" , dev->irq);kfree (dev->priv); dev->priv =NULL ; -return -EAGAIN ; +return ret; }if (dev->mem_start ==0 ) {
@@ -241,7 +242,7 @@ goto cleanup; } ei_status.reg0 =1 ;/* Use as remap flag */ -printk ("lne390.c: remapped %dkB card memory to virtual address %#lx\n" , +printk (KERN_INFO "lne390.c: remapped %dkB card memory to virtual address %#lx\n" ,LNE390_STOP_PG /4 , dev->mem_start); }
@@ -259,7 +260,7 @@ ei_status.word16 =1 ;if (ei_debug >0 ) -printk (version); +printk (KERN_INFO "%s" , version); ei_status.reset_8390 = &lne390_reset_8390; ei_status.block_input = &lne390_block_input;
@@ -287,7 +288,7 @@unsigned short ioaddr = dev->base_addr;outb (0x04 , ioaddr +LNE390_RESET_PORT ); -if (ei_debug >1 )printk ("%s: resetting the LNE390..." , dev->name); +if (ei_debug >1 )printk (KERN_DEBUG "%s: resetting the LNE390..." , dev->name);mdelay (2 );
@@ -364,7 +365,7 @@ {if (ei_debug >1 ) -printk ("%s: Shutting down ethercard.\n" , dev->name); +printk (KERN_DEBUG "%s: Shutting down ethercard.\n" , dev->name);ei_close (dev);MOD_DEC_USE_COUNT ;
linux/drivers/net/ne3210.c renamed from mnt/disk/linux/drivers/net/ne3210.c +22 -20
128 lines not on this page · raw message
linux/drivers/net/es3210.c renamed from mnt/disk/linux/drivers/net/es3210.c +23 -20
130 lines not on this page · raw message
linux/drivers/net/ioc3-eth.c renamed from mnt/disk/linux/drivers/net/ioc3-eth.c +3 -2
@@ -837,12 +837,13 @@static int ioc3_open (struct net_device *dev) { +int retval;struct ioc3_private *ip; -if (request_irq (dev->irq, ioc3_interrupt,0 , ioc3_str, dev)) { +if ((retval =request_irq (dev->irq, ioc3_interrupt,0 , dev->name, dev))) {printk (KERN_ERR "%s: Can't get irq %d\n" , dev->name, dev->irq); -return -EAGAIN ; +return retval; } ip = (struct ioc3_private *) dev->priv;
linux/drivers/net/ni5010.c renamed from mnt/disk/linux/drivers/net/ni5010.c +39 -27
150 lines not on this page · raw message
linux/drivers/net/ni52.c renamed from mnt/disk/linux/drivers/net/ni52.c +16 -13
@@ -256,16 +256,18 @@*/ static int ni52_open (struct net_device *dev) { +int retval; +ni_disint ();alloc586 (dev);init586 (dev);startrecv586 (dev);ni_enaint (); -if (request_irq (dev->irq, &ni52_interrupt,0 ,"ni5210" ,dev)) +if ((retval =request_irq (dev->irq, &ni52_interrupt,0 , dev->name, dev))) {ni_reset586 (); -return -EAGAIN ; +return retval; }netif_start_queue (dev);
@@ -393,13 +395,13 @@ {int i, size, retval; -if (!request_region (ioaddr,NI52_TOTAL_SIZE ,"ni5210" )) -return -ENODEV ; +if (!request_region (ioaddr,NI52_TOTAL_SIZE , dev->name)) +return -EBUSY ;if ( !(inb (ioaddr+NI52_MAGIC1 ) ==NI52_MAGICVAL1 ) || !(inb (ioaddr+NI52_MAGIC2 ) ==NI52_MAGICVAL2 )) { retval = -ENODEV ; - goto out; + goto err_out; }for (i=0 ;i<ETH_ALEN ;i++)
@@ -408,7 +410,7 @@if (dev->dev_addr[0 ] !=NI52_ADDR0 || dev->dev_addr[1 ] !=NI52_ADDR1 || dev->dev_addr[2 ] !=NI52_ADDR2 ) { retval = -ENODEV ; - goto out; + goto err_out; }printk ("%s: NI5210 found at %#3lx, " ,dev->name,dev->base_addr);
@@ -421,12 +423,12 @@if (size !=0x2000 && size !=0x4000 ) {printk ("\n%s: Illegal memory size %d. Allowed is 0x2000 or 0x4000 bytes.\n" ,dev->name,size); retval = -ENODEV ; - goto out; + goto err_out; }if (!check586 (dev,(char *) dev->mem_start,size)) {printk ("?memcheck, Can't find memory at 0x%lx with size %d!\n" ,dev->mem_start,size); retval = -ENODEV ; - goto out; + goto err_out; }#else if (dev->mem_start !=0 )/* no auto-mem-probe */
@@ -437,7 +439,7 @@if (!check586 (dev,(char *) dev->mem_start,size)) {printk ("?memprobe, Can't find memory at 0x%lx!\n" ,dev->mem_start); retval = -ENODEV ; - goto out; + goto err_out; } } }
@@ -450,7 +452,7 @@if (!memaddrs[i]) {printk ("?memprobe, Can't find io-memory!\n" ); retval = -ENODEV ; - goto out; + goto err_out; } dev->mem_start = memaddrs[i]; size =0x2000 ;/* check for 8K mem */
@@ -468,7 +470,7 @@if (dev->priv ==NULL ) {printk ("%s: Ooops .. can't allocate private driver memory.\n" ,dev->name); retval = -ENOMEM ; - goto out; + goto err_out; }/* warning: we don't free it on errors */ memset ((char *) dev->priv,0 ,sizeof (struct priv ));
@@ -496,7 +498,7 @@kfree (dev->priv); dev->priv =NULL ; retval = -EAGAIN ; - goto out; + goto err_out; }printk ("IRQ %d (autodetected).\n" ,dev->irq); }
@@ -519,7 +521,8 @@ether_setup (dev);return 0 ; -out: + +err_out:release_region (ioaddr,NI52_TOTAL_SIZE );return retval; }
linux/drivers/net/hp.c renamed from mnt/disk/linux/drivers/net/hp.c +11 -10
@@ -104,7 +104,7 @@static unsigned version_printed;if (!request_region (ioaddr,HP_IO_EXTENT , dev->name)) -return -ENODEV ; +return -EBUSY ;/* Check for the HP physical address, 08 00 09 xx xx xx. */ /* This really isn't good enough: we may pick up HP LANCE boards
@@ -114,7 +114,7 @@ || inb(ioaddr+2) != 0x09 || inb(ioaddr+14) == 0x57) { retval = -ENODEV ; - goto out; + goto err_out; }/* Set up the parameters based on the board ID.
@@ -128,16 +128,16 @@ }if (ei_debug && version_printed++ ==0 ) -printk (version); +printk (KERN_INFO "%s" , version);/* Allocate dev->priv and fill in 8390 specific dev fields. */ if (ethdev_init (dev)) { -printk (" unable to get memory for dev->priv.\n" ); +printk (KERN_ERR "%s: unable to get memory for dev->priv.\n" , dev->name); retval = -ENOMEM ; - goto out; + goto err_out; } -printk ("%s: %s (ID %02x) at %#3x," , dev->name, name, board_id, ioaddr); +printk (KERN_INFO "%s: %s (ID %02x) at %#3x," , dev->name, name, board_id, ioaddr);for (i =0 ; i <ETHER_ADDR_LEN ; i++)printk (" %2.2x" , dev->dev_addr[i] =inb (ioaddr + i));
@@ -165,14 +165,14 @@if (*irqp ==0 ) {printk (" no free IRQ lines.\n" ); retval = -EBUSY ; - goto out1; + goto err_out_kfree; } }else {if (dev->irq ==2 ) dev->irq =9 ;if ((retval =request_irq (dev->irq, ei_interrupt,0 , dev->name, dev))) {printk (" unable to get IRQ %d.\n" , dev->irq); - goto out1; + goto err_out_kfree; } }
@@ -194,10 +194,11 @@hp_init_card (dev);return 0 ; -out1: + +err_out_kfree:kfree (dev->priv); dev->priv =NULL ; -out: +err_out:release_region (ioaddr,HP_IO_EXTENT );return retval; }
linux/drivers/net/hp-plus.c renamed from mnt/disk/linux/drivers/net/hp-plus.c +12 -10
@@ -150,13 +150,13 @@if (inw (ioaddr +HP_ID ) !=0x4850 || (inw (ioaddr +HP_PAGING ) &0xfff0 ) !=0x5300 ) { retval = -ENODEV ; - goto out; + goto err_out; }if (ei_debug && version_printed++ ==0 ) -printk (version); +printk (KERN_INFO "%s" , version); -printk ("%s: %s at %#3x," , dev->name, name, ioaddr); +printk (KERN_INFO "%s: %s at %#3x," , dev->name, name, ioaddr);/* Retrieve and checksum the station address. */ outw (MAC_Page, ioaddr +HP_PAGING );
@@ -172,7 +172,7 @@if (checksum !=0xff ) {printk (" bad checksum %2.2x.\n" , checksum); retval = -ENODEV ; - goto out; + goto err_out; }else {/* Point at the Software Configuration Flags. */ outw (ID_Page, ioaddr +HP_PAGING );
@@ -181,9 +181,9 @@/* Allocate dev->priv and fill in 8390 specific dev fields. */ if (ethdev_init (dev)) { -printk ("hp-plus.c: unable to allocate memory for dev->priv.\n" ); +printk (KERN_INFO "hp-plus.c: unable to allocate memory for dev->priv.\n" ); retval = -ENOMEM ; - goto out; + goto err_out; }/* Read the IRQ line. */
@@ -239,7 +239,8 @@outw (inw (ioaddr +HPP_OPTION ) & ~EnableIRQ, ioaddr +HPP_OPTION );return 0 ; -out: + +err_out:release_region (ioaddr,HP_IO_EXTENT );return retval; }
@@ -295,7 +296,8 @@int ioaddr = dev->base_addr -NIC_OFFSET ;int option_reg =inw (ioaddr +HPP_OPTION ); -if (ei_debug >1 )printk ("resetting the 8390 time=%ld..." , jiffies); +if (ei_debug >1 ) +printk (KERN_DEBUG "resetting the 8390 time=%ld..." , jiffies);outw (option_reg & ~(NICReset + ChipReset), ioaddr +HPP_OPTION );/* Pause a few cycles for the hardware reset to take place. */
@@ -307,9 +309,9 @@if ((inb_p (ioaddr+NIC_OFFSET +EN0_ISR ) &ENISR_RESET ) ==0 ) -printk ("%s: hp_reset_8390() did not complete.\n" , dev->name); +printk (KERN_WARNING "%s: hp_reset_8390() did not complete.\n" , dev->name); -if (ei_debug >1 )printk ("8390 reset done (%ld)." , jiffies); +if (ei_debug >1 )printk (KERN_DEBUG "8390 reset done (%ld)." , jiffies);return ; }
linux/drivers/net/eth16i.c renamed from mnt/disk/linux/drivers/net/eth16i.c +7 -6
@@ -486,7 +486,7 @@if (eth16i_portlist[(inb (ioaddr +JUMPERLESS_CONFIG ) &0x07 )] != ioaddr) { retval = -ENODEV ; - goto out; + goto err_out; } }
@@ -494,7 +494,7 @@if (eth16i_check_signature (ioaddr) !=0 ) { retval = -ENODEV ; - goto out; + goto err_out; }/*
@@ -522,7 +522,7 @@if ((retval =request_irq (dev->irq, (void *)ð16i_interrupt,0 , dev->name, dev))) {printk (KERN_WARNING "%s: %s at %#3x, but is unusable due conflicting IRQ %d.\n" , dev->name, cardname, ioaddr, dev->irq); - goto out; + goto err_out; } printk(KERN_INFO "%s: %s at %#3x, IRQ %d, ",
@@ -544,7 +544,7 @@if (dev->priv ==NULL ) {free_irq (dev->irq, dev); retval = -ENOMEM ; - goto out; + goto err_out; } }
@@ -566,7 +566,8 @@ boot =0 ;return 0 ; -out: + +err_out:release_region (ioaddr,ETH16I_IO_EXTENT );return retval; }
@@ -858,7 +859,7 @@ creg[i] =inb (ioaddr +TRANSMIT_MODE_REG + i);if (eth16i_debug >1 ) -printk ("eth16i: read signature byte %x at %x\n" , +printk (KERN_DEBUG "eth16i: read signature byte %x at %x\n" , creg[i], ioaddr +TRANSMIT_MODE_REG + i); }
linux/drivers/net/3c503.c renamed from mnt/disk/linux/drivers/net/3c503.c +22 -20
138 lines not on this page · raw message
linux/drivers/net/3c505.c renamed from mnt/disk/linux/drivers/net/3c505.c +69 -65
502 lines not on this page · raw message
linux/drivers/net/3c507.c renamed from mnt/disk/linux/drivers/net/3c507.c +31 -33
204 lines not on this page · raw message
linux/drivers/net/cs89x0.c renamed from mnt/disk/linux/drivers/net/cs89x0.c +40 -33
246 lines not on this page · raw message
linux/drivers/net/wd.c renamed from mnt/disk/linux/drivers/net/wd.c +8 -7
@@ -124,7 +124,7 @@int ancient =0 ;/* An old card without config registers. */ int word16 =0 ;/* 0 = 8 bit, 1 = 16 bit */ const char *model_name; -static unsigned version_printed =0 ; +static unsigned version_printed;for (i =0 ; i <8 ; i++) checksum +=inb (ioaddr +8 + i);
@@ -141,9 +141,9 @@ }if (ei_debug && version_printed++ ==0 ) -printk (version); +printk (KERN_INFO "%s" , version); -printk ("%s: WD80x3 at %#3x," , dev->name, ioaddr); +printk (KERN_INFO "%s: WD80x3 at %#3x," , dev->name, ioaddr);for (i =0 ; i <6 ; i++)printk (" %2.2X" , dev->dev_addr[i] =inb (ioaddr +8 + i));
@@ -263,11 +263,11 @@/* Snarf the interrupt now. There's no point in waiting since we cannot share and the board will usually be enabled. */ -if (request_irq (dev->irq, ei_interrupt,0 , model_name, dev)) { +if ((i =request_irq (dev->irq, ei_interrupt,0 , dev->name, dev))) {printk (" unable to get IRQ %d.\n" , dev->irq);kfree (dev->priv); dev->priv =NULL ; -return -EAGAIN ; +return i; }/* OK, were are certain this is going to work. Setup the device. */
@@ -334,7 +334,8 @@int wd_cmd_port = dev->base_addr -WD_NIC_OFFSET ;/* WD_CMDREG */ outb (WD_RESET , wd_cmd_port); -if (ei_debug >1 )printk ("resetting the WD80x3 t=%lu..." , jiffies); +if (ei_debug >1 ) +printk (KERN_DEBUG "resetting the WD80x3 t=%lu..." , jiffies); ei_status.txing =0 ;/* Set up the ASIC registers, just in case something changed them. */
@@ -421,7 +422,7 @@int wd_cmdreg = dev->base_addr -WD_NIC_OFFSET ;/* WD_CMDREG */ if (ei_debug >1 ) -printk ("%s: Shutting down ethercard.\n" , dev->name); +printk (KERN_DEBUG "%s: Shutting down ethercard.\n" , dev->name);ei_close (dev);/* Change from 16-bit to 8-bit shared memory so reboot works. */