Fixed DBG macro format, fixed compile warnings. removed extra parameter from mtd80x_disable(...)

pull/1/head
Marty Connor 2006-09-14 17:15:53 +00:00
parent 35f90278a8
commit 08d7ea1d34
1 changed files with 25 additions and 25 deletions

View File

@ -501,12 +501,12 @@ static void mtd_reset(struct nic *nic)
getlinkstatus(nic); getlinkstatus(nic);
if (mtdx.linkok) if (mtdx.linkok)
{ {
char* texts[]={"half","full","10","100","1000"}; static const char* texts[]={"half","full","10","100","1000"};
getlinktype(nic); getlinktype(nic);
DBG(("Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] )); DBG ( "Link is OK : %s %s\n", texts[mtdx.duplexmode-1], texts[mtdx.line_speed+1] );
} else } else
{ {
DBG(("No link!!!\n")); DBG ( "No link!!!\n" );
} }
mtdx.crvalue |= /*TxEnable |*/ RxEnable | TxThreshold; mtdx.crvalue |= /*TxEnable |*/ RxEnable | TxThreshold;
@ -520,7 +520,7 @@ static void mtd_reset(struct nic *nic)
/************************************************************************** /**************************************************************************
POLL - Wait for a frame POLL - Wait for a frame
***************************************************************************/ ***************************************************************************/
static int mtd_poll(struct nic *nic, int retrieve) static int mtd_poll(struct nic *nic, __unused int retrieve)
{ {
s32 rx_status = mtdx.cur_rx->status; s32 rx_status = mtdx.cur_rx->status;
int retval = 0; int retval = 0;
@ -548,8 +548,8 @@ static int mtd_poll(struct nic *nic, int retrieve)
/* Omit the four octet CRC from the length. */ /* Omit the four octet CRC from the length. */
short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4; short pkt_len = ((rx_status & FLNGMASK) >> FLNGShift) - 4;
DBG(( " netdev_rx() normal Rx pkt length %d" DBG ( " netdev_rx() normal Rx pkt length %d"
" status %x.\n", pkt_len, rx_status)); " status %x.\n", pkt_len, rx_status );
nic->packetlen = pkt_len; nic->packetlen = pkt_len;
memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len); memcpy(nic->packet, mtdx.cur_rx->skbuff, pkt_len);
@ -615,9 +615,9 @@ static void mtd_transmit(
tx_status = mtdx.tx_ring[0].status; tx_status = mtdx.tx_ring[0].status;
if (currticks() >= to){ if (currticks() >= to){
DBG(("TX Time Out")); DBG ( "TX Time Out" );
} else if( tx_status & (CSL | LC | EC | UDF | HF)){ } else if( tx_status & (CSL | LC | EC | UDF | HF)){
printf("Transmit error: %s %s %s %s %s.\n", printf( "Transmit error: %8.8x %s %s %s %s %s\n",
tx_status, tx_status,
tx_status & EC ? "abort" : "", tx_status & EC ? "abort" : "",
tx_status & CSL ? "carrier" : "", tx_status & CSL ? "carrier" : "",
@ -629,13 +629,13 @@ static void mtd_transmit(
/*hex_dump( txb, size );*/ /*hex_dump( txb, size );*/
/*pause();*/ /*pause();*/
DBG(("TRANSMIT\n")); DBG ( "TRANSMIT\n" );
} }
/************************************************************************** /**************************************************************************
DISABLE - Turn off ethernet interface DISABLE - Turn off ethernet interface
***************************************************************************/ ***************************************************************************/
static void mtd_disable ( struct nic *nic, struct pci_device *pci __unused ) { static void mtd_disable ( struct nic *nic ) {
/* Disable Tx Rx*/ /* Disable Tx Rx*/
outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR ); outl( mtdx.crvalue & (~TxEnable) & (~RxEnable), mtdx.ioaddr + TCRRCR );
@ -643,7 +643,7 @@ static void mtd_disable ( struct nic *nic, struct pci_device *pci __unused ) {
/* Reset the chip to erase previous misconfiguration. */ /* Reset the chip to erase previous misconfiguration. */
mtd_reset(nic); mtd_reset(nic);
DBG(("DISABLE\n")); DBG ( "DISABLE\n" );
} }
static struct nic_operations mtd_operations = { static struct nic_operations mtd_operations = {
@ -686,12 +686,12 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
nic->node_addr[i] = inb(mtdx.ioaddr + PAR0 + i); nic->node_addr[i] = inb(mtdx.ioaddr + PAR0 + i);
} }
if (memcmp(nic->node_addr, "\0\0\0\0\0", 6) == 0) if (memcmp(nic->node_addr, "\0\0\0\0\0\0", 6) == 0)
{ {
return 0; return 0;
} }
DBG(("%s : ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr)); /* DBG ( "%s: ioaddr %#hX, addr %!\n",mtdx.nic_name, mtdx.ioaddr, nic->node_addr ); */
/* Reset the chip to erase previous misconfiguration. */ /* Reset the chip to erase previous misconfiguration. */
outl(0x00000001, mtdx.ioaddr + BCR); outl(0x00000001, mtdx.ioaddr + BCR);
@ -708,8 +708,8 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
if (mii_status != 0xffff && mii_status != 0x0000) { if (mii_status != 0xffff && mii_status != 0x0000) {
mtdx.phys[phy_idx] = phy; mtdx.phys[phy_idx] = phy;
DBG(("%s: MII PHY found at address %d, status " DBG ( "%s: MII PHY found at address %d, status "
"0x%4.4x.\n", mtdx.nic_name, phy, mii_status)); "0x%4.4x.\n", mtdx.nic_name, phy, mii_status );
/* get phy type */ /* get phy type */
{ {
unsigned int data; unsigned int data;
@ -742,10 +742,10 @@ static int mtd_probe ( struct nic *nic, struct pci_device *pci ) {
/* get phy type */ /* get phy type */
if (inl(mtdx.ioaddr + PHYIDENTIFIER) == MysonPHYID ) { if (inl(mtdx.ioaddr + PHYIDENTIFIER) == MysonPHYID ) {
mtdx.PHYType = MysonPHY; mtdx.PHYType = MysonPHY;
DBG(("MysonPHY\n")); DBG ( "MysonPHY\n" );
} else { } else {
mtdx.PHYType = OtherPHY; mtdx.PHYType = OtherPHY;
DBG(("OtherPHY\n")); DBG ( "OtherPHY\n" );
} }
} }