]> git.pld-linux.org Git - packages/kernel.git/blame - linux-2.4.20-nicupdates.patch
- added description of djurban's branch
[packages/kernel.git] / linux-2.4.20-nicupdates.patch
CommitLineData
8e9e47b7
JR
1diff -urNp linux-1280/drivers/net/3c59x.c linux-1290/drivers/net/3c59x.c
2--- linux-1280/drivers/net/3c59x.c
3+++ linux-1290/drivers/net/3c59x.c
4@@ -446,6 +446,7 @@ enum vortex_chips {
5
6 CH_3CCFEM656_1,
7 CH_3C450,
8+ CH_3C920,
9 };
10
11
12@@ -537,6 +538,8 @@ static struct vortex_chip_info {
13 MAX_COLLISION_RESET|HAS_HWCKSM, 128, },
14 {"3c450 HomePNA Tornado", /* AKPM: from Don's 0.99Q */
15 PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
16+ {"3c920 Tornado",
17+ PCI_USES_IO|PCI_USES_MASTER, IS_TORNADO|HAS_NWAY|HAS_HWCKSM, 128, },
18 {0,}, /* 0 terminated list. */
19 };
20
21@@ -580,6 +583,7 @@ static struct pci_device_id vortex_pci_t
22
23 { 0x10B7, 0x6564, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3CCFEM656_1 },
24 { 0x10B7, 0x4500, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C450 },
25+ { 0x10B7, 0x9201, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_3C920 },
26 {0,} /* 0 terminated list. */
27 };
28 MODULE_DEVICE_TABLE(pci, vortex_pci_tbl);
29@@ -980,7 +984,7 @@ static int __devinit vortex_probe1(struc
30 int i, step;
31 struct net_device *dev;
32 static int printed_version;
33- int retval, print_info;
34+ int retval;
35 struct vortex_chip_info * const vci = &vortex_info_tbl[chip_idx];
36 char *print_name;
37
38@@ -1022,10 +1026,7 @@ static int __devinit vortex_probe1(struc
39 vp->enable_wol = 1;
40 }
41
42- print_info = (vortex_debug > 1);
43- if (print_info)
44- printk (KERN_INFO "See Documentation/networking/vortex.txt\n");
45-
46+ printk (KERN_INFO "See Documentation/networking/vortex.txt\n");
47 printk(KERN_INFO "%s: 3Com %s %s at 0x%lx. Vers " DRV_VERSION "\n",
48 print_name,
49 pdev ? "PCI" : "EISA",
50@@ -1151,20 +1152,16 @@ static int __devinit vortex_probe1(struc
51 printk(" ***INVALID CHECKSUM %4.4x*** ", checksum);
52 for (i = 0; i < 3; i++)
53 ((u16 *)dev->dev_addr)[i] = htons(eeprom[i + 10]);
54- if (print_info) {
55- for (i = 0; i < 6; i++)
56- printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
57- }
58+ for (i = 0; i < 6; i++)
59+ printk("%c%2.2x", i ? ':' : ' ', dev->dev_addr[i]);
60 EL3WINDOW(2);
61 for (i = 0; i < 6; i++)
62 outb(dev->dev_addr[i], ioaddr + i);
63
64 #ifdef __sparc__
65- if (print_info)
66- printk(", IRQ %s\n", __irq_itoa(dev->irq));
67+ printk(", IRQ %s\n", __irq_itoa(dev->irq));
68 #else
69- if (print_info)
70- printk(", IRQ %d\n", dev->irq);
71+ printk(", IRQ %d\n", dev->irq);
72 /* Tell them about an invalid IRQ. */
73 if (dev->irq <= 0 || dev->irq >= NR_IRQS)
74 printk(KERN_WARNING " *** Warning: IRQ %d is unlikely to work! ***\n",
75@@ -1173,12 +1170,9 @@ static int __devinit vortex_probe1(struc
76
77 EL3WINDOW(4);
78 step = (inb(ioaddr + Wn4_NetDiag) & 0x1e) >> 1;
79- if (print_info) {
80- printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-"
81- "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14],
82- step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9);
83- }
84-
85+ printk(KERN_INFO " product code %02x%02x rev %02x.%d date %02d-"
86+ "%02d-%02d\n", eeprom[6]&0xff, eeprom[6]>>8, eeprom[0x14],
87+ step, (eeprom[4]>>5) & 15, eeprom[4] & 31, eeprom[4]>>9);
88
89 if (pdev && vci->drv_flags & HAS_CB_FNS) {
90 unsigned long fn_st_addr; /* Cardbus function status space */
91@@ -1191,10 +1185,8 @@ static int __devinit vortex_probe1(struc
92 if (!vp->cb_fn_base)
93 goto free_ring;
94 }
95- if (print_info) {
96- printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n",
97- print_name, fn_st_addr, vp->cb_fn_base);
98- }
99+ printk(KERN_INFO "%s: CardBus functions mapped %8.8lx->%p\n",
100+ print_name, fn_st_addr, vp->cb_fn_base);
101 EL3WINDOW(2);
102
103 n = inw(ioaddr + Wn2_ResetOptions) & ~0x4010;
104@@ -1216,8 +1208,7 @@ static int __devinit vortex_probe1(struc
105
106 if (vp->info1 & 0x8000) {
107 vp->full_duplex = 1;
108- if (print_info)
109- printk(KERN_INFO "Full duplex capable\n");
110+ printk(KERN_INFO "Full duplex capable\n");
111 }
112
113 {
114@@ -1228,17 +1219,16 @@ static int __devinit vortex_probe1(struc
115 if ((vp->available_media & 0xff) == 0) /* Broken 3c916 */
116 vp->available_media = 0x40;
117 config = inl(ioaddr + Wn3_Config);
118- if (print_info) {
119- printk(KERN_DEBUG " Internal config register is %4.4x, "
120- "transceivers %#x.\n", config, inw(ioaddr + Wn3_Options));
121- printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n",
122- 8 << RAM_SIZE(config),
123- RAM_WIDTH(config) ? "word" : "byte",
124- ram_split[RAM_SPLIT(config)],
125- AUTOSELECT(config) ? "autoselect/" : "",
126- XCVR(config) > XCVR_ExtMII ? "<invalid transceiver>" :
127- media_tbl[XCVR(config)].name);
128- }
129+ printk(KERN_DEBUG " Internal config register is %4.4x, "
130+ "transceivers %#x.\n", config,
131+ inw(ioaddr + Wn3_Options));
132+ printk(KERN_INFO " %dK %s-wide RAM %s Rx:Tx split, %s%s interface.\n",
133+ 8 << RAM_SIZE(config),
134+ RAM_WIDTH(config) ? "word" : "byte",
135+ ram_split[RAM_SPLIT(config)],
136+ AUTOSELECT(config) ? "autoselect/" : "",
137+ XCVR(config) > XCVR_ExtMII ? "<invalid transceiver>" :
138+ media_tbl[XCVR(config)].name);
139 vp->default_media = XCVR(config);
140 if (vp->default_media == XCVR_NWAY)
141 vp->has_nway = 1;
142@@ -1275,10 +1265,9 @@ static int __devinit vortex_probe1(struc
143 mii_status = mdio_read(dev, phyx, 1);
144 if (mii_status && mii_status != 0xffff) {
145 vp->phys[phy_idx++] = phyx;
146- if (print_info) {
147- printk(KERN_INFO " MII transceiver found at address %d,"
148- " status %4x.\n", phyx, mii_status);
149- }
150+ printk(KERN_INFO " MII transceiver found at "
151+ "address %d, status %4x.\n",
152+ phyx, mii_status);
153 if ((mii_status & 0x0040) == 0)
154 mii_preamble_required++;
155 }
156@@ -1299,10 +1288,9 @@ static int __devinit vortex_probe1(struc
157
158 if (vp->capabilities & CapBusMaster) {
159 vp->full_bus_master_tx = 1;
160- if (print_info) {
161- printk(KERN_INFO " Enabling bus-master transmits and %s receives.\n",
162+ printk(KERN_INFO " Enabling bus-master transmits and %s "
163+ "receives.\n",
164 (vp->info2 & 1) ? "early" : "whole-frame" );
165- }
166 vp->full_bus_master_rx = (vp->info2 & 1) ? 1 : 2;
167 vp->bus_master = 0; /* AKPM: vortex only */
168 }
169@@ -1321,12 +1309,10 @@ static int __devinit vortex_probe1(struc
170 dev->hard_start_xmit = vortex_start_xmit;
171 }
172
173- if (print_info) {
174- printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
175- print_name,
176- (dev->features & NETIF_F_SG) ? "en":"dis",
177- (dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
178- }
179+ printk(KERN_INFO "%s: scatter/gather %sabled. h/w checksums %sabled\n",
180+ print_name,
181+ (dev->features & NETIF_F_SG) ? "en":"dis",
182+ (dev->features & NETIF_F_IP_CSUM) ? "en":"dis");
183
184 dev->stop = vortex_close;
185 dev->get_stats = vortex_get_stats;
186diff -urNp linux-1280/drivers/net/ppp_generic.c linux-1290/drivers/net/ppp_generic.c
187--- linux-1280/drivers/net/ppp_generic.c
188+++ linux-1290/drivers/net/ppp_generic.c
189@@ -965,11 +965,10 @@ ppp_send_frame(struct ppp *ppp, struct s
190 if (ppp->pass_filter.filter
191 && sk_run_filter(skb, ppp->pass_filter.filter,
192 ppp->pass_filter.len) == 0) {
193- if (ppp->debug & 1) {
194+ if (ppp->debug & 1)
195 printk(KERN_DEBUG "PPP: outbound frame not passed\n");
196- kfree_skb(skb);
197- return;
198- }
199+ kfree_skb(skb);
200+ return;
201 }
202 /* if this packet passes the active filter, record the time */
203 if (!(ppp->active_filter.filter
This page took 2.228553 seconds and 4 git commands to generate.