From: Jens Osterkamp <jens@de.ibm.com>
To: cbe-oss-dev@ozlabs.org
Cc: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>,
linas@austin.ibm.com, netdev@vger.kernel.org
Subject: Re: [Cbe-oss-dev] [PATCH 4/5] spidernet: fix error interrupt handling
Date: Wed, 23 Jan 2008 14:55:33 +0100 [thread overview]
Message-ID: <200801231455.34027.jens@de.ibm.com> (raw)
In-Reply-To: <20080111.154614.-345477188.kouish@swc.toshiba.co.jp>
On Friday 11 January 2008, Ishizaki Kou wrote:
> In addition to the value of GHIINT0STS, spidernet interrupt handler
> should check the values of GHIINT1STS/GHIINT2STS registers at the
> beginning of spider_net_interrupt() so as not to drop error
> interrupts.
>
> GHIINT1STS/GHIINT2STS registers indicates some of erroneous conditions
> in spidernet, and a few bits of GHIINT0STS register reflects these
> conditions. But GHIINT0MSK masks these bits, so you should check these
> conditions by reading GHIINT1STS/GHIINT2STS registers directly.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Acked-by: Jens Osterkamp <jens@de.ibm.com>
>
> Index: linux-powerpc-git/drivers/net/spider_net.c
> ===================================================================
> --- linux-powerpc-git.orig/drivers/net/spider_net.c
> +++ linux-powerpc-git/drivers/net/spider_net.c
> @@ -1415,18 +1415,12 @@ spider_net_link_reset(struct net_device
> * found when an interrupt is presented
> */
> static void
> -spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg)
> +spider_net_handle_error_irq(struct spider_net_card *card, u32 status_reg,
> + u32 error_reg1, u32 error_reg2)
> {
> - u32 error_reg1, error_reg2;
> u32 i;
> int show_error = 1;
>
> - error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
> - error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);
> -
> - error_reg1 &= SPIDER_NET_INT1_MASK_VALUE;
> - error_reg2 &= SPIDER_NET_INT2_MASK_VALUE;
> -
> /* check GHIINT0STS ************************************/
> if (status_reg)
> for (i = 0; i < 32; i++)
> @@ -1656,12 +1650,15 @@ spider_net_interrupt(int irq, void *ptr)
> {
> struct net_device *netdev = ptr;
> struct spider_net_card *card = netdev_priv(netdev);
> - u32 status_reg;
> + u32 status_reg, error_reg1, error_reg2;
>
> status_reg = spider_net_read_reg(card, SPIDER_NET_GHIINT0STS);
> - status_reg &= SPIDER_NET_INT0_MASK_VALUE;
> + error_reg1 = spider_net_read_reg(card, SPIDER_NET_GHIINT1STS);
> + error_reg2 = spider_net_read_reg(card, SPIDER_NET_GHIINT2STS);
>
> - if (!status_reg)
> + if (!(status_reg & SPIDER_NET_INT0_MASK_VALUE) &&
> + !(error_reg1 & SPIDER_NET_INT1_MASK_VALUE) &&
> + !(error_reg2 & SPIDER_NET_INT2_MASK_VALUE))
> return IRQ_NONE;
>
> if (status_reg & SPIDER_NET_RXINT ) {
> @@ -1676,7 +1673,8 @@ spider_net_interrupt(int irq, void *ptr)
> spider_net_link_reset(netdev);
>
> if (status_reg & SPIDER_NET_ERRINT )
> - spider_net_handle_error_irq(card, status_reg);
> + spider_net_handle_error_irq(card, status_reg,
> + error_reg1, error_reg2);
>
> /* clear interrupt sources */
> spider_net_write_reg(card, SPIDER_NET_GHIINT0STS, status_reg);
> _______________________________________________
> cbe-oss-dev mailing list
> cbe-oss-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/cbe-oss-dev
>
--
Gruß,
Jens
IBM Deutschland Entwicklung GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Herbert Kircher
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
prev parent reply other threads:[~2008-01-23 13:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-11 6:46 [PATCH 4/5] spidernet: fix error interrupt handling Ishizaki Kou
2008-01-23 13:55 ` Jens Osterkamp [this message]
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=200801231455.34027.jens@de.ibm.com \
--to=jens@de.ibm.com \
--cc=cbe-oss-dev@ozlabs.org \
--cc=kou.ishizaki@toshiba.co.jp \
--cc=linas@austin.ibm.com \
--cc=netdev@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).