3c50x: convert printk() to pr_foo()
Subsystems (2)
PATCH 1/2 3c50x: convert printk() to pr_foo()
---
Compile tested.
drivers/net/3c501.c | 55 +++++++-------- drivers/net/3c503.c | 36 +++++----- drivers/net/3c505.c | 191 +++++++++++++++++++++++++-------------------------- drivers/net/3c507.c | 47 ++++++------- drivers/net/3c509.c | 60 ++++++++-------- 5 files changed, 193 insertions(+), 196 deletions(-)
drivers/net/3c501.c +26 -29
@@ -281,7 +281,7 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr) autoirq =probe_irq_off (irq_mask);if (autoirq ==0 ) { -printk (KERN_WARNING "%s probe at %#x failed to detect IRQ line.\n" , +pr_warning ("%s probe at %#x failed to detect IRQ line.\n" , mname, ioaddr);release_region (ioaddr,EL1_IO_EXTENT );return -EAGAIN ;
@@ -297,16 +297,16 @@ static int __init el1_probe1(struct net_device *dev, int ioaddr)if (autoirq) dev->irq = autoirq; -printk (KERN_INFO "%s: %s EtherLink at %#lx, using %sIRQ %d.\n" , +pr_info ("%s: %s EtherLink at %#lx, using %sIRQ %d.\n" , dev->name, mname, dev->base_addr, autoirq ?"auto" :"assigned " , dev->irq);#ifdef CONFIG_IP_MULTICAST -printk (KERN_WARNING "WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n" ); +pr_warning ("WARNING: Use of the 3c501 in a multicast kernel is NOT recommended.\n" );#endif if (el_debug) -printk (KERN_DEBUG "%s" , version); +pr_debug ("%s" , version); lp =netdev_priv (dev);memset (lp,0 ,sizeof (struct net_local ));
@@ -343,7 +343,7 @@ static int el_open(struct net_device *dev)unsigned long flags;if (el_debug >2 ) -printk (KERN_DEBUG "%s: Doing el_open()..." , dev->name); +pr_debug ("%s: Doing el_open()..." , dev->name); retval =request_irq (dev->irq, &el_interrupt,0 , dev->name, dev);if (retval)
@@ -374,7 +374,7 @@ static void el_timeout(struct net_device *dev)int ioaddr = dev->base_addr;if (el_debug) -printk (KERN_DEBUG "%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n" , +pr_debug ("%s: transmit timed out, txsr %#2x axsr=%02x rxsr=%02x.\n" , dev->name,inb (TX_STATUS ),inb (AX_STATUS ),inb (RX_STATUS )); dev->stats.tx_errors++;
@@ -483,14 +483,13 @@ static int el_start_xmit(struct sk_buff *skb, struct net_device *dev) lp->loading =0 ; dev->trans_start = jiffies;if (el_debug >2 ) -printk (KERN_DEBUG " queued xmit.\n" ); +pr_debug (" queued xmit.\n" );dev_kfree_skb (skb);return 0 ; }/* A receive upset our load, despite our best efforts */ if (el_debug >2 ) -printk (KERN_DEBUG "%s: burped during tx load.\n" , - dev->name); +pr_debug ("%s: burped during tx load.\n" , dev->name);spin_lock_irqsave (&lp->lock, flags); }while (1 ); }
@@ -540,11 +539,10 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)*/ if (el_debug >3 ) -printk (KERN_DEBUG "%s: el_interrupt() aux=%#02x" , - dev->name, axsr); +pr_debug ("%s: el_interrupt() aux=%#02x" , dev->name, axsr);if (lp->loading ==1 && !lp->txing) -printk (KERN_WARNING "%s: Inconsistent state loading while not in tx\n" , +pr_warning ("%s: Inconsistent state loading while not in tx\n" , dev->name);if (lp->txing) {
@@ -556,9 +554,9 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)if (lp->loading ==1 ) {if (el_debug >2 ) { -printk (KERN_DEBUG "%s: Interrupt while loading [" , +pr_debug ("%s: Interrupt while loading [" , dev->name); -printk (" txsr=%02x gp=%04x rp=%04x]\n" , +pr_debug (" txsr=%02x gp=%04x rp=%04x]\n" , txsr,inw (GP_LOW ),inw (RX_LOW )); }/* Force a reload */
@@ -567,7 +565,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id) goto out; }if (el_debug >6 ) -printk (KERN_DEBUG " txsr=%02x gp=%04x rp=%04x" , +pr_debug (" txsr=%02x gp=%04x rp=%04x" , txsr,inw (GP_LOW ),inw (RX_LOW ));if ((axsr &0x80 ) && (txsr &TX_READY ) ==0 ) {
@@ -576,7 +574,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)* on trying or reset immediately ? */ if (el_debug >1 ) -printk (KERN_DEBUG "%s: Unusual interrupt during Tx, txsr=%02x axsr=%02x gp=%03x rp=%03x.\n" , +pr_debug ("%s: Unusual interrupt during Tx, txsr=%02x axsr=%02x gp=%03x rp=%03x.\n" , dev->name, txsr, axsr,inw (ioaddr +EL1_DATAPTR ),inw (ioaddr +EL1_RXPTR ));
@@ -587,7 +585,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)* Timed out */ if (el_debug) -printk (KERN_DEBUG "%s: Transmit failed 16 times, Ethernet jammed?\n" , dev->name); +pr_debug ("%s: Transmit failed 16 times, Ethernet jammed?\n" , dev->name);outb (AX_SYS ,AX_CMD ); lp->txing =0 ; dev->stats.tx_aborted_errors++;
@@ -598,7 +596,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)*/ if (el_debug >6 ) -printk (KERN_DEBUG " retransmitting after a collision.\n" ); +pr_debug (" retransmitting after a collision.\n" );/* * Poor little chip can't reset its own start * pointer
@@ -616,7 +614,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)*/ dev->stats.tx_packets++;if (el_debug >6 ) -printk (KERN_DEBUG " Tx succeeded %s\n" , +pr_debug (" Tx succeeded %s\n" , (txsr &TX_RDY ) ?"." :"but tx is busy!" );/*
@@ -633,7 +631,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)int rxsr =inb (RX_STATUS );if (el_debug >5 ) -printk (KERN_DEBUG " rxsr=%02x txsr=%02x rp=%04x" , rxsr,inb (TX_STATUS ),inw (RX_LOW )); +pr_debug (" rxsr=%02x txsr=%02x rp=%04x" , rxsr,inb (TX_STATUS ),inw (RX_LOW ));/* * Just reading rx_status fixes most errors. */
@@ -643,7 +641,7 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)/* Handled to avoid board lock-up. */ dev->stats.rx_length_errors++;if (el_debug >5 ) -printk (KERN_DEBUG " runt.\n" ); +pr_debug (" runt.\n" ); }else if (rxsr &RX_GOOD ) {/* * Receive worked.
@@ -654,12 +652,12 @@ static irqreturn_t el_interrupt(int irq, void *dev_id)* Nothing? Something is broken! */ if (el_debug >2 ) -printk (KERN_DEBUG "%s: No packet seen, rxsr=%02x **resetting 3c501***\n" , +pr_debug ("%s: No packet seen, rxsr=%02x **resetting 3c501***\n" , dev->name, rxsr);el_reset (dev); }if (el_debug >3 ) -printk (KERN_DEBUG ".\n" ); +pr_debug (".\n" ); }/*
@@ -695,11 +693,11 @@ static void el_receive(struct net_device *dev) pkt_len =inw (RX_LOW );if (el_debug >4 ) -printk (KERN_DEBUG " el_receive %d.\n" , pkt_len); +pr_debug (" el_receive %d.\n" , pkt_len);if (pkt_len <60 || pkt_len >1536 ) {if (el_debug) -printk (KERN_DEBUG "%s: bogus packet, length=%d\n" , +pr_debug ("%s: bogus packet, length=%d\n" , dev->name, pkt_len); dev->stats.rx_over_errors++;return ;
@@ -718,8 +716,7 @@ static void el_receive(struct net_device *dev)outw (0x00 ,GP_LOW );if (skb ==NULL ) { -printk (KERN_INFO "%s: Memory squeeze, dropping packet.\n" , - dev->name); +pr_info ("%s: Memory squeeze, dropping packet.\n" , dev->name); dev->stats.rx_dropped++;return ; }else {
@@ -753,7 +750,7 @@ static void el_reset(struct net_device *dev)int ioaddr = dev->base_addr;if (el_debug >2 ) -printk (KERN_INFO "3c501 reset..." ); +pr_info ("3c501 reset..." );outb (AX_RESET ,AX_CMD );/* Reset the chip */ /* Aux control, irq and loopback enabled */ outb (AX_LOOP ,AX_CMD );
@@ -787,7 +784,7 @@ static int el1_close(struct net_device *dev)int ioaddr = dev->base_addr;if (el_debug >2 ) -printk (KERN_INFO "%s: Shutting down Ethernet card at %#x.\n" , +pr_info ("%s: Shutting down Ethernet card at %#x.\n" , dev->name, ioaddr);netif_stop_queue (dev);
drivers/net/3c503.c +19 -17
@@ -234,16 +234,16 @@ el2_probe1(struct net_device *dev, int ioaddr) }if (ei_debug && version_printed++ ==0 ) -printk (version); +pr_debug ("%s" , version); dev->base_addr = ioaddr; -printk ("%s: 3c503 at i/o base %#3x, node " , dev->name, ioaddr); +pr_info ("%s: 3c503 at i/o base %#3x, node " , dev->name, ioaddr);/* Retrieve and print the ethernet address. */ for (i =0 ; i <6 ; i++) dev->dev_addr[i] =inb (ioaddr + i); -printk ("%pM" , dev->dev_addr); +pr_info ("%pM" , dev->dev_addr);/* Map the 8390 back into the window. */ outb (ECNTRL_THIN , ioaddr +0x406 );
@@ -256,7 +256,8 @@ el2_probe1(struct net_device *dev, int ioaddr)outb_p (E8390_PAGE0 , ioaddr +E8390_CMD );/* Probe for, turn on and clear the board's shared memory. */ -if (ei_debug >2 )printk (" memory jumpers %2.2x " , membase_reg); +if (ei_debug >2 ) +pr_debug (" memory jumpers %2.2x " , membase_reg);outb (EGACFR_NORM , ioaddr +0x405 );/* Enable RAM */ /* This should be probed for (or set via an ioctl()) at run-time.
@@ -268,7 +269,7 @@ el2_probe1(struct net_device *dev, int ioaddr)#else ei_status.interface_num = dev->mem_end &0xf ;#endif -printk (", using %sternal xcvr.\n" , ei_status.interface_num ==0 ?"in" :"ex" ); +pr_info (", using %sternal xcvr.\n" , ei_status.interface_num ==0 ?"in" :"ex" );if ((membase_reg &0xf0 ) ==0 ) { dev->mem_start =0 ;
@@ -292,7 +293,7 @@ el2_probe1(struct net_device *dev, int ioaddr)writel (test_val, mem_base + i);if (readl (mem_base) !=0xba5eba5e ||readl (mem_base + i) != test_val) { -printk ("3c503: memory failure or memory address conflict.\n" ); +pr_warning ("3c503: memory failure or memory address conflict.\n" ); dev->mem_start =0 ; ei_status.name ="3c503-PIO" ;iounmap (mem_base);
@@ -344,7 +345,7 @@ el2_probe1(struct net_device *dev, int ioaddr)if (dev->irq ==2 ) dev->irq =9 ;else if (dev->irq >5 && dev->irq !=9 ) { -printk ("3c503: configured interrupt %d invalid, will use autoIRQ.\n" , +pr_warning ("3c503: configured interrupt %d invalid, will use autoIRQ.\n" , dev->irq); dev->irq =0 ; }
@@ -359,7 +360,7 @@ el2_probe1(struct net_device *dev, int ioaddr) goto out1;if (dev->mem_start) -printk ("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n" , +pr_info ("%s: %s - %dkB RAM, 8kB shared mem window at %#6lx-%#6lx.\n" , dev->name, ei_status.name, (wordlength+1 )<<3 , dev->mem_start, dev->mem_end-1 );
@@ -367,7 +368,7 @@ el2_probe1(struct net_device *dev, int ioaddr) { ei_status.tx_start_page =EL2_MB1_START_PG ; ei_status.rx_start_page =EL2_MB1_START_PG +TX_PAGES ; -printk ("\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n" , +pr_info ("\n%s: %s, %dkB RAM, using programmed I/O (REJUMPER for SHARED MEMORY).\n" , dev->name, ei_status.name, (wordlength+1 )<<3 ); }release_region (ioaddr +0x400 ,8 );
@@ -435,15 +436,16 @@ static void el2_reset_8390(struct net_device *dev) {if (ei_debug >1 ) { -printk ("%s: Resetting the 3c503 board..." , dev->name); -printk ("%#lx=%#02x %#lx=%#02x %#lx=%#02x..." ,E33G_IDCFR ,inb (E33G_IDCFR ), +pr_debug ("%s: Resetting the 3c503 board..." , dev->name); +pr_debug ("%#lx=%#02x %#lx=%#02x %#lx=%#02x..." ,E33G_IDCFR ,inb (E33G_IDCFR ),E33G_CNTRL ,inb (E33G_CNTRL ),E33G_GACFR ,inb (E33G_GACFR )); }outb_p (ECNTRL_RESET |ECNTRL_THIN ,E33G_CNTRL ); ei_status.txing =0 ;outb_p (ei_status.interface_num==0 ?ECNTRL_THIN :ECNTRL_AUI ,E33G_CNTRL );el2_init_card (dev); -if (ei_debug >1 )printk ("done\n" ); +if (ei_debug >1 ) +pr_debug ("done\n" ); }/* Initialize the 3c503 GA registers after a reset. */
@@ -529,7 +531,7 @@ el2_block_output(struct net_device *dev, int count, {if (!boguscount--) { -printk ("%s: FIFO blocked in el2_block_output.\n" , dev->name); +pr_notice ("%s: FIFO blocked in el2_block_output.\n" , dev->name);el2_reset_8390 (dev); goto blocked; }
@@ -581,7 +583,7 @@ el2_get_8390_hdr(struct net_device *dev, struct e8390_pkt_hdr *hdr, int ring_pag {if (!boguscount--) { -printk ("%s: FIFO blocked in el2_get_8390_hdr.\n" , dev->name); +pr_notice ("%s: FIFO blocked in el2_get_8390_hdr.\n" , dev->name);memset (hdr,0x00 ,sizeof (struct e8390_pkt_hdr ));el2_reset_8390 (dev); goto blocked;
@@ -645,7 +647,7 @@ el2_block_input(struct net_device *dev, int count, struct sk_buff *skb, int ring {if (!boguscount--) { -printk ("%s: FIFO blocked in el2_block_input.\n" , dev->name); +pr_notice ("%s: FIFO blocked in el2_block_input.\n" , dev->name);el2_reset_8390 (dev); goto blocked; }
@@ -707,7 +709,7 @@ init_module(void)for (this_dev =0 ; this_dev <MAX_EL2_CARDS ; this_dev++) {if (io[this_dev] ==0 ) {if (this_dev !=0 )break ;/* only autoprobe 1st one */ -printk (KERN_NOTICE "3c503.c: Presently autoprobing (not recommended) for a single card.\n" ); +pr_notice ("3c503.c: Presently autoprobing (not recommended) for a single card.\n" ); } dev =alloc_eip_netdev ();if (!dev)
@@ -720,7 +722,7 @@ init_module(void)continue ; }free_netdev (dev); -printk (KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n" , io[this_dev]); +pr_warning ("3c503.c: No 3c503 card found (i/o = 0x%x).\n" , io[this_dev]);break ; }if (found)
drivers/net/3c505.c +95 -96
658 lines not on this page · raw message
drivers/net/3c507.c +23 -24
176 lines not on this page · raw message
drivers/net/3c509.c +30 -30
223 lines not on this page · raw message
Signature · 1 line
1.6.3.1
PATCH 2/2 3c5xx: convert printk() to pr_foo()
---
Compile tested.
drivers/net/3c515.c | 115 +++++++++++++++---------------- drivers/net/3c523.c | 86 +++++++++++----------- drivers/net/3c527.c | 46 ++++++------- drivers/net/3c59x.c | 194 +++++++++++++++++++++++++------------------------- 4 files changed, 217 insertions(+), 224 deletions(-)
drivers/net/3c515.c +56 -59
@@ -420,7 +420,7 @@ int init_module(void)if (debug >=0 ) corkscrew_debug = debug;if (corkscrew_debug) -printk (version); +pr_debug ("%s" , version);while (corkscrew_scan (-1 )) found++;return found ?0 : -ENODEV ;
@@ -437,7 +437,7 @@ struct net_device *tc515_probe(int unit)if (corkscrew_debug >0 && !printed) { printed =1 ; -printk (version); +pr_debug ("%s" , version); }return dev;
@@ -516,7 +516,7 @@ static struct net_device *corkscrew_scan(int unit)if (pnp_device_attach (idev) <0 )continue ;if (pnp_activate_dev (idev) <0 ) { -printk ("pnp activate failed (out of resources?)\n" ); +pr_warning ("pnp activate failed (out of resources?)\n" );pnp_device_detach (idev);continue ; }
@@ -531,9 +531,9 @@ static struct net_device *corkscrew_scan(int unit)continue ; }if (corkscrew_debug) -printk ("ISAPNP reports %s at i/o 0x%x, irq %d\n" , +pr_debug ("ISAPNP reports %s at i/o 0x%x, irq %d\n" , (char *) corkscrew_isapnp_adapters[i].driver_data, ioaddr, irq); -printk (KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n" , +pr_info ("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n" ,inl (ioaddr +0x2002 ),inw (ioaddr +0x2000 ));/* irq = inw(ioaddr + 0x2002) & 15; */ /* Use the irq from isapnp */ SET_NETDEV_DEV (dev, &idev->dev);
@@ -552,7 +552,7 @@ no_pnp:if (!check_device (ioaddr))continue ; -printk (KERN_INFO "3c515 Resource configuration register %#4.4x, DCR %4.4x.\n" , +pr_info ("3c515 Resource configuration register %#4.4x, DCR %4.4x.\n" ,inl (ioaddr +0x2002 ),inw (ioaddr +0x2000 )); err =corkscrew_setup (dev, ioaddr,NULL , cards_found++);if (!err)
@@ -625,7 +625,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,list_add (&vp->list, &root_corkscrew_dev);#endif -printk (KERN_INFO "%s: 3Com %s at %#3x," , dev->name, vp->product_name, ioaddr); +pr_info ("%s: 3Com %s at %#3x," , dev->name, vp->product_name, ioaddr);spin_lock_init (&vp->lock);
@@ -648,19 +648,19 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, } checksum = (checksum ^ (checksum >>8 )) &0xff ;if (checksum !=0x00 ) -printk (" ***INVALID CHECKSUM %4.4x*** " , checksum); -printk (" %pM" , dev->dev_addr); +pr_err (" ***INVALID CHECKSUM %4.4x*** " , checksum); +pr_info (" %pM" , dev->dev_addr);if (eeprom[16 ] ==0x11c7 ) {/* Corkscrew */ if (request_dma (dev->dma,"3c515" )) { -printk (", DMA %d allocation failed" , dev->dma); +pr_warning (", DMA %d allocation failed" , dev->dma); dev->dma =0 ; }else -printk (", DMA %d" , dev->dma); +pr_info (", DMA %d" , dev->dma); } -printk (", IRQ %d\n" , dev->irq); +pr_info (", IRQ %d\n" , dev->irq);/* Tell them about an invalid IRQ. */ if (corkscrew_debug && (dev->irq <=0 || dev->irq >15 )) -printk (KERN_WARNING " *** Warning: this IRQ is unlikely to work! ***\n" ); +pr_warning (" *** Warning: this IRQ is unlikely to work! ***\n" ); {char *ram_split[] = {"5:3" ,"3:1" ,"1:1" ,"3:5" };
@@ -669,9 +669,9 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, vp->available_media =inw (ioaddr + Wn3_Options); config =inl (ioaddr + Wn3_Config);if (corkscrew_debug >1 ) -printk (KERN_INFO " Internal config register is %4.4x, transceivers %#x.\n" , +pr_info (" Internal config register is %4.4x, transceivers %#x.\n" , config,inw (ioaddr + Wn3_Options)); - printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", + pr_info(" %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n", 8 << config & Ram_size, config & Ram_width ? "word" : "byte", ram_split[(config & Ram_split) >> Ram_split_shift],
@@ -682,7 +682,7 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, dev->if_port = vp->default_media; }if (vp->media_override !=7 ) { -printk (KERN_INFO " Media override to transceiver type %d (%s).\n" , +pr_info (" Media override to transceiver type %d (%s).\n" , vp->media_override, media_tbl[vp->media_override].name); dev->if_port = vp->media_override;
@@ -718,7 +718,7 @@ static int corkscrew_open(struct net_device *dev)if (vp->media_override !=7 ) {if (corkscrew_debug >1 ) -printk (KERN_INFO "%s: Media override to transceiver %d (%s).\n" , +pr_info ("%s: Media override to transceiver %d (%s).\n" , dev->name, vp->media_override, media_tbl[vp->media_override].name); dev->if_port = vp->media_override;
@@ -729,7 +729,7 @@ static int corkscrew_open(struct net_device *dev) dev->if_port = media_tbl[dev->if_port].next;if (corkscrew_debug >1 ) -printk ("%s: Initial media type %s.\n" , +pr_debug ("%s: Initial media type %s.\n" , dev->name, media_tbl[dev->if_port].name);init_timer (&vp->timer);
@@ -744,7 +744,7 @@ static int corkscrew_open(struct net_device *dev)outl (config, ioaddr + Wn3_Config);if (corkscrew_debug >1 ) { -printk ("%s: corkscrew_open() InternalConfig %8.8x.\n" , +pr_debug ("%s: corkscrew_open() InternalConfig %8.8x.\n" , dev->name, config); }
@@ -777,7 +777,7 @@ static int corkscrew_open(struct net_device *dev)if (corkscrew_debug >1 ) {EL3WINDOW (4 ); -printk ("%s: corkscrew_open() irq %d media status %4.4x.\n" , +pr_debug ("%s: corkscrew_open() irq %d media status %4.4x.\n" , dev->name, dev->irq,inw (ioaddr + Wn4_Media)); }
@@ -814,8 +814,7 @@ static int corkscrew_open(struct net_device *dev)if (vp->full_bus_master_rx) {/* Boomerang bus master. */ vp->cur_rx = vp->dirty_rx =0 ;if (corkscrew_debug >2 ) -printk ("%s: Filling in the Rx ring.\n" , - dev->name); +pr_debug ("%s: Filling in the Rx ring.\n" , dev->name);for (i =0 ; i <RX_RING_SIZE ; i++) {struct sk_buff *skb;if (i < (RX_RING_SIZE -1 ))
@@ -877,7 +876,7 @@ static void corkscrew_timer(unsigned long data)int ok =0 ;if (corkscrew_debug >1 ) -printk ("%s: Media selection timer tick happened, %s.\n" , +pr_debug ("%s: Media selection timer tick happened, %s.\n" , dev->name, media_tbl[dev->if_port].name);spin_lock_irqsave (&vp->lock, flags);
@@ -894,12 +893,12 @@ static void corkscrew_timer(unsigned long data)if (media_status & Media_LnkBeat) { ok =1 ;if (corkscrew_debug >1 ) -printk ("%s: Media %s has link beat, %x.\n" , +pr_debug ("%s: Media %s has link beat, %x.\n" , dev->name, media_tbl[dev->if_port].name, media_status); }else if (corkscrew_debug >1 ) -printk ("%s: Media %s is has no link beat, %x.\n" , +pr_debug ("%s: Media %s is has no link beat, %x.\n" , dev->name, media_tbl[dev->if_port].name, media_status);
@@ -907,7 +906,7 @@ static void corkscrew_timer(unsigned long data)break ;default :/* Other media types handled by Tx timeouts. */ if (corkscrew_debug >1 ) -printk ("%s: Media %s is has no indication, %x.\n" , +pr_debug ("%s: Media %s is has no indication, %x.\n" , dev->name, media_tbl[dev->if_port].name, media_status);
@@ -925,12 +924,12 @@ static void corkscrew_timer(unsigned long data)if (dev->if_port ==8 ) {/* Go back to default. */ dev->if_port = vp->default_media;if (corkscrew_debug >1 ) -printk ("%s: Media selection failing, using default %s port.\n" , +pr_debug ("%s: Media selection failing, using default %s port.\n" , dev->name, media_tbl[dev->if_port].name); }else {if (corkscrew_debug >1 ) -printk ("%s: Media selection failed, now trying %s port.\n" , +pr_debug ("%s: Media selection failed, now trying %s port.\n" , dev->name, media_tbl[dev->if_port].name); vp->timer.expires = jiffies + media_tbl[dev->if_port].wait;
@@ -953,7 +952,7 @@ static void corkscrew_timer(unsigned long data)spin_unlock_irqrestore (&vp->lock, flags);if (corkscrew_debug >1 ) -printk ("%s: Media selection timer finished, %s.\n" , +pr_debug ("%s: Media selection timer finished, %s.\n" , dev->name, media_tbl[dev->if_port].name);#endif /* AUTOMEDIA */
@@ -966,23 +965,21 @@ static void corkscrew_timeout(struct net_device *dev)struct corkscrew_private *vp =netdev_priv (dev);int ioaddr = dev->base_addr; -printk (KERN_WARNING -"%s: transmit timed out, tx_status %2.2x status %4.4x.\n" , +pr_warning ("%s: transmit timed out, tx_status %2.2x status %4.4x.\n" , dev->name,inb (ioaddr + TxStatus),inw (ioaddr +EL3_STATUS ));/* Slight code bloat to be user friendly. */ if ((inb (ioaddr + TxStatus) &0x88 ) ==0x88 ) -printk (KERN_WARNING -"%s: Transmitter encountered 16 collisions -- network" +pr_warning ("%s: Transmitter encountered 16 collisions --" " network cable problem?\n" , dev->name);#ifndef final_version -printk (" Flags; bus-master %d, full %d; dirty %d current %d.\n" , +pr_debug (" Flags; bus-master %d, full %d; dirty %d current %d.\n" , vp->full_bus_master_tx, vp->tx_full, vp->dirty_tx, vp->cur_tx); -printk (" Down list %8.8x vs. %p.\n" ,inl (ioaddr + DownListPtr), +pr_debug (" Down list %8.8x vs. %p.\n" ,inl (ioaddr + DownListPtr), &vp->tx_ring[0 ]);for (i =0 ; i <TX_RING_SIZE ; i++) { -printk (" %d: %p length %8.8x status %8.8x\n" , i, +pr_debug (" %d: %p length %8.8x status %8.8x\n" , i, &vp->tx_ring[i], vp->tx_ring[i].length, vp->tx_ring[i].status); }
@@ -1023,7 +1020,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,else prev_entry =NULL ;if (corkscrew_debug >3 ) -printk ("%s: Trying to send a packet, Tx index %d.\n" , +pr_debug ("%s: Trying to send a packet, Tx index %d.\n" , dev->name, vp->cur_tx);/* vp->tx_full = 1; */ vp->tx_skbuff[entry] = skb;
@@ -1102,7 +1099,7 @@ static int corkscrew_start_xmit(struct sk_buff *skb,while (--i >0 && (tx_status =inb (ioaddr + TxStatus)) >0 ) {if (tx_status &0x3C ) {/* A Tx-disabling error occurred. */ if (corkscrew_debug >2 ) -printk ("%s: Tx error, status %2.2x.\n" , +pr_debug ("%s: Tx error, status %2.2x.\n" , dev->name, tx_status);if (tx_status &0x04 ) dev->stats.tx_fifo_errors++;
@@ -1143,7 +1140,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) status =inw (ioaddr +EL3_STATUS );if (corkscrew_debug >4 ) -printk ("%s: interrupt, status %4.4x, timer %d.\n" , +pr_debug ("%s: interrupt, status %4.4x, timer %d.\n" , dev->name, status, latency);if ((status &0xE000 ) !=0xE000 ) {static int donedidthis;
@@ -1151,7 +1148,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)Ignore a single early interrupt, but don't hang the machine for other interrupt problems. */ if (donedidthis++ >100 ) { -printk (KERN_ERR "%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n" , +pr_err ("%s: Bogus interrupt, bailing. Status %4.4x, start=%d.\n" , dev->name, status,netif_running (dev));free_irq (dev->irq, dev); dev->irq =-1 ;
@@ -1160,14 +1157,14 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) do { if (corkscrew_debug > 5) - printk("%s: In interrupt loop, status %4.4x.\n", + pr_debug("%s: In interrupt loop, status %4.4x.\n", dev->name, status); if (status & RxComplete) corkscrew_rx(dev); if (status & TxAvailable) { if (corkscrew_debug > 5) - printk(" TX room bit was handled.\n"); + pr_debug(" TX room bit was handled.\n"); /* There's room in the FIFO for a full-sized packet. */ outw(AckIntr | TxAvailable, ioaddr + EL3_CMD); netif_wake_queue(dev);
@@ -1212,19 +1209,19 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)if (status & StatsFull) {/* Empty statistics. */ static int DoneDidThat;if (corkscrew_debug >4 ) -printk ("%s: Updating stats.\n" , dev->name); +pr_debug ("%s: Updating stats.\n" , dev->name);update_stats (ioaddr, dev);/* DEBUG HACK: Disable statistics as an interrupt source. */ /* This occurs when we have the wrong media type! */ if (DoneDidThat ==0 &&inw (ioaddr +EL3_STATUS ) & StatsFull) {int win, reg; -printk ("%s: Updating stats failed, disabling stats as an" +pr_notice ("%s: Updating stats failed, disabling stats as an" " interrupt source.\n" , dev->name);for (win =0 ; win <8 ; win++) {EL3WINDOW (win); -printk ("\n Vortex window %d:" , win); +pr_notice ("\n Vortex window %d:" , win);for (reg =0 ; reg <16 ; reg++) -printk (" %2.2x" ,inb (ioaddr + reg)); +pr_notice (" %2.2x" ,inb (ioaddr + reg)); }EL3WINDOW (7 ); outw(SetIntrEnb | TxAvailable |
@@ -1246,7 +1243,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id) }if (--i <0 ) { -printk (KERN_ERR "%s: Too much work in interrupt, status %4.4x. " +pr_err ("%s: Too much work in interrupt, status %4.4x. " "Disabling functions (%4.4x).\n" , dev->name, status, SetStatusEnb | ((~status) &0x7FE ));/* Disable all pending interrupts. */
@@ -1262,7 +1259,7 @@ static irqreturn_t corkscrew_interrupt(int irq, void *dev_id)spin_unlock (&lp->lock);if (corkscrew_debug >4 ) -printk ("%s: exiting interrupt, status %4.4x.\n" , dev->name, status); +pr_debug ("%s: exiting interrupt, status %4.4x.\n" , dev->name, status);return IRQ_HANDLED ; }
@@ -1273,13 +1270,13 @@ static int corkscrew_rx(struct net_device *dev)short rx_status;if (corkscrew_debug >5 ) -printk (" In rx_packet(), status %4.4x, rx_status %4.4x.\n" , +pr_debug (" In rx_packet(), status %4.4x, rx_status %4.4x.\n" ,inw (ioaddr +EL3_STATUS ),inw (ioaddr + RxStatus));while ((rx_status =inw (ioaddr + RxStatus)) >0 ) {if (rx_status &0x4000 ) {/* Error, update stats. */ unsigned char rx_error =inb (ioaddr + RxErrors);if (corkscrew_debug >2 ) -printk (" Rx error: status %2.2x.\n" , +pr_debug (" Rx error: status %2.2x.\n" , rx_error); dev->stats.rx_errors++;if (rx_error &0x01 )
@@ -1299,7 +1296,7 @@ static int corkscrew_rx(struct net_device *dev) skb =dev_alloc_skb (pkt_len +5 +2 );if (corkscrew_debug >4 ) -printk ("Receiving packet size %d status %4.4x.\n" , +pr_debug ("Receiving packet size %d status %4.4x.\n" , pkt_len, rx_status);if (skb !=NULL ) {skb_reserve (skb,2 );/* Align IP on 16 byte boundaries */
@@ -1318,7 +1315,7 @@ static int corkscrew_rx(struct net_device *dev)break ;continue ; }else if (corkscrew_debug) -printk ("%s: Couldn't allocate a sk_buff of size %d.\n" , dev->name, pkt_len); +pr_debug ("%s: Couldn't allocate a sk_buff of size %d.\n" , dev->name, pkt_len); }outw (RxDiscard, ioaddr +EL3_CMD ); dev->stats.rx_dropped++;
@@ -1338,13 +1335,13 @@ static int boomerang_rx(struct net_device *dev)int rx_status;if (corkscrew_debug >5 ) -printk (" In boomerang_rx(), status %4.4x, rx_status %4.4x.\n" , +pr_debug (" In boomerang_rx(), status %4.4x, rx_status %4.4x.\n" ,inw (ioaddr +EL3_STATUS ),inw (ioaddr + RxStatus));while ((rx_status = vp->rx_ring[entry].status) & RxDComplete) {if (rx_status & RxDError) {/* Error, update stats. */ unsigned char rx_error = rx_status >>16 ;if (corkscrew_debug >2 ) -printk (" Rx error: status %2.2x.\n" , +pr_debug (" Rx error: status %2.2x.\n" , rx_error); dev->stats.rx_errors++;if (rx_error &0x01 )
@@ -1364,7 +1361,7 @@ static int boomerang_rx(struct net_device *dev) dev->stats.rx_bytes += pkt_len;if (corkscrew_debug >4 ) -printk ("Receiving packet size %d status %4.4x.\n" , +pr_debug ("Receiving packet size %d status %4.4x.\n" , pkt_len, rx_status);/* Check if the packet is long enough to just accept without
@@ -1385,7 +1382,7 @@ static int boomerang_rx(struct net_device *dev) temp =skb_put (skb, pkt_len);/* Remove this checking code for final release. */ if (isa_bus_to_virt (vp->rx_ring[entry].addr) != temp) - printk("%s: Warning -- the skbuff addresses do not match" + pr_warning("%s: Warning -- the skbuff addresses do not match" " in boomerang_rx: %p vs. %p / %p.\n", dev->name, isa_bus_to_virt(vp->
@@ -1427,10 +1424,10 @@ static int corkscrew_close(struct net_device *dev)netif_stop_queue (dev);if (corkscrew_debug >1 ) { -printk ("%s: corkscrew_close() status %4.4x, Tx status %2.2x.\n" , +pr_debug ("%s: corkscrew_close() status %4.4x, Tx status %2.2x.\n" , dev->name,inw (ioaddr +EL3_STATUS ),inb (ioaddr + TxStatus)); -printk ("%s: corkscrew close stats: rx_nocopy %d rx_copy %d" +pr_debug ("%s: corkscrew close stats: rx_nocopy %d rx_copy %d" " tx_queued %d.\n" , dev->name, rx_nocopy, rx_copy, queued_packet); }
@@ -1534,7 +1531,7 @@ static void set_rx_mode(struct net_device *dev)if (dev->flags &IFF_PROMISC ) {if (corkscrew_debug >3 ) -printk ("%s: Setting promiscuous mode.\n" , +pr_debug ("%s: Setting promiscuous mode.\n" , dev->name); new_mode = SetRxFilter | RxStation | RxMulticast | RxBroadcast | RxProm; }else if ((dev->mc_list) || (dev->flags &IFF_ALLMULTI )) {
drivers/net/3c523.c +43 -43
256 lines not on this page · raw message
drivers/net/3c527.c +21 -25
162 lines not on this page · raw message
drivers/net/3c59x.c +97 -97
706 lines not on this page · raw message
Signature · 1 line
1.6.3.1
2009/5/19 Alexander Beregalov <[email protected]>:
Quoted 6 lines
Signed-off-by Alexander Beregalov <[email protected]>---
Compile tested.
Quoted 7 lines
drivers/net/3c501.c | 55 +++++++-------- drivers/net/3c503.c | 36 +++++----- drivers/net/3c505.c | 191 +++++++++++++++++++++++++-------------------------- drivers/net/3c507.c | 47 ++++++------- drivers/net/3c509.c | 60 ++++++++-------- 5 files changed, 193 insertions(+), 196 deletions(-)
I do not use pr_cont when it is needed.
Please do not pull both patches, I will make a new version.
David Miller
maintainerFrom: Alexander Beregalov <[email protected]>
Date: Wed, 20 May 2009 01:27:20 +0400
Quoted 2 lines
I do not use
pr_contwhen it is needed.
Please do not pull both patches, I will make a new version.
Ok I'll toss them both and wait for new submissions, thanks.