From: Radek Podgorny <radek@podgorny.cz>
To: netdev@vger.kernel.org
Subject: via velocity trivial patch
Date: Wed, 06 May 2009 23:07:02 +0200 [thread overview]
Message-ID: <4A01FBF6.1090001@podgorny.cz> (raw)
In-Reply-To: <49F1A05A.8070802@podgorny.cz>
[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello everyone!
I've sent the following mail to Francois Romieu <romieu@fr.zoreil.com>
but did not get any reply. So I'm sending directly here. It's a trivial
patch for via-velocity driver.
Sincerely
Radek Podgorny
Radek Podgorny wrote:
> Hello,
>
> attached is my trivial patch for the via-velocity driver. The actual
> change has been suggested years ago by Jeff Garzik
> (http://lkml.indiana.edu/hypermail/linux/kernel/0406.0/0500.html).
>
> The problem:
>
> When multiple velocity cards share the same interrupt (I have a 4x combo
> card on a very old motherboard without APIC or anything) the interrupt
> routine gets called for all of them (which is correct) but the chip that
> is not in question tries to react (which is wrong). The patch should
> explain the case better.
>
> It has been tested on my old (and until now broken) system and on a
> modern one (APIC, no shared interrupts) and works flawlessly.
>
> Sincerely
> Radek Podgorny
>
> diff -ru linux-2.6.29.1-orig/drivers/net/via-velocity.c
> linux-2.6.29.1/drivers/net/via-velocity.c
> --- linux-2.6.29.1-orig/drivers/net/via-velocity.c 2009-04-02
> 22:55:27.000000000 +0200
> +++ linux-2.6.29.1/drivers/net/via-velocity.c 2009-04-24
> 13:09:45.945318255 +0200
> @@ -2226,8 +2226,8 @@
> spin_lock(&vptr->lock);
> isr_status = mac_read_isr(vptr->mac_regs);
>
> - /* Not us ? */
> - if (isr_status == 0) {
> + /* Not us or garbage ? */
> + if (isr_status == 0 || isr_status == 0xffffffff) {
> spin_unlock(&vptr->lock);
> return IRQ_NONE;
> }
> @@ -2236,10 +2236,11 @@
>
> /*
> * Keep processing the ISR until we have completed
> - * processing and the isr_status becomes zero
> + * processing and the isr_status becomes zero or
> + * we read out some garbage
> */
>
> - while (isr_status != 0) {
> + while (isr_status != 0 && isr_status != 0xffffffff) {
> mac_write_isr(vptr->mac_regs, isr_status);
> if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
> velocity_error(vptr, isr_status);
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkoB+/UACgkQ7mej6pjlbYTriwCgvMZ7md0ilITiVqWQphzoyCHq
Ko4AoMqxNS2dSt6QyE29N6DK9eCInbMp
=/ZrZ
-----END PGP SIGNATURE-----
[-- Attachment #2: via-velocity.patch --]
[-- Type: text/plain, Size: 997 bytes --]
diff -ru linux-2.6.29.1-orig/drivers/net/via-velocity.c linux-2.6.29.1/drivers/net/via-velocity.c
--- linux-2.6.29.1-orig/drivers/net/via-velocity.c 2009-04-02 22:55:27.000000000 +0200
+++ linux-2.6.29.1/drivers/net/via-velocity.c 2009-04-24 13:09:45.945318255 +0200
@@ -2226,8 +2226,8 @@
spin_lock(&vptr->lock);
isr_status = mac_read_isr(vptr->mac_regs);
- /* Not us ? */
- if (isr_status == 0) {
+ /* Not us or garbage ? */
+ if (isr_status == 0 || isr_status == 0xffffffff) {
spin_unlock(&vptr->lock);
return IRQ_NONE;
}
@@ -2236,10 +2236,11 @@
/*
* Keep processing the ISR until we have completed
- * processing and the isr_status becomes zero
+ * processing and the isr_status becomes zero or
+ * we read out some garbage
*/
- while (isr_status != 0) {
+ while (isr_status != 0 && isr_status != 0xffffffff) {
mac_write_isr(vptr->mac_regs, isr_status);
if (isr_status & (~(ISR_PRXI | ISR_PPRXI | ISR_PTXI | ISR_PPTXI)))
velocity_error(vptr, isr_status);
next parent reply other threads:[~2009-05-06 21:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49F1A05A.8070802@podgorny.cz>
2009-05-06 21:07 ` Radek Podgorny [this message]
2009-05-07 22:02 ` via velocity trivial patch David Miller
2009-05-08 11:32 ` Radek Podgorny
2009-05-08 19:29 ` Francois Romieu
2009-05-10 21:06 ` Radek Podgorny
2009-05-13 13:03 ` Radek Podgorny
2009-05-13 22:32 ` Francois Romieu
2009-05-08 19:40 ` David Miller
2009-05-08 19:41 ` David Miller
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=4A01FBF6.1090001@podgorny.cz \
--to=radek@podgorny.cz \
--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