* Re: [3/5] [NET]: Add software TSOv4
From: Michael Chan @ 2006-06-24 3:08 UTC (permalink / raw)
To: Herbert Xu; +Cc: David S. Miller, netdev
In-Reply-To: <20060623235341.GA6593@gondor.apana.org.au>
On Sat, 2006-06-24 at 09:53 +1000, Herbert Xu wrote:
> Nevermind, I obviously complete ignored your other fix to the length of
> the last segment :) Here is a fixed version.
>
> [NET]: Fix CHECKSUM_HW GSO problems.
>
> Fix checksum problems in the GSO code path for CHECKSUM_HW packets.
>
> The ipv4 TCP pseudo header checksum has to be adjusted for GSO
> segmented packets.
>
> The adjustment is needed because the length field in the pseudo-header
> changes. However, because we have the inequality oldlen > newlen, we
> know that delta = (u16)~oldlen + newlen is still a 16-bit quantity.
> This also means that htonl(delta) + th->check still fits in 32 bits.
> Therefore we don't have to use csum_add on this operations.
>
> This is based on a patch by Michael Chan <mchan@broadcom.com>.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
>
Yes, this should work. ACK.
^ permalink raw reply
* Re: [0/5] GSO: Generic Segmentation Offload
From: Herbert Xu @ 2006-06-24 5:36 UTC (permalink / raw)
To: YOSHIFUJI Hideaki / ?$B5HF#1QL@; +Cc: davem, netdev
In-Reply-To: <20060622.232801.02912673.yoshfuji@linux-ipv6.org>
On Thu, Jun 22, 2006 at 11:28:01PM +0900, YOSHIFUJI Hideaki / ?$B5HF#1QL@ wrote:
>
> Can you measure some with other sizes,
> e.g. 4kByte, 8kByte, 9000Byte?
GSO like TSO is less effective when the MTU is larger. However, NICs
supporting larger MTUs also support SG. So the figures I included for
lo should apply. In those scenarios, GSO is basically on par with the
default segmentation.
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply
* Re: [1/4] kevent: core files.
From: Robert Iakobashvili @ 2006-06-24 9:14 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: Benjamin LaHaise, David Miller, netdev
In-Reply-To: <20060623205401.GB26168@2ka.mipt.ru>
Hi,
> According to numbers: kevent compared to epoll resulted in the
> folllowing numbers:
> kevent: more than 2600 requests per second (trivial web server)
> epoll: about 1600-1800 requests.
> Number of errors for 3k bursts of connections with 30K connections total
> in 10seconds:
> kevent: about 2k errors.
> epoll: upto 15k errors.
If it beats the great epoll, it means a real business case for kevent.
All previous attempts in kernel as well as by glibc and other userland
emulations to provide some real AIO infrastructure and API for server
applications with performance benefits, were not too much successful.
Heavy load networking servers are normally not using AIOs on linux due
to low performance.
>From another side Windows have a very strong I/O completion ports API,
which are widely used for the most heavy load applications.
Kevent may take linux servers productivity forward in general as well as
encourage moving aio-applications from windows to linux.
--
Sincerely,
------------------------------------------------------------------
Robert Iakobashvili, coroberti at gmail dot com
Navigare necesse est, vivere non est necesse.
------------------------------------------------------------------
^ permalink raw reply
* Re: [PATCH 3/3] bcm43xx-d80211: use host_gen_beacon_template
From: Jiri Benc @ 2006-06-24 11:17 UTC (permalink / raw)
To: John W. Linville; +Cc: Michael Buesch, netdev, Alexander Tsvyashchenko
In-Reply-To: <200606232312.16289.mb@bu3sch.de>
Fri, 23 Jun 2006 23:12:15 +0200, Michael Buesch wrote:
> John, please apply.
Please do not apply the whole series yet, it is experimental and not well
tested (I wrote it in the introduction e-mail but will ensure I put it also
in subjects next time).
For example, I just realized that the first patch breaks scanning in STA
mode.
Thanks,
Jiri
--
Jiri Benc
SUSE Labs
^ permalink raw reply
* re: Brand new Have you ever dreamt to have a very hard peenis during all process?
From: Delgado @ 2006-06-24 11:47 UTC (permalink / raw)
To: nicknetwfpog
Good evening It is fully guaranteed – it will help you to shoot more and more Worried it won't work? Every man wishes it. But some of us think it’s impossible Have you ever wished to have more intense final? Check up here: http://enmsf.com/gal/ms
^ permalink raw reply
* [PATCH 1/3] d80211: experimental: do not receive through master interface when not scanning
From: Jiri Benc @ 2006-06-24 11:50 UTC (permalink / raw)
To: netdev; +Cc: John W. Linville, Michael Buesch, Alexander Tsvyashchenko
In-Reply-To: <20060623181634.56509483AB@silver.suse.cz>
This is a corrected version of the patch. I also updated the 'devel' branch
of my tree.
---
Arrived packets should not go into master interface except when scanning
- it leads to duplicate packets reception. This also fixes a race when
scanning is finished during invoking of rx handlers.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
---
net/d80211/ieee80211.c | 17 +++++++++++++++--
net/d80211/ieee80211_i.h | 1 +
2 files changed, 16 insertions(+), 2 deletions(-)
--- dscape.orig/net/d80211/ieee80211.c
+++ dscape/net/d80211/ieee80211.c
@@ -3348,6 +3348,12 @@ ieee80211_rx_h_passive_scan(struct ieee8
}
}
+ if (unlikely(rx->u.rx.in_scan)) {
+ /* scanning finished during invoking of handlers */
+ I802_DEBUG_INC(local->rx_handlers_drop_passive_scan);
+ return TXRX_DROP;
+ }
+
return TXRX_CONTINUE;
}
@@ -3539,6 +3545,9 @@ void __ieee80211_rx(struct net_device *d
goto end;
}
+ if (unlikely(local->sta_scanning || local->scan.in_scan))
+ rx.u.rx.in_scan = 1;
+
if (sta && !sta->assoc_ap && !(sta->flags & WLAN_STA_WDS) &&
!local->iff_promiscs && !multicast) {
rx.dev = sta->dev;
@@ -3581,11 +3590,15 @@ void __ieee80211_rx(struct net_device *d
if (memcmp(sdata->dev->dev_addr,
hdr->addr1, ETH_ALEN) != 0)
continue;
- } else if (!local->sta_scanning &&
- !local->scan.in_scan &&
+ } else if (!rx.u.rx.in_scan &&
!ieee80211_bssid_match(bssid,
sdata->dev->dev_addr))
continue;
+ if (sdata->dev == sdata->master &&
+ !rx.u.rx.in_scan)
+ /* do not receive anything via
+ * master device when not scanning */
+ continue;
break;
case IEEE80211_IF_TYPE_WDS:
if (bssid ||
--- dscape.orig/net/d80211/ieee80211_i.h
+++ dscape/net/d80211/ieee80211_i.h
@@ -137,6 +137,7 @@ struct ieee80211_txrx_data {
struct ieee80211_rx_status *status;
int sent_ps_buffered;
int queue;
+ int in_scan:1;
} rx;
} u;
#ifdef CONFIG_HOSTAPD_WPA_TESTING
^ permalink raw reply
* Re: [NET]: Prevent multiple qdisc runs
From: Jamal Hadi Salim @ 2006-06-24 13:50 UTC (permalink / raw)
To: Herbert Xu; +Cc: netdev, David S. Miller, Robert Olsson
In-Reply-To: <20060623033525.GA11751@gondor.apana.org.au>
On Fri, 2006-23-06 at 13:35 +1000, Herbert Xu wrote:
> On Thu, Jun 22, 2006 at 08:52:17PM -0400, jamal wrote:
> >
> > It does feel like the qdisc_is_running though is now a replacement
> > for the need for dev->txlock which existed to protect multi-cpus from
> > entering the device transmit path. Is that unintended side effect?
> > i.e why would dev->txlock be needed anymore in that path?
>
> It's not totally redundant yet since you can set tx_queue_len to zero.
> It also still protects against the asynchronous paths that take xmit_lock.
The tx_timeout?
> However, it wouldn't be a bad idea to see if there is a way to reduce the
> number of locks required on the xmit path to one.
It also seems to be there - dont know why it took me so long to see
this. I am actually gut-feeling now that we may get better performance
with LLTX drivers with this approach;-> talk about a flip-flop.
The qualification for LLTX seems to be for a driver to have a
private tx lock which is the case of about every ethernet driver out
there.
cheers,
jamal
^ permalink raw reply
* RE: [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL
From: jamal @ 2006-06-24 14:13 UTC (permalink / raw)
To: Russell Stuart
Cc: Jesper Dangaard Brouer, netdev, Stephen Hemminger, Alan Cox,
Patrick McHardy
In-Reply-To: <1151066247.4217.254.camel@ras.pc.brisbane.lube>
On Fri, 2006-23-06 at 22:37 +1000, Russell Stuart wrote:
> Sorry for the digest like reply :(
;-> I know this discussion has gone in a few directions already
and i am sure as you kept responding to the emails it became obvious.
Let me just jump to one point so we dont repeat a lot of the same things
over and over..
You can actually stop reading here if you have gathered the view at
this point that i am not objecting to the simple approach Patrick is
going with...
> On Tue, 2006-06-20 at 10:06 -0400, jamal wrote:
> But you can measure the bandwidth you are
> getting from your ISP and plug that into the tc command
> line. The web page I sent to you describes how to do this
> for ADSL lines.
>
Indeed and i referred to it in the exchanges.
And yes, I was arguing that the tc scheme you describe would not be so
bad either if the cost of making a generic change is expensive.
To reiterate the scheduler "owns the resources" of the link
i.e link level bandwidth - aka throughput; however, teaching the
scheduler as in your description in that page about effective
throughput aka "goodput" is also within reason if you knew _it was
consistent_ . The diagram i drew was:
|Linux| --ethernet-- |Modem| --DSL-- |DSLAM| --ATM-- |BRAS|
As can be seen from above, Linux has direct ownership of the ethernet
link resources (within limits of fixed bandwidth no AN etc). Just like a
disk quota scheduler owns the disk resources or CPU scheduler owns the
CPU cycles etc. Likewise, the DSLAM downstream owns scheduling of the
ATM link resources.
if you have knowledge that ATM runs between DSLAM and BRAS and that
the effective throughput is in-fact lower than the advertised one at
that point in the end2end path, then i admit it is fine to do as you
described in your web-page.
Given the ubiquity of ADSL it is also ok to have simple tweak knobs for
the scheduler in Linux to allow for it to be able to compensate for the
ATM fragmentation 3 hops down.
There are a lot of link layer issues that you may end up knowing of
(other than the ATM fragmentation overhead) in regards to something
downstream and you keep adding knobs is just adding more bloat.
Example: If that 3rd hop was wireless that happened to be doing CDMA RLP
with a lot of retransmits, or wireless that varied its throughput from
1-3Mbps at any point in time or it was a satellite link that had a lot
of latency etc etc. You could always have some way to tweak these via
the kernel. In-fact people have written schedulers specifically for
these sorts of link layer problems (I think even some of the IEEE 802.11
or wimax folks have standardized specific schedulers). You basically
have to draw a line somewhere. My line was "can it be done via user
space? yes - do it there".
Patrick seems to have a simple way to compensate generically for link
layer fragmentation, so i will not argue the practically; hopefully that
settles it? ;->
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 0/2][RFC] Network Event Notifier Mechanism
From: jamal @ 2006-06-24 14:30 UTC (permalink / raw)
To: Steve Wise; +Cc: caitlinb, netdev, David Miller
In-Reply-To: <1151069083.7808.19.camel@stevo-desktop>
On Fri, 2006-23-06 at 08:24 -0500, Steve Wise wrote:
>
> > PS:- I do think what they need is to hear route cache generation
> > as opposed to ARP+FIB updates; but lets wait and see how clever
> > the patches would look.
> >
> Can you expand on your statement above? If hooking route cache
> generation gets all the events I described, then I'd like to use that.
> I'm still learning the Linux routing subsystem. Any help would be
> GREAT!
>
If my understanding is correct of what you are trying to do is:
for a destination IP you are going to figure the source and destination
MAC address. Most of that info is available at the route + hh cache.
There can be only one destination mac per device and so you only need to
watch the device changes for that. The dst MAC per IP and any changes
you can glean from the route cache created.
But this is based on my understanding of what you are trying to do and
so far i cant say i am 100% clear.
cheers,
jamal
^ permalink raw reply
* Re: [PATCH 0/2] NET: Accurate packet scheduling for ATM/ADSL
From: jamal @ 2006-06-24 14:39 UTC (permalink / raw)
To: Patrick McHardy
Cc: Jesper Dangaard Brouer, hawk, russell-tcatm, netdev,
Stephen Hemminger
In-Reply-To: <449BFB82.9000008@trash.net>
On Fri, 2006-23-06 at 16:32 +0200, Patrick McHardy wrote:
> jamal wrote:
> > If you do it in user space you will need a daemon of some form; this is
> > my preference but it seems a lot of people hate daemons - the standard
> > claim is it is counter-usability. Such people are forgiving if you built
> > the daemon into the kernel as a thread. Perhaps the netcarrier that
> > Stefan Rompf has added could be extended to handle this)
>
> I absolutely disagree, in my opinion we currently have too few
> specialized daemons and a lot too much wild shell scripting with
> seding, awking, grepping.
Like i said i too prefer a daemon; but i have experienced a lot of
people who dont (especially in small embedded devices).
> I'm actually working on a daemon that
> provides a small scripting language to express networking configuration
> states and react to result set changes and state transitions.
> Its far from complete, but already allows you to express things like
> "on transition from { none, link flags !up } to { link flags up }
> execute /etc/network/link/$LINK_NAME up" (same for routes, addresses,
> basically all object types) or "for each link with flags lowerup,up
> execute add-to-bridge.sh". The value of each expression is dumped
> into the environment on execution, so you can comfortably use
> $LINK_NAME or $LINK_MTU instead of having to cut it out the
> "ip link list" output. Should be trivial to support link speed changes
> once we have notifications for that.
>
cool - a neteventd
> I don't think it should carry both old and new speed. Netlink
> notifications usually provide a snapshot of the new state, but
> no indication what changed, with one notable exception, the
> ifi_change field, which IMO is a hack for lazy userspace.
I am quiet fond of the ifi_change ;->
> Since
> notifications can get lost, userspace needs to resync occasionally.
> The naiive approach (works for every other object) to determine if
> the object state changed from my last known state is to compare
> all attributes ..
scalability issues abound when you have a gazillion things to look at.
There used or may still be a way to tell from looking at netlink socket
that an error occurred since last time - such as "a message was lost".
You could use that to tell a message was lost and do scanning only
then.
> but the ifi_change field will be different
> between notifications and dumps even if the object itself didn't
> change. "Lazy userspace" because looking at ifi_change is obviously
> only useful if it doesn't keep its last known state and tries to
> derive the change from update notifications alone .. which means it
> fails when notifications are lost.
>
But thats not the real intent for it.
cheers,
jamal
PS:- I will look at your other postings and respond later i have to run
for now.
^ permalink raw reply
* Re: Re: Re:
From: Ali Barrera @ 2006-06-24 19:25 UTC (permalink / raw)
To: netdev
Sensationall revoolution in medicine!
E''nlarge your p''enis up to 10 cm or up to 4 inches!
Its h'erbal solution what hasnt side effect, but has 100% guaranted results!
Dont lose your chance and but know wihtout doubts, you will be impressed with results!
Clisk here: http://nerdznews.net
propylene stretch quickstep impact thence insecticide aboveboard desperate
healthful plasmon starling figural subsidiary flux dacca twist
^ permalink raw reply
* Re: 2.6.17-mm2
From: Andrew Morton @ 2006-06-24 21:43 UTC (permalink / raw)
To: Dominik Karall; +Cc: linux-kernel, netdev, John W. Linville, Jeff Garzik
In-Reply-To: <200606242141.41055.dominik.karall@gmx.net>
On Sat, 24 Jun 2006 21:41:41 +0200
Dominik Karall <dominik.karall@gmx.net> wrote:
> On Saturday, 24. June 2006 15:19, Andrew Morton wrote:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.1
> >7/2.6.17-mm2/
>
> hi!
>
> I get this warning on make modules_install:
>
> WARNING: /lib/modules/2.6.17-mm2/kernel/net/ieee80211/ieee80211.ko
> needs unknown symbol wireless_spy_update
>
Someone removed the `#ifdef CONFIG_WIRELESS_EXT' from around the callsite
in net/ieee80211/ieee80211_rx.c and didn't update Kconfig appropriately.
Presumably, setting CONFIG_WIRELESS_EXT will get you going again.
^ permalink raw reply
* Get the freshest Now you have chance to do it Enjoy
From: Rudy @ 2006-06-25 3:26 UTC (permalink / raw)
To: netdev
Good day dear Sir,
Make other men envy you and girls worship you Most efficient products for men
Enjoy secure ordering, lowest possible prices and almost instant shipment.
Millions of people enjoy goods from these brands, and they are more than happy
Find what you need here: http://www.sluggishcl.com
We offer reliable service and 5 years expirience on the marcket!
^ permalink raw reply
* [patch 3/3] Fix phy id for LXT971A/LXT972A
From: akpm @ 2006-06-25 8:44 UTC (permalink / raw)
To: jeff; +Cc: netdev, akpm, Uwe_Zeisberger, afleming
From: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
The phy ids used are taken from an driver that used a right shift of 4 to chop
off the revision number. This driver does not shift, so the id and mask
values are wrong and must be left shifted by 4 to actually detect the chips.
Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
Acked-by: Andy Fleming <afleming@freescale.com>
[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/phy/lxt.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN drivers/net/phy/lxt.c~fix-phy-id-for-lxt971a-lxt972a drivers/net/phy/lxt.c
--- a/drivers/net/phy/lxt.c~fix-phy-id-for-lxt971a-lxt972a
+++ a/drivers/net/phy/lxt.c
@@ -123,9 +123,9 @@ static int lxt971_config_intr(struct phy
}
static struct phy_driver lxt970_driver = {
- .phy_id = 0x07810000,
+ .phy_id = 0x78100000,
.name = "LXT970",
- .phy_id_mask = 0x0fffffff,
+ .phy_id_mask = 0xfffffff0,
.features = PHY_BASIC_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_init = lxt970_config_init,
@@ -137,9 +137,9 @@ static struct phy_driver lxt970_driver =
};
static struct phy_driver lxt971_driver = {
- .phy_id = 0x0001378e,
+ .phy_id = 0x001378e0,
.name = "LXT971",
- .phy_id_mask = 0x0fffffff,
+ .phy_id_mask = 0xfffffff0,
.features = PHY_BASIC_FEATURES,
.flags = PHY_HAS_INTERRUPT,
.config_aneg = genphy_config_aneg,
_
^ permalink raw reply
* [patch 1/3] natsemi: Add quirks for Aculab E1/T1 PMXc cPCI carrier cards
From: akpm @ 2006-06-25 8:44 UTC (permalink / raw)
To: jeff; +Cc: netdev, akpm, broonie, jgarzik, thockin
From: Mark Brown <broonie@sirena.org.uk>
Aculab E1/T1 PMXc cPCI carrier card cards present a natsemi on the cPCI bus
wired up in a non-standard fashion. This patch provides support in the
natsemi driver for these cards by implementing a quirk mechanism and using
that to configure appropriate settings for the card: forcing 100M full duplex,
having a large EEPROM and using the MII port while ignoring PHYs.
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Cc: Tim Hockin <thockin@hockin.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/natsemi.c | 94 ++++++++++++++++++++++++--------------
include/linux/pci_ids.h | 3 +
2 files changed, 63 insertions(+), 34 deletions(-)
diff -puN drivers/net/natsemi.c~natsemi-add-quirks-for-aculab-e1-t1-pmxc-cpci-carrier-cards drivers/net/natsemi.c
--- a/drivers/net/natsemi.c~natsemi-add-quirks-for-aculab-e1-t1-pmxc-cpci-carrier-cards
+++ a/drivers/net/natsemi.c
@@ -226,7 +226,6 @@ static int full_duplex[MAX_UNITS];
NATSEMI_PG1_NREGS)
#define NATSEMI_REGS_VER 1 /* v1 added RFDR registers */
#define NATSEMI_REGS_SIZE (NATSEMI_NREGS * sizeof(u32))
-#define NATSEMI_DEF_EEPROM_SIZE 24 /* 12 16-bit values */
/* Buffer sizes:
* The nic writes 32-bit values, even if the upper bytes of
@@ -344,12 +343,14 @@ None characterised.
-enum pcistuff {
+enum natsemi_quirks {
PCI_USES_IO = 0x01,
PCI_USES_MEM = 0x02,
PCI_USES_MASTER = 0x04,
PCI_ADDR0 = 0x08,
PCI_ADDR1 = 0x10,
+ MEDIA_FORCE_100FD = 0x20,
+ MEDIA_IGNORE_PHY = 0x40,
};
/* MMIO operations required */
@@ -367,17 +368,21 @@ enum pcistuff {
#define MII_FX_SEL 0x0001 /* 100BASE-FX (fiber) */
#define MII_EN_SCRM 0x0004 /* enable scrambler (tp) */
-
/* array of board data directly indexed by pci_tbl[x].driver_data */
static const struct {
const char *name;
unsigned long flags;
+ int quirks;
+ int eeprom_size;
} natsemi_pci_info[] __devinitdata = {
- { "NatSemi DP8381[56]", PCI_IOTYPE },
+ { "NatSemi DP8381[56]", PCI_IOTYPE, 0, 24 },
+ { "Aculab E1/T1 PMXc cPCI carrier card", PCI_IOTYPE,
+ MEDIA_FORCE_100FD | MEDIA_IGNORE_PHY, 128 },
};
static struct pci_device_id natsemi_pci_tbl[] = {
- { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_83815, PCI_ANY_ID, PCI_ANY_ID, },
+ { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_83815, PCI_VENDOR_ID_ACULAB, PCI_SUBDEVICE_ID_ACULAB_174, 0, 0, 1 },
+ { PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_83815, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, },
};
MODULE_DEVICE_TABLE(pci, natsemi_pci_tbl);
@@ -815,6 +820,39 @@ static void move_int_phy(struct net_devi
udelay(1);
}
+static void __devinit natsemi_init_media (struct net_device *dev)
+{
+ struct netdev_private *np = netdev_priv(dev);
+ u32 tmp;
+
+ tmp = mdio_read(dev, MII_BMCR);
+ np->speed = (tmp & BMCR_SPEED100)? SPEED_100 : SPEED_10;
+ np->duplex = (tmp & BMCR_FULLDPLX)? DUPLEX_FULL : DUPLEX_HALF;
+ np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE;
+ np->advertising= mdio_read(dev, MII_ADVERTISE);
+
+ if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL
+ && netif_msg_probe(np)) {
+ printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s "
+ "10%s %s duplex.\n",
+ pci_name(np->pci_dev),
+ (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE)?
+ "enabled, advertise" : "disabled, force",
+ (np->advertising &
+ (ADVERTISE_100FULL|ADVERTISE_100HALF))?
+ "0" : "",
+ (np->advertising &
+ (ADVERTISE_100FULL|ADVERTISE_10FULL))?
+ "full" : "half");
+ }
+ if (netif_msg_probe(np))
+ printk(KERN_INFO
+ "natsemi %s: Transceiver status %#04x advertising %#04x.\n",
+ pci_name(np->pci_dev), mdio_read(dev, MII_BMSR),
+ np->advertising);
+
+}
+
static int __devinit natsemi_probe1 (struct pci_dev *pdev,
const struct pci_device_id *ent)
{
@@ -894,17 +932,21 @@ static int __devinit natsemi_probe1 (str
np->msg_enable = (debug >= 0) ? (1<<debug)-1 : NATSEMI_DEF_MSG;
np->hands_off = 0;
np->intr_status = 0;
- np->eeprom_size = NATSEMI_DEF_EEPROM_SIZE;
+ np->eeprom_size = natsemi_pci_info[chip_idx].eeprom_size;
option = find_cnt < MAX_UNITS ? options[find_cnt] : 0;
if (dev->mem_start)
option = dev->mem_start;
/* Ignore the PHY status? */
- if (option & 0x400) {
+ if (natsemi_pci_info[chip_idx].quirks & MEDIA_IGNORE_PHY) {
np->ignore_phy = 1;
} else {
- np->ignore_phy = 0;
+ if (option & 0x400) {
+ np->ignore_phy = 1;
+ } else {
+ np->ignore_phy = 0;
+ }
}
/* Initial port:
@@ -936,6 +978,12 @@ static int __devinit natsemi_probe1 (str
np->phy_addr_external = PHY_ADDR_INTERNAL;
}
+ /* Apply any speed quirks. */
+ if (natsemi_pci_info[chip_idx].quirks & MEDIA_FORCE_100FD) {
+ np->speed = 100;
+ np->duplex = 1;
+ }
+
/* The lower four bits are the media type. */
if (option) {
if (option & 0x200)
@@ -974,32 +1022,10 @@ static int __devinit natsemi_probe1 (str
else
netif_carrier_off(dev);
- /* get the initial settings from hardware */
- tmp = mdio_read(dev, MII_BMCR);
- np->speed = (tmp & BMCR_SPEED100)? SPEED_100 : SPEED_10;
- np->duplex = (tmp & BMCR_FULLDPLX)? DUPLEX_FULL : DUPLEX_HALF;
- np->autoneg = (tmp & BMCR_ANENABLE)? AUTONEG_ENABLE: AUTONEG_DISABLE;
- np->advertising= mdio_read(dev, MII_ADVERTISE);
-
- if ((np->advertising & ADVERTISE_ALL) != ADVERTISE_ALL
- && netif_msg_probe(np)) {
- printk(KERN_INFO "natsemi %s: Transceiver default autonegotiation %s "
- "10%s %s duplex.\n",
- pci_name(np->pci_dev),
- (mdio_read(dev, MII_BMCR) & BMCR_ANENABLE)?
- "enabled, advertise" : "disabled, force",
- (np->advertising &
- (ADVERTISE_100FULL|ADVERTISE_100HALF))?
- "0" : "",
- (np->advertising &
- (ADVERTISE_100FULL|ADVERTISE_10FULL))?
- "full" : "half");
- }
- if (netif_msg_probe(np))
- printk(KERN_INFO
- "natsemi %s: Transceiver status %#04x advertising %#04x.\n",
- pci_name(np->pci_dev), mdio_read(dev, MII_BMSR),
- np->advertising);
+ /* get the initial settings from hardware if we don't have any
+ * already */
+ if (!np->speed)
+ natsemi_init_media(dev);
/* save the silicon revision for later querying */
np->srr = readl(ioaddr + SiliconRev);
diff -puN include/linux/pci_ids.h~natsemi-add-quirks-for-aculab-e1-t1-pmxc-cpci-carrier-cards include/linux/pci_ids.h
--- a/include/linux/pci_ids.h~natsemi-add-quirks-for-aculab-e1-t1-pmxc-cpci-carrier-cards
+++ a/include/linux/pci_ids.h
@@ -1656,6 +1656,9 @@
#define PCI_VENDOR_ID_NVIDIA_SGS 0x12d2
#define PCI_DEVICE_ID_NVIDIA_SGS_RIVA128 0x0018
+#define PCI_VENDOR_ID_ACULAB 0x12d9
+#define PCI_SUBDEVICE_ID_ACULAB_174 0x000c
+
#define PCI_SUBVENDOR_ID_CHASE_PCIFAST 0x12E0
#define PCI_SUBDEVICE_ID_CHASE_PCIFAST4 0x0031
#define PCI_SUBDEVICE_ID_CHASE_PCIFAST8 0x0021
_
^ permalink raw reply
* [patch 2/3] drivers/net/ns83820.c: add paramter to disable autonegotiation
From: akpm @ 2006-06-25 8:44 UTC (permalink / raw)
To: jeff; +Cc: netdev, akpm, dan, bcrl, dan, jgarzik
From: Dan Faerch <dan@scannet.dk>
Adds "ethtool command" support to driver. Initially 2 commands are
implemented: force fullduplex and toggle autoneg.
Also added a "disable_autoneg" module argument to completely disable
autoneg on all cards using this driver.
Signed-off-by: Dan Faerch <dan@hacker.dk>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/ns83820.c | 183 +++++++++++++++++++++++++++++++++++++---
1 file changed, 172 insertions(+), 11 deletions(-)
diff -puN drivers/net/ns83820.c~drivers-net-ns83820c-add-paramter-to-disable-auto drivers/net/ns83820.c
--- a/drivers/net/ns83820.c~drivers-net-ns83820c-add-paramter-to-disable-auto
+++ a/drivers/net/ns83820.c
@@ -1,4 +1,4 @@
-#define VERSION "0.22"
+#define VERSION "0.23"
/* ns83820.c by Benjamin LaHaise with contributions.
*
* Questions/comments/discussion to linux-ns83820@kvack.org.
@@ -68,6 +68,9 @@
* 20050406 0.22 - improved DAC ifdefs from Andi Kleen
* - removal of dead code from Adrian Bunk
* - fix half duplex collision behaviour
+ * 20060213 0.23 - Basic skeleton for adding ethtool commands.
+ * Setting of autoneg & full-duplex via ethtool
+ * by Dan Faerch <dan@hacker.dk>
* Driver Overview
* ===============
*
@@ -126,8 +129,9 @@
/* Global parameters. See module_param near the bottom. */
static int ihr = 2;
-static int reset_phy = 0;
-static int lnksts = 0; /* CFG_LNKSTS bit polarity */
+static int reset_phy;
+static int lnksts; /* CFG_LNKSTS bit polarity */
+static int disable_autoneg;
/* Dprintk is used for more interesting debug events */
#undef Dprintk
@@ -1259,6 +1263,154 @@ static struct net_device_stats *ns83820_
return &dev->stats;
}
+/* Let ethtool retrieve info */
+static int ns83820_get_settings(struct net_device *ndev,
+ struct ethtool_cmd *cmd)
+{
+ struct ns83820 *dev = PRIV(ndev);
+ u32 cfg, tanar, tbicr;
+ int have_optical = 0;
+ int fullduplex = 0;
+
+ /*
+ * Here's the list of available ethtool commands from other drivers:
+ * cmd->advertising =
+ * cmd->speed =
+ * cmd->duplex =
+ * cmd->port = 0;
+ * cmd->phy_address =
+ * cmd->transceiver = 0;
+ * cmd->autoneg =
+ * cmd->maxtxpkt = 0;
+ * cmd->maxrxpkt = 0;
+ */
+
+ /* read current configuration */
+ cfg = readl(dev->base + CFG) ^ SPDSTS_POLARITY;
+ tanar = readl(dev->base + TANAR);
+ tbicr = readl(dev->base + TBICR);
+
+ if (dev->CFG_cache & CFG_TBI_EN) {
+ /* we have an optical interface */
+ have_optical = 1;
+ fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;
+
+ } else {
+ /* We have copper */
+ fullduplex = (cfg & CFG_DUPSTS) ? 1 : 0;
+ }
+
+ cmd->supported = SUPPORTED_Autoneg;
+
+ /* we have optical interface */
+ if (dev->CFG_cache & CFG_TBI_EN) {
+ cmd->supported |= SUPPORTED_1000baseT_Half |
+ SUPPORTED_1000baseT_Full |
+ SUPPORTED_FIBRE;
+ cmd->port = PORT_FIBRE;
+ } /* TODO: else copper related support */
+
+ cmd->duplex = fullduplex ? DUPLEX_FULL : DUPLEX_HALF;
+ switch (cfg / CFG_SPDSTS0 & 3) {
+ case 2:
+ cmd->speed = SPEED_1000;
+ break;
+ case 1:
+ cmd->speed = SPEED_100;
+ break;
+ default:
+ cmd->speed = SPEED_10;
+ break;
+ }
+ cmd->autoneg = (tbicr & TBICR_MR_AN_ENABLE) ? 1: 0;
+ return 0;
+}
+
+/* Let ethool change settings*/
+static int ns83820_set_settings(struct net_device *ndev,
+ struct ethtool_cmd *cmd)
+{
+ struct ns83820 *dev = PRIV(ndev);
+ u32 cfg, tanar;
+ int have_optical = 0;
+ int fullduplex = 0;
+
+ /* read current configuration */
+ cfg = readl(dev->base + CFG) ^ SPDSTS_POLARITY;
+ tanar = readl(dev->base + TANAR);
+
+ if (dev->CFG_cache & CFG_TBI_EN) {
+ /* we have optical */
+ have_optical = 1;
+ fullduplex = (tanar & TANAR_FULL_DUP);
+
+ } else {
+ /* we have copper */
+ fullduplex = cfg & CFG_DUPSTS;
+ }
+
+ spin_lock_irq(&dev->misc_lock);
+ spin_lock(&dev->tx_lock);
+
+ /* Set duplex */
+ if (cmd->duplex != fullduplex) {
+ if (have_optical) {
+ /*set full duplex*/
+ if (cmd->duplex == DUPLEX_FULL) {
+ /* force full duplex */
+ writel(readl(dev->base + TXCFG)
+ | TXCFG_CSI | TXCFG_HBI | TXCFG_ATP,
+ dev->base + TXCFG);
+ writel(readl(dev->base + RXCFG) | RXCFG_RX_FD,
+ dev->base + RXCFG);
+ /* Light up full duplex LED */
+ writel(readl(dev->base + GPIOR) | GPIOR_GP1_OUT,
+ dev->base + GPIOR);
+ } else {
+ /*TODO: set half duplex */
+ }
+
+ } else {
+ /*we have copper*/
+ /* TODO: Set duplex for copper cards */
+ }
+ printk(KERN_INFO "%s: Duplex set via ethtool\n",
+ ndev->name);
+ }
+
+ /* Set autonegotiation */
+ if ((disable_autoneg && cmd->autoneg != AUTONEG_DISABLE) ||
+ (!disable_autoneg && cmd->autoneg != AUTONEG_ENABLE)) {
+ if (cmd->autoneg == AUTONEG_ENABLE) {
+ disable_autoneg = 0;
+
+ /* restart auto negotiation */
+ writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN,
+ dev->base + TBICR);
+ writel(TBICR_MR_AN_ENABLE, dev->base + TBICR);
+ dev->linkstate = LINK_AUTONEGOTIATE;
+
+ printk(KERN_INFO "%s: autoneg enabled via ethtool\n",
+ ndev->name);
+ } else {
+ disable_autoneg = 1;
+
+ /* disable auto negotiation */
+ writel(0x00000000, dev->base + TBICR);
+ }
+
+ printk(KERN_INFO "%s: autoneg %s via ethtool\n", ndev->name,
+ cmd->autoneg ? "ENABLED" : "DISABLED");
+ }
+
+ phy_intr(ndev);
+ spin_unlock(&dev->tx_lock);
+ spin_unlock_irq(&dev->misc_lock);
+
+ return 0;
+}
+/* end ethtool get/set support -df */
+
static void ns83820_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo *info)
{
struct ns83820 *dev = PRIV(ndev);
@@ -1275,8 +1427,10 @@ static u32 ns83820_get_link(struct net_d
}
static struct ethtool_ops ops = {
- .get_drvinfo = ns83820_get_drvinfo,
- .get_link = ns83820_get_link
+ .get_settings = ns83820_get_settings,
+ .set_settings = ns83820_set_settings,
+ .get_drvinfo = ns83820_get_drvinfo,
+ .get_link = ns83820_get_link
};
/* this function is called in irq context from the ISR */
@@ -1976,12 +2130,16 @@ static int __devinit ns83820_init_one(st
| TANAR_HALF_DUP | TANAR_FULL_DUP,
dev->base + TANAR);
- /* start auto negotiation */
- writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN,
- dev->base + TBICR);
- writel(TBICR_MR_AN_ENABLE, dev->base + TBICR);
- dev->linkstate = LINK_AUTONEGOTIATE;
-
+ if (!disable_autoneg) {
+ /* start auto negotiation */
+ writel(TBICR_MR_AN_ENABLE | TBICR_MR_RESTART_AN,
+ dev->base + TBICR);
+ writel(TBICR_MR_AN_ENABLE, dev->base + TBICR);
+ dev->linkstate = LINK_AUTONEGOTIATE;
+ } else {
+ printk(KERN_INFO "%s: Skipping autonegotiation\n",
+ ndev->name);
+ }
dev->CFG_cache |= CFG_MODE_1000;
}
@@ -2202,5 +2360,8 @@ MODULE_PARM_DESC(ihr, "Time in 100 us in
module_param(reset_phy, int, 0);
MODULE_PARM_DESC(reset_phy, "Set to 1 to reset the PHY on startup");
+module_param(disable_autoneg, int, 0);
+MODULE_PARM_DESC(disable_autoneg, "Set to 1 to disable autoneg");
+
module_init(ns83820_init);
module_exit(ns83820_exit);
_
^ permalink raw reply
* [patch 2/2] tulip: NatSemi DP83840A PHY fix
From: akpm @ 2006-06-25 8:45 UTC (permalink / raw)
To: val_henson; +Cc: jeff, netdev, akpm, T-Bone, grundler, jgarzik, varenet
From: Thibaut VARENE <T-Bone@parisc-linux.org>
Fix a problem with Tulip 21142 HP branded PCI cards (PN#: B5509-66001),
which feature a NatSemi DP83840A PHY.
Without that patch, it is impossible to properly initialize the card's PHY,
and it's thus impossible to monitor/configure it.
It's a timing/posting problem, and it is solved exactly the same way Grant
fixed it elsewhere already.
Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
Cc: Jeff Garzik <jgarzik@pobox.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
Cc: Valerie Henson <val_henson@linux.intel.com>
[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/tulip/media.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff -puN drivers/net/tulip/media.c~tulip-natsemi-dp83840a-phy-fix drivers/net/tulip/media.c
--- a/drivers/net/tulip/media.c~tulip-natsemi-dp83840a-phy-fix
+++ a/drivers/net/tulip/media.c
@@ -263,11 +263,27 @@ void tulip_select_media(struct net_devic
u16 *reset_sequence = &((u16*)(p+3))[init_length];
int reset_length = p[2 + init_length*2];
misc_info = reset_sequence + reset_length;
- if (startup)
+ if (startup) {
+ int timeout = 10; /* max 1 ms */
for (i = 0; i < reset_length; i++)
iowrite32(get_u16(&reset_sequence[i]) << 16, ioaddr + CSR15);
+
+ /* flush posted writes */
+ ioread32(ioaddr + CSR15);
+
+ /* Sect 3.10.3 in DP83840A.pdf (p39) */
+ udelay(500);
+
+ /* Section 4.2 in DP83840A.pdf (p43) */
+ /* and IEEE 802.3 "22.2.4.1.1 Reset" */
+ while (timeout-- &&
+ (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
+ udelay(100);
+ }
for (i = 0; i < init_length; i++)
iowrite32(get_u16(&init_sequence[i]) << 16, ioaddr + CSR15);
+
+ ioread32(ioaddr + CSR15); /* flush posted writes */
} else {
u8 *init_sequence = p + 2;
u8 *reset_sequence = p + 3 + init_length;
_
^ permalink raw reply
* [patch 1/2] tulip: fix for 64-bit mips
From: akpm @ 2006-06-25 8:45 UTC (permalink / raw)
To: val_henson; +Cc: jeff, netdev, akpm, maillist, grundler, pdh
From: Jim Gifford <maillist@jg555.com>,
Grant Grundler <grundler@parisc-linux.org>,
Peter Horton <pdh@colonel-panic.org>
With Grant's help I was able to get the tulip driver to work with 64 bit
MIPS.
Cc: Valerie Henson <val_henson@linux.intel.com>
[akpm: this is a previously-nacked patch, but the problem is real]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/tulip/media.c | 22 ++++++++++++++++++++--
drivers/net/tulip/tulip.h | 7 +++++--
drivers/net/tulip/tulip_core.c | 2 +-
3 files changed, 26 insertions(+), 5 deletions(-)
diff -puN drivers/net/tulip/media.c~tulip-fix-for-64-bit-mips drivers/net/tulip/media.c
--- a/drivers/net/tulip/media.c~tulip-fix-for-64-bit-mips
+++ a/drivers/net/tulip/media.c
@@ -44,8 +44,10 @@ static const unsigned char comet_miireg2
/* MII transceiver control section.
Read and write the MII registers using software-generated serial
- MDIO protocol. See the MII specifications or DP83840A data sheet
- for details. */
+ MDIO protocol.
+ See IEEE 802.3-2002.pdf (Section 2, Chapter "22.2.4 Management functions")
+ or DP83840A data sheet for more details.
+ */
int tulip_mdio_read(struct net_device *dev, int phy_id, int location)
{
@@ -272,13 +274,29 @@ void tulip_select_media(struct net_devic
int reset_length = p[2 + init_length];
misc_info = (u16*)(reset_sequence + reset_length);
if (startup) {
+ int timeout = 10; /* max 1 ms */
iowrite32(mtable->csr12dir | 0x100, ioaddr + CSR12);
for (i = 0; i < reset_length; i++)
iowrite32(reset_sequence[i], ioaddr + CSR12);
+
+ /* flush posted writes */
+ ioread32(ioaddr + CSR12);
+
+ /* Sect 3.10.3 in DP83840A.pdf (p39) */
+ udelay(500);
+
+ /* Section 4.2 in DP83840A.pdf (p43) */
+ /* and IEEE 802.3 "22.2.4.1.1 Reset" */
+ while (timeout-- &&
+ (tulip_mdio_read (dev, phy_num, MII_BMCR) & BMCR_RESET))
+ udelay(100);
}
for (i = 0; i < init_length; i++)
iowrite32(init_sequence[i], ioaddr + CSR12);
+
+ ioread32(ioaddr + CSR12); /* flush posted writes */
}
+
tmp_info = get_u16(&misc_info[1]);
if (tmp_info)
tp->advertising[phy_num] = tmp_info | 1;
diff -puN drivers/net/tulip/tulip_core.c~tulip-fix-for-64-bit-mips drivers/net/tulip/tulip_core.c
--- a/drivers/net/tulip/tulip_core.c~tulip-fix-for-64-bit-mips
+++ a/drivers/net/tulip/tulip_core.c
@@ -22,7 +22,7 @@
#else
#define DRV_VERSION "1.1.13"
#endif
-#define DRV_RELDATE "May 11, 2002"
+#define DRV_RELDATE "December 15, 2004"
#include <linux/module.h>
diff -puN drivers/net/tulip/tulip.h~tulip-fix-for-64-bit-mips drivers/net/tulip/tulip.h
--- a/drivers/net/tulip/tulip.h~tulip-fix-for-64-bit-mips
+++ a/drivers/net/tulip/tulip.h
@@ -474,8 +474,11 @@ static inline void tulip_stop_rxtx(struc
udelay(10);
if (!i)
- printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed\n",
- pci_name(tp->pdev));
+ printk(KERN_DEBUG "%s: tulip_stop_rxtx() failed"
+ " (CSR5 0x%x CSR6 0x%x)\n",
+ pci_name(tp->pdev),
+ ioread32(ioaddr + CSR5),
+ ioread32(ioaddr + CSR6));
}
}
_
^ permalink raw reply
* [patch 1/6] ppp_async hang fix
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, xeb, paulus
From: <xeb@mail.ru>
Adapted from http://bugzilla.kernel.org/show_bug.cgi?id=6530
Reschedule the async Tx tasklet if the transmit queue was full.
Cc: Paul Mackerras <paulus@samba.org>
[akpm: submitted before, discussion petered off inconclusively]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/ppp_async.c | 2 ++
1 file changed, 2 insertions(+)
diff -puN drivers/net/ppp_async.c~ppp_async-hang-fix drivers/net/ppp_async.c
--- a/drivers/net/ppp_async.c~ppp_async-hang-fix
+++ a/drivers/net/ppp_async.c
@@ -516,6 +516,8 @@ static void ppp_async_process(unsigned l
/* try to push more stuff out */
if (test_bit(XMIT_WAKEUP, &ap->xmit_flags) && ppp_async_push(ap))
ppp_output_wakeup(&ap->chan);
+ else if (test_bit(XMIT_FULL, &ap->xmit_flags))
+ ppp_asynctty_wakeup(ap->tty);
}
/*
_
^ permalink raw reply
* [patch 4/6] IRDA: add some IBM think pads
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, bcollins, randy.dunlap
From: Ben Collins <bcollins@ubuntu.com>
[UBUNTU:nsc-ircc] Add some IBM think pads
Add Thinkpad T60/X60/Z60/T43/R52 Infrared driver support.
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=7b8d2713435a9fb69719a282ba75e117f3f76a5b
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
drivers/net/irda/nsc-ircc.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff -puN drivers/net/irda/nsc-ircc.c~irda-add-some-ibm-think-pads drivers/net/irda/nsc-ircc.c
--- a/drivers/net/irda/nsc-ircc.c~irda-add-some-ibm-think-pads
+++ a/drivers/net/irda/nsc-ircc.c
@@ -115,8 +115,12 @@ static nsc_chip_t chips[] = {
/* Contributed by Jan Frey - IBM A30/A31 */
{ "PC8739x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xea, 0xff,
nsc_ircc_probe_39x, nsc_ircc_init_39x },
- { "IBM", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff,
- nsc_ircc_probe_39x, nsc_ircc_init_39x },
+ /* IBM ThinkPads using PC8738x (T60/X60/Z60) */
+ { "IBM-PC8738x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff,
+ nsc_ircc_probe_39x, nsc_ircc_init_39x },
+ /* IBM ThinkPads using PC8394T (T43/R52/?) */
+ { "IBM-PC8394T", { 0x2e, 0x4e, 0x0 }, 0x20, 0xf9, 0xff,
+ nsc_ircc_probe_39x, nsc_ircc_init_39x },
{ NULL }
};
_
^ permalink raw reply
* [patch 6/6] neighbour.c, pneigh_get_next() skips published entry
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, Jari.Takkala, jari.takkala
From: "Jari Takkala" <Jari.Takkala@Q9.com>
Fix a problem where output from /proc/net/arp skips a record when the full
output does not fit into the users read() buffer.
To reproduce: publish a large number of ARP entries (more than 10 required
on my system). Run 'dd if=/proc/net/arp of=arp-1024.out bs=1024'. View
the output, one entry will be missing.
Signed-off-by: Jari Takkala <jari.takkala@q9.com>
[akpm: submitted before, discussion ended inconclusively, iirc]
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/core/neighbour.c | 6 ++++++
1 file changed, 6 insertions(+)
diff -puN net/core/neighbour.c~neighbourc-pneigh_get_next-skips-published-entry net/core/neighbour.c
--- a/net/core/neighbour.c~neighbourc-pneigh_get_next-skips-published-entry
+++ a/net/core/neighbour.c
@@ -2138,6 +2138,12 @@ static struct pneigh_entry *pneigh_get_n
struct neigh_seq_state *state = seq->private;
struct neigh_table *tbl = state->tbl;
+ if (pos != NULL && *pos == 1 &&
+ (pn->next || tbl->phash_buckets[state->bucket])) {
+ --(*pos);
+ return pn;
+ }
+
pn = pn->next;
while (!pn) {
if (++state->bucket > PNEIGH_HASHMASK)
_
^ permalink raw reply
* [patch 2/6] netpoll: don't spin forever sending to stopped queues
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, jeremy, mpm
From: Jeremy Fitzhardinge <jeremy@goop.org>
When transmitting a skb in netpoll_send_skb(), only retry a limited number
of times if the device queue is stopped.
Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Acked-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/core/netpoll.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff -puN net/core/netpoll.c~netpoll-dont-spin-forever-sending-to-blocked-queues net/core/netpoll.c
--- a/net/core/netpoll.c~netpoll-dont-spin-forever-sending-to-blocked-queues
+++ a/net/core/netpoll.c
@@ -279,14 +279,10 @@ static void netpoll_send_skb(struct netp
* network drivers do not expect to be called if the queue is
* stopped.
*/
- if (netif_queue_stopped(np->dev)) {
- netif_tx_unlock(np->dev);
- netpoll_poll(np);
- udelay(50);
- continue;
- }
+ status = NETDEV_TX_BUSY;
+ if (!netif_queue_stopped(np->dev))
+ status = np->dev->hard_start_xmit(skb, np->dev);
- status = np->dev->hard_start_xmit(skb, np->dev);
netif_tx_unlock(np->dev);
/* success */
_
^ permalink raw reply
* [patch 3/6] netpoll: break recursive loop in netpoll rx path
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, nhorman, mpm
From: Neil Horman <nhorman@tuxdriver.com>
The netpoll system currently has a rx to tx path via:
netpoll_rx
__netpoll_rx
arp_reply
netpoll_send_skb
dev->hard_start_tx
This rx->tx loop places network drivers at risk of inadvertently causing a
deadlock or BUG halt by recursively trying to acquire a spinlock that is
used in both their rx and tx paths (this problem was origionally reported
to me in the 3c59x driver, which shares a spinlock between the
boomerang_interrupt and boomerang_start_xmit routines).
This patch breaks this loop, by queueing arp frames, so that they can be
responded to after all receive operations have been completed. Tested by
myself and the reported with successful results.
Specifically it was tested with netdump. Heres the BZ with details:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=194055
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Matt Mackall <mpm@selenic.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
include/linux/netpoll.h | 1 +
net/core/netpoll.c | 26 ++++++++++++++++++++++++--
2 files changed, 25 insertions(+), 2 deletions(-)
diff -puN include/linux/netpoll.h~netpoll-break-recursive-loop-in-netpoll-rx-path include/linux/netpoll.h
--- a/include/linux/netpoll.h~netpoll-break-recursive-loop-in-netpoll-rx-path
+++ a/include/linux/netpoll.h
@@ -31,6 +31,7 @@ struct netpoll_info {
int rx_flags;
spinlock_t rx_lock;
struct netpoll *rx_np; /* netpoll that registered an rx_hook */
+ struct sk_buff_head arp_tx; /* list of arp requests to reply to */
};
void netpoll_poll(struct netpoll *np);
diff -puN net/core/netpoll.c~netpoll-break-recursive-loop-in-netpoll-rx-path net/core/netpoll.c
--- a/net/core/netpoll.c~netpoll-break-recursive-loop-in-netpoll-rx-path
+++ a/net/core/netpoll.c
@@ -54,6 +54,7 @@ static atomic_t trapped;
sizeof(struct iphdr) + sizeof(struct ethhdr))
static void zap_completion_queue(void);
+static void arp_reply(struct sk_buff *skb);
static void queue_process(void *p)
{
@@ -153,6 +154,22 @@ static void poll_napi(struct netpoll *np
}
}
+static void service_arp_queue(struct netpoll_info *npi)
+{
+ struct sk_buff *skb;
+
+ if (unlikely(!npi))
+ return;
+
+ skb = skb_dequeue(&npi->arp_tx);
+
+ while (skb != NULL) {
+ arp_reply(skb);
+ skb = skb_dequeue(&npi->arp_tx);
+ }
+ return;
+}
+
void netpoll_poll(struct netpoll *np)
{
if(!np->dev || !netif_running(np->dev) || !np->dev->poll_controller)
@@ -163,6 +180,8 @@ void netpoll_poll(struct netpoll *np)
if (np->dev->poll)
poll_napi(np);
+ service_arp_queue(np->dev->npinfo);
+
zap_completion_queue();
}
@@ -442,7 +461,9 @@ int __netpoll_rx(struct sk_buff *skb)
int proto, len, ulen;
struct iphdr *iph;
struct udphdr *uh;
- struct netpoll *np = skb->dev->npinfo->rx_np;
+ struct netpoll_info *npi = skb->dev->npinfo;
+ struct netpoll *np = npi->rx_np;
+
if (!np)
goto out;
@@ -452,7 +473,7 @@ int __netpoll_rx(struct sk_buff *skb)
/* check if netpoll clients need ARP */
if (skb->protocol == __constant_htons(ETH_P_ARP) &&
atomic_read(&trapped)) {
- arp_reply(skb);
+ skb_queue_tail(&npi->arp_tx, skb);
return 1;
}
@@ -647,6 +668,7 @@ int netpoll_setup(struct netpoll *np)
npinfo->poll_owner = -1;
npinfo->tries = MAX_RETRIES;
spin_lock_init(&npinfo->rx_lock);
+ skb_queue_head_init(&npinfo->arp_tx);
} else
npinfo = ndev->npinfo;
_
^ permalink raw reply
* [patch 5/6] atm/mpc.c warning fix
From: akpm @ 2006-06-25 8:47 UTC (permalink / raw)
To: davem; +Cc: netdev, akpm, chas
From: Andrew Morton <akpm@osdl.org>
net/atm/mpc.c: In function 'MPOA_res_reply_rcvd':
net/atm/mpc.c:1116: warning: unused variable 'ip'
Cc: chas williams <chas@cmf.nrl.navy.mil>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---
net/atm/mpc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff -puN net/atm/mpc.c~atm-mpcc-warning-fix net/atm/mpc.c
--- a/net/atm/mpc.c~atm-mpcc-warning-fix
+++ a/net/atm/mpc.c
@@ -1113,10 +1113,9 @@ static void check_qos_and_open_shortcut(
static void MPOA_res_reply_rcvd(struct k_message *msg, struct mpoa_client *mpc)
{
- unsigned char *ip;
-
uint32_t dst_ip = msg->content.in_info.in_dst_ip;
in_cache_entry *entry = mpc->in_ops->get(dst_ip, mpc);
+
dprintk("mpoa: (%s) MPOA_res_reply_rcvd: ip %u.%u.%u.%u\n", mpc->dev->name, NIPQUAD(dst_ip));
ddprintk("mpoa: (%s) MPOA_res_reply_rcvd() entry = %p", mpc->dev->name, entry);
if(entry == NULL){
_
^ permalink raw reply
* Re: [patch 3/3] Fix phy id for LXT971A/LXT972A
From: Jeff Garzik @ 2006-06-25 9:15 UTC (permalink / raw)
To: akpm; +Cc: netdev, Uwe_Zeisberger, afleming
In-Reply-To: <200606250844.k5P8ichl020797@shell0.pdx.osdl.net>
akpm@osdl.org wrote:
> From: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
>
> The phy ids used are taken from an driver that used a right shift of 4 to chop
> off the revision number. This driver does not shift, so the id and mask
> values are wrong and must be left shifted by 4 to actually detect the chips.
>
> Signed-off-by: Uwe Zeisberger <Uwe_Zeisberger@digi.com>
> Acked-by: Andy Fleming <afleming@freescale.com>
>
> [akpm: this is a previously-nacked patch, but the problem is real]
> Signed-off-by: Andrew Morton <akpm@osdl.org>
This was nak'd? Does anyone recall why?
Jeff
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox