/[linux-patches]/genpatches-2.6/trunk/2.6.16/2400_sky2-1.1.patch
Gentoo

Diff of /genpatches-2.6/trunk/2.6.16/2400_sky2-1.1.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 415 Revision 416
1--- a/linux/drivers/net/sky2.c 2006-04-19 09:13:25.000000000 +0000 1--- linux-2.6.16-gentoo/drivers/net/sky2.c 2006-03-20 15:45:48.000000000 +0000
2+++ b/linux/drivers/net/sky2.c 2006-04-19 10:10:22.000000000 +0000 2+++ linux-dsd/drivers/net/sky2.c 2006-03-27 13:34:10.000000000 +0100
3@@ -51,7 +51,7 @@ 3@@ -51,7 +51,7 @@
4 #include "sky2.h" 4 #include "sky2.h"
5 5
6 #define DRV_NAME "sky2" 6 #define DRV_NAME "sky2"
7-#define DRV_VERSION "0.15" 7-#define DRV_VERSION "0.15"
18- (hw)->chip_rev == CHIP_REV_YU_EC_A1) 18- (hw)->chip_rev == CHIP_REV_YU_EC_A1)
19- 19-
20 #define RX_LE_SIZE 512 20 #define RX_LE_SIZE 512
21 #define RX_LE_BYTES (RX_LE_SIZE*sizeof(struct sky2_rx_le)) 21 #define RX_LE_BYTES (RX_LE_SIZE*sizeof(struct sky2_rx_le))
22 #define RX_MAX_PENDING (RX_LE_SIZE/2 - 2) 22 #define RX_MAX_PENDING (RX_LE_SIZE/2 - 2)
23@@ -92,6 +88,10 @@ static int debug = -1; /* defaults abov 23@@ -96,6 +92,10 @@ static int copybreak __read_mostly = 256
24 module_param(debug, int, 0); 24 module_param(copybreak, int, 0);
25 MODULE_PARM_DESC(debug, "Debug level (0=none,...,16=all)"); 25 MODULE_PARM_DESC(copybreak, "Receive copy threshold");
26 26
27+static int disable_msi = 0; 27+static int disable_msi = 0;
28+module_param(disable_msi, int, 0); 28+module_param(disable_msi, int, 0);
29+MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)"); 29+MODULE_PARM_DESC(disable_msi, "Disable Message Signaled Interrupt (MSI)");
30+ 30+
31 static int copybreak __read_mostly = 256; 31 static const struct pci_device_id sky2_id_table[] = {
32 module_param(copybreak, int, 0); 32 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9000) },
33 MODULE_PARM_DESC(copybreak, "Receive copy threshold"); 33 { PCI_DEVICE(PCI_VENDOR_ID_SYSKONNECT, 0x9E00) },
34@@ -504,9 +504,9 @@ static void sky2_phy_init(struct sky2_hw 34@@ -504,9 +504,9 @@ static void sky2_phy_init(struct sky2_hw
35 /* Force a renegotiation */ 35 /* Force a renegotiation */
36 static void sky2_phy_reinit(struct sky2_port *sky2) 36 static void sky2_phy_reinit(struct sky2_port *sky2)
37 { 37 {
38- down(&sky2->phy_sema); 38- down(&sky2->phy_sema);
145- u32 ramsize, rxspace; 145- u32 ramsize, rxspace;
146+ u32 ramsize, rxspace, imask; 146+ u32 ramsize, rxspace, imask;
147 int err = -ENOMEM; 147 int err = -ENOMEM;
148 148
149 if (netif_msg_ifup(sky2)) 149 if (netif_msg_ifup(sky2))
150@@ -1079,10 +1052,9 @@ static int sky2_up(struct net_device *de 150@@ -1079,10 +1052,10 @@ static int sky2_up(struct net_device *de
151 goto err_out; 151 goto err_out;
152 152
153 /* Enable interrupts from phy/mac for port */ 153 /* Enable interrupts from phy/mac for port */
154- spin_lock_irq(&hw->hw_lock); 154- spin_lock_irq(&hw->hw_lock);
155- hw->intr_mask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; 155- hw->intr_mask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
156- sky2_write32(hw, B0_IMSK, hw->intr_mask); 156- sky2_write32(hw, B0_IMSK, hw->intr_mask);
157- spin_unlock_irq(&hw->hw_lock); 157- spin_unlock_irq(&hw->hw_lock);
158+ imask = sky2_read32(hw, B0_IMSK); 158+ imask = sky2_read32(hw, B0_IMSK);
159+ imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2; 159+ imask |= (port == 0) ? Y2_IS_PORT_1 : Y2_IS_PORT_2;
160+ sky2_write32(hw, B0_IMSK, imask); 160+ sky2_write32(hw, B0_IMSK, imask);
161+
161 return 0; 162 return 0;
162 163
163 err_out: 164 err_out:
164@@ -1202,7 +1174,7 @@ static int sky2_xmit_frame(struct sk_buf 165@@ -1202,7 +1175,7 @@ static int sky2_xmit_frame(struct sk_buf
165 /* just drop the packet if non-linear expansion fails */ 166 /* just drop the packet if non-linear expansion fails */
166 if (skb_header_cloned(skb) && 167 if (skb_header_cloned(skb) &&
167 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { 168 pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
168- dev_kfree_skb_any(skb); 169- dev_kfree_skb_any(skb);
169+ dev_kfree_skb(skb); 170+ dev_kfree_skb(skb);
170 goto out_unlock; 171 goto out_unlock;
171 } 172 }
172 173
173@@ -1299,8 +1271,7 @@ static int sky2_xmit_frame(struct sk_buf 174@@ -1299,8 +1272,7 @@ static int sky2_xmit_frame(struct sk_buf
174 netif_stop_queue(dev); 175 netif_stop_queue(dev);
175 } 176 }
176 177
177- sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod, 178- sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod,
178- &sky2->tx_last_put, TX_RING_SIZE); 179- &sky2->tx_last_put, TX_RING_SIZE);
179+ sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod); 180+ sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod);
180 181
181 out_unlock: 182 out_unlock:
182 spin_unlock(&sky2->tx_lock); 183 spin_unlock(&sky2->tx_lock);
183@@ -1332,7 +1303,7 @@ static void sky2_tx_complete(struct sky2 184@@ -1332,7 +1304,7 @@ static void sky2_tx_complete(struct sky2
184 struct tx_ring_info *re = sky2->tx_ring + put; 185 struct tx_ring_info *re = sky2->tx_ring + put;
185 struct sk_buff *skb = re->skb; 186 struct sk_buff *skb = re->skb;
186 187
187- nxt = re->idx; 188- nxt = re->idx;
188+ nxt = re->idx; 189+ nxt = re->idx;
189 BUG_ON(nxt >= TX_RING_SIZE); 190 BUG_ON(nxt >= TX_RING_SIZE);
190 prefetch(sky2->tx_ring + nxt); 191 prefetch(sky2->tx_ring + nxt);
191 192
192@@ -1348,15 +1319,15 @@ static void sky2_tx_complete(struct sky2 193@@ -1348,15 +1320,15 @@ static void sky2_tx_complete(struct sky2
193 struct tx_ring_info *fre; 194 struct tx_ring_info *fre;
194 fre = sky2->tx_ring + (put + i + 1) % TX_RING_SIZE; 195 fre = sky2->tx_ring + (put + i + 1) % TX_RING_SIZE;
195 pci_unmap_page(pdev, pci_unmap_addr(fre, mapaddr), 196 pci_unmap_page(pdev, pci_unmap_addr(fre, mapaddr),
196- skb_shinfo(skb)->frags[i].size, 197- skb_shinfo(skb)->frags[i].size,
197+ skb_shinfo(skb)->frags[i].size, 198+ skb_shinfo(skb)->frags[i].size,
206- if (netif_queue_stopped(dev) && tx_avail(sky2) > MAX_SKB_TX_LE) 207- if (netif_queue_stopped(dev) && tx_avail(sky2) > MAX_SKB_TX_LE)
207+ if (tx_avail(sky2) > MAX_SKB_TX_LE) 208+ if (tx_avail(sky2) > MAX_SKB_TX_LE)
208 netif_wake_queue(dev); 209 netif_wake_queue(dev);
209 } 210 }
210 211
211@@ -1374,7 +1345,7 @@ static int sky2_down(struct net_device * 212@@ -1375,6 +1347,7 @@ static int sky2_down(struct net_device *
212 struct sky2_port *sky2 = netdev_priv(dev);
213 struct sky2_hw *hw = sky2->hw; 213 struct sky2_hw *hw = sky2->hw;
214 unsigned port = sky2->port; 214 unsigned port = sky2->port;
215- u16 ctrl; 215 u16 ctrl;
216+ u32 imask; 216+ u32 imask;
217 217
218 /* Never really got started! */ 218 /* Never really got started! */
219 if (!sky2->tx_le) 219 if (!sky2->tx_le)
220@@ -1386,14 +1357,6 @@ static int sky2_down(struct net_device * 220@@ -1386,14 +1359,6 @@ static int sky2_down(struct net_device *
221 /* Stop more packets from being queued */ 221 /* Stop more packets from being queued */
222 netif_stop_queue(dev); 222 netif_stop_queue(dev);
223 223
224- /* Disable port IRQ */ 224- /* Disable port IRQ */
225- spin_lock_irq(&hw->hw_lock); 225- spin_lock_irq(&hw->hw_lock);
230- flush_scheduled_work(); 230- flush_scheduled_work();
231- 231-
232 sky2_phy_reset(hw, port); 232 sky2_phy_reset(hw, port);
233 233
234 /* Stop transmitter */ 234 /* Stop transmitter */
235@@ -1437,6 +1400,11 @@ static int sky2_down(struct net_device * 235@@ -1437,6 +1402,11 @@ static int sky2_down(struct net_device *
236 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 236 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
237 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET); 237 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
238 238
239+ /* Disable port IRQ */ 239+ /* Disable port IRQ */
240+ imask = sky2_read32(hw, B0_IMSK); 240+ imask = sky2_read32(hw, B0_IMSK);
242+ sky2_write32(hw, B0_IMSK, imask); 242+ sky2_write32(hw, B0_IMSK, imask);
243+ 243+
244 /* turn off LED's */ 244 /* turn off LED's */
245 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF); 245 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
246 246
247@@ -1631,20 +1599,19 @@ static int sky2_autoneg_done(struct sky2 247@@ -1631,20 +1601,19 @@ static int sky2_autoneg_done(struct sky2
248 return 0; 248 return 0;
249 } 249 }
250 250
251-/* 251-/*
252- * Interrupt from PHY are handled outside of interrupt context 252- * Interrupt from PHY are handled outside of interrupt context
273+ if (!netif_running(dev)) 273+ if (!netif_running(dev))
274+ goto out; 274+ goto out;
275 275
276 if (netif_msg_intr(sky2)) 276 if (netif_msg_intr(sky2))
277 printk(KERN_INFO PFX "%s: phy interrupt status 0x%x 0x%x\n", 277 printk(KERN_INFO PFX "%s: phy interrupt status 0x%x 0x%x\n",
278@@ -1670,12 +1637,7 @@ static void sky2_phy_task(void *arg) 278@@ -1670,12 +1639,7 @@ static void sky2_phy_task(void *arg)
279 sky2_link_down(sky2); 279 sky2_link_down(sky2);
280 } 280 }
281 out: 281 out:
282- up(&sky2->phy_sema); 282- up(&sky2->phy_sema);
283- 283-
287- spin_unlock_irq(&hw->hw_lock); 287- spin_unlock_irq(&hw->hw_lock);
288+ spin_unlock(&sky2->phy_lock); 288+ spin_unlock(&sky2->phy_lock);
289 } 289 }
290 290
291 291
292@@ -1687,31 +1649,37 @@ static void sky2_tx_timeout(struct net_d 292@@ -1687,31 +1651,40 @@ static void sky2_tx_timeout(struct net_d
293 struct sky2_port *sky2 = netdev_priv(dev); 293 struct sky2_port *sky2 = netdev_priv(dev);
294 struct sky2_hw *hw = sky2->hw; 294 struct sky2_hw *hw = sky2->hw;
295 unsigned txq = txqaddr[sky2->port]; 295 unsigned txq = txqaddr[sky2->port];
296- u16 ridx; 296- u16 ridx;
297- 297-
317+ report = sky2_read16(hw, sky2->port == 0 ? STAT_TXA1_RIDX : STAT_TXA2_RIDX); 317+ report = sky2_read16(hw, sky2->port == 0 ? STAT_TXA1_RIDX : STAT_TXA2_RIDX);
318+ done = sky2_read16(hw, Q_ADDR(txq, Q_DONE)); 318+ done = sky2_read16(hw, Q_ADDR(txq, Q_DONE));
319 319
320- sky2_tx_clean(sky2); 320- sky2_tx_clean(sky2);
321+ printk(KERN_DEBUG PFX "%s: transmit ring %u .. %u report=%u done=%u\n", 321+ printk(KERN_DEBUG PFX "%s: transmit ring %u .. %u report=%u done=%u\n",
322+ dev->name, 322+ dev->name,
323+ sky2->tx_cons, sky2->tx_prod, report, done); 323+ sky2->tx_cons, sky2->tx_prod, report, done);
324 324+
325- sky2_qset(hw, txq);
326- sky2_prefetch_init(hw, txq, sky2->tx_le_map, TX_RING_SIZE - 1);
327+ if (report != done) { 325+ if (report != done) {
328+ printk(KERN_INFO PFX "status burst pending (irq moderation?)\n"); 326+ printk(KERN_INFO PFX "status burst pending (irq moderation?)\n");
327+
329+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); 328+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP);
330+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START); 329+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START);
331+ } else if (report != sky2->tx_cons) { 330+ } else if (report != sky2->tx_cons) {
332+ printk(KERN_INFO PFX "status report lost?\n"); 331+ printk(KERN_INFO PFX "status report lost?\n");
332+
333+ spin_lock_bh(&sky2->tx_lock); 333+ spin_lock_bh(&sky2->tx_lock);
334+ sky2_tx_complete(sky2, report); 334+ sky2_tx_complete(sky2, report);
335+ spin_unlock_bh(&sky2->tx_lock); 335+ spin_unlock_bh(&sky2->tx_lock);
336+ } else { 336+ } else {
337+ printk(KERN_INFO PFX "hardware hung? flushing\n"); 337+ printk(KERN_INFO PFX "hardware hung? flushing\n");
338
339- sky2_qset(hw, txq);
340- sky2_prefetch_init(hw, txq, sky2->tx_le_map, TX_RING_SIZE - 1);
338+ sky2_write32(hw, Q_ADDR(txq, Q_CSR), BMU_STOP); 341+ sky2_write32(hw, Q_ADDR(txq, Q_CSR), BMU_STOP);
339+ sky2_write32(hw, Y2_QADDR(txq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); 342+ sky2_write32(hw, Y2_QADDR(txq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET);
340+ 343+
341+ sky2_tx_clean(sky2); 344+ sky2_tx_clean(sky2);
342+ 345+
344+ sky2_prefetch_init(hw, txq, sky2->tx_le_map, TX_RING_SIZE - 1); 347+ sky2_prefetch_init(hw, txq, sky2->tx_le_map, TX_RING_SIZE - 1);
345+ } 348+ }
346 } 349 }
347 350
348 351
349@@ -1730,6 +1698,7 @@ static int sky2_change_mtu(struct net_de 352@@ -1730,6 +1703,7 @@ static int sky2_change_mtu(struct net_de
350 struct sky2_hw *hw = sky2->hw; 353 struct sky2_hw *hw = sky2->hw;
351 int err; 354 int err;
352 u16 ctl, mode; 355 u16 ctl, mode;
353+ u32 imask; 356+ u32 imask;
354 357
355 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU) 358 if (new_mtu < ETH_ZLEN || new_mtu > ETH_JUMBO_MTU)
356 return -EINVAL; 359 return -EINVAL;
357@@ -1742,12 +1711,15 @@ static int sky2_change_mtu(struct net_de 360@@ -1742,12 +1716,15 @@ static int sky2_change_mtu(struct net_de
358 return 0; 361 return 0;
359 } 362 }
360 363
361+ imask = sky2_read32(hw, B0_IMSK); 364+ imask = sky2_read32(hw, B0_IMSK);
362 sky2_write32(hw, B0_IMSK, 0); 365 sky2_write32(hw, B0_IMSK, 0);
368+ synchronize_irq(hw->pdev->irq); 371+ synchronize_irq(hw->pdev->irq);
369+ 372+
370 ctl = gma_read16(hw, sky2->port, GM_GP_CTRL); 373 ctl = gma_read16(hw, sky2->port, GM_GP_CTRL);
371 gma_write16(hw, sky2->port, GM_GP_CTRL, ctl & ~GM_GPCR_RX_ENA); 374 gma_write16(hw, sky2->port, GM_GP_CTRL, ctl & ~GM_GPCR_RX_ENA);
372 sky2_rx_stop(sky2); 375 sky2_rx_stop(sky2);
373@@ -1766,7 +1738,7 @@ static int sky2_change_mtu(struct net_de 376@@ -1766,7 +1743,7 @@ static int sky2_change_mtu(struct net_de
374 sky2_write8(hw, RB_ADDR(rxqaddr[sky2->port], RB_CTRL), RB_ENA_OP_MD); 377 sky2_write8(hw, RB_ADDR(rxqaddr[sky2->port], RB_CTRL), RB_ENA_OP_MD);
375 378
376 err = sky2_rx_start(sky2); 379 err = sky2_rx_start(sky2);
377- sky2_write32(hw, B0_IMSK, hw->intr_mask); 380- sky2_write32(hw, B0_IMSK, hw->intr_mask);
378+ sky2_write32(hw, B0_IMSK, imask); 381+ sky2_write32(hw, B0_IMSK, imask);
379 382
380 if (err) 383 if (err)
381 dev_close(dev); 384 dev_close(dev);
382@@ -1843,9 +1815,7 @@ resubmit: 385@@ -1843,8 +1820,7 @@ resubmit:
383 sky2_rx_add(sky2, re->mapaddr); 386 sky2_rx_add(sky2, re->mapaddr);
384 387
385 /* Tell receiver about new buffers. */ 388 /* Tell receiver about new buffers. */
386- sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put, 389- sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put,
387- &sky2->rx_last_put, RX_LE_SIZE); 390- &sky2->rx_last_put, RX_LE_SIZE);
388-
389+ sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put); 391+ sky2_put_idx(sky2->hw, rxqaddr[sky2->port], sky2->rx_put);
392
390 return skb; 393 return skb;
391 394
392 oversize:
393@@ -1871,76 +1841,50 @@ error: 395@@ -1871,76 +1847,51 @@ error:
394 goto resubmit; 396 goto resubmit;
395 } 397 }
396 398
397-/* 399-/*
398- * Check for transmit complete 400- * Check for transmit complete
405 { 407 {
406- if (last != TX_NO_STATUS) { 408- if (last != TX_NO_STATUS) {
407- struct net_device *dev = hw->dev[port]; 409- struct net_device *dev = hw->dev[port];
408- if (dev && netif_running(dev)) { 410- if (dev && netif_running(dev)) {
409- struct sky2_port *sky2 = netdev_priv(dev); 411- struct sky2_port *sky2 = netdev_priv(dev);
410- 412+ struct sky2_port *sky2 = netdev_priv(dev);
413
411- spin_lock(&sky2->tx_lock); 414- spin_lock(&sky2->tx_lock);
412- sky2_tx_complete(sky2, last); 415- sky2_tx_complete(sky2, last);
413- spin_unlock(&sky2->tx_lock); 416- spin_unlock(&sky2->tx_lock);
414- } 417- }
415+ struct sky2_port *sky2 = netdev_priv(dev);
416+ if (netif_running(dev)) { 418+ if (netif_running(dev)) {
417+ spin_lock(&sky2->tx_lock); 419+ spin_lock(&sky2->tx_lock);
418+ sky2_tx_complete(sky2, last); 420+ sky2_tx_complete(sky2, last);
419+ spin_unlock(&sky2->tx_lock); 421+ spin_unlock(&sky2->tx_lock);
420 } 422 }
451- hwidx = sky2_read16(hw, STAT_PUT_IDX); 453- hwidx = sky2_read16(hw, STAT_PUT_IDX);
452- BUG_ON(hwidx >= STATUS_RING_SIZE); 454- BUG_ON(hwidx >= STATUS_RING_SIZE);
453 rmb(); 455 rmb();
454 456
455- while (hwidx != hw->st_idx) { 457- while (hwidx != hw->st_idx) {
456+ for (;;) { 458+ for(;;) {
457 struct sky2_status_le *le = hw->st_le + hw->st_idx; 459 struct sky2_status_le *le = hw->st_le + hw->st_idx;
458 struct net_device *dev; 460 struct net_device *dev;
459 struct sky2_port *sky2; 461 struct sky2_port *sky2;
460 struct sk_buff *skb; 462 struct sk_buff *skb;
461 u32 status; 463 u32 status;
489- switch (le->opcode & ~HW_OWNER) { 491- switch (le->opcode & ~HW_OWNER) {
490+ switch (opcode) { 492+ switch (opcode) {
491 case OP_RXSTAT: 493 case OP_RXSTAT:
492 skb = sky2_receive(sky2, length, status); 494 skb = sky2_receive(sky2, length, status);
493 if (!skb) 495 if (!skb)
494@@ -1980,42 +1924,23 @@ static int sky2_poll(struct net_device * 496@@ -1980,42 +1931,23 @@ static int sky2_poll(struct net_device *
495 497
496 case OP_TXINDEXLE: 498 case OP_TXINDEXLE:
497 /* TX index reports status for both ports */ 499 /* TX index reports status for both ports */
498- tx_done[0] = status & 0xffff; 500- tx_done[0] = status & 0xffff;
499- tx_done[1] = ((status >> 24) & 0xff) 501- tx_done[1] = ((status >> 24) & 0xff)
500- | (u16)(length & 0xf) << 8; 502- | (u16)(length & 0xf) << 8;
501+ sky2_tx_done(hw->dev[0], status & 0xffff); 503+ sky2_tx_done(hw->dev[0], status & 0xffff);
502+ if (hw->dev[1]) 504+ if (hw->dev[1])
503+ sky2_tx_done(hw->dev[1], 505+ sky2_tx_done(hw->dev[1],
504+ ((status >> 24) & 0xff) 506+ ((status >> 24) & 0xff)
505+ | (u16)(length & 0xf) << 8); 507+ | (u16)(length & 0xf) << 8);
506 break; 508 break;
507 509
508 default: 510 default:
509 if (net_ratelimit()) 511 if (net_ratelimit())
510 printk(KERN_WARNING PFX 512 printk(KERN_WARNING PFX
539- } 541- }
540+ return work_done; 542+ return work_done;
541 } 543 }
542 544
543 static void sky2_hw_error(struct sky2_hw *hw, unsigned port, u32 status) 545 static void sky2_hw_error(struct sky2_hw *hw, unsigned port, u32 status)
544@@ -2134,57 +2059,97 @@ static void sky2_mac_intr(struct sky2_hw 546@@ -2134,57 +2066,97 @@ static void sky2_mac_intr(struct sky2_hw
545 } 547 }
546 } 548 }
547 549
548-static void sky2_phy_intr(struct sky2_hw *hw, unsigned port) 550-static void sky2_phy_intr(struct sky2_hw *hw, unsigned port)
549+/* This should never happen it is a fatal situation */ 551+/* This should never happen it is a fatal situation */
669+ else 671+ else
670+ printk(KERN_DEBUG PFX "irq race detected\n"); 672+ printk(KERN_DEBUG PFX "irq race detected\n");
671 673
672 return IRQ_HANDLED; 674 return IRQ_HANDLED;
673 } 675 }
674@@ -2238,6 +2203,23 @@ static int sky2_reset(struct sky2_hw *hw 676@@ -2238,6 +2210,23 @@ static int sky2_reset(struct sky2_hw *hw
675 return -EOPNOTSUPP; 677 return -EOPNOTSUPP;
676 } 678 }
677 679
678+ hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4; 680+ hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
679+ 681+
680+ /* This rev is really old, and requires untested workarounds */ 682+ /* This rev is really old, and requires untested workarounds */
681+ if (hw->chip_id == CHIP_ID_YUKON_EC && hw->chip_rev == CHIP_REV_YU_EC_A1) { 683+ if (hw->chip_id == CHIP_ID_YUKON_EC && hw->chip_rev == CHIP_REV_YU_EC_A1) {
682+ printk(KERN_ERR PFX "%s: unsupported revision Yukon-%s (0x%x) rev %d\n", 684+ printk(KERN_ERR PFX "%s: unsupported revision Yukon-%s (0x%x) rev %d\n",
683+ pci_name(hw->pdev), yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL], 685+ pci_name(hw->pdev), yukon2_name[hw->chip_id - CHIP_ID_YUKON_XL],
684+ hw->chip_id, hw->chip_rev); 686+ hw->chip_id, hw->chip_rev);
685+ return -EOPNOTSUPP; 687+ return -EOPNOTSUPP;
686+ } 688+ }
687+ 689+
688+ /* This chip is new and not tested yet */ 690+ /* This chip is new and not tested yet */
689+ if (hw->chip_id == CHIP_ID_YUKON_EC_U) { 691+ if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
693+ } 695+ }
694+ 696+
695 /* disable ASF */ 697 /* disable ASF */
696 if (hw->chip_id <= CHIP_ID_YUKON_EC) { 698 if (hw->chip_id <= CHIP_ID_YUKON_EC) {
697 sky2_write8(hw, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET); 699 sky2_write8(hw, B28_Y2_ASF_STAT_CMD, Y2_ASF_RESET);
698@@ -2258,7 +2240,7 @@ static int sky2_reset(struct sky2_hw *hw 700@@ -2258,7 +2247,7 @@ static int sky2_reset(struct sky2_hw *hw
699 sky2_write8(hw, B0_CTST, CS_MRST_CLR); 701 sky2_write8(hw, B0_CTST, CS_MRST_CLR);
700 702
701 /* clear any PEX errors */ 703 /* clear any PEX errors */
702- if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP)) 704- if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP))
703+ if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP)) 705+ if (pci_find_capability(hw->pdev, PCI_CAP_ID_EXP))
704 sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 0xffffffffUL); 706 sky2_pci_write32(hw, PEX_UNC_ERR_STAT, 0xffffffffUL);
705 707
706 708
707@@ -2271,7 +2253,6 @@ static int sky2_reset(struct sky2_hw *hw 709@@ -2271,7 +2260,6 @@ static int sky2_reset(struct sky2_hw *hw
708 if (!(sky2_read8(hw, B2_Y2_CLK_GATE) & Y2_STATUS_LNK2_INAC)) 710 if (!(sky2_read8(hw, B2_Y2_CLK_GATE) & Y2_STATUS_LNK2_INAC))
709 ++hw->ports; 711 ++hw->ports;
710 } 712 }
711- hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4; 713- hw->chip_rev = (sky2_read8(hw, B2_MAC_CFG) & CFG_CHIP_R_MSK) >> 4;
712 714
713 sky2_set_power_state(hw, PCI_D0); 715 sky2_set_power_state(hw, PCI_D0);
714 716
715@@ -2337,30 +2318,14 @@ static int sky2_reset(struct sky2_hw *hw 717@@ -2337,30 +2325,18 @@ static int sky2_reset(struct sky2_hw *hw
716 /* Set the list last index */ 718 /* Set the list last index */
717 sky2_write16(hw, STAT_LAST_IDX, STATUS_RING_SIZE - 1); 719 sky2_write16(hw, STAT_LAST_IDX, STATUS_RING_SIZE - 1);
718 720
719- /* These status setup values are copied from SysKonnect's driver */ 721- /* These status setup values are copied from SysKonnect's driver */
720- if (is_ec_a1(hw)) { 722- if (is_ec_a1(hw)) {
728- sky2_write8(hw, STAT_FIFO_ISR_WM, 0x07); /* WA for dev. #4.18 */ 730- sky2_write8(hw, STAT_FIFO_ISR_WM, 0x07); /* WA for dev. #4.18 */
729- sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 10000)); 731- sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 10000));
730- } else { 732- } else {
731- sky2_write16(hw, STAT_TX_IDX_TH, 10); 733- sky2_write16(hw, STAT_TX_IDX_TH, 10);
732- sky2_write8(hw, STAT_FIFO_WM, 16); 734- sky2_write8(hw, STAT_FIFO_WM, 16);
733- 735+ sky2_write16(hw, STAT_TX_IDX_TH, 10);
736+ sky2_write8(hw, STAT_FIFO_WM, 16);
737
734- /* set Status-FIFO ISR watermark */ 738- /* set Status-FIFO ISR watermark */
735- if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0) 739- if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0)
736- sky2_write8(hw, STAT_FIFO_ISR_WM, 4); 740- sky2_write8(hw, STAT_FIFO_ISR_WM, 4);
737- else 741- else
738- sky2_write8(hw, STAT_FIFO_ISR_WM, 16); 742- sky2_write8(hw, STAT_FIFO_ISR_WM, 16);
739+ sky2_write16(hw, STAT_TX_IDX_TH, 10);
740+ sky2_write8(hw, STAT_FIFO_WM, 16);
741
742- sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
743- sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 7));
744- }
745+ /* set Status-FIFO ISR watermark */ 743+ /* set Status-FIFO ISR watermark */
746+ if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0) 744+ if (hw->chip_id == CHIP_ID_YUKON_XL && hw->chip_rev == 0)
747+ sky2_write8(hw, STAT_FIFO_ISR_WM, 4); 745+ sky2_write8(hw, STAT_FIFO_ISR_WM, 4);
748+ else 746+ else
749+ sky2_write8(hw, STAT_FIFO_ISR_WM, 16); 747+ sky2_write8(hw, STAT_FIFO_ISR_WM, 16);
750 748
749- sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
750- sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 7));
751- }
752+ sky2_write32(hw, STAT_TX_TIMER_INI, sky2_us2clk(hw, 1000));
753+ sky2_write32(hw, STAT_ISR_TIMER_INI, sky2_us2clk(hw, 20));
754+ sky2_write32(hw, STAT_LEV_TIMER_INI, sky2_us2clk(hw, 100));
755
751 /* enable status unit */ 756 /* enable status unit */
752 sky2_write32(hw, STAT_CTRL, SC_STAT_OP_ON); 757 sky2_write32(hw, STAT_CTRL, SC_STAT_OP_ON);
753@@ -2502,17 +2467,34 @@ static const struct sky2_stat { 758@@ -2502,17 +2478,34 @@ static const struct sky2_stat {
754 { "rx_unicast", GM_RXF_UC_OK }, 759 { "rx_unicast", GM_RXF_UC_OK },
755 { "tx_mac_pause", GM_TXF_MPAUSE }, 760 { "tx_mac_pause", GM_TXF_MPAUSE },
756 { "rx_mac_pause", GM_RXF_MPAUSE }, 761 { "rx_mac_pause", GM_RXF_MPAUSE },
757- { "collisions", GM_TXF_SNG_COL }, 762- { "collisions", GM_TXF_SNG_COL },
758+ { "collisions", GM_TXF_COL }, 763+ { "collisions", GM_TXF_COL },
788+ { "tx_1519_to_max_byte_packets", GM_TXF_MAX_SZ }, 793+ { "tx_1519_to_max_byte_packets", GM_TXF_MAX_SZ },
789+ { "tx_fifo_underrun", GM_TXE_FIFO_UR }, 794+ { "tx_fifo_underrun", GM_TXE_FIFO_UR },
790 }; 795 };
791 796
792 static u32 sky2_get_rx_csum(struct net_device *dev) 797 static u32 sky2_get_rx_csum(struct net_device *dev)
793@@ -2614,7 +2596,7 @@ static struct net_device_stats *sky2_get 798@@ -2614,7 +2607,7 @@ static struct net_device_stats *sky2_get
794 sky2->net_stats.rx_bytes = data[1]; 799 sky2->net_stats.rx_bytes = data[1];
795 sky2->net_stats.tx_packets = data[2] + data[4] + data[6]; 800 sky2->net_stats.tx_packets = data[2] + data[4] + data[6];
796 sky2->net_stats.rx_packets = data[3] + data[5] + data[7]; 801 sky2->net_stats.rx_packets = data[3] + data[5] + data[7];
797- sky2->net_stats.multicast = data[5] + data[7]; 802- sky2->net_stats.multicast = data[5] + data[7];
798+ sky2->net_stats.multicast = data[3] + data[5]; 803+ sky2->net_stats.multicast = data[3] + data[5];
799 sky2->net_stats.collisions = data[10]; 804 sky2->net_stats.collisions = data[10];
800 sky2->net_stats.tx_aborted_errors = data[12]; 805 sky2->net_stats.tx_aborted_errors = data[12];
801 806
802@@ -2743,7 +2725,7 @@ static int sky2_phys_id(struct net_devic 807@@ -2743,7 +2736,7 @@ static int sky2_phys_id(struct net_devic
803 ms = data * 1000; 808 ms = data * 1000;
804 809
805 /* save initial values */ 810 /* save initial values */
806- down(&sky2->phy_sema); 811- down(&sky2->phy_sema);
807+ spin_lock_bh(&sky2->phy_lock); 812+ spin_lock_bh(&sky2->phy_lock);
808 if (hw->chip_id == CHIP_ID_YUKON_XL) { 813 if (hw->chip_id == CHIP_ID_YUKON_XL) {
809 u16 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR); 814 u16 pg = gm_phy_read(hw, port, PHY_MARV_EXT_ADR);
810 gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 3); 815 gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 3);
811@@ -2759,9 +2741,9 @@ static int sky2_phys_id(struct net_devic 816@@ -2759,9 +2752,9 @@ static int sky2_phys_id(struct net_devic
812 sky2_led(hw, port, onoff); 817 sky2_led(hw, port, onoff);
813 onoff = !onoff; 818 onoff = !onoff;
814 819
815- up(&sky2->phy_sema); 820- up(&sky2->phy_sema);
816+ spin_unlock_bh(&sky2->phy_lock); 821+ spin_unlock_bh(&sky2->phy_lock);
818- down(&sky2->phy_sema); 823- down(&sky2->phy_sema);
819+ spin_lock_bh(&sky2->phy_lock); 824+ spin_lock_bh(&sky2->phy_lock);
820 825
821 ms -= 250; 826 ms -= 250;
822 } 827 }
823@@ -2776,7 +2758,7 @@ static int sky2_phys_id(struct net_devic 828@@ -2776,7 +2769,7 @@ static int sky2_phys_id(struct net_devic
824 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl); 829 gm_phy_write(hw, port, PHY_MARV_LED_CTRL, ledctrl);
825 gm_phy_write(hw, port, PHY_MARV_LED_OVER, ledover); 830 gm_phy_write(hw, port, PHY_MARV_LED_OVER, ledover);
826 } 831 }
827- up(&sky2->phy_sema); 832- up(&sky2->phy_sema);
828+ spin_unlock_bh(&sky2->phy_lock); 833+ spin_unlock_bh(&sky2->phy_lock);
829 834
830 return 0; 835 return 0;
831 } 836 }
832@@ -2806,38 +2788,6 @@ static int sky2_set_pauseparam(struct ne 837@@ -2806,38 +2799,6 @@ static int sky2_set_pauseparam(struct ne
833 return err; 838 return err;
834 } 839 }
835 840
836-#ifdef CONFIG_PM 841-#ifdef CONFIG_PM
837-static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) 842-static void sky2_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
866-#endif 871-#endif
867- 872-
868 static int sky2_get_coalesce(struct net_device *dev, 873 static int sky2_get_coalesce(struct net_device *dev,
869 struct ethtool_coalesce *ecmd) 874 struct ethtool_coalesce *ecmd)
870 { 875 {
871@@ -2878,19 +2828,12 @@ static int sky2_set_coalesce(struct net_ 876@@ -2878,19 +2839,11 @@ static int sky2_set_coalesce(struct net_
872 { 877 {
873 struct sky2_port *sky2 = netdev_priv(dev); 878 struct sky2_port *sky2 = netdev_priv(dev);
874 struct sky2_hw *hw = sky2->hw; 879 struct sky2_hw *hw = sky2->hw;
875- const u32 tmin = sky2_clk2us(hw, 1); 880- const u32 tmin = sky2_clk2us(hw, 1);
876- const u32 tmax = 5000; 881- const u32 tmax = 5000;
877- 882-
878- if (ecmd->tx_coalesce_usecs != 0 && 883- if (ecmd->tx_coalesce_usecs != 0 &&
879- (ecmd->tx_coalesce_usecs < tmin || ecmd->tx_coalesce_usecs > tmax)) 884- (ecmd->tx_coalesce_usecs < tmin || ecmd->tx_coalesce_usecs > tmax))
880- return -EINVAL; 885- return -EINVAL;
886+ const u32 tmax = sky2_clk2us(hw, 0x0ffffff);
881 887
882- if (ecmd->rx_coalesce_usecs != 0 && 888- if (ecmd->rx_coalesce_usecs != 0 &&
883- (ecmd->rx_coalesce_usecs < tmin || ecmd->rx_coalesce_usecs > tmax)) 889- (ecmd->rx_coalesce_usecs < tmin || ecmd->rx_coalesce_usecs > tmax))
884- return -EINVAL; 890- return -EINVAL;
885+ const u32 tmax = sky2_clk2us(hw, 0x0ffffff); 891-
886
887- if (ecmd->rx_coalesce_usecs_irq != 0 && 892- if (ecmd->rx_coalesce_usecs_irq != 0 &&
888- (ecmd->rx_coalesce_usecs_irq < tmin || ecmd->rx_coalesce_usecs_irq > tmax)) 893- (ecmd->rx_coalesce_usecs_irq < tmin || ecmd->rx_coalesce_usecs_irq > tmax))
889+ if (ecmd->tx_coalesce_usecs > tmax || 894+ if (ecmd->tx_coalesce_usecs > tmax ||
890+ ecmd->rx_coalesce_usecs > tmax || 895+ ecmd->rx_coalesce_usecs > tmax ||
891+ ecmd->rx_coalesce_usecs_irq > tmax) 896+ ecmd->rx_coalesce_usecs_irq > tmax)
892 return -EINVAL; 897 return -EINVAL;
893 898
894 if (ecmd->tx_max_coalesced_frames >= TX_RING_SIZE-1) 899 if (ecmd->tx_max_coalesced_frames >= TX_RING_SIZE-1)
895@@ -3025,10 +2968,6 @@ static struct ethtool_ops sky2_ethtool_o 900@@ -3025,10 +2978,6 @@ static struct ethtool_ops sky2_ethtool_o
896 .set_ringparam = sky2_set_ringparam, 901 .set_ringparam = sky2_set_ringparam,
897 .get_pauseparam = sky2_get_pauseparam, 902 .get_pauseparam = sky2_get_pauseparam,
898 .set_pauseparam = sky2_set_pauseparam, 903 .set_pauseparam = sky2_set_pauseparam,
899-#ifdef CONFIG_PM 904-#ifdef CONFIG_PM
900- .get_wol = sky2_get_wol, 905- .get_wol = sky2_get_wol,
901- .set_wol = sky2_set_wol, 906- .set_wol = sky2_set_wol,
902-#endif 907-#endif
903 .phys_id = sky2_phys_id, 908 .phys_id = sky2_phys_id,
904 .get_stats_count = sky2_get_stats_count, 909 .get_stats_count = sky2_get_stats_count,
905 .get_ethtool_stats = sky2_get_ethtool_stats, 910 .get_ethtool_stats = sky2_get_ethtool_stats,
906@@ -3082,16 +3021,15 @@ static __devinit struct net_device *sky2 911@@ -3082,16 +3031,15 @@ static __devinit struct net_device *sky2
907 sky2->speed = -1; 912 sky2->speed = -1;
908 sky2->advertising = sky2_supported_modes(hw); 913 sky2->advertising = sky2_supported_modes(hw);
909 914
910- /* Receive checksum disabled for Yukon XL 915- /* Receive checksum disabled for Yukon XL
911+ /* Receive checksum disabled for Yukon XL 916+ /* Receive checksum disabled for Yukon XL
921- sky2->rx_pending = is_ec_a1(hw) ? 8 : RX_DEF_PENDING; 926- sky2->rx_pending = is_ec_a1(hw) ? 8 : RX_DEF_PENDING;
922+ sky2->rx_pending = RX_DEF_PENDING; 927+ sky2->rx_pending = RX_DEF_PENDING;
923 sky2->rx_bufsize = sky2_buf_size(ETH_DATA_LEN); 928 sky2->rx_bufsize = sky2_buf_size(ETH_DATA_LEN);
924 929
925 hw->dev[port] = dev; 930 hw->dev[port] = dev;
926@@ -3133,6 +3071,66 @@ static void __devinit sky2_show_addr(str 931@@ -3133,6 +3081,66 @@ static void __devinit sky2_show_addr(str
927 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]); 932 dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
928 } 933 }
929 934
930+/* Handle software interrupt used during MSI test */ 935+/* Handle software interrupt used during MSI test */
931+static irqreturn_t __devinit sky2_test_intr(int irq, void *dev_id, 936+static irqreturn_t __devinit sky2_test_intr(int irq, void *dev_id,
932+ struct pt_regs *regs) 937+ struct pt_regs *regs)
933+{ 938+{
934+ struct sky2_hw *hw = dev_id; 939+ struct sky2_hw *hw = dev_id;
935+ u32 status = sky2_read32(hw, B0_Y2_SP_ISRC2); 940+ u32 status = sky2_read32(hw, B0_Y2_SP_ISRC2);
936+ 941+
937+ if (status == 0) 942+ if (status == 0)
970+ wait_event_timeout(hw->msi_wait, hw->msi_detected, HZ/10); 975+ wait_event_timeout(hw->msi_wait, hw->msi_detected, HZ/10);
971+ 976+
972+ if (!hw->msi_detected) { 977+ if (!hw->msi_detected) {
973+ /* MSI test failed, go back to INTx mode */ 978+ /* MSI test failed, go back to INTx mode */
974+ printk(KERN_WARNING PFX "%s: No interrupt was generated using MSI, " 979+ printk(KERN_WARNING PFX "%s: No interrupt was generated using MSI, "
975+ "switching to INTx mode. Please report this failure to " 980+ "switching to INTx mode. Please report this failure to "
976+ "the PCI maintainer and include system chipset information.\n", 981+ "the PCI maintainer and include system chipset information.\n",
977+ pci_name(pdev)); 982+ pci_name(pdev));
978+ 983+
979+ err = -EOPNOTSUPP; 984+ err = -EOPNOTSUPP;
980+ sky2_write8(hw, B0_CTST, CS_CL_SW_IRQ); 985+ sky2_write8(hw, B0_CTST, CS_CL_SW_IRQ);
981+ } 986+ }
982+ 987+
988+} 993+}
989+ 994+
990 static int __devinit sky2_probe(struct pci_dev *pdev, 995 static int __devinit sky2_probe(struct pci_dev *pdev,
991 const struct pci_device_id *ent) 996 const struct pci_device_id *ent)
992 { 997 {
993@@ -3201,7 +3199,6 @@ static int __devinit sky2_probe(struct p 998@@ -3201,7 +3209,6 @@ static int __devinit sky2_probe(struct p
994 goto err_out_free_hw; 999 goto err_out_free_hw;
995 } 1000 }
996 hw->pm_cap = pm_cap; 1001 hw->pm_cap = pm_cap;
997- spin_lock_init(&hw->hw_lock); 1002- spin_lock_init(&hw->hw_lock);
998 1003
999 #ifdef __BIG_ENDIAN 1004 #ifdef __BIG_ENDIAN
1000 /* byte swap descriptors in hardware */ 1005 /* byte swap descriptors in hardware */
1001@@ -3254,21 +3251,27 @@ static int __devinit sky2_probe(struct p 1006@@ -3254,21 +3261,29 @@ static int __devinit sky2_probe(struct p
1002 } 1007 }
1003 } 1008 }
1004 1009
1005- err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw); 1010- err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw);
1006+ if (!disable_msi && pci_enable_msi(pdev) == 0) { 1011+ if (!disable_msi && pci_enable_msi(pdev) == 0) {
1007+ err = sky2_test_msi(hw); 1012+ err = sky2_test_msi(hw);
1008+ if (err == -EOPNOTSUPP) 1013+ if (err == -EOPNOTSUPP)
1009+ pci_disable_msi(pdev); 1014+ pci_disable_msi(pdev);
1010+ else if (err) 1015+ else if (err)
1011+ goto err_out_unregister; 1016+ goto err_out_unregister;
1012+ } 1017+ }
1018+
1019+ err = request_irq(pdev->irq, sky2_intr, SA_SHIRQ, DRV_NAME, hw);
1013 if (err) { 1020 if (err) {
1014 printk(KERN_ERR PFX "%s: cannot assign irq %d\n", 1021 printk(KERN_ERR PFX "%s: cannot assign irq %d\n",
1015 pci_name(pdev), pdev->irq); 1022 pci_name(pdev), pdev->irq);
1016 goto err_out_unregister; 1023 goto err_out_unregister;
1017 } 1024 }
1027 err_out_unregister: 1034 err_out_unregister:
1028+ pci_disable_msi(pdev); 1035+ pci_disable_msi(pdev);
1029 if (dev1) { 1036 if (dev1) {
1030 unregister_netdev(dev1); 1037 unregister_netdev(dev1);
1031 free_netdev(dev1); 1038 free_netdev(dev1);
1032@@ -3311,6 +3314,7 @@ static void __devexit sky2_remove(struct 1039@@ -3311,6 +3326,7 @@ static void __devexit sky2_remove(struct
1033 sky2_read8(hw, B0_CTST); 1040 sky2_read8(hw, B0_CTST);
1034 1041
1035 free_irq(pdev->irq, hw); 1042 free_irq(pdev->irq, hw);
1036+ pci_disable_msi(pdev); 1043+ pci_disable_msi(pdev);
1037 pci_free_consistent(pdev, STATUS_LE_BYTES, hw->st_le, hw->st_dma); 1044 pci_free_consistent(pdev, STATUS_LE_BYTES, hw->st_le, hw->st_dma);
1038 pci_release_regions(pdev); 1045 pci_release_regions(pdev);
1039 pci_disable_device(pdev); 1046 pci_disable_device(pdev);
1040--- a/linux/drivers/net/sky2.h 2006-04-19 09:13:28.000000000 +0000 1047--- linux/drivers/net/sky2.h 2006-04-19 09:13:28.000000000 +0000
1041+++ b/linux/drivers/net/sky2.h 2006-04-19 10:19:11.000000000 +0000 1048+++ linux/drivers/net/sky2.h 2006-04-19 10:19:11.000000000 +0000
1042@@ -278,13 +278,11 @@ enum { 1049@@ -278,13 +278,11 @@ enum {
1043 Y2_IS_CHK_TXS1 = 1<<1, /* Descriptor error TXS 1 */ 1050 Y2_IS_CHK_TXS1 = 1<<1, /* Descriptor error TXS 1 */
1044 Y2_IS_CHK_TXA1 = 1<<0, /* Descriptor error TXA 1 */ 1051 Y2_IS_CHK_TXA1 = 1<<0, /* Descriptor error TXA 1 */
1045 1052
1046- Y2_IS_BASE = Y2_IS_HW_ERR | Y2_IS_STAT_BMU | 1053- Y2_IS_BASE = Y2_IS_HW_ERR | Y2_IS_STAT_BMU |

Legend:
Removed from v.415  
changed lines
  Added in v.416

  ViewVC Help
Powered by ViewVC 1.1.20