[pxe] Tidy up debugging output

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/5/head
Michael Brown 2011-12-08 02:55:53 +00:00
parent faf50e8fa3
commit 61944ed602
1 changed files with 16 additions and 13 deletions

View File

@ -306,8 +306,6 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
unsigned int i;
int rc;
DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
/* Sanity check */
if ( ! pxe_netdev ) {
DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
@ -316,6 +314,8 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
return PXENV_EXIT_FAILURE;
}
DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
/* Forcibly enable interrupts and freeze receive queue
* processing at this point, to work around callers that never
* 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
struct device *dev;
struct ll_protocol *ll_protocol;
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
/* Sanity check */
if ( ! pxe_netdev ) {
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
return PXENV_EXIT_FAILURE;
}
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
/* Fill in information */
dev = pxe_netdev->dev;
ll_protocol = pxe_netdev->ll_protocol;
@ -576,7 +576,6 @@ PXENV_EXIT_t pxenv_undi_get_information ( struct s_PXENV_UNDI_GET_INFORMATION
*/
PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
*undi_get_statistics ) {
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
/* Sanity check */
if ( ! pxe_netdev ) {
@ -586,6 +585,8 @@ PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
return PXENV_EXIT_FAILURE;
}
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
/* Report statistics */
undi_get_statistics->XmtGoodFrames = pxe_netdev->tx_stats.good;
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
struct in_addr ip = { .s_addr = undi_get_mcast_address->InetAddr };
int rc;
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
inet_ntoa ( ip ) );
/* Sanity check */
if ( ! pxe_netdev ) {
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
return PXENV_EXIT_FAILURE;
}
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
inet_ntoa ( ip ) );
/* Hash address using the network device's link-layer protocol */
ll_protocol = pxe_netdev->ll_protocol;
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
*undi_get_nic_type ) {
struct device *dev;
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
/* Sanity check */
if ( ! pxe_netdev ) {
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
return PXENV_EXIT_FAILURE;
}
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
/* Fill in information */
memset ( &undi_get_nic_type->info, 0,
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
*/
PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
*undi_get_iface_info ) {
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
/* Sanity check */
if ( ! pxe_netdev ) {
@ -793,6 +793,8 @@ PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
return PXENV_EXIT_FAILURE;
}
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
/* Just hand back some info, doesn't really matter what it is.
* Most PXE stacks seem to take this approach.
*/
@ -855,16 +857,17 @@ PXENV_EXIT_t pxenv_undi_isr ( struct s_PXENV_UNDI_ISR *undi_isr ) {
/* Use a different debug colour, since UNDI ISR messages are
* likely to be interspersed amongst other UNDI messages.
*/
DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
/* Sanity check */
if ( ! pxe_netdev ) {
DBGC ( &pxe_netdev, "PXENV_UNDI_ISR called with "
DBGC ( &pxenv_undi_isr, "PXENV_UNDI_ISR called with "
"no network device\n" );
undi_isr->Status = PXENV_STATUS_UNDI_INVALID_STATE;
return PXENV_EXIT_FAILURE;
}
DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
/* Just in case some idiot actually looks at these fields when
* we weren't meant to fill them in...
*/