Ver código fonte

[pxe] Tidy up debugging output

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 anos atrás
pai
commit
61944ed602
1 arquivos alterados com 16 adições e 13 exclusões
  1. 16
    13
      src/arch/i386/interface/pxe/pxe_undi.c

+ 16
- 13
src/arch/i386/interface/pxe/pxe_undi.c Ver arquivo

@@ -306,8 +306,6 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
306 306
 	unsigned int i;
307 307
 	int rc;
308 308
 
309
-	DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
310
-
311 309
 	/* Sanity check */
312 310
 	if ( ! pxe_netdev ) {
313 311
 		DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
@@ -316,6 +314,8 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
316 314
 		return PXENV_EXIT_FAILURE;
317 315
 	}
318 316
 
317
+	DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
318
+
319 319
 	/* Forcibly enable interrupts and freeze receive queue
320 320
 	 * processing at this point, to work around callers that never
321 321
 	 * call PXENV_UNDI_OPEN before attempting to use the UNDI API.
@@ -527,8 +527,6 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
527 527
 	struct device *dev;
528 528
 	struct ll_protocol *ll_protocol;
529 529
 
530
-	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
531
-
532 530
 	/* Sanity check */
533 531
 	if ( ! pxe_netdev ) {
534 532
 		DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION called with no "
@@ -537,6 +535,8 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
537 535
 		return PXENV_EXIT_FAILURE;
538 536
 	}
539 537
 
538
+	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
539
+
540 540
 	/* Fill in information */
541 541
 	dev = pxe_netdev->dev;
542 542
 	ll_protocol = pxe_netdev->ll_protocol;
@@ -576,7 +576,6 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
576 576
  */
577 577
 PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
578 578
 					 *undi_get_statistics ) {
579
-	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
580 579
 
581 580
 	/* Sanity check */
582 581
 	if ( ! pxe_netdev ) {
@@ -586,6 +585,8 @@ PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
586 585
 		return PXENV_EXIT_FAILURE;
587 586
 	}
588 587
 
588
+	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
589
+
589 590
 	/* Report statistics */
590 591
 	undi_get_statistics->XmtGoodFrames = pxe_netdev->tx_stats.good;
591 592
 	undi_get_statistics->RcvGoodFrames = pxe_netdev->rx_stats.good;
@@ -679,9 +680,6 @@ pxenv_undi_get_mcast_address ( struct s_PXENV_UNDI_GET_MCAST_ADDRESS
679 680
 	struct in_addr ip = { .s_addr = undi_get_mcast_address->InetAddr };
680 681
 	int rc;
681 682
 
682
-	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
683
-	       inet_ntoa ( ip ) );
684
-
685 683
 	/* Sanity check */
686 684
 	if ( ! pxe_netdev ) {
687 685
 		DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS called with "
@@ -691,6 +689,9 @@ pxenv_undi_get_mcast_address ( struct s_PXENV_UNDI_GET_MCAST_ADDRESS
691 689
 		return PXENV_EXIT_FAILURE;
692 690
 	}
693 691
 
692
+	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
693
+	       inet_ntoa ( ip ) );
694
+
694 695
 	/* Hash address using the network device's link-layer protocol */
695 696
 	ll_protocol = pxe_netdev->ll_protocol;
696 697
 	if ( ( rc = ll_protocol->mc_hash ( AF_INET, &ip,
@@ -714,8 +715,6 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
714 715
 				       *undi_get_nic_type ) {
715 716
 	struct device *dev;
716 717
 
717
-	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
718
-
719 718
 	/* Sanity check */
720 719
 	if ( ! pxe_netdev ) {
721 720
 		DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE called with "
@@ -724,6 +723,8 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
724 723
 		return PXENV_EXIT_FAILURE;
725 724
 	}
726 725
 
726
+	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
727
+
727 728
 	/* Fill in information */
728 729
 	memset ( &undi_get_nic_type->info, 0,
729 730
 		 sizeof ( undi_get_nic_type->info ) );
@@ -783,7 +784,6 @@ PXENV_EXIT_t pxenv_undi_get_nic_type ( struct s_PXENV_UNDI_GET_NIC_TYPE
783 784
  */
784 785
 PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
785 786
 					 *undi_get_iface_info ) {
786
-	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
787 787
 
788 788
 	/* Sanity check */
789 789
 	if ( ! pxe_netdev ) {
@@ -793,6 +793,8 @@ PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
793 793
 		return PXENV_EXIT_FAILURE;
794 794
 	}
795 795
 
796
+	DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
797
+
796 798
 	/* Just hand back some info, doesn't really matter what it is.
797 799
 	 * Most PXE stacks seem to take this approach.
798 800
 	 */
@@ -855,16 +857,17 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
855 857
 	/* Use a different debug colour, since UNDI ISR messages are
856 858
 	 * likely to be interspersed amongst other UNDI messages.
857 859
 	 */
858
-	DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
859 860
 
860 861
 	/* Sanity check */
861 862
 	if ( ! pxe_netdev ) {
862
-		DBGC ( &pxe_netdev, "PXENV_UNDI_ISR called with "
863
+		DBGC ( &pxenv_undi_isr, "PXENV_UNDI_ISR called with "
863 864
 		       "no network device\n" );
864 865
 		undi_isr->Status = PXENV_STATUS_UNDI_INVALID_STATE;
865 866
 		return PXENV_EXIT_FAILURE;
866 867
 	}
867 868
 
869
+	DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
870
+
868 871
 	/* Just in case some idiot actually looks at these fields when
869 872
 	 * we weren't meant to fill them in...
870 873
 	 */

Carregando…
Cancelar
Salvar