From: Stefan Rompf <srompf@isg.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com
Subject: Re: Patch: netif_carrier_on()/off() for xircom_tulip_cb
Date: Fri, 20 Feb 2004 17:23:00 +0100 [thread overview]
Message-ID: <200402201723.00916.srompf@isg.de> (raw)
In-Reply-To: <4033FAF6.2090200@pobox.com>
[-- Attachment #1: Type: text/plain, Size: 152 bytes --]
> Please resend patches that may be applied with "patch -p1",
> not "patch -p0".
and here the netif_carrier-stuff, this time with attachment.
Stefan
[-- Attachment #2: xircom_tulip_cb_lw.diff --]
[-- Type: text/x-diff, Size: 1524 bytes --]
--- jeffdir/drivers/net/tulip/xircom_tulip_cb.c.pm 2004-02-15 13:07:49.000000000 +0100
+++ jeffdir/drivers/net/tulip/xircom_tulip_cb.c 2004-02-15 13:58:06.000000000 +0100
@@ -343,6 +343,7 @@ static void xircom_tx_timeout(struct net
static void xircom_init_ring(struct net_device *dev);
static int xircom_start_xmit(struct sk_buff *skb, struct net_device *dev);
static int xircom_rx(struct net_device *dev);
+static void xircom_media_change(struct net_device *dev);
static irqreturn_t xircom_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
static int xircom_close(struct net_device *dev);
static struct net_device_stats *xircom_get_stats(struct net_device *dev);
@@ -789,6 +790,9 @@ xircom_up(struct net_device *dev)
/* Tell the net layer we're ready */
netif_start_queue (dev);
+ /* Check current media state */
+ xircom_media_change(dev);
+
if (xircom_debug > 2) {
printk(KERN_DEBUG "%s: Done xircom_up(), CSR0 %8.8x, CSR5 %8.8x CSR6 %8.8x.\n",
dev->name, inl(ioaddr + CSR0), inl(ioaddr + CSR5),
@@ -1013,6 +1017,7 @@ static void xircom_media_change(struct n
dev->name,
tp->speed100 ? "100" : "10",
tp->full_duplex ? "full" : "half");
+ netif_carrier_on(dev);
newcsr6 = csr6 & ~FullDuplexBit;
if (tp->full_duplex)
newcsr6 |= FullDuplexBit;
@@ -1020,6 +1025,7 @@ static void xircom_media_change(struct n
outl_CSR6(newcsr6, ioaddr + CSR6);
} else {
printk(KERN_DEBUG "%s: Link is down\n", dev->name);
+ netif_carrier_off(dev);
}
}
prev parent reply other threads:[~2004-02-20 16:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-15 14:04 Patch: netif_carrier_on()/off() for xircom_tulip_cb Stefan Rompf
2004-02-18 23:53 ` Jeff Garzik
2004-02-20 16:21 ` Stefan Rompf
2004-02-25 1:01 ` Jeff Garzik
2004-02-20 16:21 ` Stefan Rompf
2004-02-20 16:23 ` Stefan Rompf [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=200402201723.00916.srompf@isg.de \
--to=srompf@isg.de \
--cc=jgarzik@pobox.com \
--cc=netdev@oss.sgi.com \
/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).