All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagannadh.teki@gmail.com>
To: netdev@vger.kernel.org
Cc: Nithin Nayak Sujir <nsujir@broadcom.com>,
	Michael Chan <mchan@broadcom.com>,
	Grant Likely <grant.likely@linaro.org>,
	Rob Herring <robh+dt@kernel.org>
Subject: Re: sblk->status_tag on drivers/net/ethernet/broadcom/tg3.c
Date: Tue, 4 Mar 2014 23:10:59 +0530	[thread overview]
Message-ID: <CAD6G_RSiT3CmuDR_fJny+NsfO=GT8pH=NB16Zmp1KUGUk3XiwQ@mail.gmail.com> (raw)
In-Reply-To: <CAD6G_RQVD7=v7b6S-muiZBYV7PEykTHOTM23i-BL=wcA5z=4Qg@mail.gmail.com>

Accidental sent please ignore this it's incomplete

On Tue, Mar 4, 2014 at 11:09 PM, Jagan Teki <jagannadh.teki@gmail.com> wrote:
> Hi All,
>
> I have a board setup with PCIe host bridge links to BCRM NIC/tg3 EP.
>
> I'm verifying legacy INT# for ifconfig up operation, typically for
> link up EP trigger an interrupt as
> Assert_INT# and PCIe RC driver ISR will called and then EP ISR will
> clear and send Dessert_INT#
>
> But I got the continues interrupts from EP which will keep ISR's in
> both PCIe RC and EP in busy loop.
>
> Log dump:
> # ifconfig eth0 172.16.0.2 up
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> ............................
> ..............
>
> I debugged further on to EP driver where I could see there is
> interrupt re-enabling is happining
> by writing 0x0 to onto MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW
>
> Debug code:
> static irqreturn_t tg3_interrupt_tagged(int irq, void *dev_id)
> {
>       ...................
>       printk(" ++status_tag = 0x%x", sblk->status_tag);
>       .......................
>
>       tw32_mailbox_f(MAILBOX_INTERRUPT_0 + TG3_64BIT_REG_LOW, 0x00000001);
>       printk(" write status = 0x%x", tr32(MAILBOX_INTERRUPT_0 +
> TG3_64BIT_REG_LOW));
>       ..................
>       tnapi->last_irq_tag = sblk->status_tag;
>       printk(" --status_tag = 0x%x\n", tnapi->last_irq_tag);
> }
>
> static int tg3_poll(struct napi_struct *napi, int budget)
> {
>
>                if (tg3_flag(tp, TAGGED_STATUS)) {
>                         /* tp->last_tag is used in tg3_int_reenable() below
>                          * to tell the hw how much work has been processed,
>                          * so we must read it before checking for more work.
>                          */
>                         tnapi->last_tag = sblk->status_tag;
>                         tnapi->last_irq_tag = tnapi->last_tag;
>                         rmb();
>                 } else
>                         sblk->status &= ~SD_STATUS_UPDATED;
>
>                 printk(" tag = 0x%x\n", sblk->status_tag);
>                 if (likely(!tg3_has_work(tnapi))) {
>                         napi_complete(napi);
>                         printk("calling tg3_int_reenable\n");
>                         tg3_int_reenable(tnapi);
>                         break;
>               }
> }
>
> static void tg3_int_reenable(struct tg3_napi *tnapi)
> {
>         struct tg3 *tp = tnapi->tp;
>
>         printk("%s val = 0x%x\n", __func__, tnapi->last_tag << 24);
>         tw32_mailbox(tnapi->int_mbox, tnapi->last_tag << 24);
>         ..............................
> }
>
> Log dump:
>
> # ifconfig eth0 172.16.0.2 up
> RC: handler
> tg3_interrupt_tagged: ++status_tag = 0x0 write status = 0x1 --status_tag = 0x0
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> RC: handler
> tg3_interrupt_tagged: write status = 0x1
> ............................
> ..............
>
>
>
>
>
>
>
>
> thanks!
> --
> Jagan.



-- 
Jagan.

  reply	other threads:[~2014-03-04 17:40 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 17:39 sblk->status_tag on drivers/net/ethernet/broadcom/tg3.c Jagan Teki
2014-03-04 17:40 ` Jagan Teki [this message]
2014-03-04 17:55 ` Jagan Teki
2014-03-04 23:22   ` Michael Chan
2014-03-05  4:03     ` Jagan Teki
2014-03-05  4:12       ` Michael Chan
2014-03-05  6:13         ` Jagan Teki
2014-03-05  6:50           ` Michael Chan
2014-03-05 20:02             ` Jagan Teki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAD6G_RSiT3CmuDR_fJny+NsfO=GT8pH=NB16Zmp1KUGUk3XiwQ@mail.gmail.com' \
    --to=jagannadh.teki@gmail.com \
    --cc=grant.likely@linaro.org \
    --cc=mchan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=nsujir@broadcom.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.