Browse Source

more debugging

tags/v0.9.3
Udayan Kumar 17 years ago
parent
commit
008bfb6e85
1 changed files with 8 additions and 4 deletions
  1. 8
    4
      src/drivers/net/natsemi.c

+ 8
- 4
src/drivers/net/natsemi.c View File

@@ -596,6 +596,8 @@ static int nat_open ( struct net_device *netdev ) {
596 596
 		nat->rx[i].link   = virt_to_bus ( ( i + 1 < NUM_RX_DESC ) ? &nat->rx[i + 1] : &nat->rx[0] );
597 597
 		nat->rx[i].cmdsts = RX_BUF_SIZE;
598 598
 		nat->rx[i].bufptr = virt_to_bus ( nat->iobuf[i]->data );
599
+	//	DBG ( " Address of iobuf [%d] = %x and iobuf->data = %x \n", i, 
600
+	//	        nat->iobuf[i],nat->iobuf[i]->data);
599 601
 	}
600 602
 
601 603
 	/* load Receive Descriptor Register
@@ -793,10 +795,11 @@ static void nat_poll ( struct net_device *netdev) {
793 795
 		/*check for the corrupt packet 
794 796
 		 */
795 797
 		if ( ( rx_status & ( DescMore|DescPktOK|RxTooLong ) ) != DescPktOK) {
796
-			 DBG ( "natsemi_poll: Corrupted packet received, "
797
-					"buffer status = %X \n",
798
-					(unsigned int) nat->rx[nat->rx_cur].cmdsts );
799
-			 netdev_rx_err ( netdev,NULL,-EINVAL );
798
+			DBG ( "natsemi_poll: Corrupted packet received, "
799
+				"buffer status = %X \n",
800
+				(unsigned int) nat->rx[nat->rx_cur].cmdsts );
801
+			//DBG_HD ( nat->iobuf[nat->rx_cur]->data,rx_len);
802
+			netdev_rx_err ( netdev,NULL,-EINVAL );
800 803
 		} else 	{
801 804
 			rx_iob = alloc_iob ( rx_len );
802 805
 
@@ -807,6 +810,7 @@ static void nat_poll ( struct net_device *netdev) {
807 810
 			memcpy ( iob_put ( rx_iob,rx_len ),
808 811
 					nat->iobuf[nat->rx_cur]->data,rx_len );
809 812
 			DBG ( "received packet\n" );
813
+			//DBG_HD ( nat->iobuf[nat->rx_cur]->data,30);
810 814
 
811 815
 			/* add to the receive queue. 
812 816
 			 */

Loading…
Cancel
Save