From: Jeff Garzik <jgarzik@pobox.com>
To: russell@coker.com.au
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
rask@sygehus.dk, akpm@osdl.org, netdev@oss.sgi.com
Subject: [PATCH/CFT] de2104x fixes
Date: Fri, 21 Nov 2003 13:50:24 -0500 [thread overview]
Message-ID: <3FBE5E70.9060102@pobox.com> (raw)
In-Reply-To: <200311212051.32352.russell@coker.com.au>
[-- Attachment #1: Type: text/plain, Size: 247 bytes --]
So, can people give this a test? It includes a change that, I hope,
addresses Russell's problem, as well as a patch from Rask.
Jeff
P.S. It would be great if people cc'd me on such bug reports ;-)
Quicker to find and respond, these days.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1792 bytes --]
===== drivers/net/tulip/de2104x.c 1.25 vs edited =====
--- 1.25/drivers/net/tulip/de2104x.c Thu Sep 11 18:46:11 2003
+++ edited/drivers/net/tulip/de2104x.c Fri Nov 21 13:48:17 2003
@@ -28,8 +28,8 @@
*/
#define DRV_NAME "de2104x"
-#define DRV_VERSION "0.6"
-#define DRV_RELDATE "Sep 1, 2003"
+#define DRV_VERSION "0.9"
+#define DRV_RELDATE "Nov 21, 2003"
#include <linux/config.h>
#include <linux/module.h>
@@ -1380,18 +1380,18 @@
return rc;
}
- rc = de_init_hw(de);
+ rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev);
if (rc) {
- printk(KERN_ERR "%s: h/w init failure, err=%d\n",
- dev->name, rc);
+ printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
+ dev->name, dev->irq, rc);
goto err_out_free;
}
- rc = request_irq(dev->irq, de_interrupt, SA_SHIRQ, dev->name, dev);
+ rc = de_init_hw(de);
if (rc) {
- printk(KERN_ERR "%s: IRQ %d request failure, err=%d\n",
- dev->name, dev->irq, rc);
- goto err_out_hw;
+ printk(KERN_ERR "%s: h/w init failure, err=%d\n",
+ dev->name, rc);
+ goto err_out_free_irq;
}
netif_start_queue(dev);
@@ -1399,10 +1399,8 @@
return 0;
-err_out_hw:
- spin_lock_irqsave(&de->lock, flags);
- de_stop_hw(de);
- spin_unlock_irqrestore(&de->lock, flags);
+err_out_free_irq:
+ free_irq (dev->irq, dev);
err_out_free:
de_free_rings(de);
@@ -1571,13 +1569,17 @@
(ecmd->advertising == de->media_advertise))
return 0; /* nothing to change */
- de_link_down(de);
- de_stop_rxtx(de);
+ if (netif_running(dev)) {
+ de_link_down(de);
+ de_stop_rxtx(de);
+ }
de->media_type = new_media;
de->media_lock = media_lock;
de->media_advertise = ecmd->advertising;
- de_set_media(de);
+
+ if (netif_running(dev))
+ de_set_media(de);
return 0;
}
next parent reply other threads:[~2003-11-21 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200311212051.32352.russell@coker.com.au>
2003-11-21 18:50 ` Jeff Garzik [this message]
2003-11-25 12:57 ` [PATCH/CFT] de2104x fixes Rask Ingemann Lambertsen
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=3FBE5E70.9060102@pobox.com \
--to=jgarzik@pobox.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@oss.sgi.com \
--cc=rask@sygehus.dk \
--cc=russell@coker.com.au \
/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).