|
@@ -30,12 +30,6 @@
|
30
|
30
|
/* to get the PCI support functions, if this is a PCI NIC */
|
31
|
31
|
#include "pci.h"
|
32
|
32
|
|
33
|
|
-#if 0
|
34
|
|
-#define DBGPRNT( x ) printf x
|
35
|
|
-#else
|
36
|
|
-#define DBGPRNT( x )
|
37
|
|
-#endif
|
38
|
|
-
|
39
|
33
|
typedef unsigned char u8;
|
40
|
34
|
typedef signed char s8;
|
41
|
35
|
typedef unsigned short u16;
|
|
@@ -518,10 +512,10 @@ static void mtd_reset(struct nic *nic)
|
518
|
512
|
{
|
519
|
513
|
char* texts[]={"half","full","10","100","1000"};
|
520
|
514
|
getlinktype(nic);
|
521
|
|
- DBGPRNT(("Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] ));
|
|
515
|
+ DBG(("Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] ));
|
522
|
516
|
} else
|
523
|
517
|
{
|
524
|
|
- DBGPRNT(("No link!!!\n"));
|
|
518
|
+ DBG(("No link!!!\n"));
|
525
|
519
|
}
|
526
|
520
|
|
527
|
521
|
mtdx.crvalue |= /*TxEnable |*/ RxEnable | TxThreshold;
|
|
@@ -563,8 +557,8 @@ static int mtd_poll(struct nic *nic, int retrieve)
|
563
|
557
|
/* Omit the four octet CRC from the length. */
|
564
|
558
|
short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4;
|
565
|
559
|
|
566
|
|
- DBGPRNT(( " netdev_rx() normal Rx pkt length %d"
|
567
|
|
- " status %x.\n", pkt_len, rx_status));
|
|
560
|
+ DBG(( " netdev_rx() normal Rx pkt length %d"
|
|
561
|
+ " status %x.\n", pkt_len, rx_status));
|
568
|
562
|
|
569
|
563
|
nic->packetlen = pkt_len;
|
570
|
564
|
memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len);
|
|
@@ -630,7 +624,7 @@ static void mtd_transmit(
|
630
|
624
|
|
631
|
625
|
tx_status = mtdx.tx_ring[0].status;
|
632
|
626
|
if (currticks() >= to){
|
633
|
|
- DBGPRNT(("TX Time Out"));
|
|
627
|
+ DBG(("TX Time Out"));
|
634
|
628
|
} else if( tx_status & (CSL | LC | EC | UDF | HF)){
|
635
|
629
|
printf("Transmit error: %s %s %s %s %s.\n",
|
636
|
630
|
tx_status,
|
|
@@ -644,7 +638,7 @@ static void mtd_transmit(
|
644
|
638
|
/*hex_dump( txb, size );*/
|
645
|
639
|
/*pause();*/
|
646
|
640
|
|
647
|
|
- DBGPRNT(("TRANSMIT\n"));
|
|
641
|
+ DBG(("TRANSMIT\n"));
|
648
|
642
|
}
|
649
|
643
|
|
650
|
644
|
/**************************************************************************
|
|
@@ -656,7 +650,7 @@ static void mtd_disable ( struct nic *nic ) {
|
656
|
650
|
outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR);
|
657
|
651
|
/* Reset the chip to erase previous misconfiguration. */
|
658
|
652
|
mtd_reset(nic);
|
659
|
|
- DBGPRNT(("DISABLE\n"));
|
|
653
|
+ DBG(("DISABLE\n"));
|
660
|
654
|
}
|
661
|
655
|
|
662
|
656
|
static struct nic_operations mtd_operations = {
|
|
@@ -708,7 +702,7 @@ static int mtd_probe ( struct dev *dev ) {
|
708
|
702
|
return 0;
|
709
|
703
|
}
|
710
|
704
|
|
711
|
|
- DBGPRNT(("%s : ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr));
|
|
705
|
+ DBG(("%s : ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr));
|
712
|
706
|
|
713
|
707
|
/* Reset the chip to erase previous misconfiguration. */
|
714
|
708
|
outl(0x00000001, mtdx.ioaddr + BCR);
|
|
@@ -725,8 +719,8 @@ static int mtd_probe ( struct dev *dev ) {
|
725
|
719
|
if (mii_status != 0xffff && mii_status != 0x0000) {
|
726
|
720
|
mtdx.phys[phy_idx] = phy;
|
727
|
721
|
|
728
|
|
- DBGPRNT(("%s: MII PHY found at address %d, status "
|
729
|
|
- "0x%4.4x.\n", mtdx.nic_name, phy, mii_status));
|
|
722
|
+ DBG(("%s: MII PHY found at address %d, status "
|
|
723
|
+ "0x%4.4x.\n", mtdx.nic_name, phy, mii_status));
|
730
|
724
|
/* get phy type */
|
731
|
725
|
{
|
732
|
726
|
unsigned int data;
|
|
@@ -759,10 +753,10 @@ static int mtd_probe ( struct dev *dev ) {
|
759
|
753
|
/* get phy type */
|
760
|
754
|
if (inl(mtdx.ioaddr + PHYIDENTIFIER) == MysonPHYID ) {
|
761
|
755
|
mtdx.PHYType = MysonPHY;
|
762
|
|
- DBGPRNT(("MysonPHY\n"));
|
|
756
|
+ DBG(("MysonPHY\n"));
|
763
|
757
|
} else {
|
764
|
758
|
mtdx.PHYType = OtherPHY;
|
765
|
|
- DBGPRNT(("OtherPHY\n"));
|
|
759
|
+ DBG(("OtherPHY\n"));
|
766
|
760
|
}
|
767
|
761
|
}
|
768
|
762
|
|