|
@@ -473,7 +473,7 @@ static void init_ring(struct nic *nic __unused)
|
473
|
473
|
/**************************************************************************
|
474
|
474
|
RESET - Reset Adapter
|
475
|
475
|
***************************************************************************/
|
476
|
|
-static void mtd_reset(struct nic *nic)
|
|
476
|
+static void mtd_reset( struct nic *nic )
|
477
|
477
|
{
|
478
|
478
|
/* Reset the chip to erase previous misconfiguration. */
|
479
|
479
|
outl(0x00000001, mtdx.ioaddr + BCR);
|
|
@@ -501,12 +501,12 @@ static void mtd_reset(struct nic *nic)
|
501
|
501
|
getlinkstatus(nic);
|
502
|
502
|
if (mtdx.linkok)
|
503
|
503
|
{
|
504
|
|
- char* texts[]={"half","full","10","100","1000"};
|
|
504
|
+ static const char* texts[]={"half","full","10","100","1000"};
|
505
|
505
|
getlinktype(nic);
|
506
|
|
- DBG(("Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] ));
|
|
506
|
+ DBG ( "Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] );
|
507
|
507
|
} else
|
508
|
508
|
{
|
509
|
|
- DBG(("No link!!!\n"));
|
|
509
|
+ DBG ( "No link!!!\n" );
|
510
|
510
|
}
|
511
|
511
|
|
512
|
512
|
mtdx.crvalue |= /*TxEnable |*/ RxEnable | TxThreshold;
|
|
@@ -520,7 +520,7 @@ static void mtd_reset(struct nic *nic)
|
520
|
520
|
/**************************************************************************
|
521
|
521
|
POLL - Wait for a frame
|
522
|
522
|
***************************************************************************/
|
523
|
|
-static int mtd_poll(struct nic *nic, int retrieve)
|
|
523
|
+static int mtd_poll(struct nic *nic, __unused int retrieve)
|
524
|
524
|
{
|
525
|
525
|
s32 rx_status = mtdx.cur_rx->status;
|
526
|
526
|
int retval = 0;
|
|
@@ -548,8 +548,8 @@ static int mtd_poll(struct nic *nic, int retrieve)
|
548
|
548
|
/* Omit the four octet CRC from the length. */
|
549
|
549
|
short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4;
|
550
|
550
|
|
551
|
|
- DBG(( " netdev_rx() normal Rx pkt length %d"
|
552
|
|
- " status %x.\n", pkt_len, rx_status));
|
|
551
|
+ DBG ( " netdev_rx() normal Rx pkt length %d"
|
|
552
|
+ " status %x.\n", pkt_len, rx_status );
|
553
|
553
|
|
554
|
554
|
nic->packetlen = pkt_len;
|
555
|
555
|
memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len);
|
|
@@ -615,35 +615,35 @@ static void mtd_transmit(
|
615
|
615
|
|
616
|
616
|
tx_status = mtdx.tx_ring[0].status;
|
617
|
617
|
if (currticks() >= to){
|
618
|
|
- DBG(("TX Time Out"));
|
|
618
|
+ DBG ( "TX Time Out" );
|
619
|
619
|
} else if( tx_status & (CSL | LC | EC | UDF | HF)){
|
620
|
|
- printf("Transmit error: %s %s %s %s %s.\n",
|
621
|
|
- tx_status,
|
622
|
|
- tx_status & EC ? "abort" : "",
|
623
|
|
- tx_status & CSL ? "carrier" : "",
|
624
|
|
- tx_status & LC ? "late" : "",
|
625
|
|
- tx_status & UDF ? "fifo" : "",
|
626
|
|
- tx_status & HF ? "heartbeat" : "" );
|
|
620
|
+ printf( "Transmit error: %8.8x %s %s %s %s %s\n",
|
|
621
|
+ tx_status,
|
|
622
|
+ tx_status & EC ? "abort" : "",
|
|
623
|
+ tx_status & CSL ? "carrier" : "",
|
|
624
|
+ tx_status & LC ? "late" : "",
|
|
625
|
+ tx_status & UDF ? "fifo" : "",
|
|
626
|
+ tx_status & HF ? "heartbeat" : "" );
|
627
|
627
|
}
|
628
|
628
|
|
629
|
629
|
/*hex_dump( txb, size );*/
|
630
|
630
|
/*pause();*/
|
631
|
631
|
|
632
|
|
- DBG(("TRANSMIT\n"));
|
|
632
|
+ DBG ( "TRANSMIT\n" );
|
633
|
633
|
}
|
634
|
634
|
|
635
|
635
|
/**************************************************************************
|
636
|
636
|
DISABLE - Turn off ethernet interface
|
637
|
637
|
***************************************************************************/
|
638
|
|
-static void mtd_disable ( struct nic *nic, struct pci_device *pci __unused ) {
|
|
638
|
+static void mtd_disable ( struct nic *nic ) {
|
639
|
639
|
|
640
|
640
|
/* Disable Tx Rx*/
|
641
|
|
- outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR);
|
|
641
|
+ outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR );
|
642
|
642
|
|
643
|
643
|
/* Reset the chip to erase previous misconfiguration. */
|
644
|
644
|
mtd_reset(nic);
|
645
|
645
|
|
646
|
|
- DBG(("DISABLE\n"));
|
|
646
|
+ DBG ( "DISABLE\n" );
|
647
|
647
|
}
|
648
|
648
|
|
649
|
649
|
static struct nic_operations mtd_operations = {
|
|
@@ -686,12 +686,12 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
|
686
|
686
|
nic->node_addr[i] = inb(mtdx.ioaddr + PAR0 + i);
|
687
|
687
|
}
|
688
|
688
|
|
689
|
|
- if (memcmp(nic->node_addr, "\0\0\0\0\0", 6) == 0)
|
|
689
|
+ if (memcmp(nic->node_addr, "\0\0\0\0\0\0", 6) == 0)
|
690
|
690
|
{
|
691
|
691
|
return 0;
|
692
|
692
|
}
|
693
|
693
|
|
694
|
|
- DBG(("%s : ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr));
|
|
694
|
+ /* DBG ( "%s: ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr ); */
|
695
|
695
|
|
696
|
696
|
/* Reset the chip to erase previous misconfiguration. */
|
697
|
697
|
outl(0x00000001, mtdx.ioaddr + BCR);
|
|
@@ -708,8 +708,8 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
|
708
|
708
|
if (mii_status != 0xffff && mii_status != 0x0000) {
|
709
|
709
|
mtdx.phys[phy_idx] = phy;
|
710
|
710
|
|
711
|
|
- DBG(("%s: MII PHY found at address %d, status "
|
712
|
|
- "0x%4.4x.\n", mtdx.nic_name, phy, mii_status));
|
|
711
|
+ DBG ( "%s: MII PHY found at address %d, status "
|
|
712
|
+ "0x%4.4x.\n", mtdx.nic_name, phy, mii_status );
|
713
|
713
|
/* get phy type */
|
714
|
714
|
{
|
715
|
715
|
unsigned int data;
|
|
@@ -742,10 +742,10 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
|
742
|
742
|
/* get phy type */
|
743
|
743
|
if (inl(mtdx.ioaddr + PHYIDENTIFIER) == MysonPHYID ) {
|
744
|
744
|
mtdx.PHYType = MysonPHY;
|
745
|
|
- DBG(("MysonPHY\n"));
|
|
745
|
+ DBG ( "MysonPHY\n" );
|
746
|
746
|
} else {
|
747
|
747
|
mtdx.PHYType = OtherPHY;
|
748
|
|
- DBG(("OtherPHY\n"));
|
|
748
|
+ DBG ( "OtherPHY\n" );
|
749
|
749
|
}
|
750
|
750
|
}
|
751
|
751
|
|