Browse Source

removed type casting from DBG statements.

tags/v0.9.3
Udayan Kumar 17 years ago
parent
commit
37517f7752
1 changed files with 16 additions and 19 deletions
  1. 16
    19
      src/drivers/net/natsemi.c

+ 16
- 19
src/drivers/net/natsemi.c View File

@@ -59,7 +59,6 @@
59 59
 */
60 60
 
61 61
 #include <stdint.h>
62
-#include <pic8259.h>
63 62
 #include <stdlib.h>
64 63
 #include <stdio.h>
65 64
 #include <io.h>
@@ -80,7 +79,7 @@
80 79
  
81 80
 static int natsemi_spi_read_bit ( struct bit_basher *, unsigned int );
82 81
 static void natsemi_spi_write_bit ( struct bit_basher *,unsigned int, unsigned long ); 
83
-void natsemi_init_eeprom ( struct natsemi_private * ); 
82
+static void natsemi_init_eeprom ( struct natsemi_private * ); 
84 83
 static int natsemi_probe (struct pci_device *pci, const struct pci_device_id *id);
85 84
 static void natsemi_reset (struct net_device *netdev);
86 85
 static int natsemi_open (struct net_device *netdev);
@@ -142,7 +141,7 @@ static struct nvo_fragment natsemi_nvo_fragments[] = {
142 141
  *
143 142
  * @v NAT		NATSEMI NIC
144 143
  */
145
- void natsemi_init_eeprom ( struct natsemi_private *np ) {
144
+static void natsemi_init_eeprom ( struct natsemi_private *np ) {
146 145
 
147 146
 	/* Initialise three-wire bus 
148 147
 	 */
@@ -355,8 +354,8 @@ static int natsemi_open (struct net_device *netdev)
355 354
 	}
356 355
 	outl (virt_to_bus (&np->tx[0]),np->ioaddr + TxRingPtr);
357 356
 
358
-	DBG ("Natsemi Tx descriptor loaded with: %#08x\n",
359
-	     (unsigned int) inl (np->ioaddr + TxRingPtr));
357
+	DBG ("Natsemi Tx descriptor loaded with: %#08lx\n",
358
+	     inl (np->ioaddr + TxRingPtr));
360 359
 
361 360
 	/* Setup RX ring
362 361
 	 */
@@ -369,13 +368,13 @@ static int natsemi_open (struct net_device *netdev)
369 368
 						? &np->rx[i + 1] : &np->rx[0]);
370 369
 		np->rx[i].cmdsts = RX_BUF_SIZE;
371 370
 		np->rx[i].bufptr = virt_to_bus (np->iobuf[i]->data);
372
-		DBG (" Address of iobuf [%d] = %#08x and iobuf->data = %#08x \n", i, 
373
-		     (unsigned int) &np->iobuf[i], (unsigned int) &np->iobuf[i]->data);
371
+		DBG (" Address of iobuf [%d] = %p and iobuf->data = %p \n", i, 
372
+		      &np->iobuf[i],  &np->iobuf[i]->data);
374 373
 	}
375 374
 	outl (virt_to_bus (&np->rx[0]), np->ioaddr + RxRingPtr);
376 375
 
377
-	DBG ("Natsemi Rx descriptor loaded with: %#08x\n",
378
-	     (unsigned int) inl (np->ioaddr + RxRingPtr));		
376
+	DBG ("Natsemi Rx descriptor loaded with: %#08lx\n",
377
+	      inl (np->ioaddr + RxRingPtr));		
379 378
 
380 379
 	/* Setup RX Filter 
381 380
 	 */
@@ -398,9 +397,9 @@ static int natsemi_open (struct net_device *netdev)
398 397
 	outl (tx_config, np->ioaddr + TxConfig);
399 398
 	outl (rx_config, np->ioaddr + RxConfig);
400 399
 
401
-	DBG ("Tx config register = %#08x Rx config register = %#08x\n", 
402
-               (unsigned int) inl (np->ioaddr + TxConfig),
403
-	       (unsigned int) inl (np->ioaddr + RxConfig));
400
+	DBG ("Tx config register = %#08lx Rx config register = %#08lx\n", 
401
+               inl (np->ioaddr + TxConfig),
402
+	       inl (np->ioaddr + RxConfig));
404 403
 
405 404
 	/*Set the Interrupt Mask register
406 405
 	 */
@@ -472,8 +471,8 @@ static int natsemi_transmit (struct net_device *netdev, struct io_buffer *iobuf)
472 471
 	np->tx[np->tx_cur].bufptr = virt_to_bus (iobuf->data);
473 472
 	np->tx[np->tx_cur].cmdsts = iob_len (iobuf) | OWN;
474 473
 
475
-	DBG ("TX id %d at %#08x + %#08x\n", np->tx_cur,
476
-	     (unsigned int) virt_to_bus (&iobuf->data), iob_len (iobuf));
474
+	DBG ("TX id %d at %#08lx + %#08x\n", np->tx_cur,
475
+	     virt_to_bus (&iobuf->data), iob_len (iobuf));
477 476
 
478 477
 	/* increment the circular buffer pointer to the next buffer location
479 478
 	 */
@@ -525,7 +524,7 @@ static void natsemi_poll (struct net_device *netdev)
525 524
 		if (! (tx_status & DescPktOK)) {
526 525
 			netdev_tx_complete_err (netdev,np->tx_iobuf[np->tx_dirty],-EINVAL);
527 526
 			DBG ("Error transmitting packet, tx_status: %#08x\n",
528
-			     (unsigned int) tx_status);
527
+			     tx_status);
529 528
 		} else {
530 529
 			netdev_tx_complete (netdev, np->tx_iobuf[np->tx_dirty]);
531 530
 			DBG ("Success transmitting packet\n");
@@ -549,13 +548,11 @@ static void natsemi_poll (struct net_device *netdev)
549 548
 			netdev_rx_err (netdev, NULL, -EINVAL);
550 549
 
551 550
 			DBG ("natsemi_poll: Corrupted packet received!"
552
-			     " Status = %#08x\n",
553
-			     (unsigned int) np->rx[np->rx_cur].cmdsts);
554
-			//DBG_HD (np->iobuf[np->rx_cur]->data, 30);
551
+			     " Status = %#08lx\n",
552
+			      np->rx[np->rx_cur].cmdsts);
555 553
 
556 554
 		} else 	{
557 555
 
558
-			//DBG_HD (np->iobuf[np->rx_cur]->data, 30);
559 556
 
560 557
 			/* If unable allocate space for this packet,
561 558
 			 *  try again next poll

Loading…
Cancel
Save