aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/00-INDEX2
-rw-r--r--Documentation/networking/net-modules.txt315
-rw-r--r--drivers/net/bonding/bond_main.c5
-rw-r--r--drivers/net/bonding/bonding.h1
-rw-r--r--drivers/net/cpmac.c145
-rw-r--r--drivers/net/ehea/ehea.h2
-rw-r--r--drivers/net/ehea/ehea_main.c7
-rw-r--r--drivers/net/forcedeth.c16
-rw-r--r--drivers/net/ipg.c22
-rw-r--r--drivers/net/ipg.h20
-rw-r--r--drivers/net/natsemi.c1
-rw-r--r--drivers/net/usb/rndis_host.c18
-rw-r--r--include/linux/pci_ids.h4
13 files changed, 149 insertions, 409 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index 153d84d281e6..f5a5e6d3d541 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -80,8 +80,6 @@ multicast.txt
80 - Behaviour of cards under Multicast 80 - Behaviour of cards under Multicast
81ncsa-telnet 81ncsa-telnet
82 - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled. 82 - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled.
83net-modules.txt
84 - info and "insmod" parameters for all network driver modules.
85netdevices.txt 83netdevices.txt
86 - info on network device driver functions exported to the kernel. 84 - info on network device driver functions exported to the kernel.
87olympic.txt 85olympic.txt
diff --git a/Documentation/networking/net-modules.txt b/Documentation/networking/net-modules.txt
deleted file mode 100644
index 98c4392dd0fd..000000000000
--- a/Documentation/networking/net-modules.txt
+++ /dev/null
@@ -1,315 +0,0 @@
1Wed 2-Aug-95 <matti.aarnio@utu.fi>
2
3 Linux network driver modules
4
5 Do not mistake this for "README.modules" at the top-level
6 directory! That document tells about modules in general, while
7 this one tells only about network device driver modules.
8
9 This is a potpourri of INSMOD-time(*) configuration options
10 (if such exists) and their default values of various modules
11 in the Linux network drivers collection.
12
13 Some modules have also hidden (= non-documented) tunable values.
14 The choice of not documenting them is based on general belief, that
15 the less the user needs to know, the better. (There are things that
16 driver developers can use, others should not confuse themselves.)
17
18 In many cases it is highly preferred that insmod:ing is done
19 ONLY with defining an explicit address for the card, AND BY
20 NOT USING AUTO-PROBING!
21
22 Now most cards have some explicitly defined base address that they
23 are compiled with (to avoid auto-probing, among other things).
24 If that compiled value does not match your actual configuration,
25 do use the "io=0xXXX" -parameter for the insmod, and give there
26 a value matching your environment.
27
28 If you are adventurous, you can ask the driver to autoprobe
29 by using the "io=0" parameter, however it is a potentially dangerous
30 thing to do in a live system. (If you don't know where the
31 card is located, you can try autoprobing, and after possible
32 crash recovery, insmod with proper IO-address..)
33
34 --------------------------
35 (*) "INSMOD-time" means when you load module with
36 /sbin/insmod you can feed it optional parameters.
37 See "man insmod".
38 --------------------------
39
40
41 8390 based Network Modules (Paul Gortmaker, Nov 12, 1995)
42 --------------------------
43
44(Includes: smc-ultra, ne, wd, 3c503, hp, hp-plus, e2100 and ac3200)
45
46The 8390 series of network drivers now support multiple card systems without
47reloading the same module multiple times (memory efficient!) This is done by
48specifying multiple comma separated values, such as:
49
50 insmod 3c503.o io=0x280,0x300,0x330,0x350 xcvr=0,1,0,1
51
52The above would have the one module controlling four 3c503 cards, with card 2
53and 4 using external transceivers. The "insmod" manual describes the usage
54of comma separated value lists.
55
56It is *STRONGLY RECOMMENDED* that you supply "io=" instead of autoprobing.
57If an "io=" argument is not supplied, then the ISA drivers will complain
58about autoprobing being not recommended, and begrudgingly autoprobe for
59a *SINGLE CARD ONLY* -- if you want to use multiple cards you *have* to
60supply an "io=0xNNN,0xQQQ,..." argument.
61
62The ne module is an exception to the above. A NE2000 is essentially an
638390 chip, some bus glue and some RAM. Because of this, the ne probe is
64more invasive than the rest, and so at boot we make sure the ne probe is
65done last of all the 8390 cards (so that it won't trip over other 8390 based
66cards) With modules we can't ensure that all other non-ne 8390 cards have
67already been found. Because of this, the ne module REQUIRES an "io=0xNNN"
68argument passed in via insmod. It will refuse to autoprobe.
69
70It is also worth noting that auto-IRQ probably isn't as reliable during
71the flurry of interrupt activity on a running machine. Cards such as the
72ne2000 that can't get the IRQ setting from an EEPROM or configuration
73register are probably best supplied with an "irq=M" argument as well.
74
75
76----------------------------------------------------------------------
77Card/Module List - Configurable Parameters and Default Values
78----------------------------------------------------------------------
79
803c501.c:
81 io = 0x280 IO base address
82 irq = 5 IRQ
83 (Probes ports: 0x280, 0x300)
84
853c503.c:
86 io = 0 (It will complain if you don't supply an "io=0xNNN")
87 irq = 0 (IRQ software selected by driver using autoIRQ)
88 xcvr = 0 (Use xcvr=1 to select external transceiver.)
89 (Probes ports: 0x300, 0x310, 0x330, 0x350, 0x250, 0x280, 0x2A0, 0x2E0)
90
913c505.c:
92 io = 0
93 irq = 0
94 dma = 6 (not autoprobed)
95 (Probes ports: 0x300, 0x280, 0x310)
96
973c507.c:
98 io = 0x300
99 irq = 0
100 (Probes ports: 0x300, 0x320, 0x340, 0x280)
101
1023c509.c:
103 io = 0
104 irq = 0
105 ( Module load-time probing Works reliably only on EISA, ISA ID-PROBE
106 IS NOT RELIABLE! Compile this driver statically into kernel for
107 now, if you need it auto-probing on an ISA-bus machine. )
108
1098390.c:
110 (No public options, several other modules need this one)
111
112a2065.c:
113 Since this is a Zorro board, it supports full autoprobing, even for
114 multiple boards. (m68k/Amiga)
115
116ac3200.c:
117 io = 0 (Checks 0x1000 to 0x8fff in 0x1000 intervals)
118 irq = 0 (Read from config register)
119 (EISA probing..)
120
121apricot.c:
122 io = 0x300 (Can't be altered!)
123 irq = 10
124
125arcnet.c:
126 io = 0
127 irqnum = 0
128 shmem = 0
129 num = 0
130 DO SET THESE MANUALLY AT INSMOD!
131 (When probing, looks at the following possible addresses:
132 Suggested ones:
133 0x300, 0x2E0, 0x2F0, 0x2D0
134 Other ones:
135 0x200, 0x210, 0x220, 0x230, 0x240, 0x250, 0x260, 0x270,
136 0x280, 0x290, 0x2A0, 0x2B0, 0x2C0,
137 0x310, 0x320, 0x330, 0x340, 0x350, 0x360, 0x370,
138 0x380, 0x390, 0x3A0, 0x3E0, 0x3F0 )
139
140ariadne.c:
141 Since this is a Zorro board, it supports full autoprobing, even for
142 multiple boards. (m68k/Amiga)
143
144at1700.c:
145 io = 0x260
146 irq = 0
147 (Probes ports: 0x260, 0x280, 0x2A0, 0x240, 0x340, 0x320, 0x380, 0x300)
148
149atarilance.c:
150 Supports full autoprobing. (m68k/Atari)
151
152atp.c: *Not modularized*
153 (Probes ports: 0x378, 0x278, 0x3BC;
154 fixed IRQs: 5 and 7 )
155
156cops.c:
157 io = 0x240
158 irq = 5
159 nodeid = 0 (AutoSelect = 0, NodeID 1-254 is hand selected.)
160 (Probes ports: 0x240, 0x340, 0x200, 0x210, 0x220, 0x230, 0x260,
161 0x2A0, 0x300, 0x310, 0x320, 0x330, 0x350, 0x360)
162
163de4x5.c:
164 io = 0x000b
165 irq = 10
166 is_not_dec = 0 -- For non-DEC card using DEC 21040/21041/21140 chip, set this to 1
167 (EISA, and PCI probing)
168
169de600.c:
170 de600_debug = 0
171 (On port 0x378, irq 7 -- lpt1; compile time configurable)
172
173de620.c:
174 bnc = 0, utp = 0 <-- Force media by setting either.
175 io = 0x378 (also compile-time configurable)
176 irq = 7
177
178depca.c:
179 io = 0x200
180 irq = 7
181 (Probes ports: ISA: 0x300, 0x200;
182 EISA: 0x0c00 )
183
184dummy.c:
185 No options
186
187e2100.c:
188 io = 0 (It will complain if you don't supply an "io=0xNNN")
189 irq = 0 (IRQ software selected by driver)
190 mem = 0 (Override default shared memory start of 0xd0000)
191 xcvr = 0 (Use xcvr=1 to select external transceiver.)
192 (Probes ports: 0x300, 0x280, 0x380, 0x220)
193
194eepro.c:
195 io = 0x200
196 irq = 0
197 (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340, 0x360)
198
199eexpress.c:
200 io = 0x300
201 irq = 0 (IRQ value read from EEPROM)
202 (Probes ports: 0x300, 0x270, 0x320, 0x340)
203
204eql.c:
205 (No parameters)
206
207ewrk3.c:
208 io = 0x300
209 irq = 5
210 (With module no autoprobing!
211 On EISA-bus does EISA probing.
212 Static linkage probes ports on ISA bus:
213 0x100, 0x120, 0x140, 0x160, 0x180, 0x1A0, 0x1C0,
214 0x200, 0x220, 0x240, 0x260, 0x280, 0x2A0, 0x2C0, 0x2E0,
215 0x300, 0x340, 0x360, 0x380, 0x3A0, 0x3C0)
216
217hp-plus.c:
218 io = 0 (It will complain if you don't supply an "io=0xNNN")
219 irq = 0 (IRQ read from configuration register)
220 (Probes ports: 0x200, 0x240, 0x280, 0x2C0, 0x300, 0x320, 0x340)
221
222hp.c:
223 io = 0 (It will complain if you don't supply an "io=0xNNN")
224 irq = 0 (IRQ software selected by driver using autoIRQ)
225 (Probes ports: 0x300, 0x320, 0x340, 0x280, 0x2C0, 0x200, 0x240)
226
227hp100.c:
228 hp100_port = 0 (IO-base address)
229 (Does EISA-probing, if on EISA-slot;
230 On ISA-bus probes all ports from 0x100 thru to 0x3E0
231 in increments of 0x020)
232
233hydra.c:
234 Since this is a Zorro board, it supports full autoprobing, even for
235 multiple boards. (m68k/Amiga)
236
237ibmtr.c:
238 io = 0xa20, 0xa24 (autoprobed by default)
239 irq = 0 (driver cannot select irq - read from hardware)
240 mem = 0 (shared memory base set at 0xd0000 and not yet
241 able to override thru mem= parameter.)
242
243lance.c: *Not modularized*
244 (PCI, and ISA probing; "CONFIG_PCI" needed for PCI support)
245 (Probes ISA ports: 0x300, 0x320, 0x340, 0x360)
246
247loopback.c: *Static kernel component*
248
249ne.c:
250 io = 0 (Explicitly *requires* an "io=0xNNN" value)
251 irq = 0 (Tries to determine configured IRQ via autoIRQ)
252 (Probes ports: 0x300, 0x280, 0x320, 0x340, 0x360)
253
254net_init.c: *Static kernel component*
255
256ni52.c: *Not modularized*
257 (Probes ports: 0x300, 0x280, 0x360, 0x320, 0x340
258 mems: 0xD0000, 0xD2000, 0xC8000, 0xCA000,
259 0xD4000, 0xD6000, 0xD8000 )
260
261ni65.c: *Not modularized* **16MB MEMORY BARRIER BUG**
262 (Probes ports: 0x300, 0x320, 0x340, 0x360)
263
264pi2.c: *Not modularized* (well, NON-STANDARD modularization!)
265 Only one card supported at this time.
266 (Probes ports: 0x380, 0x300, 0x320, 0x340, 0x360, 0x3A0)
267
268plip.c:
269 io = 0
270 irq = 0 (by default, uses IRQ 5 for port at 0x3bc, IRQ 7
271 for port at 0x378, and IRQ 2 for port at 0x278)
272 (Probes ports: 0x278, 0x378, 0x3bc)
273
274ppp.c:
275 No options (ppp-2.2+ has some, this is based on non-dynamic
276 version from ppp-2.1.2d)
277
278seeq8005.c: *Not modularized*
279 (Probes ports: 0x300, 0x320, 0x340, 0x360)
280
281skeleton.c: *Skeleton*
282
283slhc.c:
284 No configuration parameters
285
286slip.c:
287 slip_maxdev = 256 (default value from SL_NRUNIT on slip.h)
288
289
290smc-ultra.c:
291 io = 0 (It will complain if you don't supply an "io=0xNNN")
292 irq = 0 (IRQ val. read from EEPROM)
293 (Probes ports: 0x200, 0x220, 0x240, 0x280, 0x300, 0x340, 0x380)
294
295tulip.c: *Partial modularization*
296 (init-time memory allocation makes problems..)
297
298tunnel.c:
299 No insmod parameters
300
301wavelan.c:
302 io = 0x390 (Settable, but change not recommended)
303 irq = 0 (Not honoured, if changed..)
304
305wd.c:
306 io = 0 (It will complain if you don't supply an "io=0xNNN")
307 irq = 0 (IRQ val. read from EEPROM, ancient cards use autoIRQ)
308 mem = 0 (Force shared-memory on address 0xC8000, or whatever..)
309 mem_end = 0 (Force non-std. mem. size via supplying mem_end val.)
310 (eg. for 32k WD8003EBT, use mem=0xd0000 mem_end=0xd8000)
311 (Probes ports: 0x300, 0x280, 0x380, 0x240)
312
313znet.c: *Not modularized*
314 (Only one device on Zenith Z-Note (notebook?) systems,
315 configuration information from (EE)PROM)
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index 6909becb10f6..6937ef0e7275 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -188,6 +188,7 @@ struct bond_parm_tbl arp_validate_tbl[] = {
188/*-------------------------- Forward declarations ---------------------------*/ 188/*-------------------------- Forward declarations ---------------------------*/
189 189
190static void bond_send_gratuitous_arp(struct bonding *bond); 190static void bond_send_gratuitous_arp(struct bonding *bond);
191static void bond_deinit(struct net_device *bond_dev);
191 192
192/*---------------------------- General routines -----------------------------*/ 193/*---------------------------- General routines -----------------------------*/
193 194
@@ -3681,7 +3682,7 @@ static int bond_open(struct net_device *bond_dev)
3681 } 3682 }
3682 3683
3683 if (bond->params.mode == BOND_MODE_8023AD) { 3684 if (bond->params.mode == BOND_MODE_8023AD) {
3684 INIT_DELAYED_WORK(&bond->ad_work, bond_alb_monitor); 3685 INIT_DELAYED_WORK(&bond->ad_work, bond_3ad_state_machine_handler);
3685 queue_delayed_work(bond->wq, &bond->ad_work, 0); 3686 queue_delayed_work(bond->wq, &bond->ad_work, 0);
3686 /* register to receive LACPDUs */ 3687 /* register to receive LACPDUs */
3687 bond_register_lacpdu(bond); 3688 bond_register_lacpdu(bond);
@@ -4449,7 +4450,7 @@ static int bond_init(struct net_device *bond_dev, struct bond_params *params)
4449/* De-initialize device specific data. 4450/* De-initialize device specific data.
4450 * Caller must hold rtnl_lock. 4451 * Caller must hold rtnl_lock.
4451 */ 4452 */
4452void bond_deinit(struct net_device *bond_dev) 4453static void bond_deinit(struct net_device *bond_dev)
4453{ 4454{
4454 struct bonding *bond = bond_dev->priv; 4455 struct bonding *bond = bond_dev->priv;
4455 4456
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h
index d1ed14bf1ccb..61c1b4536d34 100644
--- a/drivers/net/bonding/bonding.h
+++ b/drivers/net/bonding/bonding.h
@@ -302,7 +302,6 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_de
302int bond_create(char *name, struct bond_params *params, struct bonding **newbond); 302int bond_create(char *name, struct bond_params *params, struct bonding **newbond);
303void bond_destroy(struct bonding *bond); 303void bond_destroy(struct bonding *bond);
304int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev); 304int bond_release_and_destroy(struct net_device *bond_dev, struct net_device *slave_dev);
305void bond_deinit(struct net_device *bond_dev);
306int bond_create_sysfs(void); 305int bond_create_sysfs(void);
307void bond_destroy_sysfs(void); 306void bond_destroy_sysfs(void);
308void bond_destroy_sysfs_entry(struct bonding *bond); 307void bond_destroy_sysfs_entry(struct bonding *bond);
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 57541d2d9e1e..6fd95a2c8cec 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -34,6 +34,7 @@
34#include <linux/skbuff.h> 34#include <linux/skbuff.h>
35#include <linux/mii.h> 35#include <linux/mii.h>
36#include <linux/phy.h> 36#include <linux/phy.h>
37#include <linux/phy_fixed.h>
37#include <linux/platform_device.h> 38#include <linux/platform_device.h>
38#include <linux/dma-mapping.h> 39#include <linux/dma-mapping.h>
39#include <asm/gpio.h> 40#include <asm/gpio.h>
@@ -53,12 +54,6 @@ MODULE_PARM_DESC(debug_level, "Number of NETIF_MSG bits to enable");
53MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus"); 54MODULE_PARM_DESC(dumb_switch, "Assume switch is not connected to MDIO bus");
54 55
55#define CPMAC_VERSION "0.5.0" 56#define CPMAC_VERSION "0.5.0"
56/* stolen from net/ieee80211.h */
57#ifndef MAC_FMT
58#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
59#define MAC_ARG(x) ((u8*)(x))[0], ((u8*)(x))[1], ((u8*)(x))[2], \
60 ((u8*)(x))[3], ((u8*)(x))[4], ((u8*)(x))[5]
61#endif
62/* frame size + 802.1q tag */ 57/* frame size + 802.1q tag */
63#define CPMAC_SKB_SIZE (ETH_FRAME_LEN + 4) 58#define CPMAC_SKB_SIZE (ETH_FRAME_LEN + 4)
64#define CPMAC_QUEUES 8 59#define CPMAC_QUEUES 8
@@ -211,6 +206,7 @@ struct cpmac_priv {
211 struct net_device *dev; 206 struct net_device *dev;
212 struct work_struct reset_work; 207 struct work_struct reset_work;
213 struct platform_device *pdev; 208 struct platform_device *pdev;
209 struct napi_struct napi;
214}; 210};
215 211
216static irqreturn_t cpmac_irq(int, void *); 212static irqreturn_t cpmac_irq(int, void *);
@@ -362,47 +358,48 @@ static void cpmac_set_multicast_list(struct net_device *dev)
362 } 358 }
363} 359}
364 360
365static struct sk_buff *cpmac_rx_one(struct net_device *dev, 361static struct sk_buff *cpmac_rx_one(struct cpmac_priv *priv,
366 struct cpmac_priv *priv,
367 struct cpmac_desc *desc) 362 struct cpmac_desc *desc)
368{ 363{
369 struct sk_buff *skb, *result = NULL; 364 struct sk_buff *skb, *result = NULL;
370 365
371 if (unlikely(netif_msg_hw(priv))) 366 if (unlikely(netif_msg_hw(priv)))
372 cpmac_dump_desc(dev, desc); 367 cpmac_dump_desc(priv->dev, desc);
373 cpmac_write(priv->regs, CPMAC_RX_ACK(0), (u32)desc->mapping); 368 cpmac_write(priv->regs, CPMAC_RX_ACK(0), (u32)desc->mapping);
374 if (unlikely(!desc->datalen)) { 369 if (unlikely(!desc->datalen)) {
375 if (netif_msg_rx_err(priv) && net_ratelimit()) 370 if (netif_msg_rx_err(priv) && net_ratelimit())
376 printk(KERN_WARNING "%s: rx: spurious interrupt\n", 371 printk(KERN_WARNING "%s: rx: spurious interrupt\n",
377 dev->name); 372 priv->dev->name);
378 return NULL; 373 return NULL;
379 } 374 }
380 375
381 skb = netdev_alloc_skb(dev, CPMAC_SKB_SIZE); 376 skb = netdev_alloc_skb(priv->dev, CPMAC_SKB_SIZE);
382 if (likely(skb)) { 377 if (likely(skb)) {
383 skb_reserve(skb, 2); 378 skb_reserve(skb, 2);
384 skb_put(desc->skb, desc->datalen); 379 skb_put(desc->skb, desc->datalen);
385 desc->skb->protocol = eth_type_trans(desc->skb, dev); 380 desc->skb->protocol = eth_type_trans(desc->skb, priv->dev);
386 desc->skb->ip_summed = CHECKSUM_NONE; 381 desc->skb->ip_summed = CHECKSUM_NONE;
387 dev->stats.rx_packets++; 382 priv->dev->stats.rx_packets++;
388 dev->stats.rx_bytes += desc->datalen; 383 priv->dev->stats.rx_bytes += desc->datalen;
389 result = desc->skb; 384 result = desc->skb;
390 dma_unmap_single(&dev->dev, desc->data_mapping, CPMAC_SKB_SIZE, 385 dma_unmap_single(&priv->dev->dev, desc->data_mapping,
391 DMA_FROM_DEVICE); 386 CPMAC_SKB_SIZE, DMA_FROM_DEVICE);
392 desc->skb = skb; 387 desc->skb = skb;
393 desc->data_mapping = dma_map_single(&dev->dev, skb->data, 388 desc->data_mapping = dma_map_single(&priv->dev->dev, skb->data,
394 CPMAC_SKB_SIZE, 389 CPMAC_SKB_SIZE,
395 DMA_FROM_DEVICE); 390 DMA_FROM_DEVICE);
396 desc->hw_data = (u32)desc->data_mapping; 391 desc->hw_data = (u32)desc->data_mapping;
397 if (unlikely(netif_msg_pktdata(priv))) { 392 if (unlikely(netif_msg_pktdata(priv))) {
398 printk(KERN_DEBUG "%s: received packet:\n", dev->name); 393 printk(KERN_DEBUG "%s: received packet:\n",
399 cpmac_dump_skb(dev, result); 394 priv->dev->name);
395 cpmac_dump_skb(priv->dev, result);
400 } 396 }
401 } else { 397 } else {
402 if (netif_msg_rx_err(priv) && net_ratelimit()) 398 if (netif_msg_rx_err(priv) && net_ratelimit())
403 printk(KERN_WARNING 399 printk(KERN_WARNING
404 "%s: low on skbs, dropping packet\n", dev->name); 400 "%s: low on skbs, dropping packet\n",
405 dev->stats.rx_dropped++; 401 priv->dev->name);
402 priv->dev->stats.rx_dropped++;
406 } 403 }
407 404
408 desc->buflen = CPMAC_SKB_SIZE; 405 desc->buflen = CPMAC_SKB_SIZE;
@@ -411,25 +408,25 @@ static struct sk_buff *cpmac_rx_one(struct net_device *dev,
411 return result; 408 return result;
412} 409}
413 410
414static int cpmac_poll(struct net_device *dev, int *budget) 411static int cpmac_poll(struct napi_struct *napi, int budget)
415{ 412{
416 struct sk_buff *skb; 413 struct sk_buff *skb;
417 struct cpmac_desc *desc; 414 struct cpmac_desc *desc;
418 int received = 0, quota = min(dev->quota, *budget); 415 int received = 0;
419 struct cpmac_priv *priv = netdev_priv(dev); 416 struct cpmac_priv *priv = container_of(napi, struct cpmac_priv, napi);
420 417
421 spin_lock(&priv->rx_lock); 418 spin_lock(&priv->rx_lock);
422 if (unlikely(!priv->rx_head)) { 419 if (unlikely(!priv->rx_head)) {
423 if (netif_msg_rx_err(priv) && net_ratelimit()) 420 if (netif_msg_rx_err(priv) && net_ratelimit())
424 printk(KERN_WARNING "%s: rx: polling, but no queue\n", 421 printk(KERN_WARNING "%s: rx: polling, but no queue\n",
425 dev->name); 422 priv->dev->name);
426 netif_rx_complete(dev); 423 netif_rx_complete(priv->dev, napi);
427 return 0; 424 return 0;
428 } 425 }
429 426
430 desc = priv->rx_head; 427 desc = priv->rx_head;
431 while ((received < quota) && ((desc->dataflags & CPMAC_OWN) == 0)) { 428 while (((desc->dataflags & CPMAC_OWN) == 0) && (received < budget)) {
432 skb = cpmac_rx_one(dev, priv, desc); 429 skb = cpmac_rx_one(priv, desc);
433 if (likely(skb)) { 430 if (likely(skb)) {
434 netif_receive_skb(skb); 431 netif_receive_skb(skb);
435 received++; 432 received++;
@@ -439,13 +436,11 @@ static int cpmac_poll(struct net_device *dev, int *budget)
439 436
440 priv->rx_head = desc; 437 priv->rx_head = desc;
441 spin_unlock(&priv->rx_lock); 438 spin_unlock(&priv->rx_lock);
442 *budget -= received;
443 dev->quota -= received;
444 if (unlikely(netif_msg_rx_status(priv))) 439 if (unlikely(netif_msg_rx_status(priv)))
445 printk(KERN_DEBUG "%s: poll processed %d packets\n", dev->name, 440 printk(KERN_DEBUG "%s: poll processed %d packets\n",
446 received); 441 priv->dev->name, received);
447 if (desc->dataflags & CPMAC_OWN) { 442 if (desc->dataflags & CPMAC_OWN) {
448 netif_rx_complete(dev); 443 netif_rx_complete(priv->dev, napi);
449 cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping); 444 cpmac_write(priv->regs, CPMAC_RX_PTR(0), (u32)desc->mapping);
450 cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1); 445 cpmac_write(priv->regs, CPMAC_RX_INT_ENABLE, 1);
451 return 0; 446 return 0;
@@ -655,6 +650,7 @@ static void cpmac_hw_error(struct work_struct *work)
655 spin_unlock(&priv->rx_lock); 650 spin_unlock(&priv->rx_lock);
656 cpmac_clear_tx(priv->dev); 651 cpmac_clear_tx(priv->dev);
657 cpmac_hw_start(priv->dev); 652 cpmac_hw_start(priv->dev);
653 napi_enable(&priv->napi);
658 netif_start_queue(priv->dev); 654 netif_start_queue(priv->dev);
659} 655}
660 656
@@ -681,8 +677,10 @@ static irqreturn_t cpmac_irq(int irq, void *dev_id)
681 677
682 if (status & MAC_INT_RX) { 678 if (status & MAC_INT_RX) {
683 queue = (status >> 8) & 7; 679 queue = (status >> 8) & 7;
684 netif_rx_schedule(dev); 680 if (netif_rx_schedule_prep(dev, &priv->napi)) {
685 cpmac_write(priv->regs, CPMAC_RX_INT_CLEAR, 1 << queue); 681 cpmac_write(priv->regs, CPMAC_RX_INT_CLEAR, 1 << queue);
682 __netif_rx_schedule(dev, &priv->napi);
683 }
686 } 684 }
687 685
688 cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0); 686 cpmac_write(priv->regs, CPMAC_MAC_EOI_VECTOR, 0);
@@ -692,6 +690,7 @@ static irqreturn_t cpmac_irq(int irq, void *dev_id)
692 printk(KERN_ERR "%s: hw error, resetting...\n", 690 printk(KERN_ERR "%s: hw error, resetting...\n",
693 dev->name); 691 dev->name);
694 netif_stop_queue(dev); 692 netif_stop_queue(dev);
693 napi_disable(&priv->napi);
695 cpmac_hw_stop(dev); 694 cpmac_hw_stop(dev);
696 schedule_work(&priv->reset_work); 695 schedule_work(&priv->reset_work);
697 if (unlikely(netif_msg_hw(priv))) 696 if (unlikely(netif_msg_hw(priv)))
@@ -849,6 +848,15 @@ static void cpmac_adjust_link(struct net_device *dev)
849 spin_unlock(&priv->lock); 848 spin_unlock(&priv->lock);
850} 849}
851 850
851static int cpmac_link_update(struct net_device *dev,
852 struct fixed_phy_status *status)
853{
854 status->link = 1;
855 status->speed = 100;
856 status->duplex = 1;
857 return 0;
858}
859
852static int cpmac_open(struct net_device *dev) 860static int cpmac_open(struct net_device *dev)
853{ 861{
854 int i, size, res; 862 int i, size, res;
@@ -857,15 +865,6 @@ static int cpmac_open(struct net_device *dev)
857 struct cpmac_desc *desc; 865 struct cpmac_desc *desc;
858 struct sk_buff *skb; 866 struct sk_buff *skb;
859 867
860 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link,
861 0, PHY_INTERFACE_MODE_MII);
862 if (IS_ERR(priv->phy)) {
863 if (netif_msg_drv(priv))
864 printk(KERN_ERR "%s: Could not attach to PHY\n",
865 dev->name);
866 return PTR_ERR(priv->phy);
867 }
868
869 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs"); 868 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs");
870 if (!request_mem_region(mem->start, mem->end - mem->start, dev->name)) { 869 if (!request_mem_region(mem->start, mem->end - mem->start, dev->name)) {
871 if (netif_msg_drv(priv)) 870 if (netif_msg_drv(priv))
@@ -927,6 +926,7 @@ static int cpmac_open(struct net_device *dev)
927 INIT_WORK(&priv->reset_work, cpmac_hw_error); 926 INIT_WORK(&priv->reset_work, cpmac_hw_error);
928 cpmac_hw_start(dev); 927 cpmac_hw_start(dev);
929 928
929 napi_enable(&priv->napi);
930 priv->phy->state = PHY_CHANGELINK; 930 priv->phy->state = PHY_CHANGELINK;
931 phy_start(priv->phy); 931 phy_start(priv->phy);
932 932
@@ -951,8 +951,6 @@ fail_remap:
951 release_mem_region(mem->start, mem->end - mem->start); 951 release_mem_region(mem->start, mem->end - mem->start);
952 952
953fail_reserve: 953fail_reserve:
954 phy_disconnect(priv->phy);
955
956 return res; 954 return res;
957} 955}
958 956
@@ -965,9 +963,8 @@ static int cpmac_stop(struct net_device *dev)
965 netif_stop_queue(dev); 963 netif_stop_queue(dev);
966 964
967 cancel_work_sync(&priv->reset_work); 965 cancel_work_sync(&priv->reset_work);
966 napi_disable(&priv->napi);
968 phy_stop(priv->phy); 967 phy_stop(priv->phy);
969 phy_disconnect(priv->phy);
970 priv->phy = NULL;
971 968
972 cpmac_hw_stop(dev); 969 cpmac_hw_stop(dev);
973 970
@@ -1001,11 +998,13 @@ static int external_switch;
1001 998
1002static int __devinit cpmac_probe(struct platform_device *pdev) 999static int __devinit cpmac_probe(struct platform_device *pdev)
1003{ 1000{
1004 int rc, phy_id; 1001 int rc, phy_id, i;
1005 struct resource *mem; 1002 struct resource *mem;
1006 struct cpmac_priv *priv; 1003 struct cpmac_priv *priv;
1007 struct net_device *dev; 1004 struct net_device *dev;
1008 struct plat_cpmac_data *pdata; 1005 struct plat_cpmac_data *pdata;
1006 struct fixed_info *fixed_phy;
1007 DECLARE_MAC_BUF(mac);
1009 1008
1010 pdata = pdev->dev.platform_data; 1009 pdata = pdev->dev.platform_data;
1011 1010
@@ -1053,21 +1052,51 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1053 dev->set_multicast_list = cpmac_set_multicast_list; 1052 dev->set_multicast_list = cpmac_set_multicast_list;
1054 dev->tx_timeout = cpmac_tx_timeout; 1053 dev->tx_timeout = cpmac_tx_timeout;
1055 dev->ethtool_ops = &cpmac_ethtool_ops; 1054 dev->ethtool_ops = &cpmac_ethtool_ops;
1056 dev->poll = cpmac_poll;
1057 dev->weight = 64;
1058 dev->features |= NETIF_F_MULTI_QUEUE; 1055 dev->features |= NETIF_F_MULTI_QUEUE;
1059 1056
1057 netif_napi_add(dev, &priv->napi, cpmac_poll, 64);
1058
1060 spin_lock_init(&priv->lock); 1059 spin_lock_init(&priv->lock);
1061 spin_lock_init(&priv->rx_lock); 1060 spin_lock_init(&priv->rx_lock);
1062 priv->dev = dev; 1061 priv->dev = dev;
1063 priv->ring_size = 64; 1062 priv->ring_size = 64;
1064 priv->msg_enable = netif_msg_init(debug_level, 0xff); 1063 priv->msg_enable = netif_msg_init(debug_level, 0xff);
1065 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr)); 1064 memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
1065
1066 if (phy_id == 31) { 1066 if (phy_id == 31) {
1067 snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, 1067 snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, cpmac_mii.id,
1068 cpmac_mii.id, phy_id); 1068 phy_id);
1069 } else 1069 } else {
1070 snprintf(priv->phy_name, BUS_ID_SIZE, "fixed@%d:%d", 100, 1); 1070 /* Let's try to get a free fixed phy... */
1071 for (i = 0; i < MAX_PHY_AMNT; i++) {
1072 fixed_phy = fixed_mdio_get_phydev(i);
1073 if (!fixed_phy)
1074 continue;
1075 if (!fixed_phy->phydev->attached_dev) {
1076 strncpy(priv->phy_name,
1077 fixed_phy->phydev->dev.bus_id,
1078 BUS_ID_SIZE);
1079 fixed_mdio_set_link_update(fixed_phy->phydev,
1080 &cpmac_link_update);
1081 goto phy_found;
1082 }
1083 }
1084 if (netif_msg_drv(priv))
1085 printk(KERN_ERR "%s: Could not find fixed PHY\n",
1086 dev->name);
1087 rc = -ENODEV;
1088 goto fail;
1089 }
1090
1091phy_found:
1092 priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
1093 PHY_INTERFACE_MODE_MII);
1094 if (IS_ERR(priv->phy)) {
1095 if (netif_msg_drv(priv))
1096 printk(KERN_ERR "%s: Could not attach to PHY\n",
1097 dev->name);
1098 return PTR_ERR(priv->phy);
1099 }
1071 1100
1072 if ((rc = register_netdev(dev))) { 1101 if ((rc = register_netdev(dev))) {
1073 printk(KERN_ERR "cpmac: error %i registering device %s\n", rc, 1102 printk(KERN_ERR "cpmac: error %i registering device %s\n", rc,
@@ -1077,9 +1106,9 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1077 1106
1078 if (netif_msg_probe(priv)) { 1107 if (netif_msg_probe(priv)) {
1079 printk(KERN_INFO 1108 printk(KERN_INFO
1080 "cpmac: device %s (regs: %p, irq: %d, phy: %s, mac: " 1109 "cpmac: device %s (regs: %p, irq: %d, phy: %s, "
1081 MAC_FMT ")\n", dev->name, (void *)mem->start, dev->irq, 1110 "mac: %s)\n", dev->name, (void *)mem->start, dev->irq,
1082 priv->phy_name, MAC_ARG(dev->dev_addr)); 1111 priv->phy_name, print_mac(mac, dev->dev_addr));
1083 } 1112 }
1084 return 0; 1113 return 0;
1085 1114
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index b557bb44a36f..4b4b74e47a67 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -40,7 +40,7 @@
40#include <asm/io.h> 40#include <asm/io.h>
41 41
42#define DRV_NAME "ehea" 42#define DRV_NAME "ehea"
43#define DRV_VERSION "EHEA_0078" 43#define DRV_VERSION "EHEA_0079"
44 44
45/* eHEA capability flags */ 45/* eHEA capability flags */
46#define DLPAR_PORT_ADD_REM 1 46#define DLPAR_PORT_ADD_REM 1
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 2809c99906e0..0a7e78925540 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2329,7 +2329,7 @@ static void port_napi_disable(struct ehea_port *port)
2329{ 2329{
2330 int i; 2330 int i;
2331 2331
2332 for (i = 0; i < port->num_def_qps; i++) 2332 for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
2333 napi_disable(&port->port_res[i].napi); 2333 napi_disable(&port->port_res[i].napi);
2334} 2334}
2335 2335
@@ -2337,7 +2337,7 @@ static void port_napi_enable(struct ehea_port *port)
2337{ 2337{
2338 int i; 2338 int i;
2339 2339
2340 for (i = 0; i < port->num_def_qps; i++) 2340 for (i = 0; i < port->num_def_qps + port->num_add_tx_qps; i++)
2341 napi_enable(&port->port_res[i].napi); 2341 napi_enable(&port->port_res[i].napi);
2342} 2342}
2343 2343
@@ -2373,8 +2373,6 @@ static int ehea_down(struct net_device *dev)
2373 ehea_drop_multicast_list(dev); 2373 ehea_drop_multicast_list(dev);
2374 ehea_free_interrupts(dev); 2374 ehea_free_interrupts(dev);
2375 2375
2376 port_napi_disable(port);
2377
2378 port->state = EHEA_PORT_DOWN; 2376 port->state = EHEA_PORT_DOWN;
2379 2377
2380 ret = ehea_clean_all_portres(port); 2378 ret = ehea_clean_all_portres(port);
@@ -2396,6 +2394,7 @@ static int ehea_stop(struct net_device *dev)
2396 flush_scheduled_work(); 2394 flush_scheduled_work();
2397 down(&port->port_lock); 2395 down(&port->port_lock);
2398 netif_stop_queue(dev); 2396 netif_stop_queue(dev);
2397 port_napi_disable(port);
2399 ret = ehea_down(dev); 2398 ret = ehea_down(dev);
2400 up(&port->port_lock); 2399 up(&port->port_lock);
2401 return ret; 2400 return ret;
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 70ddf1acfd88..92ce2e38f0d5 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5597,6 +5597,22 @@ static struct pci_device_id pci_tbl[] = {
5597 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_31), 5597 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_31),
5598 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR, 5598 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_HIGH_DMA|DEV_HAS_POWER_CNTRL|DEV_HAS_MSI|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT|DEV_HAS_CORRECT_MACADDR,
5599 }, 5599 },
5600 { /* MCP77 Ethernet Controller */
5601 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_32),
5602 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
5603 },
5604 { /* MCP77 Ethernet Controller */
5605 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_33),
5606 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
5607 },
5608 { /* MCP77 Ethernet Controller */
5609 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_34),
5610 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
5611 },
5612 { /* MCP77 Ethernet Controller */
5613 PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NVENET_35),
5614 .driver_data = DEV_NEED_TIMERIRQ|DEV_NEED_LINKTIMER|DEV_HAS_CHECKSUM|DEV_HAS_HIGH_DMA|DEV_HAS_MSI|DEV_HAS_POWER_CNTRL|DEV_HAS_PAUSEFRAME_TX|DEV_HAS_STATISTICS_V2|DEV_HAS_TEST_EXTENDED|DEV_HAS_MGMT_UNIT,
5615 },
5600 {0,}, 5616 {0,},
5601}; 5617};
5602 5618
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index 68887235d7e9..dbd23bb65d1e 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -55,6 +55,26 @@ MODULE_DESCRIPTION("IC Plus IP1000 Gigabit Ethernet Adapter Linux Driver "
55 DrvVer); 55 DrvVer);
56MODULE_LICENSE("GPL"); 56MODULE_LICENSE("GPL");
57 57
58//variable record -- index by leading revision/length
59//Revision/Length(=N*4), Address1, Data1, Address2, Data2,...,AddressN,DataN
60static unsigned short DefaultPhyParam[] = {
61 // 11/12/03 IP1000A v1-3 rev=0x40
62 /*--------------------------------------------------------------------------
63 (0x4000|(15*4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 22, 0x85bd, 24, 0xfff2,
64 27, 0x0c10, 28, 0x0c10, 29, 0x2c10, 31, 0x0003, 23, 0x92f6,
65 31, 0x0000, 23, 0x003d, 30, 0x00de, 20, 0x20e7, 9, 0x0700,
66 --------------------------------------------------------------------------*/
67 // 12/17/03 IP1000A v1-4 rev=0x40
68 (0x4000 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
69 0x0000,
70 30, 0x005e, 9, 0x0700,
71 // 01/09/04 IP1000A v1-5 rev=0x41
72 (0x4100 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
73 0x0000,
74 30, 0x005e, 9, 0x0700,
75 0x0000
76};
77
58static const char *ipg_brand_name[] = { 78static const char *ipg_brand_name[] = {
59 "IC PLUS IP1000 1000/100/10 based NIC", 79 "IC PLUS IP1000 1000/100/10 based NIC",
60 "Sundance Technology ST2021 based NIC", 80 "Sundance Technology ST2021 based NIC",
@@ -990,7 +1010,7 @@ static void ipg_nic_txcleanup(struct net_device *dev)
990} 1010}
991 1011
992/* Provides statistical information about the IPG NIC. */ 1012/* Provides statistical information about the IPG NIC. */
993struct net_device_stats *ipg_nic_get_stats(struct net_device *dev) 1013static struct net_device_stats *ipg_nic_get_stats(struct net_device *dev)
994{ 1014{
995 struct ipg_nic_private *sp = netdev_priv(dev); 1015 struct ipg_nic_private *sp = netdev_priv(dev);
996 void __iomem *ioaddr = sp->ioaddr; 1016 void __iomem *ioaddr = sp->ioaddr;
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h
index e418b9035cac..d5d092c9d0af 100644
--- a/drivers/net/ipg.h
+++ b/drivers/net/ipg.h
@@ -833,24 +833,4 @@ struct ipg_nic_private {
833 struct delayed_work task; 833 struct delayed_work task;
834}; 834};
835 835
836//variable record -- index by leading revision/length
837//Revision/Length(=N*4), Address1, Data1, Address2, Data2,...,AddressN,DataN
838unsigned short DefaultPhyParam[] = {
839 // 11/12/03 IP1000A v1-3 rev=0x40
840 /*--------------------------------------------------------------------------
841 (0x4000|(15*4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 22, 0x85bd, 24, 0xfff2,
842 27, 0x0c10, 28, 0x0c10, 29, 0x2c10, 31, 0x0003, 23, 0x92f6,
843 31, 0x0000, 23, 0x003d, 30, 0x00de, 20, 0x20e7, 9, 0x0700,
844 --------------------------------------------------------------------------*/
845 // 12/17/03 IP1000A v1-4 rev=0x40
846 (0x4000 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
847 0x0000,
848 30, 0x005e, 9, 0x0700,
849 // 01/09/04 IP1000A v1-5 rev=0x41
850 (0x4100 | (07 * 4)), 31, 0x0001, 27, 0x01e0, 31, 0x0002, 27, 0xeb8e, 31,
851 0x0000,
852 30, 0x005e, 9, 0x0700,
853 0x0000
854};
855
856#endif /* __LINUX_IPG_H */ 836#endif /* __LINUX_IPG_H */
diff --git a/drivers/net/natsemi.c b/drivers/net/natsemi.c
index 953117152bbd..87cde062fd63 100644
--- a/drivers/net/natsemi.c
+++ b/drivers/net/natsemi.c
@@ -864,6 +864,7 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev,
864 864
865 np = netdev_priv(dev); 865 np = netdev_priv(dev);
866 netif_napi_add(dev, &np->napi, natsemi_poll, 64); 866 netif_napi_add(dev, &np->napi, natsemi_poll, 64);
867 np->dev = dev;
867 868
868 np->pci_dev = pdev; 869 np->pci_dev = pdev;
869 pci_set_drvdata(pdev, dev); 870 pci_set_drvdata(pdev, dev);
diff --git a/drivers/net/usb/rndis_host.c b/drivers/net/usb/rndis_host.c
index cd991a0f75bb..1ebe3259be0d 100644
--- a/drivers/net/usb/rndis_host.c
+++ b/drivers/net/usb/rndis_host.c
@@ -512,11 +512,19 @@ static int rndis_bind(struct usbnet *dev, struct usb_interface *intf)
512 } 512 }
513 tmp = le32_to_cpu(u.init_c->max_transfer_size); 513 tmp = le32_to_cpu(u.init_c->max_transfer_size);
514 if (tmp < dev->hard_mtu) { 514 if (tmp < dev->hard_mtu) {
515 dev_err(&intf->dev, 515 if (tmp <= net->hard_header_len) {
516 "dev can't take %u byte packets (max %u)\n", 516 dev_err(&intf->dev,
517 dev->hard_mtu, tmp); 517 "dev can't take %u byte packets (max %u)\n",
518 retval = -EINVAL; 518 dev->hard_mtu, tmp);
519 goto fail_and_release; 519 retval = -EINVAL;
520 goto fail_and_release;
521 }
522 dev->hard_mtu = tmp;
523 net->mtu = dev->hard_mtu - net->hard_header_len;
524 dev_warn(&intf->dev,
525 "dev can't take %u byte packets (max %u), "
526 "adjusting MTU to %u\n",
527 dev->hard_mtu, tmp, net->mtu);
520 } 528 }
521 529
522 /* REVISIT: peripheral "alignment" request is ignored ... */ 530 /* REVISIT: peripheral "alignment" request is ignored ... */
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 4e10a074ca56..e44aac8cf5ff 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -1236,6 +1236,10 @@
1236#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560 1236#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP67_IDE 0x0560
1237#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C 1237#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP73_IDE 0x056C
1238#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759 1238#define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP77_IDE 0x0759
1239#define PCI_DEVICE_ID_NVIDIA_NVENET_32 0x0760
1240#define PCI_DEVICE_ID_NVIDIA_NVENET_33 0x0761
1241#define PCI_DEVICE_ID_NVIDIA_NVENET_34 0x0762
1242#define PCI_DEVICE_ID_NVIDIA_NVENET_35 0x0763
1239 1243
1240#define PCI_VENDOR_ID_IMS 0x10e0 1244#define PCI_VENDOR_ID_IMS 0x10e0
1241#define PCI_DEVICE_ID_IMS_TT128 0x9128 1245#define PCI_DEVICE_ID_IMS_TT128 0x9128