diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /drivers/net/atarilance.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'drivers/net/atarilance.c')
-rw-r--r-- | drivers/net/atarilance.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index b57d7dee389a..1264d781b554 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -116,7 +116,7 @@ MODULE_LICENSE("GPL"); | |||
116 | #define RX_RING_LEN_BITS (RX_LOG_RING_SIZE << 5) | 116 | #define RX_RING_LEN_BITS (RX_LOG_RING_SIZE << 5) |
117 | #define RX_RING_MOD_MASK (RX_RING_SIZE - 1) | 117 | #define RX_RING_MOD_MASK (RX_RING_SIZE - 1) |
118 | 118 | ||
119 | #define TX_TIMEOUT 20 | 119 | #define TX_TIMEOUT (HZ/5) |
120 | 120 | ||
121 | /* The LANCE Rx and Tx ring descriptors. */ | 121 | /* The LANCE Rx and Tx ring descriptors. */ |
122 | struct lance_rx_head { | 122 | struct lance_rx_head { |
@@ -362,7 +362,7 @@ static void *slow_memcpy( void *dst, const void *src, size_t len ) | |||
362 | *cto++ = *cfrom++; | 362 | *cto++ = *cfrom++; |
363 | MFPDELAY(); | 363 | MFPDELAY(); |
364 | } | 364 | } |
365 | return( dst ); | 365 | return dst; |
366 | } | 366 | } |
367 | 367 | ||
368 | 368 | ||
@@ -407,7 +407,7 @@ static noinline int __init addr_accessible(volatile void *regp, int wordflag, | |||
407 | int writeflag) | 407 | int writeflag) |
408 | { | 408 | { |
409 | int ret; | 409 | int ret; |
410 | long flags; | 410 | unsigned long flags; |
411 | long *vbr, save_berr; | 411 | long *vbr, save_berr; |
412 | 412 | ||
413 | local_irq_save(flags); | 413 | local_irq_save(flags); |
@@ -449,7 +449,7 @@ static noinline int __init addr_accessible(volatile void *regp, int wordflag, | |||
449 | vbr[2] = save_berr; | 449 | vbr[2] = save_berr; |
450 | local_irq_restore(flags); | 450 | local_irq_restore(flags); |
451 | 451 | ||
452 | return( ret ); | 452 | return ret; |
453 | } | 453 | } |
454 | 454 | ||
455 | static const struct net_device_ops lance_netdev_ops = { | 455 | static const struct net_device_ops lance_netdev_ops = { |
@@ -526,7 +526,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, | |||
526 | goto probe_ok; | 526 | goto probe_ok; |
527 | 527 | ||
528 | probe_fail: | 528 | probe_fail: |
529 | return( 0 ); | 529 | return 0; |
530 | 530 | ||
531 | probe_ok: | 531 | probe_ok: |
532 | lp = netdev_priv(dev); | 532 | lp = netdev_priv(dev); |
@@ -554,9 +554,9 @@ static unsigned long __init lance_probe1( struct net_device *dev, | |||
554 | memaddr == (unsigned short *)0xffe00000) { | 554 | memaddr == (unsigned short *)0xffe00000) { |
555 | /* PAMs card and Riebl on ST use level 5 autovector */ | 555 | /* PAMs card and Riebl on ST use level 5 autovector */ |
556 | if (request_irq(IRQ_AUTO_5, lance_interrupt, IRQ_TYPE_PRIO, | 556 | if (request_irq(IRQ_AUTO_5, lance_interrupt, IRQ_TYPE_PRIO, |
557 | "PAM/Riebl-ST Ethernet", dev)) { | 557 | "PAM,Riebl-ST Ethernet", dev)) { |
558 | printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); | 558 | printk( "Lance: request for irq %d failed\n", IRQ_AUTO_5 ); |
559 | return( 0 ); | 559 | return 0; |
560 | } | 560 | } |
561 | dev->irq = (unsigned short)IRQ_AUTO_5; | 561 | dev->irq = (unsigned short)IRQ_AUTO_5; |
562 | } | 562 | } |
@@ -568,12 +568,12 @@ static unsigned long __init lance_probe1( struct net_device *dev, | |||
568 | unsigned long irq = atari_register_vme_int(); | 568 | unsigned long irq = atari_register_vme_int(); |
569 | if (!irq) { | 569 | if (!irq) { |
570 | printk( "Lance: request for VME interrupt failed\n" ); | 570 | printk( "Lance: request for VME interrupt failed\n" ); |
571 | return( 0 ); | 571 | return 0; |
572 | } | 572 | } |
573 | if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, | 573 | if (request_irq(irq, lance_interrupt, IRQ_TYPE_PRIO, |
574 | "Riebl-VME Ethernet", dev)) { | 574 | "Riebl-VME Ethernet", dev)) { |
575 | printk( "Lance: request for irq %ld failed\n", irq ); | 575 | printk( "Lance: request for irq %ld failed\n", irq ); |
576 | return( 0 ); | 576 | return 0; |
577 | } | 577 | } |
578 | dev->irq = irq; | 578 | dev->irq = irq; |
579 | } | 579 | } |
@@ -637,7 +637,7 @@ static unsigned long __init lance_probe1( struct net_device *dev, | |||
637 | /* XXX MSch */ | 637 | /* XXX MSch */ |
638 | dev->watchdog_timeo = TX_TIMEOUT; | 638 | dev->watchdog_timeo = TX_TIMEOUT; |
639 | 639 | ||
640 | return( 1 ); | 640 | return 1; |
641 | } | 641 | } |
642 | 642 | ||
643 | 643 | ||
@@ -666,7 +666,7 @@ static int lance_open( struct net_device *dev ) | |||
666 | DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n", | 666 | DPRINTK( 2, ( "lance_open(): opening %s failed, i=%d, csr0=%04x\n", |
667 | dev->name, i, DREG )); | 667 | dev->name, i, DREG )); |
668 | DREG = CSR0_STOP; | 668 | DREG = CSR0_STOP; |
669 | return( -EIO ); | 669 | return -EIO; |
670 | } | 670 | } |
671 | DREG = CSR0_IDON; | 671 | DREG = CSR0_IDON; |
672 | DREG = CSR0_STRT; | 672 | DREG = CSR0_STRT; |
@@ -676,7 +676,7 @@ static int lance_open( struct net_device *dev ) | |||
676 | 676 | ||
677 | DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG )); | 677 | DPRINTK( 2, ( "%s: LANCE is open, csr0 %04x\n", dev->name, DREG )); |
678 | 678 | ||
679 | return( 0 ); | 679 | return 0; |
680 | } | 680 | } |
681 | 681 | ||
682 | 682 | ||
@@ -1126,13 +1126,13 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) | |||
1126 | int i; | 1126 | int i; |
1127 | 1127 | ||
1128 | if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL) | 1128 | if (lp->cardtype != OLD_RIEBL && lp->cardtype != NEW_RIEBL) |
1129 | return( -EOPNOTSUPP ); | 1129 | return -EOPNOTSUPP; |
1130 | 1130 | ||
1131 | if (netif_running(dev)) { | 1131 | if (netif_running(dev)) { |
1132 | /* Only possible while card isn't started */ | 1132 | /* Only possible while card isn't started */ |
1133 | DPRINTK( 1, ( "%s: hwaddr can be set only while card isn't open.\n", | 1133 | DPRINTK( 1, ( "%s: hwaddr can be set only while card isn't open.\n", |
1134 | dev->name )); | 1134 | dev->name )); |
1135 | return( -EIO ); | 1135 | return -EIO; |
1136 | } | 1136 | } |
1137 | 1137 | ||
1138 | memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len ); | 1138 | memcpy( dev->dev_addr, saddr->sa_data, dev->addr_len ); |
@@ -1142,7 +1142,7 @@ static int lance_set_mac_address( struct net_device *dev, void *addr ) | |||
1142 | /* set also the magic for future sessions */ | 1142 | /* set also the magic for future sessions */ |
1143 | *RIEBL_MAGIC_ADDR = RIEBL_MAGIC; | 1143 | *RIEBL_MAGIC_ADDR = RIEBL_MAGIC; |
1144 | 1144 | ||
1145 | return( 0 ); | 1145 | return 0; |
1146 | } | 1146 | } |
1147 | 1147 | ||
1148 | 1148 | ||