mirror of https://github.com/ipxe/ipxe.git
[pxe] Tidy up debugging output
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/5/head
parent
faf50e8fa3
commit
61944ed602
|
@ -306,8 +306,6 @@ PXENV_EXIT_t pxenv_undi_transmit ( struct s_PXENV_UNDI_TRANSMIT
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_TRANSMIT called with no "
|
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;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC2 ( &pxe_netdev, "PXENV_UNDI_TRANSMIT" );
|
||||||
|
|
||||||
/* Forcibly enable interrupts and freeze receive queue
|
/* Forcibly enable interrupts and freeze receive queue
|
||||||
* processing at this point, to work around callers that never
|
* processing at this point, to work around callers that never
|
||||||
* call PXENV_UNDI_OPEN before attempting to use the UNDI API.
|
* 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 device *dev;
|
||||||
struct ll_protocol *ll_protocol;
|
struct ll_protocol *ll_protocol;
|
||||||
|
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION called with no "
|
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;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_INFORMATION" );
|
||||||
|
|
||||||
/* Fill in information */
|
/* Fill in information */
|
||||||
dev = pxe_netdev->dev;
|
dev = pxe_netdev->dev;
|
||||||
ll_protocol = pxe_netdev->ll_protocol;
|
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
|
PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
|
||||||
*undi_get_statistics ) {
|
*undi_get_statistics ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
|
@ -586,6 +585,8 @@ PXENV_EXIT_t pxenv_undi_get_statistics ( struct s_PXENV_UNDI_GET_STATISTICS
|
||||||
return PXENV_EXIT_FAILURE;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_STATISTICS" );
|
||||||
|
|
||||||
/* Report statistics */
|
/* Report statistics */
|
||||||
undi_get_statistics->XmtGoodFrames = pxe_netdev->tx_stats.good;
|
undi_get_statistics->XmtGoodFrames = pxe_netdev->tx_stats.good;
|
||||||
undi_get_statistics->RcvGoodFrames = pxe_netdev->rx_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 };
|
struct in_addr ip = { .s_addr = undi_get_mcast_address->InetAddr };
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS %s",
|
|
||||||
inet_ntoa ( ip ) );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_MCAST_ADDRESS called with "
|
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;
|
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 */
|
/* Hash address using the network device's link-layer protocol */
|
||||||
ll_protocol = pxe_netdev->ll_protocol;
|
ll_protocol = pxe_netdev->ll_protocol;
|
||||||
if ( ( rc = ll_protocol->mc_hash ( AF_INET, &ip,
|
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 ) {
|
*undi_get_nic_type ) {
|
||||||
struct device *dev;
|
struct device *dev;
|
||||||
|
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE called with "
|
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;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_NIC_TYPE" );
|
||||||
|
|
||||||
/* Fill in information */
|
/* Fill in information */
|
||||||
memset ( &undi_get_nic_type->info, 0,
|
memset ( &undi_get_nic_type->info, 0,
|
||||||
sizeof ( undi_get_nic_type->info ) );
|
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
|
PXENV_EXIT_t pxenv_undi_get_iface_info ( struct s_PXENV_UNDI_GET_IFACE_INFO
|
||||||
*undi_get_iface_info ) {
|
*undi_get_iface_info ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
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;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC ( &pxe_netdev, "PXENV_UNDI_GET_IFACE_INFO" );
|
||||||
|
|
||||||
/* Just hand back some info, doesn't really matter what it is.
|
/* Just hand back some info, doesn't really matter what it is.
|
||||||
* Most PXE stacks seem to take this approach.
|
* 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
|
/* Use a different debug colour, since UNDI ISR messages are
|
||||||
* likely to be interspersed amongst other UNDI messages.
|
* likely to be interspersed amongst other UNDI messages.
|
||||||
*/
|
*/
|
||||||
DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
|
|
||||||
|
|
||||||
/* Sanity check */
|
/* Sanity check */
|
||||||
if ( ! pxe_netdev ) {
|
if ( ! pxe_netdev ) {
|
||||||
DBGC ( &pxe_netdev, "PXENV_UNDI_ISR called with "
|
DBGC ( &pxenv_undi_isr, "PXENV_UNDI_ISR called with "
|
||||||
"no network device\n" );
|
"no network device\n" );
|
||||||
undi_isr->Status = PXENV_STATUS_UNDI_INVALID_STATE;
|
undi_isr->Status = PXENV_STATUS_UNDI_INVALID_STATE;
|
||||||
return PXENV_EXIT_FAILURE;
|
return PXENV_EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBGC2 ( &pxenv_undi_isr, "PXENV_UNDI_ISR" );
|
||||||
|
|
||||||
/* Just in case some idiot actually looks at these fields when
|
/* Just in case some idiot actually looks at these fields when
|
||||||
* we weren't meant to fill them in...
|
* we weren't meant to fill them in...
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue