* UNHERALDED NEWS WITH COMMENTS: About rising interest rates and much more
From: info @ 2006-06-12 0:36 UTC (permalink / raw)
To: netdev
Reply-To: Edward
Subscribe here (twice weekly):http://straitgateministry.net
UNHERALDED NEWS WITH COMMENTS: About rising interest rates, gifts to Israel, Christian-Zionism on the march, Wall Street and Oil....
READ THE FULL STORIES HERE: http://straitgateministry.net (Unheralded News)
"My Name is Rachel Corrie" is banned in New York theaters
Albawaba Jun 08, 2006
"The impact of this decision is enormous--it is bigger than Rachel and bigger than this play," Cindy Corrie, Rachel's mother, said. "There was something about this play that made them (Israeli Patriots?) feel so vulnerable.
'CENTRIST' DEMOCRATS SOUND WARNING About 'Liberal Fundamentalism'
CNSNews.com Jun 07, 2006
"MoveOn.org's political action committee recently endorsed Lieberman Democratic challenger, noting grassroots frustration with Lieberman's "continued support for the war in Iraq" and his support for "Big Oil's energy bill."
WILL BUSH'S APPEAL TO RELIGIOUS RIGHT on gay marriage backfire among Jews?
JTA Jun 06, 2006
Another rut in the road between Israel and the "Christian Right;" 75% of American Jews tell us the favor homosexual marriage, and the Christian Right overwhelmingly claims to opposes it. But don't worry, its only a lover's spat, Christian-Zionist is Judaism. -Ed.
FED WARNING
Associated Press Jun 06, 2006
So far this year, inflation at the consumer level has been elevated in large part by rising energy prices, Bernanke said. As measured by the Consumer Price Index, "core" inflation rose at an annual rate of 3.2 percent over the last three months and 2.8 percent over the past six months. "These are unwelcome developments," he said.
ISRAEL SAYS HAS 200 NUCLEAR WARHEADS
Global News Service of the Jewish people (JTA) Jun 06, 2006
Editor Asks: Why would a peace loving country need 200 nuclear warheads? Would that not be five or ten bombs for every population area in the Mideast?
AMNESTY INTERNATIONAL COUNTS Israeli/Palestinian kill rate
JTA Global News Service for Jewish People
Israel has always maintained a reprisal ratio of about 5 executed Philistines for every Israeli lost to bomb or bullet. The ratio is much higher among children, about 8 to 1. Historically this ratio has varied but always 3 or more Palestinians are executed for every Israeli death.- ed
HILLARY SEEKS 'ENERGY REVOLUTION' with spending scheme
CNSNews.com
"Greater fuel efficiency and a $50 billion research fund" is the Clinton Program. She would subsidize industry to do what they will have to do anyway when buyers will no longer drive home SUV'S that hold 40 gallons of Gas. War increases the cost of everything, especially fuel. Mrs. Clinton did not oppose war spending, which is why the ladies in Pink protested her.- ed
FED 'CANNOT IGNORE' STOCK MOVEMENTS To Set Interest Rates
AP Economics Writer
Ben Shalome Bernake wrote. "There is little or no evidence that the Fed "is better able than the market to identify speculative bubbles and that it can successfully `deflate' such bubbles without harming the broader economy." Ben is far too modest, for the FED does not predict "bubbles" it causes them to happen, and it contracts debt without the least concern for collateral damage. That is what it is doing right now.-ed
KNESSET CHRISTIAN ALLIES CAUCUS for Jewish-Christian Relations
CNS News
May 25, 2006, Unity Coalition for Israel
The Knesset Christian Allies Caucus Presented the Newly Created KCAC
Women's Council Today in its First Meeting of the Seventeenth Knesset
Speaker of Knesset Dalia Itzik Addresses the KCAC Women's Council
Judeo-Christian Values at Center of Council's Strategy to Liberate
Oppressed Women Around the World
Tuesday, May 23, 2006- The Knesset Christian Allies Caucus (KCAC)
met today in the Knesset and launched the KCAC Women's Council, a powerful
union of Israeli and Christian women focused on advancing the status of
women worldwide using Judeo-Christian values.
It was announced in the meeting that an Israeli board of directors in
Jerusalem and an international board of directors in the United States
will govern the Women's Council through a joint steering committee. ..... Kay Arthur,
Chairwoman of the international board, spoke of the importance of Jews and
Christians working together for the advancement of the status of women.
"You have the Tanach. We have the Bible. The word of God is our
common ground," she declared.
yshtern1@knesset.gov.il
054-697-4172
JIMMY CARTER: Punishing the innocent is a crime
International Herald Tribune
Carter: " Although Hamas leaders have refused to recognize the state of Israel while their territory is being occupied, Prime Minister Ismail Haniyeh has expressed approval for peace talks between Abbas and Prime Minister Ehud Olmert of Israel. "
WALL STREET AIMS to buy into the Euro exchanges
Associated Press Paris
Cashing in on the bull market: Thain said the NYSE would most likely have to issue its own bonds, borrowing at least some of the $3 billion necessary for Euronext shareholders. The NYSE Group currently has about $650 million in cash available.
READ ALL THE FULL STORIES HERE:
http://straitgateministry.net (Unheralded News)
Strait Gate Ministry HAS A GIFT TO YOU while they last (you find it and pay the shipping cost):
Click here: http://straitgateministry.net (a hint: try "bookstore")
"ONE NATION UNDER ISRAEL" by Andrew Hurley, 345 page documentary, may be the best historically documented expose of the hijacking of the American Congress. It is a popular lament that, "Congress is out of control," but nothing could be further from the truth. Author Andrew Hurley explains that Congress is not under the control of its constituents but answers to a foreign power. And Andrew Hurley provides a blueprint for peace in the Mideast
Strait Gate Ministry
P.O. Box 14491
Scottsdale, AZ 85267
http://straitgateministry.net
cecarl@straitgateministry.net
To be blocked from future mailings reply with Delete'
Write it in the subject line please.
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Jan Engelhardt @ 2006-06-11 10:25 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: rdunlap, akpm, jgarzik, linux-kernel, netdev
In-Reply-To: <200606110051.k5B0pLBI010621@harpo.it.uu.se>
>
>The messages above are from when I used gcc-4.1.1.
>With gcc-3.2.3 I only see a single warning.
>
FTR, gcc 4.0.x is also 'affected'.
Jan Engelhardt
--
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Jan Engelhardt @ 2006-06-11 10:23 UTC (permalink / raw)
To: Sam Ravnborg
Cc: Randy.Dunlap, Mikael Pettersson, linux-kernel, netdev, jgarzik,
akpm
In-Reply-To: <20060610203800.GC9502@mars.ravnborg.org>
>> Doesn't look serious. init_module() is not __init, but it calls
>> some __init functions and touches some __initdata.
>
>This is the typical case with inconsistent tagging.
>
Worse yet, I once experienced a double-definition error, that is, I had
__init int init_module(void) {
/* module1 */
}
and, in another .c file,
__init int init_module(void) {
/* module2 */
}
and making them both CONFIG_...=y gave a typical double-definition link
time error in vmlinux. The proper way (IMO) is
static __init int blah_init(void) { ... }
module_init(blah_init);
Then it does not even matter if blah_init is defined in two different
modules.
>>
>> -int init_module(void)
>> +int __init init_module(void)
>> {
>> int this_dev, found = 0;
>
>When you anyway touches the driver I suggest to name the function
><module>_init, <module>_cleanup and use module_init(), module_cleanup().
Jan Engelhardt
--
^ permalink raw reply
* Re: [RFC] [patch 2/6] [Network namespace] Network device sharing by view
From: Andrew Morton @ 2006-06-11 10:18 UTC (permalink / raw)
To: dlezcano; +Cc: linux-kernel, netdev, serue, haveblue, clg, dlezcano
In-Reply-To: <20060609210625.144158000@localhost.localdomain>
On Fri, 09 Jun 2006 23:02:04 +0200
dlezcano@fr.ibm.com wrote:
> +int net_ns_dev_add(const char *devname,
> + struct net_ns_dev_list *devlist)
> +{
> + struct net_ns_dev *db;
> + struct net_device *dev;
> + int ret = 0;
> +
> + read_lock(&dev_base_lock);
> +
> + for (dev = dev_base; dev; dev = dev->next)
> + if (!strncmp(dev->name, devname, IFNAMSIZ))
> + break;
> +
> + if (!dev) {
> + ret = -ENODEV;
> + goto out;
> + }
> +
> + db = kmalloc(sizeof(*db), GFP_KERNEL);
sleep-in-spinlock. Please always test new code with all kernel debugging
options enabled.
^ permalink raw reply
* Re: [RFC ] [1 of 4] IEEE802.11 Regulatory/Geographical Support for drivers - statement of project
From: Ulrich Kunitz @ 2006-06-11 10:07 UTC (permalink / raw)
To: netdev
In-Reply-To: <448210EF.10103@lwfinger.net>
Larry,
I've not read your patches your detail, so I comment only on your
description.
> 1. A new routine, ieee80211_init_geo has been written that is called by a
> driver wishing to use this functionality. The arguments are an
> ieee80211_device, a two-character ISO3661 country code, and a flag that is
> true if the device is to be used outdoors. This new routine does the
> following:
The problem is the driver doesn't have good ideas, whether the
device is outdoor and in which country it operates. Devices have
some information available, but I have definitely a device
marketed in Canada, which had an EEPROM value for ETSI as
regulatory domain. I would expect the daemon to know, in which
country it is and whether the device is used outdoors. Keep also
in mind, that this information will be available from the AP at a
later time.
So there should be an explicit method to request the minimum set
or the configuration of daemon. Later the set can be changed again
by the AP information provided.
> b) It then creates a new directory, '/proc/net/ieee80211_geo', and
> populates it with 2 files for communication with the daemon. The first,
> which is read by the daemon, contains the country and outdoor codes, and
> the second is for the the daemon to write the 'struct ieee80211_geo' data
> corresponding to the country and indoor/outdoor information passed from the
> kernel.
Michael Buesch already commented on /proc/net. I don't think, that
this will be popular with a lot of folks. sysfs should be
supported and the mechanism should be comparable to firmware
loading. Maybe this could be some kind of udev extension. And make
it device specific, the whole approach should not break, if you
are accessing two devices connecting to two different access
points at the same time, where one of them is configured by the
central networking folks, who don't bother to adapt there configs
to specific countries and the other is a perfectly conformant
local AP, which is used for "testing" purposes.
> 2. The user-space daemon, which need not be run as root, does the following:
It needs only to run temporarily run as root. I would definitely
recommend that all file parsing activities should not run as root.
> e) It then spins waiting for the existence of file
> '/proc/net/ieee80211_geo/country', which is the indication that the kernel
> is requesting data.
Again the whole interface should be device specific.
> I welcome your comments. Part 2 will show a debug dump of the converted
> database, Part 3 will present the patch needed to add the new routine to
> the ieee80211 routines, and Part 4 will show the patches needed to modify
> the bcm43xx driver to use the new routine..
Cheers,
Uli
--
Uli Kunitz
^ permalink raw reply
* Re: [RFC ] [2 of 4] IEEE802.11 Regulatory/Geographical Support for drivers - database
From: Ulrich Kunitz @ 2006-06-11 9:42 UTC (permalink / raw)
To: netdev
In-Reply-To: <4482110B.4080404@lwfinger.net>
On 06-06-03 17:45 Larry Finger wrote:
> This message shows each of the 2.4 GHz and 5 GHz bands split into indoor
> and outdoor usage. For each group, the ISO name for that country is shown
> before the channel listing. There are a lot of countries that do not belong
> in the default group. I welcome any input you can provide for these missing
> countries, and any other incorrect information. Note: The country code EU
> is a pseudonym for the entire European Union.
>
> Thanks, Larry
>
> =============================================================================================
>
> IEEE80211 Regulatory/Geographical Daemon (V0.1)
> Using Database Version of 26 May 2006
>
Hi Larry,
two minor comments.
1. I appreciate that you are keeping everything in 80 character
lines. So I believe the one line extending 80 characters is an
oversight.
2. Could you just add a simple explanation for the pow column for
the uninformed reader?
Regards,
Uli
--
Uli Kunitz
^ permalink raw reply
* Set up a password reminder
From: August Chen @ 2006-06-11 6:48 UTC (permalink / raw)
To: netdev
-S''ensationall r'evoolution in m''edicine!
-En large your p''e'n'i's up to 10 cm or up to 4 i'nches!
-It's h'e'r'b'a'l solution what hasn't side e'ffect, but has 100% g'uaranted results!
-Don't lose your chance and but know wihtout d'oubts, you will be i'mpressed with results!
Clisk here: http://teensnj.info
tipple cardiovascular battlefront wordy borderline puffin adult reb bereft lebanese
focussed jake cloture deportee crumble wrongful allyl alva dolphin
vietnam plagued camp retch expulsion southwest aviary pegging swore roberts virginal
beaux gallus bistable chess coverall salamander bernardo tab
eden prolix inflexible cobblestone tangent chemise autoclave chambermaid
foss gutsy tackle papacy aquarium dawson suffuse caucus
^ permalink raw reply
* Re: Updated sysctl documentation take #2
From: Randy.Dunlap @ 2006-06-11 3:41 UTC (permalink / raw)
To: Diego Calleja; +Cc: linux-kernel, akpm, netdev, linux-xfs, ecki, lkml
In-Reply-To: <20060608001806.028ab05a.diegocg@gmail.com>
On Thu, 8 Jun 2006 00:18:06 +0200 Diego Calleja wrote:
> El Wed, 7 Jun 2006 13:06:53 -0700,
> "Randy.Dunlap" <rdunlap@xenotime.net> escribió:
>
> > OK, that's all for the README file. I'll look at the rest of it
> > sometime this week. I don't think that it's quite ready to be merged.
>
> Thank's for your review, altought I didn't though someone was to review
> so deeply a documentation patch ;) I've gone through all the files and
> fixed the 72-col limit and everything I could. I've updated the patch
> http://terra.es/personal/diegocg/sysctl-docs
Here are some more comments for you.
1. There are quite a few lines (17) ending with ^M (carriage return)
that should be removed.
2. Lines like this one should end with a period (full stop):
+This file is SPARC-only
3. I would put this comment near the top of each file, not at
the end:
+PLEASE KEEP THIS FILE ORDERED ALPHABETICALLY.
Other than that, it's looking good to me.
Thanks,
---
~Randy
^ permalink raw reply
* Re: [Bugme-new] [Bug 6646] New: UDP socket doesn't return to bound state after association is dissolved by connect(..AF_UNSPEC)
From: David Miller @ 2006-06-11 1:10 UTC (permalink / raw)
To: akpm; +Cc: netdev, yujiang.wang, bugme-daemon
In-Reply-To: <20060605000751.f3bc7ed3.akpm@osdl.org>
From: Andrew Morton <akpm@osdl.org>
Date: Mon, 5 Jun 2006 00:07:51 -0700
> > When disconnect a UDP socket, Linux kernel set local port to zero if the port
> > number comes from a implicit bind. Linux connect(2) man page reads:
> > "Generally, connection-based protocol sockets may successfully *connect* only
> > once; connectionless protocol sockets may use *connect* multiple times to change
> > their association. Connectionless sockets may dissolve the association by
> > connecting to an address with the /sa_family/ member of *sockaddr* set to
> > *AF_UNSPEC*."
> > But dissolve the association should not impact the local binding, while
> > currently it does. In contrast, Unix variants like Solaris don't alter local
> > binding when disconnecting a UDP socket.
You can only preserve the parts of a local binding which are
explicitly specified. Since you make an explicit bind to a source
address, that will be preserved by the disconnect.
However, since you use a zero anonymous port during the bind,
the one choosen by the kernel will not be preserved. If you
had choosen an explicit port during bind() it would be preserved
by the disconnect.
This behavior is intentional and will not change.
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Mikael Pettersson @ 2006-06-11 0:51 UTC (permalink / raw)
To: rdunlap; +Cc: akpm, jgarzik, linux-kernel, netdev
On Sat, 10 Jun 2006 12:13:35 -0700, Randy.Dunlap wrote:
>On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:
>
>> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
>>
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
>> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
>>
>> Not sure how serious this is; the driver seems to work fine later on.
>
>Doesn't look serious. init_module() is not __init, but it calls
>some __init functions and touches some __initdata.
>
>BTW, I would be happy to see some consistent results from modpost
>section checking. I don't see all of these warnings (I see only 1)
>when using gcc 3.3.6. What gcc version are you using?
>Does that matter? (not directed at anyone in particular)
The messages above are from when I used gcc-4.1.1.
With gcc-3.2.3 I only see a single warning.
>Patch below fixes it for me. Please test/report.
Worked for me too. Thanks.
/Mikael
>---
>
>From: Randy Dunlap <rdunlap@xenotime.net>
>
>Fix section mismatch warnings:
>WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x396) and 'cleanup_card'
>WARNING: drivers/net/ne2.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x483) and 'cleanup_card'
>
>Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
>---
> drivers/net/ne.c | 2 +-
> drivers/net/ne2.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>--- linux-2617-rc6.orig/drivers/net/ne.c
>+++ linux-2617-rc6/drivers/net/ne.c
>@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
> is at boot) and so the probe will get confused by any other 8390 cards.
> ISA device autoprobes on a running machine are not recommended anyway. */
>
>-int init_module(void)
>+int __init init_module(void)
> {
> int this_dev, found = 0;
>
>--- linux-2617-rc6.orig/drivers/net/ne2.c
>+++ linux-2617-rc6/drivers/net/ne2.c
>@@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)");
>
> /* Module code fixed by David Weinehall */
>
>-int init_module(void)
>+int __init init_module(void)
> {
> struct net_device *dev;
> int this_dev, found = 0;
>
^ permalink raw reply
* Re: [RFT] Realtek 8168 ethernet support
From: Francois Romieu @ 2006-06-10 22:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Randy.Dunlap, Daniel Drake, netdev
In-Reply-To: <20060610120523.GA24288@electric-eye.fr.zoreil.com>
Francois Romieu <romieu@fr.zoreil.com> :
[...]
> -> the != ... && ... != test above seems inverted.
Answering to myself: yes, it is. The 8100 and 8101 are PCI Express
fast ethernet only (but they should do 802.1q, go figure).
--
Ueimor
^ permalink raw reply
* [PATCH 2.6.17-rc6-mm2] eth1394: replace __constant_htons by htons
From: Stefan Richter @ 2006-06-10 21:44 UTC (permalink / raw)
To: linux1394-devel; +Cc: netdev, Alexey Dobriyan
In-Reply-To: <20060527094019.4d451093@localhost.localdomain>
...and __constant_ntohs, __constant_ntohl, __constant_cpu_to_be32 too
where possible. Htons and friends are resolved to constants in these
places anyway. Also fix an endianess glitch in a log message, spotted
by Alexey Dobriyan.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
drivers/ieee1394/eth1394.c | 23 +++++++++++------------
1 files changed, 11 insertions(+), 12 deletions(-)
Index: linux-2.6.17-rc6-mm2/drivers/ieee1394/eth1394.c
===================================================================
--- linux-2.6.17-rc6-mm2.orig/drivers/ieee1394/eth1394.c 2006-06-10 21:18:28.000000000 +0200
+++ linux-2.6.17-rc6-mm2/drivers/ieee1394/eth1394.c 2006-06-10 21:33:59.000000000 +0200
@@ -770,7 +770,7 @@ static int ether1394_rebuild_header(stru
default:
ETH1394_PRINT(KERN_DEBUG, dev->name,
"unable to resolve type %04x addresses.\n",
- eth->h_proto);
+ ntohs(eth->h_proto));
break;
}
@@ -792,9 +792,8 @@ static int ether1394_header_cache(struct
(16 - ETH1394_HLEN));
struct net_device *dev = neigh->dev;
- if (type == __constant_htons(ETH_P_802_3)) {
+ if (type == htons(ETH_P_802_3))
return -1;
- }
eth->h_proto = type;
memcpy(eth->h_dest, neigh->ha, dev->addr_len);
@@ -883,7 +882,7 @@ static inline u16 ether1394_parse_encap(
/* If this is an ARP packet, convert it. First, we want to make
* use of some of the fields, since they tell us a little bit
* about the sending machine. */
- if (ether_type == __constant_htons (ETH_P_ARP)) {
+ if (ether_type == htons(ETH_P_ARP)) {
struct eth1394_arp *arp1394 = (struct eth1394_arp*)skb->data;
struct arphdr *arp = (struct arphdr *)skb->data;
unsigned char *arp_ptr = (unsigned char *)(arp + 1);
@@ -939,8 +938,8 @@ static inline u16 ether1394_parse_encap(
}
/* Now add the ethernet header. */
- if (dev->hard_header (skb, dev, __constant_ntohs (ether_type),
- &dest_hw, NULL, skb->len) >= 0)
+ if (dev->hard_header(skb, dev, ntohs(ether_type), &dest_hw, NULL,
+ skb->len) >= 0)
ret = ether1394_type_trans(skb, dev);
return ret;
@@ -1509,8 +1508,8 @@ static inline void ether1394_prep_gasp_p
p->data = ((quadlet_t*)skb->data) - 2;
p->data[0] = cpu_to_be32((priv->host->node_id << 16) |
ETHER1394_GASP_SPECIFIER_ID_HI);
- p->data[1] = __constant_cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) |
- ETHER1394_GASP_VERSION);
+ p->data[1] = cpu_to_be32((ETHER1394_GASP_SPECIFIER_ID_LO << 24) |
+ ETHER1394_GASP_VERSION);
/* Setting the node id to ALL_NODES (not LOCAL_BUS | ALL_NODES)
* prevents hpsb_send_packet() from setting the speed to an arbitrary
@@ -1665,9 +1664,9 @@ static int ether1394_tx (struct sk_buff
/* Set the transmission type for the packet. ARP packets and IP
* broadcast packets are sent via GASP. */
if (memcmp(eth->h_dest, dev->broadcast, ETH1394_ALEN) == 0 ||
- proto == __constant_htons(ETH_P_ARP) ||
- (proto == __constant_htons(ETH_P_IP) &&
- IN_MULTICAST(__constant_ntohl(skb->nh.iph->daddr)))) {
+ proto == htons(ETH_P_ARP) ||
+ (proto == htons(ETH_P_IP) &&
+ IN_MULTICAST(ntohl(skb->nh.iph->daddr)))) {
tx_type = ETH1394_GASP;
dest_node = LOCAL_BUS | ALL_NODES;
max_payload = priv->bc_maxpayload - ETHER1394_GASP_OVERHEAD;
@@ -1699,7 +1698,7 @@ static int ether1394_tx (struct sk_buff
}
/* If this is an ARP packet, convert it */
- if (proto == __constant_htons (ETH_P_ARP))
+ if (proto == htons(ETH_P_ARP))
ether1394_arp_to_1394arp (skb, dev);
ptask->hdr.words.word1 = 0;
^ permalink raw reply
* Re: [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Sam Ravnborg @ 2006-06-10 20:38 UTC (permalink / raw)
To: Randy.Dunlap; +Cc: Mikael Pettersson, linux-kernel, netdev, jgarzik, akpm
In-Reply-To: <20060610121335.447e19f2.rdunlap@xenotime.net>
> >
> > Not sure how serious this is; the driver seems to work fine later on.
>
> Doesn't look serious. init_module() is not __init, but it calls
> some __init functions and touches some __initdata.
This is the typical case with inconsistent tagging.
> BTW, I would be happy to see some consistent results from modpost
> section checking. I don't see all of these warnings (I see only 1)
> when using gcc 3.3.6. What gcc version are you using?
> Does that matter? (not directed at anyone in particular)
I did not see anyone of them - strange.
I did not dig into it, but objdump -rR ne.o should tell the number of
mismatches with soem carefull checking.
> --- linux-2617-rc6.orig/drivers/net/ne.c
> +++ linux-2617-rc6/drivers/net/ne.c
> @@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
> is at boot) and so the probe will get confused by any other 8390 cards.
> ISA device autoprobes on a running machine are not recommended anyway. */
>
> -int init_module(void)
> +int __init init_module(void)
> {
> int this_dev, found = 0;
When you anyway touches the driver I suggest to name the function
<module>_init, <module>_cleanup and use module_init(), module_cleanup().
Sam
^ permalink raw reply
* [PATCH] smc ethernet: fix section mismatch warnings
From: Randy.Dunlap @ 2006-06-10 20:30 UTC (permalink / raw)
To: netdev; +Cc: p_gortmaker, akpm, jgarzik, nico
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Removes one duplicate assignment.
Fix section mismatch warnings:
WARNING: drivers/net/smc-ultra.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x369) and 'cleanup_card'
WARNING: drivers/net/smc-ultra32.o - Section mismatch: reference to .init.text:ultra32_probe from .text between 'init_module' (at offset 0x254) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.text:smc_init from .text between 'init_module' (at offset 0x997) and 'cleanup_module'
WARNING: drivers/net/smc9194.o - Section mismatch: reference to .init.data: from .data between 'smcdev.0' (at offset 0x44) and '__param_str_io'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/smc-ultra.c | 2 +-
drivers/net/smc-ultra32.c | 2 +-
drivers/net/smc9194.c | 7 ++-----
3 files changed, 4 insertions(+), 7 deletions(-)
--- linux-2617-rc6.orig/drivers/net/smc-ultra.c
+++ linux-2617-rc6/drivers/net/smc-ultra.c
@@ -553,7 +553,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/smc-ultra32.c
+++ linux-2617-rc6/drivers/net/smc-ultra32.c
@@ -421,7 +421,7 @@ static struct net_device *dev_ultra[MAX_
MODULE_DESCRIPTION("SMC Ultra32 EISA ethernet driver");
MODULE_LICENSE("GPL");
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/smc9194.c
+++ linux-2617-rc6/drivers/net/smc9194.c
@@ -732,12 +732,9 @@ static int ifport;
struct net_device * __init smc_init(int unit)
{
struct net_device *dev = alloc_etherdev(sizeof(struct smc_local));
- static struct devlist *smcdev = smc_devlist;
+ struct devlist *smcdev = smc_devlist;
int err = 0;
-#ifndef NO_AUTOPROBE
- smcdev = smc_devlist;
-#endif
if (!dev)
return ERR_PTR(-ENODEV);
@@ -1607,7 +1604,7 @@ MODULE_PARM_DESC(io, "SMC 99194 I/O base
MODULE_PARM_DESC(irq, "SMC 99194 IRQ number");
MODULE_PARM_DESC(ifport, "SMC 99194 interface port (0-default, 1-TP, 2-AUI)");
-int init_module(void)
+int __init init_module(void)
{
if (io == 0)
printk(KERN_WARNING
---
^ permalink raw reply
* [PATCH] hp ethernet: fix section mismatches
From: Randy.Dunlap @ 2006-06-10 20:32 UTC (permalink / raw)
To: netdev; +Cc: akpm, jgarzik
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Fix section mismatch warnings:
WARNING: drivers/net/hp-plus.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x387) and 'cleanup_card'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.data: from .text between 'hp_init_card' (at offset 0x310) and 'init_module'
WARNING: drivers/net/hp.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x367) and 'cleanup_card'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/hp-plus.c | 2 +-
drivers/net/hp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
--- linux-2617-rc6.orig/drivers/net/hp-plus.c
+++ linux-2617-rc6/drivers/net/hp-plus.c
@@ -446,7 +446,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/hp.c
+++ linux-2617-rc6/drivers/net/hp.c
@@ -384,7 +384,7 @@ hp_block_output(struct net_device *dev,
}
/* This function resets the ethercard if something screws up. */
-static void
+static void __init
hp_init_card(struct net_device *dev)
{
int irq = dev->irq;
@@ -409,7 +409,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
---
^ permalink raw reply
* [PATCH] 3c5zz ethernet: fix section warnings
From: Randy.Dunlap @ 2006-06-10 20:33 UTC (permalink / raw)
To: netdev; +Cc: philb, p_gortmaker, jgarzik, akpm
From: Randy Dunlap <rdunlap@xenotime.net>
Priority: not critical; makes init code discardable.
Fix section mismatch warnings:
WARNING: drivers/net/3c501.o - Section mismatch: reference to .init.text:el1_probe from .text between 'init_module' (at offset 0x812) and 'cleanup_module'
WARNING: drivers/net/3c503.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x661) and 'cleanup_card'
WARNING: drivers/net/3c505.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x228d) and 'cleanup_module'
WARNING: drivers/net/3c507.o - Section mismatch: reference to .init.text:el16_probe from .text between 'init_module' (at offset 0xa99) and 'cleanup_module'
WARNING: drivers/net/3c523.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x12e7) and 'cleanup_module'
WARNING: drivers/net/3c527.o - Section mismatch: reference to .init.text:mc32_probe from .text between 'init_module' (at offset 0xd8d) and 'cleanup_module'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/3c501.c | 2 +-
drivers/net/3c503.c | 2 +-
drivers/net/3c505.c | 2 +-
drivers/net/3c507.c | 2 +-
drivers/net/3c523.c | 2 +-
drivers/net/3c527.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
--- linux-2617-rc6.orig/drivers/net/3c501.c
+++ linux-2617-rc6/drivers/net/3c501.c
@@ -909,7 +909,7 @@ MODULE_PARM_DESC(irq, "EtherLink IRQ num
* here also causes the module to be unloaded
*/
-int init_module(void)
+int __init init_module(void)
{
dev_3c501 = el1_probe(-1);
if (IS_ERR(dev_3c501))
--- linux-2617-rc6.orig/drivers/net/3c503.c
+++ linux-2617-rc6/drivers/net/3c503.c
@@ -688,7 +688,7 @@ MODULE_LICENSE("GPL");
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
-int
+int __init
init_module(void)
{
struct net_device *dev;
--- linux-2617-rc6.orig/drivers/net/3c505.c
+++ linux-2617-rc6/drivers/net/3c505.c
@@ -1633,7 +1633,7 @@ MODULE_PARM_DESC(io, "EtherLink Plus I/O
MODULE_PARM_DESC(irq, "EtherLink Plus IRQ number(s) (assigned)");
MODULE_PARM_DESC(dma, "EtherLink Plus DMA channel(s)");
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/3c507.c
+++ linux-2617-rc6/drivers/net/3c507.c
@@ -932,7 +932,7 @@ module_param(irq, int, 0);
MODULE_PARM_DESC(io, "EtherLink16 I/O base address");
MODULE_PARM_DESC(irq, "(ignored)");
-int init_module(void)
+int __init init_module(void)
{
if (io == 0)
printk("3c507: You should not use auto-probing with insmod!\n");
--- linux-2617-rc6.orig/drivers/net/3c523.c
+++ linux-2617-rc6/drivers/net/3c523.c
@@ -1277,7 +1277,7 @@ MODULE_PARM_DESC(io, "EtherLink/MC I/O b
MODULE_PARM_DESC(irq, "EtherLink/MC IRQ number(s)");
MODULE_LICENSE("GPL");
-int init_module(void)
+int __init init_module(void)
{
int this_dev,found = 0;
--- linux-2617-rc6.orig/drivers/net/3c527.c
+++ linux-2617-rc6/drivers/net/3c527.c
@@ -1646,7 +1646,7 @@ static struct net_device *this_device;
* insmod multiple modules for now but it's a hack.
*/
-int init_module(void)
+int __init init_module(void)
{
this_device = mc32_probe(-1);
if (IS_ERR(this_device))
---
^ permalink raw reply
* Re: [linux-usb-devel] [PATCH RFC] ZyDAS ZD1211 USB-WLAN driver
From: Daniel Drake @ 2006-06-10 19:37 UTC (permalink / raw)
To: Oliver Neukum; +Cc: linux-usb-devel, John W. Linville, netdev, Ulrich Kunitz
In-Reply-To: <200606031951.09135.oliver@neukum.org>
Oliver Neukum wrote:
> +static void disconnect(struct usb_interface *intf)
> +{
>
> This is racy. It allows io to disconnected devices. You must take the
> lock and set a flag that you test after you've taken the lock elsewhere.
It's been a bit of an adventure, but I'm now fairly confident that only
a single-line change is required to fix this: stop the TX queue early on
in the netdev->stop function.
When disconnect() happens, we call unregister_netdev(). This will call
netdev->stop if the interface was up, and netdev->stop ensures that no
more packets are queued for transmission, and that the host does not
receive any more packets or interrupts from the device.
unregister_netdev() also does some synchronization and rtnl stuff, and
after it has returned, it is guaranteed that no ioctls or other
functions (hard_start_xmit/set_mac_address) are in progress, and it is
guaranteed that no more of those will happen.
In disconnect() we also kill all urbs that we know about. All of our URB
completions handle the cancelled case without generating further I/O.
Additionally, the return values of all of our usb I/O function calls are
checked and propagated up, so most code will simply stop when the device
gets unplugged.
At this point, it's now safe to say that nobody is using (or will use)
the various structures, so disconnect() frees the whole lot and returns.
Do you agree, or did you have certain other race paths in mind which I
might have missed?
Thanks,
Daniel
^ permalink raw reply
* [PATCH] [2.6.17-rc6] Section mismatch in drivers/net/ne.o during modpost
From: Randy.Dunlap @ 2006-06-10 19:13 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel, netdev, jgarzik, akpm
In-Reply-To: <200606101211.k5ACBgtl029545@harpo.it.uu.se>
On Sat, 10 Jun 2006 14:11:42 +0200 (MEST) Mikael Pettersson wrote:
> While compiling 2.6.17-rc6 for a 486 with an NE2000 ISA ethernet card, I got:
>
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x158) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x176) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x183) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x1ea) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.data:isapnp_clone_list from .text between 'init_module' (at offset 0x251) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x266) and 'ne_block_input'
> WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x29b) and 'ne_block_input'
>
> Not sure how serious this is; the driver seems to work fine later on.
Doesn't look serious. init_module() is not __init, but it calls
some __init functions and touches some __initdata.
BTW, I would be happy to see some consistent results from modpost
section checking. I don't see all of these warnings (I see only 1)
when using gcc 3.3.6. What gcc version are you using?
Does that matter? (not directed at anyone in particular)
Patch below fixes it for me. Please test/report.
---
From: Randy Dunlap <rdunlap@xenotime.net>
Fix section mismatch warnings:
WARNING: drivers/net/ne.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x396) and 'cleanup_card'
WARNING: drivers/net/ne2.o - Section mismatch: reference to .init.text: from .text between 'init_module' (at offset 0x483) and 'cleanup_card'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
---
drivers/net/ne.c | 2 +-
drivers/net/ne2.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- linux-2617-rc6.orig/drivers/net/ne.c
+++ linux-2617-rc6/drivers/net/ne.c
@@ -829,7 +829,7 @@ that the ne2k probe is the last 8390 bas
is at boot) and so the probe will get confused by any other 8390 cards.
ISA device autoprobes on a running machine are not recommended anyway. */
-int init_module(void)
+int __init init_module(void)
{
int this_dev, found = 0;
--- linux-2617-rc6.orig/drivers/net/ne2.c
+++ linux-2617-rc6/drivers/net/ne2.c
@@ -780,7 +780,7 @@ MODULE_PARM_DESC(bad, "(ignored)");
/* Module code fixed by David Weinehall */
-int init_module(void)
+int __init init_module(void)
{
struct net_device *dev;
int this_dev, found = 0;
^ permalink raw reply
* Re: [PATCH 2.6.17-rc6] Remove Prism II support from Orinoco
From: Dave Jones @ 2006-06-10 18:08 UTC (permalink / raw)
To: Faidon Liambotis; +Cc: netdev
In-Reply-To: <20060610175010.GA4617@divinity>
On Sat, Jun 10, 2006 at 08:50:10PM +0300, Faidon Liambotis wrote:
> Remove Prism II IDs from the orinoco driver since now we have a separate
> driver for them (HostAP). Additionally, kill orinoco_{pci,plx,nortel}
> completely, since they only exist to support Prism cards.
> No attempt was made to clean up the rest of the driver of the actual
> Prism II code, only the PCI IDs were removed.
I'm fairly certain I have a buffalo card that doesn't work with hostap
that works just fine with orinoco. I'll dig it out and see if that
has been improved.
Dave
--
http://www.codemonkey.org.uk
^ permalink raw reply
* [PATCH 2.6.17-rc6] Add two PLX device IDs
From: Faidon Liambotis @ 2006-06-10 17:54 UTC (permalink / raw)
To: netdev; +Cc: Jouni Malinen
This patch adds device IDs for Symbol LA-4123 and Global Sun Tech
GL24110P to the HostAP PLX driver.
This is not tested with real hardware, but there is no reason why it
shouldn't work.
Please test.
Signed-off-by: Faidon Liambotis <faidon@cube.gr>
--
hostap_plx.c | 2 ++
1 files changed, 2 insertions(+)
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/hostap/hostap_plx.c linux/drivers/net/wireless/hostap/hostap_plx.c
--- linux-2.6.17-rc6/drivers/net/wireless/hostap/hostap_plx.c 2006-06-06 03:57:02.000000000 +0300
+++ linux/drivers/net/wireless/hostap/hostap_plx.c 2006-06-10 19:20:10.000000000 +0300
@@ -67,10 +67,12 @@
PLXDEV(0x10b7, 0x7770, "3Com AirConnect PCI 777A"),
PLXDEV(0x111a, 0x1023, "Siemens SpeedStream SS1023"),
PLXDEV(0x126c, 0x8030, "Nortel emobility"),
+ PLXDEV(0x1562, 0x0001, "Symbol LA-4123"),
PLXDEV(0x1385, 0x4100, "Netgear MA301"),
PLXDEV(0x15e8, 0x0130, "National Datacomm NCP130 (PLX9052)"),
PLXDEV(0x15e8, 0x0131, "National Datacomm NCP130 (TMD7160)"),
PLXDEV(0x1638, 0x1100, "Eumitcom WL11000"),
+ PLXDEV(0x16ab, 0x1100, "Global Sun Tech GL24110P"),
PLXDEV(0x16ab, 0x1101, "Global Sun Tech GL24110P (?)"),
PLXDEV(0x16ab, 0x1102, "Linksys WPC11 with WDT11"),
PLXDEV(0x16ab, 0x1103, "Longshine 8031"),
^ permalink raw reply
* [PATCH 2.6.17-rc6] Remove Prism II support from Orinoco
From: Faidon Liambotis @ 2006-06-10 17:50 UTC (permalink / raw)
To: netdev
Remove Prism II IDs from the orinoco driver since now we have a separate
driver for them (HostAP). Additionally, kill orinoco_{pci,plx,nortel}
completely, since they only exist to support Prism cards.
No attempt was made to clean up the rest of the driver of the actual
Prism II code, only the PCI IDs were removed.
Signed-off-by: Faidon Liambotis <faidon@cube.gr>
--
drivers/net/wireless/Kconfig | 61 -----
drivers/net/wireless/Makefile | 4
drivers/net/wireless/orinoco_cs.c | 24 --
drivers/net/wireless/orinoco_nortel.c | 312 --------------------------
drivers/net/wireless/orinoco_pci.c | 399 ---------------------------------
drivers/net/wireless/orinoco_plx.c | 403 ----------------------------------
drivers/net/wireless/orinoco_tmd.c | 260 ---------------------
7 files changed, 9 insertions(+), 1454 deletions(-)
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/Kconfig linux/drivers/net/wireless/Kconfig
--- linux-2.6.17-rc6/drivers/net/wireless/Kconfig 2006-06-06 03:57:02.000000000 +0300
+++ linux/drivers/net/wireless/Kconfig 2006-06-10 19:03:27.000000000 +0300
@@ -285,18 +285,16 @@
depends on NET_RADIO && (PPC_PMAC || PCI || PCMCIA)
---help---
A driver for 802.11b wireless cards based based on the "Hermes" or
- Intersil HFA384x (Prism 2) MAC controller. This includes the vast
- majority of the PCMCIA 802.11b cards (which are nearly all rebadges)
- - except for the Cisco/Aironet cards. Cards supported include the
- Apple Airport (not a PCMCIA card), WavelanIEEE/Orinoco,
- Cabletron/EnteraSys Roamabout, ELSA AirLancer, MELCO Buffalo, Avaya,
- IBM High Rate Wireless, Farralon Syyline, Samsung MagicLAN, Netgear
- MA401, LinkSys WPC-11, D-Link DWL-650, 3Com AirConnect, Intel
- PRO/Wireless, and Symbol Spectrum24 High Rate amongst others.
+ MAC controller. Cards supported include the Apple Airport (not a
+ PCMCIA card), WavelanIEEE/Orinoco, Cabletron/EnteraSys Roamabout,
+ ELSA AirLancer, MELCO Buffalo, Avaya, IBM High Rate Wireless,
+ Farralon Syyline, Samsung MagicLAN, Netgear MA401, LinkSys WPC-11,
+ D-Link DWL-650, 3Com AirConnect, Intel PRO/Wireless, and Symbol
+ Spectrum24 High Rate amongst others.
This option includes the guts of the driver, but in order to
actually use a card you will also need to enable support for PCMCIA
- Hermes cards, PLX9052 based PCI adaptors or the Apple Airport below.
+ Hermes cards or the Apple Airport below.
You will also very likely also need the Wireless Tools in order to
configure your card and that /etc/pcmcia/wireless.opts works :
@@ -314,46 +312,6 @@
This driver does not support the Airport Extreme (802.11b/g). Use
the BCM43xx driver for Airport Extreme cards.
-config PLX_HERMES
- tristate "Hermes in PLX9052 based PCI adaptor support (Netgear MA301 etc.)"
- depends on PCI && HERMES
- help
- Enable support for PCMCIA cards supported by the "Hermes" (aka
- orinoco) driver when used in PLX9052 based PCI adaptors. These
- adaptors are not a full PCMCIA controller but act as a more limited
- PCI <-> PCMCIA bridge. Several vendors sell such adaptors so that
- 802.11b PCMCIA cards can be used in desktop machines. The Netgear
- MA301 is such an adaptor.
-
-config TMD_HERMES
- tristate "Hermes in TMD7160 based PCI adaptor support"
- depends on PCI && HERMES
- help
- Enable support for PCMCIA cards supported by the "Hermes" (aka
- orinoco) driver when used in TMD7160 based PCI adaptors. These
- adaptors are not a full PCMCIA controller but act as a more limited
- PCI <-> PCMCIA bridge. Several vendors sell such adaptors so that
- 802.11b PCMCIA cards can be used in desktop machines.
-
-config NORTEL_HERMES
- tristate "Nortel emobility PCI adaptor support"
- depends on PCI && HERMES
- help
- Enable support for PCMCIA cards supported by the "Hermes" (aka
- orinoco) driver when used in Nortel emobility PCI adaptors. These
- adaptors are not full PCMCIA controllers, but act as a more limited
- PCI <-> PCMCIA bridge.
-
-config PCI_HERMES
- tristate "Prism 2.5 PCI 802.11b adaptor support"
- depends on PCI && HERMES
- help
- Enable support for PCI and mini-PCI 802.11b wireless NICs based on
- the Prism 2.5 chipset. These are true PCI cards, not the 802.11b
- PCMCIA cards bundled with PCI<->PCMCIA adaptors which are also
- common. Some of the built-in wireless adaptors in laptops are of
- this variety.
-
config ATMEL
tristate "Atmel at76c50x chipset 802.11b support"
depends on NET_RADIO && (PCI || PCMCIA)
@@ -388,9 +346,8 @@
A driver for "Hermes" chipset based PCMCIA wireless adaptors, such
as the Lucent WavelanIEEE/Orinoco cards and their OEM (Cabletron/
EnteraSys RoamAbout 802.11, ELSA Airlancer, Melco Buffalo and
- others). It should also be usable on various Prism II based cards
- such as the Linksys, D-Link and Farallon Skyline. It should also
- work on Symbol cards such as the 3Com AirConnect and Ericsson WLAN.
+ others). It should also work on Symbol cards such as the 3Com
+ AirConnect and Ericsson WLAN.
To use your PC-cards, you will need supporting software from David
Hinds' pcmcia-cs package (see the file <file:Documentation/Changes>
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/Makefile linux/drivers/net/wireless/Makefile
--- linux-2.6.17-rc6/drivers/net/wireless/Makefile 2006-06-06 03:57:02.000000000 +0300
+++ linux/drivers/net/wireless/Makefile 2006-06-10 18:55:44.000000000 +0300
@@ -19,10 +19,6 @@
obj-$(CONFIG_HERMES) += orinoco.o hermes.o
obj-$(CONFIG_PCMCIA_HERMES) += orinoco_cs.o
obj-$(CONFIG_APPLE_AIRPORT) += airport.o
-obj-$(CONFIG_PLX_HERMES) += orinoco_plx.o
-obj-$(CONFIG_PCI_HERMES) += orinoco_pci.o
-obj-$(CONFIG_TMD_HERMES) += orinoco_tmd.o
-obj-$(CONFIG_NORTEL_HERMES) += orinoco_nortel.o
obj-$(CONFIG_PCMCIA_SPECTRUM) += spectrum_cs.o
obj-$(CONFIG_AIRO) += airo.o
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/orinoco_cs.c linux/drivers/net/wireless/orinoco_cs.c
--- linux-2.6.17-rc6/drivers/net/wireless/orinoco_cs.c 2006-06-06 03:57:02.000000000 +0300
+++ linux/drivers/net/wireless/orinoco_cs.c 2006-06-10 18:49:50.000000000 +0300
@@ -476,33 +476,19 @@
"Pavel Roskin <proski@gnu.org>, et al)";
static struct pcmcia_device_id orinoco_cs_ids[] = {
- PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7100), /* SonicWALL Long Range Wireless Card */
- PCMCIA_DEVICE_MANF_CARD(0x000b, 0x7300), /* Sohoware NCP110, Philips 802.11b */
PCMCIA_DEVICE_MANF_CARD(0x0089, 0x0002), /* AnyPoint(TM) Wireless II PC Card */
- PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0777), /* 3Com AirConnect PCI 777A */
- PCMCIA_DEVICE_MANF_CARD(0x0126, 0x8000), /* PROXIM RangeLAN-DS/LAN PC CARD */
- PCMCIA_DEVICE_MANF_CARD(0x0138, 0x0002), /* Compaq WL100 11 Mbps Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0002), /* Lucent Orinoco and old Intersil */
PCMCIA_DEVICE_MANF_CARD(0x016b, 0x0001), /* Ericsson WLAN Card C11 */
PCMCIA_DEVICE_MANF_CARD(0x01eb, 0x080a), /* Nortel Networks eMobility 802.11 Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x01ff, 0x0008), /* Intermec MobileLAN 11Mbps 802.11b WLAN Card */
- PCMCIA_DEVICE_MANF_CARD(0x0250, 0x0002), /* Samsung SWL2000-N 11Mb/s WLAN Card */
PCMCIA_DEVICE_MANF_CARD(0x0261, 0x0002), /* AirWay 802.11 Adapter (PCMCIA) */
PCMCIA_DEVICE_MANF_CARD(0x0268, 0x0001), /* ARtem Onair */
- PCMCIA_DEVICE_MANF_CARD(0x026f, 0x0305), /* Buffalo WLI-PCM-S11 */
- PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1612), /* Linksys WPC11 Version 2.5 */
- PCMCIA_DEVICE_MANF_CARD(0x0274, 0x1613), /* Linksys WPC11 Version 3 */
- PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0002), /* Compaq HNW-100 11 Mbps Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x028a, 0x0673), /* Linksys WCF12 Wireless CompactFlash Card */
- PCMCIA_DEVICE_MANF_CARD(0x02aa, 0x0002), /* ASUS SpaceLink WL-100 */
PCMCIA_DEVICE_MANF_CARD(0x02ac, 0x0002), /* SpeedStream SS1021 Wireless Adapter */
PCMCIA_DEVICE_MANF_CARD(0x14ea, 0xb001), /* PLANEX RoadLannerWave GW-NS11H */
- PCMCIA_DEVICE_MANF_CARD(0x50c2, 0x7300), /* Airvast WN-100 */
PCMCIA_DEVICE_MANF_CARD(0x9005, 0x0021), /* Adaptec Ultra Wireless ANW-8030 */
PCMCIA_DEVICE_MANF_CARD(0xc001, 0x0008), /* CONTEC FLEXSCAN/FX-DDS110-PCC */
PCMCIA_DEVICE_MANF_CARD(0xc250, 0x0002), /* Conceptronic CON11Cpro, EMTAC A2424i */
- PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0002), /* Safeway 802.11b, ZCOMAX AirRunner/XI-300 */
- PCMCIA_DEVICE_MANF_CARD(0xd601, 0x0005), /* D-Link DCF660, Sandisk Connect SDWCFB-000 */
PCMCIA_DEVICE_PROD_ID12(" ", "IEEE 802.11 Wireless LAN/PC Card", 0x3b6e20c8, 0xefccafe9),
PCMCIA_DEVICE_PROD_ID12("3Com", "3CRWE737A AirConnect Wireless LAN PC Card", 0x41240e5b, 0x56010af3),
PCMCIA_DEVICE_PROD_ID12("ACTIONTEC", "PRISM Wireless LAN PC Card", 0x393089da, 0xa71e69d5),
@@ -514,9 +500,7 @@
PCMCIA_DEVICE_PROD_ID12("Avaya Communication", "Avaya Wireless PC Card", 0xd8a43b78, 0x0d341169),
PCMCIA_DEVICE_PROD_ID12("BENQ", "AWL100 PCMCIA ADAPTER", 0x35dadc74, 0x01f7fedb),
PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-PCM-L11G", 0x2decece3, 0xf57ca4b3),
- PCMCIA_DEVICE_PROD_ID12("BUFFALO", "WLI-CF-S11G", 0x2decece3, 0x82067c18),
PCMCIA_DEVICE_PROD_ID12("Cabletron", "RoamAbout 802.11 DS", 0x32d445f5, 0xedeffd90),
- PCMCIA_DEVICE_PROD_ID12("Compaq", "WL200_11Mbps_Wireless_PCI_Card", 0x54f7c49c, 0x15a75e5b),
PCMCIA_DEVICE_PROD_ID123("corega", "WL PCCL-11", "ISL37300P", 0x0a21501a, 0x59868926, 0xc9049a39),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCC-11", 0x5261440f, 0xa6405584),
PCMCIA_DEVICE_PROD_ID12("corega K.K.", "Wireless LAN PCCA-11", 0x5261440f, 0xdf6115f9),
@@ -527,14 +511,8 @@
PCMCIA_DEVICE_PROD_ID12("Digital Data Communications", "WPC-0100", 0xfdd73470, 0xe0b6f146),
PCMCIA_DEVICE_PROD_ID12("ELSA", "AirLancer MC-11", 0x4507a33a, 0xef54f0e3),
PCMCIA_DEVICE_PROD_ID12("HyperLink", "Wireless PC Card 11Mbps", 0x56cc3f1a, 0x0bcf220c),
- PCMCIA_DEVICE_PROD_ID123("Instant Wireless ", " Network PC CARD", "Version 01.02", 0x11d901af, 0x6e9bd926, 0x4b74baa0),
PCMCIA_DEVICE_PROD_ID12("Intel", "PRO/Wireless 2011 LAN PC Card", 0x816cc815, 0x07f58077),
- PCMCIA_DEVICE_PROD_ID12("INTERSIL", "HFA384x/IEEE", 0x74c5e40d, 0xdb472a18),
- PCMCIA_DEVICE_PROD_ID12("INTERSIL", "I-GATE 11M PC Card / PC Card plus", 0x74c5e40d, 0x8304ff77),
- PCMCIA_DEVICE_PROD_ID12("Intersil", "PRISM 2_5 PCMCIA ADAPTER", 0x4b801a17, 0x6345a0bf),
- PCMCIA_DEVICE_PROD_ID123("Intersil", "PRISM Freedom PCMCIA Adapter", "ISL37100P", 0x4b801a17, 0xf222ec2d, 0x630d52b2),
PCMCIA_DEVICE_PROD_ID12("LeArtery", "SYNCBYAIR 11Mbps Wireless LAN PC Card", 0x7e3b326a, 0x49893e92),
- PCMCIA_DEVICE_PROD_ID12("Linksys", "Wireless CompactFlash Card", 0x0733cc81, 0x0c52f395),
PCMCIA_DEVICE_PROD_ID12("Lucent Technologies", "WaveLAN/IEEE", 0x23eb9949, 0xc562e72a),
PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11", 0x481e0094, 0x7360e410),
PCMCIA_DEVICE_PROD_ID12("MELCO", "WLI-PCM-L11G", 0x481e0094, 0xf57ca4b3),
@@ -552,10 +530,8 @@
PCMCIA_DEVICE_PROD_ID12("PROXIM", "LAN PCI CARD HARMONY 80211B", 0xc6536a5e, 0x9f494e26),
PCMCIA_DEVICE_PROD_ID12("SAMSUNG", "11Mbps WLAN Card", 0x43d74cb4, 0x579bd91b),
PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2532W-B EliteConnect Wireless Adapter", 0xc4f8b18b, 0x196bd757),
- PCMCIA_DEVICE_PROD_ID12("SMC", "SMC2632W", 0xc4f8b18b, 0x474a1f2a),
PCMCIA_DEVICE_PROD_ID12("Symbol Technologies", "LA4111 Spectrum24 Wireless LAN PC Card", 0x3f02b4d6, 0x3663cb0e),
PCMCIA_DEVICE_PROD_ID123("The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", 0xa5f472c2, 0x590eb502, 0xc9049a39),
- PCMCIA_DEVICE_PROD_ID12("ZoomAir 11Mbps High", "Rate wireless Networking", 0x273fe3db, 0x32a1eaee),
PCMCIA_DEVICE_NULL,
};
MODULE_DEVICE_TABLE(pcmcia, orinoco_cs_ids);
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/orinoco_nortel.c linux/drivers/net/wireless/orinoco_nortel.c
--- linux-2.6.17-rc6/drivers/net/wireless/orinoco_nortel.c 2006-06-06 03:57:02.000000000 +0300
+++ /dev/null 1970-01-01 02:00:00.000000000 +0200
@@ -1,312 +0,0 @@
-/* orinoco_nortel.c
- *
- * Driver for Prism II devices which would usually be driven by orinoco_cs,
- * but are connected to the PCI bus by a PCI-to-PCMCIA adapter used in
- * Nortel emobility, Symbol LA-4113 and Symbol LA-4123.
- * but are connected to the PCI bus by a Nortel PCI-PCMCIA-Adapter.
- *
- * Copyright (C) 2002 Tobias Hoffmann
- * (C) 2003 Christoph Jungegger <disdos@traum404.de>
- *
- * Some of this code is borrowed from orinoco_plx.c
- * Copyright (C) 2001 Daniel Barlow
- * Some of this code is borrowed from orinoco_pci.c
- * Copyright (C) 2001 Jean Tourrilhes
- * Some of this code is "inspired" by linux-wlan-ng-0.1.10, but nothing
- * has been copied from it. linux-wlan-ng-0.1.10 is originally :
- * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License version 2 (the "GPL"), in
- * which case the provisions of the GPL are applicable instead of the
- * above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the MPL, indicate your decision by
- * deleting the provisions above and replace them with the notice and
- * other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file
- * under either the MPL or the GPL.
- */
-
-#define DRIVER_NAME "orinoco_nortel"
-#define PFX DRIVER_NAME ": "
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
-#include <pcmcia/cisreg.h>
-
-#include "orinoco.h"
-
-#define COR_OFFSET (0xe0) /* COR attribute offset of Prism2 PC card */
-#define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */
-
-
-/* Nortel specific data */
-struct nortel_pci_card {
- unsigned long iobase1;
- unsigned long iobase2;
-};
-
-/*
- * Do a soft reset of the PCI card using the Configuration Option Register
- * We need this to get going...
- * This is the part of the code that is strongly inspired from wlan-ng
- *
- * Note bis : Don't try to access HERMES_CMD during the reset phase.
- * It just won't work !
- */
-static int nortel_pci_cor_reset(struct orinoco_private *priv)
-{
- struct nortel_pci_card *card = priv->card;
-
- /* Assert the reset until the card notice */
- outw_p(8, card->iobase1 + 2);
- inw(card->iobase2 + COR_OFFSET);
- outw_p(0x80, card->iobase2 + COR_OFFSET);
- mdelay(1);
-
- /* Give time for the card to recover from this hard effort */
- outw_p(0, card->iobase2 + COR_OFFSET);
- outw_p(0, card->iobase2 + COR_OFFSET);
- mdelay(1);
-
- /* set COR as usual */
- outw_p(COR_VALUE, card->iobase2 + COR_OFFSET);
- outw_p(COR_VALUE, card->iobase2 + COR_OFFSET);
- mdelay(1);
-
- outw_p(0x228, card->iobase1 + 2);
-
- return 0;
-}
-
-static int nortel_pci_hw_init(struct nortel_pci_card *card)
-{
- int i;
- u32 reg;
-
- /* setup bridge */
- if (inw(card->iobase1) & 1) {
- printk(KERN_ERR PFX "brg1 answer1 wrong\n");
- return -EBUSY;
- }
- outw_p(0x118, card->iobase1 + 2);
- outw_p(0x108, card->iobase1 + 2);
- mdelay(30);
- outw_p(0x8, card->iobase1 + 2);
- for (i = 0; i < 30; i++) {
- mdelay(30);
- if (inw(card->iobase1) & 0x10) {
- break;
- }
- }
- if (i == 30) {
- printk(KERN_ERR PFX "brg1 timed out\n");
- return -EBUSY;
- }
- if (inw(card->iobase2 + 0xe0) & 1) {
- printk(KERN_ERR PFX "brg2 answer1 wrong\n");
- return -EBUSY;
- }
- if (inw(card->iobase2 + 0xe2) & 1) {
- printk(KERN_ERR PFX "brg2 answer2 wrong\n");
- return -EBUSY;
- }
- if (inw(card->iobase2 + 0xe4) & 1) {
- printk(KERN_ERR PFX "brg2 answer3 wrong\n");
- return -EBUSY;
- }
-
- /* set the PCMCIA COR-Register */
- outw_p(COR_VALUE, card->iobase2 + COR_OFFSET);
- mdelay(1);
- reg = inw(card->iobase2 + COR_OFFSET);
- if (reg != COR_VALUE) {
- printk(KERN_ERR PFX "Error setting COR value (reg=%x)\n",
- reg);
- return -EBUSY;
- }
-
- /* set leds */
- outw_p(1, card->iobase1 + 10);
- return 0;
-}
-
-static int nortel_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
-{
- int err;
- struct orinoco_private *priv;
- struct nortel_pci_card *card;
- struct net_device *dev;
- void __iomem *iomem;
-
- err = pci_enable_device(pdev);
- if (err) {
- printk(KERN_ERR PFX "Cannot enable PCI device\n");
- return err;
- }
-
- err = pci_request_regions(pdev, DRIVER_NAME);
- if (err != 0) {
- printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
- goto fail_resources;
- }
-
- iomem = pci_iomap(pdev, 2, 0);
- if (!iomem) {
- err = -ENOMEM;
- goto fail_map_io;
- }
-
- /* Allocate network device */
- dev = alloc_orinocodev(sizeof(*card), nortel_pci_cor_reset);
- if (!dev) {
- printk(KERN_ERR PFX "Cannot allocate network device\n");
- err = -ENOMEM;
- goto fail_alloc;
- }
-
- priv = netdev_priv(dev);
- card = priv->card;
- card->iobase1 = pci_resource_start(pdev, 0);
- card->iobase2 = pci_resource_start(pdev, 1);
- dev->base_addr = pci_resource_start(pdev, 2);
- SET_MODULE_OWNER(dev);
- SET_NETDEV_DEV(dev, &pdev->dev);
-
- hermes_struct_init(&priv->hw, iomem, HERMES_16BIT_REGSPACING);
-
- printk(KERN_DEBUG PFX "Detected Nortel PCI device at %s irq:%d, "
- "io addr:0x%lx\n", pci_name(pdev), pdev->irq, dev->base_addr);
-
- err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
- dev->name, dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
- err = -EBUSY;
- goto fail_irq;
- }
- dev->irq = pdev->irq;
-
- err = nortel_pci_hw_init(card);
- if (err) {
- printk(KERN_ERR PFX "Hardware initialization failed\n");
- goto fail;
- }
-
- err = nortel_pci_cor_reset(priv);
- if (err) {
- printk(KERN_ERR PFX "Initial reset failed\n");
- goto fail;
- }
-
-
- err = register_netdev(dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot register network device\n");
- goto fail;
- }
-
- pci_set_drvdata(pdev, dev);
-
- return 0;
-
- fail:
- free_irq(pdev->irq, dev);
-
- fail_irq:
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
-
- fail_alloc:
- pci_iounmap(pdev, iomem);
-
- fail_map_io:
- pci_release_regions(pdev);
-
- fail_resources:
- pci_disable_device(pdev);
-
- return err;
-}
-
-static void __devexit nortel_pci_remove_one(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = netdev_priv(dev);
- struct nortel_pci_card *card = priv->card;
-
- /* clear leds */
- outw_p(0, card->iobase1 + 10);
-
- unregister_netdev(dev);
- free_irq(dev->irq, dev);
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
- pci_iounmap(pdev, priv->hw.iobase);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
-}
-
-
-static struct pci_device_id nortel_pci_id_table[] = {
- /* Nortel emobility PCI */
- {0x126c, 0x8030, PCI_ANY_ID, PCI_ANY_ID,},
- /* Symbol LA-4123 PCI */
- {0x1562, 0x0001, PCI_ANY_ID, PCI_ANY_ID,},
- {0,},
-};
-
-MODULE_DEVICE_TABLE(pci, nortel_pci_id_table);
-
-static struct pci_driver nortel_pci_driver = {
- .name = DRIVER_NAME,
- .id_table = nortel_pci_id_table,
- .probe = nortel_pci_init_one,
- .remove = __devexit_p(nortel_pci_remove_one),
-};
-
-static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
- " (Tobias Hoffmann & Christoph Jungegger <disdos@traum404.de>)";
-MODULE_AUTHOR("Christoph Jungegger <disdos@traum404.de>");
-MODULE_DESCRIPTION
- ("Driver for wireless LAN cards using the Nortel PCI bridge");
-MODULE_LICENSE("Dual MPL/GPL");
-
-static int __init nortel_pci_init(void)
-{
- printk(KERN_DEBUG "%s\n", version);
- return pci_module_init(&nortel_pci_driver);
-}
-
-static void __exit nortel_pci_exit(void)
-{
- pci_unregister_driver(&nortel_pci_driver);
- ssleep(1);
-}
-
-module_init(nortel_pci_init);
-module_exit(nortel_pci_exit);
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * tab-width: 8
- * End:
- */
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/orinoco_pci.c linux/drivers/net/wireless/orinoco_pci.c
--- linux-2.6.17-rc6/drivers/net/wireless/orinoco_pci.c 2006-06-06 03:57:02.000000000 +0300
+++ /dev/null 1970-01-01 02:00:00.000000000 +0200
@@ -1,399 +0,0 @@
-/* orinoco_pci.c
- *
- * Driver for Prism II devices that have a direct PCI interface
- * (i.e., not in a Pcmcia or PLX bridge)
- *
- * Specifically here we're talking about the Linksys WMP11
- *
- * Current maintainers (as of 29 September 2003) are:
- * Pavel Roskin <proski AT gnu.org>
- * and David Gibson <hermes AT gibson.dropbear.id.au>
- *
- * Some of this code is borrowed from orinoco_plx.c
- * Copyright (C) 2001 Daniel Barlow <dan AT telent.net>
- * Some of this code is "inspired" by linux-wlan-ng-0.1.10, but nothing
- * has been copied from it. linux-wlan-ng-0.1.10 is originally :
- * Copyright (C) 1999 AbsoluteValue Systems, Inc. All Rights Reserved.
- * This file originally written by:
- * Copyright (C) 2001 Jean Tourrilhes <jt AT hpl.hp.com>
- * And is now maintained by:
- * (C) Copyright David Gibson, IBM Corp. 2002-2003.
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License version 2 (the "GPL"), in
- * which case the provisions of the GPL are applicable instead of the
- * above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the MPL, indicate your decision by
- * deleting the provisions above and replace them with the notice and
- * other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file
- * under either the MPL or the GPL.
- */
-
-/*
- * Theory of operation...
- * -------------------
- * Maybe you had a look in orinoco_plx. Well, this is totally different...
- *
- * The card contains only one PCI region, which contains all the usual
- * hermes registers.
- *
- * The driver will memory map this region in normal memory. Because
- * the hermes registers are mapped in normal memory and not in ISA I/O
- * post space, we can't use the usual inw/outw macros and we need to
- * use readw/writew.
- * This slight difference force us to compile our own version of
- * hermes.c with the register access macro changed. That's a bit
- * hackish but works fine.
- *
- * Note that the PCI region is pretty big (4K). That's much more than
- * the usual set of hermes register (0x0 -> 0x3E). I've got a strong
- * suspicion that the whole memory space of the adapter is in fact in
- * this region. Accessing directly the adapter memory instead of going
- * through the usual register would speed up significantely the
- * operations...
- *
- * Finally, the card looks like this :
------------------------
- Bus 0, device 14, function 0:
- Network controller: PCI device 1260:3873 (Harris Semiconductor) (rev 1).
- IRQ 11.
- Master Capable. Latency=248.
- Prefetchable 32 bit memory at 0xffbcc000 [0xffbccfff].
------------------------
-00:0e.0 Network controller: Harris Semiconductor: Unknown device 3873 (rev 01)
- Subsystem: Unknown device 1737:3874
- Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
- Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
- Latency: 248 set, cache line size 08
- Interrupt: pin A routed to IRQ 11
- Region 0: Memory at ffbcc000 (32-bit, prefetchable) [size=4K]
- Capabilities: [dc] Power Management version 2
- Flags: PMEClk- AuxPwr- DSI- D1+ D2+ PME+
- Status: D0 PME-Enable- DSel=0 DScale=0 PME-
------------------------
- *
- * That's all..
- *
- * Jean II
- */
-
-#define DRIVER_NAME "orinoco_pci"
-#define PFX DRIVER_NAME ": "
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
-
-#include "orinoco.h"
-
-/* All the magic there is from wlan-ng */
-/* Magic offset of the reset register of the PCI card */
-#define HERMES_PCI_COR (0x26)
-/* Magic bitmask to reset the card */
-#define HERMES_PCI_COR_MASK (0x0080)
-/* Magic timeouts for doing the reset.
- * Those times are straight from wlan-ng, and it is claimed that they
- * are necessary. Alan will kill me. Take your time and grab a coffee. */
-#define HERMES_PCI_COR_ONT (250) /* ms */
-#define HERMES_PCI_COR_OFFT (500) /* ms */
-#define HERMES_PCI_COR_BUSYT (500) /* ms */
-
-/* Orinoco PCI specific data */
-struct orinoco_pci_card {
- void __iomem *pci_ioaddr;
-};
-
-/*
- * Do a soft reset of the PCI card using the Configuration Option Register
- * We need this to get going...
- * This is the part of the code that is strongly inspired from wlan-ng
- *
- * Note : This code is done with irq enabled. This mean that many
- * interrupts will occur while we are there. This is why we use the
- * jiffies to regulate time instead of a straight mdelay(). Usually we
- * need only around 245 iteration of the loop to do 250 ms delay.
- *
- * Note bis : Don't try to access HERMES_CMD during the reset phase.
- * It just won't work !
- */
-static int
-orinoco_pci_cor_reset(struct orinoco_private *priv)
-{
- hermes_t *hw = &priv->hw;
- unsigned long timeout;
- u16 reg;
-
- /* Assert the reset until the card notice */
- hermes_write_regn(hw, PCI_COR, HERMES_PCI_COR_MASK);
- mdelay(HERMES_PCI_COR_ONT);
-
- /* Give time for the card to recover from this hard effort */
- hermes_write_regn(hw, PCI_COR, 0x0000);
- mdelay(HERMES_PCI_COR_OFFT);
-
- /* The card is ready when it's no longer busy */
- timeout = jiffies + (HERMES_PCI_COR_BUSYT * HZ / 1000);
- reg = hermes_read_regn(hw, CMD);
- while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) {
- mdelay(1);
- reg = hermes_read_regn(hw, CMD);
- }
-
- /* Still busy? */
- if (reg & HERMES_CMD_BUSY) {
- printk(KERN_ERR PFX "Busy timeout\n");
- return -ETIMEDOUT;
- }
-
- return 0;
-}
-
-/*
- * Initialise a card. Mostly similar to PLX code.
- */
-static int orinoco_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
-{
- int err = 0;
- unsigned long pci_iorange;
- u16 __iomem *pci_ioaddr = NULL;
- unsigned long pci_iolen;
- struct orinoco_private *priv = NULL;
- struct orinoco_pci_card *card;
- struct net_device *dev = NULL;
-
- err = pci_enable_device(pdev);
- if (err) {
- printk(KERN_ERR PFX "Cannot enable PCI device\n");
- return err;
- }
-
- err = pci_request_regions(pdev, DRIVER_NAME);
- if (err != 0) {
- printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
- goto fail_resources;
- }
-
- /* Resource 0 is mapped to the hermes registers */
- pci_iorange = pci_resource_start(pdev, 0);
- pci_iolen = pci_resource_len(pdev, 0);
- pci_ioaddr = ioremap(pci_iorange, pci_iolen);
- if (!pci_iorange) {
- printk(KERN_ERR PFX "Cannot remap hardware registers\n");
- goto fail_map;
- }
-
- /* Allocate network device */
- dev = alloc_orinocodev(sizeof(*card), orinoco_pci_cor_reset);
- if (! dev) {
- err = -ENOMEM;
- goto fail_alloc;
- }
-
- priv = netdev_priv(dev);
- card = priv->card;
- card->pci_ioaddr = pci_ioaddr;
- dev->mem_start = pci_iorange;
- dev->mem_end = pci_iorange + pci_iolen - 1;
- SET_MODULE_OWNER(dev);
- SET_NETDEV_DEV(dev, &pdev->dev);
-
- hermes_struct_init(&priv->hw, pci_ioaddr, HERMES_32BIT_REGSPACING);
-
- printk(KERN_DEBUG PFX "Detected device %s, mem:0x%lx-0x%lx, irq %d\n",
- pci_name(pdev), dev->mem_start, dev->mem_end, pdev->irq);
-
- err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
- dev->name, dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
- err = -EBUSY;
- goto fail_irq;
- }
- dev->irq = pdev->irq;
-
- /* Perform a COR reset to start the card */
- err = orinoco_pci_cor_reset(priv);
- if (err) {
- printk(KERN_ERR PFX "Initial reset failed\n");
- goto fail;
- }
-
- err = register_netdev(dev);
- if (err) {
- printk(KERN_ERR PFX "Failed to register net device\n");
- goto fail;
- }
-
- pci_set_drvdata(pdev, dev);
-
- return 0;
-
- fail:
- free_irq(pdev->irq, dev);
-
- fail_irq:
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
-
- fail_alloc:
- iounmap(pci_ioaddr);
-
- fail_map:
- pci_release_regions(pdev);
-
- fail_resources:
- pci_disable_device(pdev);
-
- return err;
-}
-
-static void __devexit orinoco_pci_remove_one(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = netdev_priv(dev);
- struct orinoco_pci_card *card = priv->card;
-
- unregister_netdev(dev);
- free_irq(dev->irq, dev);
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
- iounmap(card->pci_ioaddr);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
-}
-
-static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = netdev_priv(dev);
- unsigned long flags;
- int err;
-
-
- err = orinoco_lock(priv, &flags);
- if (err) {
- printk(KERN_ERR "%s: hw_unavailable on orinoco_pci_suspend\n",
- dev->name);
- return err;
- }
-
- err = __orinoco_down(dev);
- if (err)
- printk(KERN_WARNING "%s: orinoco_pci_suspend(): Error %d downing interface\n",
- dev->name, err);
-
- netif_device_detach(dev);
-
- priv->hw_unavailable++;
-
- orinoco_unlock(priv, &flags);
-
- pci_save_state(pdev);
- pci_set_power_state(pdev, PCI_D3hot);
-
- return 0;
-}
-
-static int orinoco_pci_resume(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = netdev_priv(dev);
- unsigned long flags;
- int err;
-
- printk(KERN_DEBUG "%s: Orinoco-PCI waking up\n", dev->name);
-
- pci_set_power_state(pdev, 0);
- pci_restore_state(pdev);
-
- err = orinoco_reinit_firmware(dev);
- if (err) {
- printk(KERN_ERR "%s: Error %d re-initializing firmware on orinoco_pci_resume()\n",
- dev->name, err);
- return err;
- }
-
- spin_lock_irqsave(&priv->lock, flags);
-
- netif_device_attach(dev);
-
- priv->hw_unavailable--;
-
- if (priv->open && (! priv->hw_unavailable)) {
- err = __orinoco_up(dev);
- if (err)
- printk(KERN_ERR "%s: Error %d restarting card on orinoco_pci_resume()\n",
- dev->name, err);
- }
-
- spin_unlock_irqrestore(&priv->lock, flags);
-
- return 0;
-}
-
-static struct pci_device_id orinoco_pci_pci_id_table[] = {
- /* Intersil Prism 3 */
- {0x1260, 0x3872, PCI_ANY_ID, PCI_ANY_ID,},
- /* Intersil Prism 2.5 */
- {0x1260, 0x3873, PCI_ANY_ID, PCI_ANY_ID,},
- /* Samsung MagicLAN SWL-2210P */
- {0x167d, 0xa000, PCI_ANY_ID, PCI_ANY_ID,},
- {0,},
-};
-
-MODULE_DEVICE_TABLE(pci, orinoco_pci_pci_id_table);
-
-static struct pci_driver orinoco_pci_driver = {
- .name = DRIVER_NAME,
- .id_table = orinoco_pci_pci_id_table,
- .probe = orinoco_pci_init_one,
- .remove = __devexit_p(orinoco_pci_remove_one),
- .suspend = orinoco_pci_suspend,
- .resume = orinoco_pci_resume,
-};
-
-static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
- " (Pavel Roskin <proski@gnu.org>,"
- " David Gibson <hermes@gibson.dropbear.id.au> &"
- " Jean Tourrilhes <jt@hpl.hp.com>)";
-MODULE_AUTHOR("Pavel Roskin <proski@gnu.org> & David Gibson <hermes@gibson.dropbear.id.au>");
-MODULE_DESCRIPTION("Driver for wireless LAN cards using direct PCI interface");
-MODULE_LICENSE("Dual MPL/GPL");
-
-static int __init orinoco_pci_init(void)
-{
- printk(KERN_DEBUG "%s\n", version);
- return pci_module_init(&orinoco_pci_driver);
-}
-
-static void __exit orinoco_pci_exit(void)
-{
- pci_unregister_driver(&orinoco_pci_driver);
-}
-
-module_init(orinoco_pci_init);
-module_exit(orinoco_pci_exit);
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * tab-width: 8
- * End:
- */
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/orinoco_plx.c linux/drivers/net/wireless/orinoco_plx.c
--- linux-2.6.17-rc6/drivers/net/wireless/orinoco_plx.c 2006-06-06 03:57:02.000000000 +0300
+++ /dev/null 1970-01-01 02:00:00.000000000 +0200
@@ -1,403 +0,0 @@
-/* orinoco_plx.c
- *
- * Driver for Prism II devices which would usually be driven by orinoco_cs,
- * but are connected to the PCI bus by a PLX9052.
- *
- * Current maintainers (as of 29 September 2003) are:
- * Pavel Roskin <proski AT gnu.org>
- * and David Gibson <hermes AT gibson.dropbear.id.au>
- *
- * (C) Copyright David Gibson, IBM Corp. 2001-2003.
- * Copyright (C) 2001 Daniel Barlow
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License version 2 (the "GPL"), in
- * which case the provisions of the GPL are applicable instead of the
- * above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the MPL, indicate your decision by
- * deleting the provisions above and replace them with the notice and
- * other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file
- * under either the MPL or the GPL.
-
- * Caution: this is experimental and probably buggy. For success and
- * failure reports for different cards and adaptors, see
- * orinoco_plx_pci_id_table near the end of the file. If you have a
- * card we don't have the PCI id for, and looks like it should work,
- * drop me mail with the id and "it works"/"it doesn't work".
- *
- * Note: if everything gets detected fine but it doesn't actually send
- * or receive packets, your first port of call should probably be to
- * try newer firmware in the card. Especially if you're doing Ad-Hoc
- * modes.
- *
- * The actual driving is done by orinoco.c, this is just resource
- * allocation stuff. The explanation below is courtesy of Ryan Niemi
- * on the linux-wlan-ng list at
- * http://archives.neohapsis.com/archives/dev/linux-wlan/2001-q1/0026.html
- *
- * The PLX9052-based cards (WL11000 and several others) are a
- * different beast than the usual PCMCIA-based PRISM2 configuration
- * expected by wlan-ng. Here's the general details on how the WL11000
- * PCI adapter works:
- *
- * - Two PCI I/O address spaces, one 0x80 long which contains the
- * PLX9052 registers, and one that's 0x40 long mapped to the PCMCIA
- * slot I/O address space.
- *
- * - One PCI memory address space, mapped to the PCMCIA memory space
- * (containing the CIS).
- *
- * After identifying the I/O and memory space, you can read through
- * the memory space to confirm the CIS's device ID or manufacturer ID
- * to make sure it's the expected card. qKeep in mind that the PCMCIA
- * spec specifies the CIS as the lower 8 bits of each word read from
- * the CIS, so to read the bytes of the CIS, read every other byte
- * (0,2,4,...). Passing that test, you need to enable the I/O address
- * space on the PCMCIA card via the PCMCIA COR register. This is the
- * first byte following the CIS. In my case (which may not have any
- * relation to what's on the PRISM2 cards), COR was at offset 0x800
- * within the PCI memory space. Write 0x41 to the COR register to
- * enable I/O mode and to select level triggered interrupts. To
- * confirm you actually succeeded, read the COR register back and make
- * sure it actually got set to 0x41, incase you have an unexpected
- * card inserted.
- *
- * Following that, you can treat the second PCI I/O address space (the
- * one that's not 0x80 in length) as the PCMCIA I/O space.
- *
- * Note that in the Eumitcom's source for their drivers, they register
- * the interrupt as edge triggered when registering it with the
- * Windows kernel. I don't recall how to register edge triggered on
- * Linux (if it can be done at all). But in some experimentation, I
- * don't see much operational difference between using either
- * interrupt mode. Don't mess with the interrupt mode in the COR
- * register though, as the PLX9052 wants level triggers with the way
- * the serial EEPROM configures it on the WL11000.
- *
- * There's some other little quirks related to timing that I bumped
- * into, but I don't recall right now. Also, there's two variants of
- * the WL11000 I've seen, revision A1 and T2. These seem to differ
- * slightly in the timings configured in the wait-state generator in
- * the PLX9052. There have also been some comments from Eumitcom that
- * cards shouldn't be hot swapped, apparently due to risk of cooking
- * the PLX9052. I'm unsure why they believe this, as I can't see
- * anything in the design that would really cause a problem, except
- * for crashing drivers not written to expect it. And having developed
- * drivers for the WL11000, I'd say it's quite tricky to write code
- * that will successfully deal with a hot unplug. Very odd things
- * happen on the I/O side of things. But anyway, be warned. Despite
- * that, I've hot-swapped a number of times during debugging and
- * driver development for various reasons (stuck WAIT# line after the
- * radio card's firmware locks up).
- *
- * Hope this is enough info for someone to add PLX9052 support to the
- * wlan-ng card. In the case of the WL11000, the PCI ID's are
- * 0x1639/0x0200, with matching subsystem ID's. Other PLX9052-based
- * manufacturers other than Eumitcom (or on cards other than the
- * WL11000) may have different PCI ID's.
- *
- * If anyone needs any more specific info, let me know. I haven't had
- * time to implement support myself yet, and with the way things are
- * going, might not have time for a while..
- */
-
-#define DRIVER_NAME "orinoco_plx"
-#define PFX DRIVER_NAME ": "
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
-#include <pcmcia/cisreg.h>
-
-#include "orinoco.h"
-
-#define COR_OFFSET (0x3e0) /* COR attribute offset of Prism2 PC card */
-#define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */
-#define COR_RESET (0x80) /* reset bit in the COR register */
-#define PLX_RESET_TIME (500) /* milliseconds */
-
-#define PLX_INTCSR 0x4c /* Interrupt Control & Status Register */
-#define PLX_INTCSR_INTEN (1<<6) /* Interrupt Enable bit */
-
-static const u8 cis_magic[] = {
- 0x01, 0x03, 0x00, 0x00, 0xff, 0x17, 0x04, 0x67
-};
-
-/* Orinoco PLX specific data */
-struct orinoco_plx_card {
- void __iomem *attr_mem;
-};
-
-/*
- * Do a soft reset of the card using the Configuration Option Register
- */
-static int orinoco_plx_cor_reset(struct orinoco_private *priv)
-{
- hermes_t *hw = &priv->hw;
- struct orinoco_plx_card *card = priv->card;
- u8 __iomem *attr_mem = card->attr_mem;
- unsigned long timeout;
- u16 reg;
-
- writeb(COR_VALUE | COR_RESET, attr_mem + COR_OFFSET);
- mdelay(1);
-
- writeb(COR_VALUE, attr_mem + COR_OFFSET);
- mdelay(1);
-
- /* Just in case, wait more until the card is no longer busy */
- timeout = jiffies + (PLX_RESET_TIME * HZ / 1000);
- reg = hermes_read_regn(hw, CMD);
- while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) {
- mdelay(1);
- reg = hermes_read_regn(hw, CMD);
- }
-
- /* Did we timeout ? */
- if (reg & HERMES_CMD_BUSY) {
- printk(KERN_ERR PFX "Busy timeout\n");
- return -ETIMEDOUT;
- }
-
- return 0;
-}
-
-
-static int orinoco_plx_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
-{
- int err = 0;
- u8 __iomem *attr_mem = NULL;
- u32 csr_reg, plx_addr;
- struct orinoco_private *priv = NULL;
- struct orinoco_plx_card *card;
- unsigned long pccard_ioaddr = 0;
- unsigned long pccard_iolen = 0;
- struct net_device *dev = NULL;
- void __iomem *mem;
- int i;
-
- err = pci_enable_device(pdev);
- if (err) {
- printk(KERN_ERR PFX "Cannot enable PCI device\n");
- return err;
- }
-
- err = pci_request_regions(pdev, DRIVER_NAME);
- if (err != 0) {
- printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
- goto fail_resources;
- }
-
- /* Resource 1 is mapped to PLX-specific registers */
- plx_addr = pci_resource_start(pdev, 1);
-
- /* Resource 2 is mapped to the PCMCIA attribute memory */
- attr_mem = ioremap(pci_resource_start(pdev, 2),
- pci_resource_len(pdev, 2));
- if (!attr_mem) {
- printk(KERN_ERR PFX "Cannot remap PCMCIA space\n");
- goto fail_map_attr;
- }
-
- /* Resource 3 is mapped to the PCMCIA I/O address space */
- pccard_ioaddr = pci_resource_start(pdev, 3);
- pccard_iolen = pci_resource_len(pdev, 3);
-
- mem = pci_iomap(pdev, 3, 0);
- if (!mem) {
- err = -ENOMEM;
- goto fail_map_io;
- }
-
- /* Allocate network device */
- dev = alloc_orinocodev(sizeof(*card), orinoco_plx_cor_reset);
- if (!dev) {
- printk(KERN_ERR PFX "Cannot allocate network device\n");
- err = -ENOMEM;
- goto fail_alloc;
- }
-
- priv = netdev_priv(dev);
- card = priv->card;
- card->attr_mem = attr_mem;
- dev->base_addr = pccard_ioaddr;
- SET_MODULE_OWNER(dev);
- SET_NETDEV_DEV(dev, &pdev->dev);
-
- hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING);
-
- printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 PLX device "
- "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq,
- pccard_ioaddr);
-
- err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
- dev->name, dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
- err = -EBUSY;
- goto fail_irq;
- }
- dev->irq = pdev->irq;
-
- /* bjoern: We need to tell the card to enable interrupts, in
- case the serial eprom didn't do this already. See the
- PLX9052 data book, p8-1 and 8-24 for reference. */
- csr_reg = inl(plx_addr + PLX_INTCSR);
- if (!(csr_reg & PLX_INTCSR_INTEN)) {
- csr_reg |= PLX_INTCSR_INTEN;
- outl(csr_reg, plx_addr + PLX_INTCSR);
- csr_reg = inl(plx_addr + PLX_INTCSR);
- if (!(csr_reg & PLX_INTCSR_INTEN)) {
- printk(KERN_ERR PFX "Cannot enable interrupts\n");
- goto fail;
- }
- }
-
- err = orinoco_plx_cor_reset(priv);
- if (err) {
- printk(KERN_ERR PFX "Initial reset failed\n");
- goto fail;
- }
-
- printk(KERN_DEBUG PFX "CIS: ");
- for (i = 0; i < 16; i++) {
- printk("%02X:", readb(attr_mem + 2*i));
- }
- printk("\n");
-
- /* Verify whether a supported PC card is present */
- /* FIXME: we probably need to be smarted about this */
- for (i = 0; i < sizeof(cis_magic); i++) {
- if (cis_magic[i] != readb(attr_mem +2*i)) {
- printk(KERN_ERR PFX "The CIS value of Prism2 PC "
- "card is unexpected\n");
- err = -EIO;
- goto fail;
- }
- }
-
- err = register_netdev(dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot register network device\n");
- goto fail;
- }
-
- pci_set_drvdata(pdev, dev);
-
- return 0;
-
- fail:
- free_irq(pdev->irq, dev);
-
- fail_irq:
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
-
- fail_alloc:
- pci_iounmap(pdev, mem);
-
- fail_map_io:
- iounmap(attr_mem);
-
- fail_map_attr:
- pci_release_regions(pdev);
-
- fail_resources:
- pci_disable_device(pdev);
-
- return err;
-}
-
-static void __devexit orinoco_plx_remove_one(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = netdev_priv(dev);
- struct orinoco_plx_card *card = priv->card;
- u8 __iomem *attr_mem = card->attr_mem;
-
- BUG_ON(! dev);
-
- unregister_netdev(dev);
- free_irq(dev->irq, dev);
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
- pci_iounmap(pdev, priv->hw.iobase);
- iounmap(attr_mem);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
-}
-
-
-static struct pci_device_id orinoco_plx_pci_id_table[] = {
- {0x111a, 0x1023, PCI_ANY_ID, PCI_ANY_ID,}, /* Siemens SpeedStream SS1023 */
- {0x1385, 0x4100, PCI_ANY_ID, PCI_ANY_ID,}, /* Netgear MA301 */
- {0x15e8, 0x0130, PCI_ANY_ID, PCI_ANY_ID,}, /* Correga - does this work? */
- {0x1638, 0x1100, PCI_ANY_ID, PCI_ANY_ID,}, /* SMC EZConnect SMC2602W,
- Eumitcom PCI WL11000,
- Addtron AWA-100 */
- {0x16ab, 0x1100, PCI_ANY_ID, PCI_ANY_ID,}, /* Global Sun Tech GL24110P */
- {0x16ab, 0x1101, PCI_ANY_ID, PCI_ANY_ID,}, /* Reported working, but unknown */
- {0x16ab, 0x1102, PCI_ANY_ID, PCI_ANY_ID,}, /* Linksys WDT11 */
- {0x16ec, 0x3685, PCI_ANY_ID, PCI_ANY_ID,}, /* USR 2415 */
- {0xec80, 0xec00, PCI_ANY_ID, PCI_ANY_ID,}, /* Belkin F5D6000 tested by
- Brendan W. McAdams <rit AT jacked-in.org> */
- {0x10b7, 0x7770, PCI_ANY_ID, PCI_ANY_ID,}, /* 3Com AirConnect PCI tested by
- Damien Persohn <damien AT persohn.net> */
- {0,},
-};
-
-MODULE_DEVICE_TABLE(pci, orinoco_plx_pci_id_table);
-
-static struct pci_driver orinoco_plx_driver = {
- .name = DRIVER_NAME,
- .id_table = orinoco_plx_pci_id_table,
- .probe = orinoco_plx_init_one,
- .remove = __devexit_p(orinoco_plx_remove_one),
-};
-
-static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
- " (Pavel Roskin <proski@gnu.org>,"
- " David Gibson <hermes@gibson.dropbear.id.au>,"
- " Daniel Barlow <dan@telent.net>)";
-MODULE_AUTHOR("Daniel Barlow <dan@telent.net>");
-MODULE_DESCRIPTION("Driver for wireless LAN cards using the PLX9052 PCI bridge");
-MODULE_LICENSE("Dual MPL/GPL");
-
-static int __init orinoco_plx_init(void)
-{
- printk(KERN_DEBUG "%s\n", version);
- return pci_module_init(&orinoco_plx_driver);
-}
-
-static void __exit orinoco_plx_exit(void)
-{
- pci_unregister_driver(&orinoco_plx_driver);
- ssleep(1);
-}
-
-module_init(orinoco_plx_init);
-module_exit(orinoco_plx_exit);
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * tab-width: 8
- * End:
- */
diff -Nur linux-2.6.17-rc6/drivers/net/wireless/orinoco_tmd.c linux/drivers/net/wireless/orinoco_tmd.c
--- linux-2.6.17-rc6/drivers/net/wireless/orinoco_tmd.c 2006-06-06 03:57:02.000000000 +0300
+++ /dev/null 1970-01-01 02:00:00.000000000 +0200
@@ -1,260 +0,0 @@
-/* orinoco_tmd.c
- *
- * Driver for Prism II devices which would usually be driven by orinoco_cs,
- * but are connected to the PCI bus by a TMD7160.
- *
- * Copyright (C) 2003 Joerg Dorchain <joerg AT dorchain.net>
- * based heavily upon orinoco_plx.c Copyright (C) 2001 Daniel Barlow
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.1 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License
- * at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and
- * limitations under the License.
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License version 2 (the "GPL"), in
- * which case the provisions of the GPL are applicable instead of the
- * above. If you wish to allow the use of your version of this file
- * only under the terms of the GPL and not to allow others to use your
- * version of this file under the MPL, indicate your decision by
- * deleting the provisions above and replace them with the notice and
- * other provisions required by the GPL. If you do not delete the
- * provisions above, a recipient may use your version of this file
- * under either the MPL or the GPL.
-
- * Caution: this is experimental and probably buggy. For success and
- * failure reports for different cards and adaptors, see
- * orinoco_tmd_pci_id_table near the end of the file. If you have a
- * card we don't have the PCI id for, and looks like it should work,
- * drop me mail with the id and "it works"/"it doesn't work".
- *
- * Note: if everything gets detected fine but it doesn't actually send
- * or receive packets, your first port of call should probably be to
- * try newer firmware in the card. Especially if you're doing Ad-Hoc
- * modes
- *
- * The actual driving is done by orinoco.c, this is just resource
- * allocation stuff.
- *
- * This driver is modeled after the orinoco_plx driver. The main
- * difference is that the TMD chip has only IO port ranges and no
- * memory space, i.e. no access to the CIS. Compared to the PLX chip,
- * the io range functionalities are exchanged.
- *
- * Pheecom sells cards with the TMD chip as "ASIC version"
- */
-
-#define DRIVER_NAME "orinoco_tmd"
-#define PFX DRIVER_NAME ": "
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/pci.h>
-#include <pcmcia/cisreg.h>
-
-#include "orinoco.h"
-
-#define COR_VALUE (COR_LEVEL_REQ | COR_FUNC_ENA) /* Enable PC card with interrupt in level trigger */
-#define COR_RESET (0x80) /* reset bit in the COR register */
-#define TMD_RESET_TIME (500) /* milliseconds */
-
-/* Orinoco TMD specific data */
-struct orinoco_tmd_card {
- u32 tmd_io;
-};
-
-
-/*
- * Do a soft reset of the card using the Configuration Option Register
- */
-static int orinoco_tmd_cor_reset(struct orinoco_private *priv)
-{
- hermes_t *hw = &priv->hw;
- struct orinoco_tmd_card *card = priv->card;
- u32 addr = card->tmd_io;
- unsigned long timeout;
- u16 reg;
-
- outb(COR_VALUE | COR_RESET, addr);
- mdelay(1);
-
- outb(COR_VALUE, addr);
- mdelay(1);
-
- /* Just in case, wait more until the card is no longer busy */
- timeout = jiffies + (TMD_RESET_TIME * HZ / 1000);
- reg = hermes_read_regn(hw, CMD);
- while (time_before(jiffies, timeout) && (reg & HERMES_CMD_BUSY)) {
- mdelay(1);
- reg = hermes_read_regn(hw, CMD);
- }
-
- /* Did we timeout ? */
- if (reg & HERMES_CMD_BUSY) {
- printk(KERN_ERR PFX "Busy timeout\n");
- return -ETIMEDOUT;
- }
-
- return 0;
-}
-
-
-static int orinoco_tmd_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent)
-{
- int err = 0;
- struct orinoco_private *priv = NULL;
- struct orinoco_tmd_card *card;
- struct net_device *dev = NULL;
- void __iomem *mem;
-
- err = pci_enable_device(pdev);
- if (err) {
- printk(KERN_ERR PFX "Cannot enable PCI device\n");
- return err;
- }
-
- err = pci_request_regions(pdev, DRIVER_NAME);
- if (err != 0) {
- printk(KERN_ERR PFX "Cannot obtain PCI resources\n");
- goto fail_resources;
- }
-
- mem = pci_iomap(pdev, 2, 0);
- if (! mem) {
- err = -ENOMEM;
- goto fail_iomap;
- }
-
- /* Allocate network device */
- dev = alloc_orinocodev(sizeof(*card), orinoco_tmd_cor_reset);
- if (! dev) {
- printk(KERN_ERR PFX "Cannot allocate network device\n");
- err = -ENOMEM;
- goto fail_alloc;
- }
-
- priv = netdev_priv(dev);
- card = priv->card;
- card->tmd_io = pci_resource_start(pdev, 1);
- dev->base_addr = pci_resource_start(pdev, 2);
- SET_MODULE_OWNER(dev);
- SET_NETDEV_DEV(dev, &pdev->dev);
-
- hermes_struct_init(&priv->hw, mem, HERMES_16BIT_REGSPACING);
-
- printk(KERN_DEBUG PFX "Detected Orinoco/Prism2 TMD device "
- "at %s irq:%d, io addr:0x%lx\n", pci_name(pdev), pdev->irq,
- dev->base_addr);
-
- err = request_irq(pdev->irq, orinoco_interrupt, SA_SHIRQ,
- dev->name, dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot allocate IRQ %d\n", pdev->irq);
- err = -EBUSY;
- goto fail_irq;
- }
- dev->irq = pdev->irq;
-
- err = orinoco_tmd_cor_reset(priv);
- if (err) {
- printk(KERN_ERR PFX "Initial reset failed\n");
- goto fail;
- }
-
- err = register_netdev(dev);
- if (err) {
- printk(KERN_ERR PFX "Cannot register network device\n");
- goto fail;
- }
-
- pci_set_drvdata(pdev, dev);
-
- return 0;
-
- fail:
- free_irq(pdev->irq, dev);
-
- fail_irq:
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
-
- fail_alloc:
- pci_iounmap(pdev, mem);
-
- fail_iomap:
- pci_release_regions(pdev);
-
- fail_resources:
- pci_disable_device(pdev);
-
- return err;
-}
-
-static void __devexit orinoco_tmd_remove_one(struct pci_dev *pdev)
-{
- struct net_device *dev = pci_get_drvdata(pdev);
- struct orinoco_private *priv = dev->priv;
-
- BUG_ON(! dev);
-
- unregister_netdev(dev);
- free_irq(dev->irq, dev);
- pci_set_drvdata(pdev, NULL);
- free_orinocodev(dev);
- pci_iounmap(pdev, priv->hw.iobase);
- pci_release_regions(pdev);
- pci_disable_device(pdev);
-}
-
-
-static struct pci_device_id orinoco_tmd_pci_id_table[] = {
- {0x15e8, 0x0131, PCI_ANY_ID, PCI_ANY_ID,}, /* NDC and OEMs, e.g. pheecom */
- {0,},
-};
-
-MODULE_DEVICE_TABLE(pci, orinoco_tmd_pci_id_table);
-
-static struct pci_driver orinoco_tmd_driver = {
- .name = DRIVER_NAME,
- .id_table = orinoco_tmd_pci_id_table,
- .probe = orinoco_tmd_init_one,
- .remove = __devexit_p(orinoco_tmd_remove_one),
-};
-
-static char version[] __initdata = DRIVER_NAME " " DRIVER_VERSION
- " (Joerg Dorchain <joerg@dorchain.net>)";
-MODULE_AUTHOR("Joerg Dorchain <joerg@dorchain.net>");
-MODULE_DESCRIPTION("Driver for wireless LAN cards using the TMD7160 PCI bridge");
-MODULE_LICENSE("Dual MPL/GPL");
-
-static int __init orinoco_tmd_init(void)
-{
- printk(KERN_DEBUG "%s\n", version);
- return pci_module_init(&orinoco_tmd_driver);
-}
-
-static void __exit orinoco_tmd_exit(void)
-{
- pci_unregister_driver(&orinoco_tmd_driver);
- ssleep(1);
-}
-
-module_init(orinoco_tmd_init);
-module_exit(orinoco_tmd_exit);
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * tab-width: 8
- * End:
- */
^ permalink raw reply
* Re: netif_tx_disable vs netif_stop_queue (possible races?)
From: Evgeniy Polyakov @ 2006-06-10 17:15 UTC (permalink / raw)
To: Daniel Drake; +Cc: Herbert Xu, netdev, david-b
In-Reply-To: <448AF607.8000603@gentoo.org>
On Sat, Jun 10, 2006 at 05:40:39PM +0100, Daniel Drake (dsd@gentoo.org) wrote:
> Evgeniy Polyakov wrote:
> >On Sat, Jun 10, 2006 at 01:42:21PM +0100, Daniel Drake (dsd@gentoo.org)
> >wrote:
> >>Herbert Xu wrote:
> >>>Correct. All callers of hard_start_xmit do so under RCU or equivalent
> >>>locks so they must be complete by the time synchronize_net() returns.
> >>Does this hold for other operations? Such as:
> >>
> >>- The netdev->set_mac_address function
> >>- The wireless ioctl's (SIOCSIWESSID, etc)
> >>
> >>Are these also guaranteed to have returned after synchronize_net()?
> >
> >None of above calls is protected with RCU (except set_mac_address()
> >called through ioctl, which is performed under read_lock which disables
> >preemtption), so they still can run after synchronize_net().
> >
> >But if you are talking about synchronize_net() inside
> >unregister_netdevice(), which is called from
> >usbnet_disconnect()->unregister_netdev(), than it is safe.
>
> Are you referring to set_mac_address in the above statement, or both
> set_mac_address *and* the wireless ioctls?
oth calls have the same nature actually, and both calls are not
protected by RCU.
> I'm basically just looking to clarify that after unregister_netdev has
> completed, none of the following can be still in progress on any CPU,
> and none of the following can be triggered again:
>
> 1. hard_start_xmit handler
> 2. set_mac_address handler
> 3. WX ioctls
>
> It's logical that this is the case, but the code doesn't make that very
> clear (and would certainly result in many potential ZD1211 races if this
> was not the case).
set_mac_address() and wireless ioctls are protected by rtnl.
unregister_netdevice() is called under rtnl protection too.
But hard_start_xmit() is not protected (and can not be protected in all
situations) by sleeping semaphore (like rtnl),
so instead it runs under RCU, which is synchronized in synchronize_net()
inside unregister_netdevice().
> Daniel
--
Evgeniy Polyakov
^ permalink raw reply
* Re: [PATCH] eth1394: endian fixes
From: Stefan Richter @ 2006-06-10 16:46 UTC (permalink / raw)
To: Alexey Dobriyan; +Cc: netdev, linux1394-devel
In-Reply-To: <20060527161249.GA7276@martell.zuzino.mipt.ru>
Alexey Dobriyan wrote on 2006-05-27:
> On Sat, May 27, 2006 at 12:05:40PM +0200, Stefan Richter wrote:
>> Did you have the chance to test your patch on different
>> platforms and with different peer OSs/platforms?
>
> Unfortunately not.
The patch works OK on an x86/Linux host with x86/WinXP peer and
ppc32/OSX peer. Thanks,
--
Stefan Richter
-=====-=-==- -==- -=-=-
http://arcgraph.de/sr/
^ permalink raw reply
* Re: netif_tx_disable vs netif_stop_queue (possible races?)
From: Daniel Drake @ 2006-06-10 16:40 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: Herbert Xu, netdev, david-b
In-Reply-To: <20060610125940.GA2983@2ka.mipt.ru>
Evgeniy Polyakov wrote:
> On Sat, Jun 10, 2006 at 01:42:21PM +0100, Daniel Drake (dsd@gentoo.org) wrote:
>> Herbert Xu wrote:
>>> Correct. All callers of hard_start_xmit do so under RCU or equivalent
>>> locks so they must be complete by the time synchronize_net() returns.
>> Does this hold for other operations? Such as:
>>
>> - The netdev->set_mac_address function
>> - The wireless ioctl's (SIOCSIWESSID, etc)
>>
>> Are these also guaranteed to have returned after synchronize_net()?
>
> None of above calls is protected with RCU (except set_mac_address()
> called through ioctl, which is performed under read_lock which disables
> preemtption), so they still can run after synchronize_net().
>
> But if you are talking about synchronize_net() inside
> unregister_netdevice(), which is called from
> usbnet_disconnect()->unregister_netdev(), than it is safe.
Are you referring to set_mac_address in the above statement, or both
set_mac_address *and* the wireless ioctls?
I'm basically just looking to clarify that after unregister_netdev has
completed, none of the following can be still in progress on any CPU,
and none of the following can be triggered again:
1. hard_start_xmit handler
2. set_mac_address handler
3. WX ioctls
It's logical that this is the case, but the code doesn't make that very
clear (and would certainly result in many potential ZD1211 races if this
was not the case).
Daniel
^ permalink raw reply
* LIBIPQ: problem with Injecting encapsulated packet (plz somebody ) reply)]
From: Vasantha Kumar Puttappa @ 2006-06-10 16:03 UTC (permalink / raw)
To: netdev
Hi,
I am posting this query again. plz somebody reply. Also I am new to
IPtables and LIBIPQ
I am working on a application that involves encapsulatting the packets .
Suppose there are 3 machines A B C. Assume that machine A is sending some
some information to machine B. All I do is to capture packets(using
libipq) destined for machine B on machine A and send it to machine C . I
encapuslate this captured packet in a new packet with(adding both IP/UDP
header, although UDP header is not really required, with destinatin
address as machine C IP).
The issue is that after the call to set_verdict function, instead of the
encapsulated packet, original packet is getting transmitted. I tried my
best to find the solution with no success. I am updating the checksum
correctly after adding new header.
Below is snippet of my code
**************
unsigned char *new_packet = NULL;
struct iphdr *new_iphdr;
struct iphdr *original_iphdr = (struct iphdr *)(m->payload);
int status;
new_packet = (unsigned char *) calloc(1,sizeof(struct iphdr) +
(m->data_len) + sizeof(struct udphdr));
new_iphdr = (struct iphdr *) calloc(1,sizeof(struct iphdr));
/* extra Udp header */
struct udphdr *new_udp;
new_udp = (struct udphdr *) calloc(1,sizeof(struct udphdr));
new_udp->source = htons(50000);
new_udp->dest = htons(50000);
new_udp->len = original_iphdr->tot_len;
new_udp->check = 0;
/* udp*/
/** New IP header **/
new_iphdr->version = original_iphdr->version;
new_iphdr->ihl = original_iphdr->ihl;
new_iphdr->tos = original_iphdr->tos;
new_iphdr->id = original_iphdr->id;;
new_iphdr->frag_off = original_iphdr->frag_off;
new_iphdr->ttl = original_iphdr->ttl;
new_iphdr->protocol = original_iphdr->protocol;
new_iphdr->saddr= inet_addr("10.107.26.27");//original_iphdr->saddr;
new_iphdr->daddr=inet_addr("10.12.25.7");//daddr.s_addr;
new_iphdr->tot_len=htons(ntohs(original_iphdr->tot_len)+
(sizeof(struct iphdr))+ sizeof(struct udphdr));
new_iphdr->check=0;
new_iphdr->check=(((ip_sum_calc((unsigned short
*)new_iphdr,sizeof(struct iphdr)))));
// Place the IP packet inside another IP packet
memcpy(new_packet,new_iphdr,(unsigned int)sizeof(struct iphdr));
memcpy(new_packet+sizeof(struct iphdr),new_udp,(unsigned
int)sizeof(struct udphdr));
memcpy(new_packet+sizeof(struct iphdr)+sizeof(struct
udphdr),m->payload,m->data_len);
size_t length = ntohs(new_iphdr->tot_len);;
status =
ipq_set_verdict(handle,m->packet_id,NF_ACCEPT,length,(unsigned char
*) new_packet);
if(status < 0)
{
printf("\n Packet Modification failed \n");
die();
}
printf("\n Packet Transmitted Successfull \n");
*********checksum function**********
unsigned short ip_sum_calc(unsigned short *addr,int len)
{
int nleft = len;
int sum = 0;
unsigned short *w = addr;
unsigned short answer = 0;
printf(" \nsize %d", sizeof(sum));
while (nleft > 1)
{
sum += *w++;
nleft -= 2;
}
if (nleft == 1)
{
*(unsigned char *)(&answer) = *(unsigned char *) w;
sum += answer;
}
sum = (sum >> 16) + (sum & 0xffff);
sum += (sum >> 16);
answer = ~sum;
return answer;
}
^ 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