diff options
author | Richard Knutsson <ricknu-0@student.ltu.se> | 2007-05-19 16:18:10 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-07-08 22:16:39 -0400 |
commit | eb034a7998956bffdd2acccb7fddfc114c913120 (patch) | |
tree | 2d8b389ff4cff886f5f97116f96c0926b83eaa01 /drivers/net/tulip/de4x5.c | |
parent | 480fe1a31c662ef4ff0598a7cacefa21f98335f1 (diff) |
tulip: Convert to generic boolean
Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/tulip/de4x5.c')
-rw-r--r-- | drivers/net/tulip/de4x5.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 62143f92c231..42fca26afc50 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -597,7 +597,7 @@ static char *args; | |||
597 | #endif | 597 | #endif |
598 | 598 | ||
599 | struct parameters { | 599 | struct parameters { |
600 | int fdx; | 600 | bool fdx; |
601 | int autosense; | 601 | int autosense; |
602 | }; | 602 | }; |
603 | 603 | ||
@@ -809,10 +809,10 @@ struct de4x5_private { | |||
809 | s32 irq_en; /* Summary interrupt bits */ | 809 | s32 irq_en; /* Summary interrupt bits */ |
810 | int media; /* Media (eg TP), mode (eg 100B)*/ | 810 | int media; /* Media (eg TP), mode (eg 100B)*/ |
811 | int c_media; /* Remember the last media conn */ | 811 | int c_media; /* Remember the last media conn */ |
812 | int fdx; /* media full duplex flag */ | 812 | bool fdx; /* media full duplex flag */ |
813 | int linkOK; /* Link is OK */ | 813 | int linkOK; /* Link is OK */ |
814 | int autosense; /* Allow/disallow autosensing */ | 814 | int autosense; /* Allow/disallow autosensing */ |
815 | int tx_enable; /* Enable descriptor polling */ | 815 | bool tx_enable; /* Enable descriptor polling */ |
816 | int setup_f; /* Setup frame filtering type */ | 816 | int setup_f; /* Setup frame filtering type */ |
817 | int local_state; /* State within a 'media' state */ | 817 | int local_state; /* State within a 'media' state */ |
818 | struct mii_phy phy[DE4X5_MAX_PHY]; /* List of attached PHY devices */ | 818 | struct mii_phy phy[DE4X5_MAX_PHY]; /* List of attached PHY devices */ |
@@ -838,8 +838,8 @@ struct de4x5_private { | |||
838 | struct de4x5_srom srom; /* A copy of the SROM */ | 838 | struct de4x5_srom srom; /* A copy of the SROM */ |
839 | int cfrv; /* Card CFRV copy */ | 839 | int cfrv; /* Card CFRV copy */ |
840 | int rx_ovf; /* Check for 'RX overflow' tag */ | 840 | int rx_ovf; /* Check for 'RX overflow' tag */ |
841 | int useSROM; /* For non-DEC card use SROM */ | 841 | bool useSROM; /* For non-DEC card use SROM */ |
842 | int useMII; /* Infoblock using the MII */ | 842 | bool useMII; /* Infoblock using the MII */ |
843 | int asBitValid; /* Autosense bits in GEP? */ | 843 | int asBitValid; /* Autosense bits in GEP? */ |
844 | int asPolarity; /* 0 => asserted high */ | 844 | int asPolarity; /* 0 => asserted high */ |
845 | int asBit; /* Autosense bit number in GEP */ | 845 | int asBit; /* Autosense bit number in GEP */ |
@@ -928,7 +928,7 @@ static int dc21040_state(struct net_device *dev, int csr13, int csr14, int c | |||
928 | static int test_media(struct net_device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec); | 928 | static int test_media(struct net_device *dev, s32 irqs, s32 irq_mask, s32 csr13, s32 csr14, s32 csr15, s32 msec); |
929 | static int test_for_100Mb(struct net_device *dev, int msec); | 929 | static int test_for_100Mb(struct net_device *dev, int msec); |
930 | static int wait_for_link(struct net_device *dev); | 930 | static int wait_for_link(struct net_device *dev); |
931 | static int test_mii_reg(struct net_device *dev, int reg, int mask, int pol, long msec); | 931 | static int test_mii_reg(struct net_device *dev, int reg, int mask, bool pol, long msec); |
932 | static int is_spd_100(struct net_device *dev); | 932 | static int is_spd_100(struct net_device *dev); |
933 | static int is_100_up(struct net_device *dev); | 933 | static int is_100_up(struct net_device *dev); |
934 | static int is_10_up(struct net_device *dev); | 934 | static int is_10_up(struct net_device *dev); |
@@ -1109,7 +1109,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1109 | /* | 1109 | /* |
1110 | ** Now find out what kind of DC21040/DC21041/DC21140 board we have. | 1110 | ** Now find out what kind of DC21040/DC21041/DC21140 board we have. |
1111 | */ | 1111 | */ |
1112 | lp->useSROM = FALSE; | 1112 | lp->useSROM = false; |
1113 | if (lp->bus == PCI) { | 1113 | if (lp->bus == PCI) { |
1114 | PCI_signature(name, lp); | 1114 | PCI_signature(name, lp); |
1115 | } else { | 1115 | } else { |
@@ -1137,7 +1137,7 @@ de4x5_hw_init(struct net_device *dev, u_long iobase, struct device *gendev) | |||
1137 | lp->cache.gepc = GEP_INIT; | 1137 | lp->cache.gepc = GEP_INIT; |
1138 | lp->asBit = GEP_SLNK; | 1138 | lp->asBit = GEP_SLNK; |
1139 | lp->asPolarity = GEP_SLNK; | 1139 | lp->asPolarity = GEP_SLNK; |
1140 | lp->asBitValid = TRUE; | 1140 | lp->asBitValid = ~0; |
1141 | lp->timeout = -1; | 1141 | lp->timeout = -1; |
1142 | lp->gendev = gendev; | 1142 | lp->gendev = gendev; |
1143 | spin_lock_init(&lp->lock); | 1143 | spin_lock_init(&lp->lock); |
@@ -1463,7 +1463,7 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1463 | u_long flags = 0; | 1463 | u_long flags = 0; |
1464 | 1464 | ||
1465 | netif_stop_queue(dev); | 1465 | netif_stop_queue(dev); |
1466 | if (lp->tx_enable == NO) { /* Cannot send for now */ | 1466 | if (!lp->tx_enable) { /* Cannot send for now */ |
1467 | return -1; | 1467 | return -1; |
1468 | } | 1468 | } |
1469 | 1469 | ||
@@ -2424,7 +2424,7 @@ dc21040_autoconf(struct net_device *dev) | |||
2424 | switch (lp->media) { | 2424 | switch (lp->media) { |
2425 | case INIT: | 2425 | case INIT: |
2426 | DISABLE_IRQs; | 2426 | DISABLE_IRQs; |
2427 | lp->tx_enable = NO; | 2427 | lp->tx_enable = false; |
2428 | lp->timeout = -1; | 2428 | lp->timeout = -1; |
2429 | de4x5_save_skbs(dev); | 2429 | de4x5_save_skbs(dev); |
2430 | if ((lp->autosense == AUTO) || (lp->autosense == TP)) { | 2430 | if ((lp->autosense == AUTO) || (lp->autosense == TP)) { |
@@ -2477,7 +2477,7 @@ dc21040_autoconf(struct net_device *dev) | |||
2477 | lp->c_media = lp->media; | 2477 | lp->c_media = lp->media; |
2478 | } | 2478 | } |
2479 | lp->media = INIT; | 2479 | lp->media = INIT; |
2480 | lp->tx_enable = NO; | 2480 | lp->tx_enable = false; |
2481 | break; | 2481 | break; |
2482 | } | 2482 | } |
2483 | 2483 | ||
@@ -2578,7 +2578,7 @@ dc21041_autoconf(struct net_device *dev) | |||
2578 | switch (lp->media) { | 2578 | switch (lp->media) { |
2579 | case INIT: | 2579 | case INIT: |
2580 | DISABLE_IRQs; | 2580 | DISABLE_IRQs; |
2581 | lp->tx_enable = NO; | 2581 | lp->tx_enable = false; |
2582 | lp->timeout = -1; | 2582 | lp->timeout = -1; |
2583 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ | 2583 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ |
2584 | if ((lp->autosense == AUTO) || (lp->autosense == TP_NW)) { | 2584 | if ((lp->autosense == AUTO) || (lp->autosense == TP_NW)) { |
@@ -2757,7 +2757,7 @@ dc21041_autoconf(struct net_device *dev) | |||
2757 | lp->c_media = lp->media; | 2757 | lp->c_media = lp->media; |
2758 | } | 2758 | } |
2759 | lp->media = INIT; | 2759 | lp->media = INIT; |
2760 | lp->tx_enable = NO; | 2760 | lp->tx_enable = false; |
2761 | break; | 2761 | break; |
2762 | } | 2762 | } |
2763 | 2763 | ||
@@ -2781,7 +2781,7 @@ dc21140m_autoconf(struct net_device *dev) | |||
2781 | case INIT: | 2781 | case INIT: |
2782 | if (lp->timeout < 0) { | 2782 | if (lp->timeout < 0) { |
2783 | DISABLE_IRQs; | 2783 | DISABLE_IRQs; |
2784 | lp->tx_enable = FALSE; | 2784 | lp->tx_enable = false; |
2785 | lp->linkOK = 0; | 2785 | lp->linkOK = 0; |
2786 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ | 2786 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ |
2787 | } | 2787 | } |
@@ -2830,7 +2830,7 @@ dc21140m_autoconf(struct net_device *dev) | |||
2830 | if (lp->timeout < 0) { | 2830 | if (lp->timeout < 0) { |
2831 | mii_wr(MII_CR_ASSE | MII_CR_RAN, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); | 2831 | mii_wr(MII_CR_ASSE | MII_CR_RAN, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); |
2832 | } | 2832 | } |
2833 | cr = test_mii_reg(dev, MII_CR, MII_CR_RAN, FALSE, 500); | 2833 | cr = test_mii_reg(dev, MII_CR, MII_CR_RAN, false, 500); |
2834 | if (cr < 0) { | 2834 | if (cr < 0) { |
2835 | next_tick = cr & ~TIMER_CB; | 2835 | next_tick = cr & ~TIMER_CB; |
2836 | } else { | 2836 | } else { |
@@ -2845,7 +2845,7 @@ dc21140m_autoconf(struct net_device *dev) | |||
2845 | break; | 2845 | break; |
2846 | 2846 | ||
2847 | case 1: | 2847 | case 1: |
2848 | if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, TRUE, 2000)) < 0) { | 2848 | if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, true, 2000)) < 0) { |
2849 | next_tick = sr & ~TIMER_CB; | 2849 | next_tick = sr & ~TIMER_CB; |
2850 | } else { | 2850 | } else { |
2851 | lp->media = SPD_DET; | 2851 | lp->media = SPD_DET; |
@@ -2857,10 +2857,10 @@ dc21140m_autoconf(struct net_device *dev) | |||
2857 | if (!(anlpa & MII_ANLPA_RF) && | 2857 | if (!(anlpa & MII_ANLPA_RF) && |
2858 | (cap = anlpa & MII_ANLPA_TAF & ana)) { | 2858 | (cap = anlpa & MII_ANLPA_TAF & ana)) { |
2859 | if (cap & MII_ANA_100M) { | 2859 | if (cap & MII_ANA_100M) { |
2860 | lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) ? TRUE : FALSE); | 2860 | lp->fdx = (ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) != 0; |
2861 | lp->media = _100Mb; | 2861 | lp->media = _100Mb; |
2862 | } else if (cap & MII_ANA_10M) { | 2862 | } else if (cap & MII_ANA_10M) { |
2863 | lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_10M) ? TRUE : FALSE); | 2863 | lp->fdx = (ana & anlpa & MII_ANA_FDAM & MII_ANA_10M) != 0; |
2864 | 2864 | ||
2865 | lp->media = _10Mb; | 2865 | lp->media = _10Mb; |
2866 | } | 2866 | } |
@@ -2932,7 +2932,7 @@ dc21140m_autoconf(struct net_device *dev) | |||
2932 | lp->c_media = lp->media; | 2932 | lp->c_media = lp->media; |
2933 | } | 2933 | } |
2934 | lp->media = INIT; | 2934 | lp->media = INIT; |
2935 | lp->tx_enable = FALSE; | 2935 | lp->tx_enable = false; |
2936 | break; | 2936 | break; |
2937 | } | 2937 | } |
2938 | 2938 | ||
@@ -2965,7 +2965,7 @@ dc2114x_autoconf(struct net_device *dev) | |||
2965 | case INIT: | 2965 | case INIT: |
2966 | if (lp->timeout < 0) { | 2966 | if (lp->timeout < 0) { |
2967 | DISABLE_IRQs; | 2967 | DISABLE_IRQs; |
2968 | lp->tx_enable = FALSE; | 2968 | lp->tx_enable = false; |
2969 | lp->linkOK = 0; | 2969 | lp->linkOK = 0; |
2970 | lp->timeout = -1; | 2970 | lp->timeout = -1; |
2971 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ | 2971 | de4x5_save_skbs(dev); /* Save non transmitted skb's */ |
@@ -3013,7 +3013,7 @@ dc2114x_autoconf(struct net_device *dev) | |||
3013 | if (lp->timeout < 0) { | 3013 | if (lp->timeout < 0) { |
3014 | mii_wr(MII_CR_ASSE | MII_CR_RAN, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); | 3014 | mii_wr(MII_CR_ASSE | MII_CR_RAN, MII_CR, lp->phy[lp->active].addr, DE4X5_MII); |
3015 | } | 3015 | } |
3016 | cr = test_mii_reg(dev, MII_CR, MII_CR_RAN, FALSE, 500); | 3016 | cr = test_mii_reg(dev, MII_CR, MII_CR_RAN, false, 500); |
3017 | if (cr < 0) { | 3017 | if (cr < 0) { |
3018 | next_tick = cr & ~TIMER_CB; | 3018 | next_tick = cr & ~TIMER_CB; |
3019 | } else { | 3019 | } else { |
@@ -3028,7 +3028,8 @@ dc2114x_autoconf(struct net_device *dev) | |||
3028 | break; | 3028 | break; |
3029 | 3029 | ||
3030 | case 1: | 3030 | case 1: |
3031 | if ((sr=test_mii_reg(dev, MII_SR, MII_SR_ASSC, TRUE, 2000)) < 0) { | 3031 | sr = test_mii_reg(dev, MII_SR, MII_SR_ASSC, true, 2000); |
3032 | if (sr < 0) { | ||
3032 | next_tick = sr & ~TIMER_CB; | 3033 | next_tick = sr & ~TIMER_CB; |
3033 | } else { | 3034 | } else { |
3034 | lp->media = SPD_DET; | 3035 | lp->media = SPD_DET; |
@@ -3040,10 +3041,10 @@ dc2114x_autoconf(struct net_device *dev) | |||
3040 | if (!(anlpa & MII_ANLPA_RF) && | 3041 | if (!(anlpa & MII_ANLPA_RF) && |
3041 | (cap = anlpa & MII_ANLPA_TAF & ana)) { | 3042 | (cap = anlpa & MII_ANLPA_TAF & ana)) { |
3042 | if (cap & MII_ANA_100M) { | 3043 | if (cap & MII_ANA_100M) { |
3043 | lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) ? TRUE : FALSE); | 3044 | lp->fdx = (ana & anlpa & MII_ANA_FDAM & MII_ANA_100M) != 0; |
3044 | lp->media = _100Mb; | 3045 | lp->media = _100Mb; |
3045 | } else if (cap & MII_ANA_10M) { | 3046 | } else if (cap & MII_ANA_10M) { |
3046 | lp->fdx = ((ana & anlpa & MII_ANA_FDAM & MII_ANA_10M) ? TRUE : FALSE); | 3047 | lp->fdx = (ana & anlpa & MII_ANA_FDAM & MII_ANA_10M) != 0; |
3047 | lp->media = _10Mb; | 3048 | lp->media = _10Mb; |
3048 | } | 3049 | } |
3049 | } | 3050 | } |
@@ -3222,14 +3223,14 @@ srom_map_media(struct net_device *dev) | |||
3222 | { | 3223 | { |
3223 | struct de4x5_private *lp = netdev_priv(dev); | 3224 | struct de4x5_private *lp = netdev_priv(dev); |
3224 | 3225 | ||
3225 | lp->fdx = 0; | 3226 | lp->fdx = false; |
3226 | if (lp->infoblock_media == lp->media) | 3227 | if (lp->infoblock_media == lp->media) |
3227 | return 0; | 3228 | return 0; |
3228 | 3229 | ||
3229 | switch(lp->infoblock_media) { | 3230 | switch(lp->infoblock_media) { |
3230 | case SROM_10BASETF: | 3231 | case SROM_10BASETF: |
3231 | if (!lp->params.fdx) return -1; | 3232 | if (!lp->params.fdx) return -1; |
3232 | lp->fdx = TRUE; | 3233 | lp->fdx = true; |
3233 | case SROM_10BASET: | 3234 | case SROM_10BASET: |
3234 | if (lp->params.fdx && !lp->fdx) return -1; | 3235 | if (lp->params.fdx && !lp->fdx) return -1; |
3235 | if ((lp->chipset == DC21140) || ((lp->chipset & ~0x00ff) == DC2114x)) { | 3236 | if ((lp->chipset == DC21140) || ((lp->chipset & ~0x00ff) == DC2114x)) { |
@@ -3249,7 +3250,7 @@ srom_map_media(struct net_device *dev) | |||
3249 | 3250 | ||
3250 | case SROM_100BASETF: | 3251 | case SROM_100BASETF: |
3251 | if (!lp->params.fdx) return -1; | 3252 | if (!lp->params.fdx) return -1; |
3252 | lp->fdx = TRUE; | 3253 | lp->fdx = true; |
3253 | case SROM_100BASET: | 3254 | case SROM_100BASET: |
3254 | if (lp->params.fdx && !lp->fdx) return -1; | 3255 | if (lp->params.fdx && !lp->fdx) return -1; |
3255 | lp->media = _100Mb; | 3256 | lp->media = _100Mb; |
@@ -3261,7 +3262,7 @@ srom_map_media(struct net_device *dev) | |||
3261 | 3262 | ||
3262 | case SROM_100BASEFF: | 3263 | case SROM_100BASEFF: |
3263 | if (!lp->params.fdx) return -1; | 3264 | if (!lp->params.fdx) return -1; |
3264 | lp->fdx = TRUE; | 3265 | lp->fdx = true; |
3265 | case SROM_100BASEF: | 3266 | case SROM_100BASEF: |
3266 | if (lp->params.fdx && !lp->fdx) return -1; | 3267 | if (lp->params.fdx && !lp->fdx) return -1; |
3267 | lp->media = _100Mb; | 3268 | lp->media = _100Mb; |
@@ -3297,7 +3298,7 @@ de4x5_init_connection(struct net_device *dev) | |||
3297 | spin_lock_irqsave(&lp->lock, flags); | 3298 | spin_lock_irqsave(&lp->lock, flags); |
3298 | de4x5_rst_desc_ring(dev); | 3299 | de4x5_rst_desc_ring(dev); |
3299 | de4x5_setup_intr(dev); | 3300 | de4x5_setup_intr(dev); |
3300 | lp->tx_enable = YES; | 3301 | lp->tx_enable = true; |
3301 | spin_unlock_irqrestore(&lp->lock, flags); | 3302 | spin_unlock_irqrestore(&lp->lock, flags); |
3302 | outl(POLL_DEMAND, DE4X5_TPD); | 3303 | outl(POLL_DEMAND, DE4X5_TPD); |
3303 | 3304 | ||
@@ -3336,7 +3337,7 @@ de4x5_reset_phy(struct net_device *dev) | |||
3336 | } | 3337 | } |
3337 | } | 3338 | } |
3338 | if (lp->useMII) { | 3339 | if (lp->useMII) { |
3339 | next_tick = test_mii_reg(dev, MII_CR, MII_CR_RST, FALSE, 500); | 3340 | next_tick = test_mii_reg(dev, MII_CR, MII_CR_RST, false, 500); |
3340 | } | 3341 | } |
3341 | } else if (lp->chipset == DC21140) { | 3342 | } else if (lp->chipset == DC21140) { |
3342 | PHY_HARD_RESET; | 3343 | PHY_HARD_RESET; |
@@ -3466,7 +3467,7 @@ wait_for_link(struct net_device *dev) | |||
3466 | ** | 3467 | ** |
3467 | */ | 3468 | */ |
3468 | static int | 3469 | static int |
3469 | test_mii_reg(struct net_device *dev, int reg, int mask, int pol, long msec) | 3470 | test_mii_reg(struct net_device *dev, int reg, int mask, bool pol, long msec) |
3470 | { | 3471 | { |
3471 | struct de4x5_private *lp = netdev_priv(dev); | 3472 | struct de4x5_private *lp = netdev_priv(dev); |
3472 | int test; | 3473 | int test; |
@@ -3476,9 +3477,8 @@ test_mii_reg(struct net_device *dev, int reg, int mask, int pol, long msec) | |||
3476 | lp->timeout = msec/100; | 3477 | lp->timeout = msec/100; |
3477 | } | 3478 | } |
3478 | 3479 | ||
3479 | if (pol) pol = ~0; | ||
3480 | reg = mii_rd((u_char)reg, lp->phy[lp->active].addr, DE4X5_MII) & mask; | 3480 | reg = mii_rd((u_char)reg, lp->phy[lp->active].addr, DE4X5_MII) & mask; |
3481 | test = (reg ^ pol) & mask; | 3481 | test = (reg ^ (pol ? ~0 : 0)) & mask; |
3482 | 3482 | ||
3483 | if (test && --lp->timeout) { | 3483 | if (test && --lp->timeout) { |
3484 | reg = 100 | TIMER_CB; | 3484 | reg = 100 | TIMER_CB; |
@@ -3992,10 +3992,10 @@ PCI_signature(char *name, struct de4x5_private *lp) | |||
3992 | ))))))); | 3992 | ))))))); |
3993 | } | 3993 | } |
3994 | if (lp->chipset != DC21041) { | 3994 | if (lp->chipset != DC21041) { |
3995 | lp->useSROM = TRUE; /* card is not recognisably DEC */ | 3995 | lp->useSROM = true; /* card is not recognisably DEC */ |
3996 | } | 3996 | } |
3997 | } else if ((lp->chipset & ~0x00ff) == DC2114x) { | 3997 | } else if ((lp->chipset & ~0x00ff) == DC2114x) { |
3998 | lp->useSROM = TRUE; | 3998 | lp->useSROM = true; |
3999 | } | 3999 | } |
4000 | 4000 | ||
4001 | return status; | 4001 | return status; |
@@ -4216,7 +4216,7 @@ srom_repair(struct net_device *dev, int card) | |||
4216 | memset((char *)&lp->srom, 0, sizeof(struct de4x5_srom)); | 4216 | memset((char *)&lp->srom, 0, sizeof(struct de4x5_srom)); |
4217 | memcpy(lp->srom.ieee_addr, (char *)dev->dev_addr, ETH_ALEN); | 4217 | memcpy(lp->srom.ieee_addr, (char *)dev->dev_addr, ETH_ALEN); |
4218 | memcpy(lp->srom.info, (char *)&srom_repair_info[SMC-1], 100); | 4218 | memcpy(lp->srom.info, (char *)&srom_repair_info[SMC-1], 100); |
4219 | lp->useSROM = TRUE; | 4219 | lp->useSROM = true; |
4220 | break; | 4220 | break; |
4221 | } | 4221 | } |
4222 | 4222 | ||
@@ -4392,7 +4392,7 @@ srom_infoleaf_info(struct net_device *dev) | |||
4392 | if (lp->chipset == infoleaf_array[i].chipset) break; | 4392 | if (lp->chipset == infoleaf_array[i].chipset) break; |
4393 | } | 4393 | } |
4394 | if (i == INFOLEAF_SIZE) { | 4394 | if (i == INFOLEAF_SIZE) { |
4395 | lp->useSROM = FALSE; | 4395 | lp->useSROM = false; |
4396 | printk("%s: Cannot find correct chipset for SROM decoding!\n", | 4396 | printk("%s: Cannot find correct chipset for SROM decoding!\n", |
4397 | dev->name); | 4397 | dev->name); |
4398 | return -ENXIO; | 4398 | return -ENXIO; |
@@ -4409,7 +4409,7 @@ srom_infoleaf_info(struct net_device *dev) | |||
4409 | if (lp->device == *p) break; | 4409 | if (lp->device == *p) break; |
4410 | } | 4410 | } |
4411 | if (i == 0) { | 4411 | if (i == 0) { |
4412 | lp->useSROM = FALSE; | 4412 | lp->useSROM = false; |
4413 | printk("%s: Cannot find correct PCI device [%d] for SROM decoding!\n", | 4413 | printk("%s: Cannot find correct PCI device [%d] for SROM decoding!\n", |
4414 | dev->name, lp->device); | 4414 | dev->name, lp->device); |
4415 | return -ENXIO; | 4415 | return -ENXIO; |
@@ -4542,7 +4542,7 @@ dc21140_infoleaf(struct net_device *dev) | |||
4542 | } | 4542 | } |
4543 | lp->media = INIT; | 4543 | lp->media = INIT; |
4544 | lp->tcount = 0; | 4544 | lp->tcount = 0; |
4545 | lp->tx_enable = FALSE; | 4545 | lp->tx_enable = false; |
4546 | } | 4546 | } |
4547 | 4547 | ||
4548 | return next_tick & ~TIMER_CB; | 4548 | return next_tick & ~TIMER_CB; |
@@ -4577,7 +4577,7 @@ dc21142_infoleaf(struct net_device *dev) | |||
4577 | } | 4577 | } |
4578 | lp->media = INIT; | 4578 | lp->media = INIT; |
4579 | lp->tcount = 0; | 4579 | lp->tcount = 0; |
4580 | lp->tx_enable = FALSE; | 4580 | lp->tx_enable = false; |
4581 | } | 4581 | } |
4582 | 4582 | ||
4583 | return next_tick & ~TIMER_CB; | 4583 | return next_tick & ~TIMER_CB; |
@@ -4611,7 +4611,7 @@ dc21143_infoleaf(struct net_device *dev) | |||
4611 | } | 4611 | } |
4612 | lp->media = INIT; | 4612 | lp->media = INIT; |
4613 | lp->tcount = 0; | 4613 | lp->tcount = 0; |
4614 | lp->tx_enable = FALSE; | 4614 | lp->tx_enable = false; |
4615 | } | 4615 | } |
4616 | 4616 | ||
4617 | return next_tick & ~TIMER_CB; | 4617 | return next_tick & ~TIMER_CB; |
@@ -4650,7 +4650,7 @@ compact_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4650 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); | 4650 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); |
4651 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; | 4651 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; |
4652 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); | 4652 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); |
4653 | lp->useMII = FALSE; | 4653 | lp->useMII = false; |
4654 | 4654 | ||
4655 | de4x5_switch_mac_port(dev); | 4655 | de4x5_switch_mac_port(dev); |
4656 | } | 4656 | } |
@@ -4691,7 +4691,7 @@ type0_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4691 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); | 4691 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); |
4692 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; | 4692 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; |
4693 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); | 4693 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); |
4694 | lp->useMII = FALSE; | 4694 | lp->useMII = false; |
4695 | 4695 | ||
4696 | de4x5_switch_mac_port(dev); | 4696 | de4x5_switch_mac_port(dev); |
4697 | } | 4697 | } |
@@ -4731,7 +4731,7 @@ type1_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4731 | lp->ibn = 1; | 4731 | lp->ibn = 1; |
4732 | lp->active = *p; | 4732 | lp->active = *p; |
4733 | lp->infoblock_csr6 = OMR_MII_100; | 4733 | lp->infoblock_csr6 = OMR_MII_100; |
4734 | lp->useMII = TRUE; | 4734 | lp->useMII = true; |
4735 | lp->infoblock_media = ANS; | 4735 | lp->infoblock_media = ANS; |
4736 | 4736 | ||
4737 | de4x5_switch_mac_port(dev); | 4737 | de4x5_switch_mac_port(dev); |
@@ -4773,7 +4773,7 @@ type2_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4773 | lp->cache.gepc = ((s32)(TWIDDLE(p)) << 16); p += 2; | 4773 | lp->cache.gepc = ((s32)(TWIDDLE(p)) << 16); p += 2; |
4774 | lp->cache.gep = ((s32)(TWIDDLE(p)) << 16); | 4774 | lp->cache.gep = ((s32)(TWIDDLE(p)) << 16); |
4775 | lp->infoblock_csr6 = OMR_SIA; | 4775 | lp->infoblock_csr6 = OMR_SIA; |
4776 | lp->useMII = FALSE; | 4776 | lp->useMII = false; |
4777 | 4777 | ||
4778 | de4x5_switch_mac_port(dev); | 4778 | de4x5_switch_mac_port(dev); |
4779 | } | 4779 | } |
@@ -4814,7 +4814,7 @@ type3_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4814 | lp->active = *p; | 4814 | lp->active = *p; |
4815 | if (MOTO_SROM_BUG) lp->active = 0; | 4815 | if (MOTO_SROM_BUG) lp->active = 0; |
4816 | lp->infoblock_csr6 = OMR_MII_100; | 4816 | lp->infoblock_csr6 = OMR_MII_100; |
4817 | lp->useMII = TRUE; | 4817 | lp->useMII = true; |
4818 | lp->infoblock_media = ANS; | 4818 | lp->infoblock_media = ANS; |
4819 | 4819 | ||
4820 | de4x5_switch_mac_port(dev); | 4820 | de4x5_switch_mac_port(dev); |
@@ -4856,7 +4856,7 @@ type4_infoblock(struct net_device *dev, u_char count, u_char *p) | |||
4856 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); | 4856 | lp->asBit = 1 << ((csr6 >> 1) & 0x07); |
4857 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; | 4857 | lp->asPolarity = ((csr6 & 0x80) ? -1 : 0) & lp->asBit; |
4858 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); | 4858 | lp->infoblock_csr6 = OMR_DEF | ((csr6 & 0x71) << 18); |
4859 | lp->useMII = FALSE; | 4859 | lp->useMII = false; |
4860 | 4860 | ||
4861 | de4x5_switch_mac_port(dev); | 4861 | de4x5_switch_mac_port(dev); |
4862 | } | 4862 | } |
@@ -5077,7 +5077,7 @@ mii_get_phy(struct net_device *dev) | |||
5077 | int id; | 5077 | int id; |
5078 | 5078 | ||
5079 | lp->active = 0; | 5079 | lp->active = 0; |
5080 | lp->useMII = TRUE; | 5080 | lp->useMII = true; |
5081 | 5081 | ||
5082 | /* Search the MII address space for possible PHY devices */ | 5082 | /* Search the MII address space for possible PHY devices */ |
5083 | for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { | 5083 | for (n=0, lp->mii_cnt=0, i=1; !((i==1) && (n==1)); i=(i+1)%DE4X5_MAX_MII) { |
@@ -5127,7 +5127,7 @@ mii_get_phy(struct net_device *dev) | |||
5127 | de4x5_dbg_mii(dev, k); | 5127 | de4x5_dbg_mii(dev, k); |
5128 | } | 5128 | } |
5129 | } | 5129 | } |
5130 | if (!lp->mii_cnt) lp->useMII = FALSE; | 5130 | if (!lp->mii_cnt) lp->useMII = false; |
5131 | 5131 | ||
5132 | return lp->mii_cnt; | 5132 | return lp->mii_cnt; |
5133 | } | 5133 | } |