pcnet32.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

In the following code snippet
if(pcnet32_debug > 5) is already commented in my original kernel source, If
I remove the comment or if I comment next line of the same (printk(...)),
the dumping of the data into debug console is very slow(I am using simple
shell, I typed ls in it, the display is very slow).

If I keep the code just like this I am getting so many debug statements of
printk.

Please clarify me why it is becoming slow, if remove the comment of
if(pcnet32_debug > 5) or commenting the next line of it (printk)...
----------------------------------------------------------------------------
-------------------
static void pcnet32_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
    int temp;
    struct net_device *dev = (struct net_device *)dev_id;
    struct pcnet32_private *lp;
    unsigned long ioaddr;
    u16 csr0,rap;
    int boguscnt =  max_interrupt_work;
    int must_restart;

        if (dev == NULL) {
        printk (KERN_DEBUG "pcnet32_interrupt(): irq %d for unknown
device.\n",
irq);
        return;
    }

    ioaddr = dev->base_addr;
    lp = (struct pcnet32_private *)dev->priv;

    spin_lock(&lp->lock);


    rap = lp->a.read_rap(ioaddr);
    while ((csr0 = lp->a.read_csr (ioaddr, 0)) & 0x8600 && --boguscnt >= 0)
{
        /* Acknowledge all of the current interrupt sources ASAP. */
        lp->a.write_csr (ioaddr, 0, csr0 & ~0x004f);

        must_restart = 0;
******************************************************************
//      if(pcnet32_debug > 5)
            printk(KERN_DEBUG"%s: interrupt  csr0=%#2.2x new csr=%#2.2x.\n"
                ,dev->name, csr0, lp->a.read_csr (ioaddr, 0));
********************************************************************
        if (csr0 & 0x0400)              /* Rx interrupt */
            pcnet32_rx(dev);

        if (csr0 & 0x0200) {            /* Tx-done interrupt */
            unsigned int dirty_tx = lp->dirty_tx;
----------------------------------------------------------------------------
---------------------


Thanks and Regards
Ramprasad

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux