[efi] Use casts rather than virt_to_bus() for UNDI buffer addresses

For a software UNDI, the addresses in PXE_CPB_TRANSMIT.FrameAddr and
PXE_CPB_RECEIVE.BufferAddr are host addresses, not bus addresses.

Remove the spurious (and no-op) use of virt_to_bus() and replace with
a cast via intptr_t.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
pull/171/head
Michael Brown 2020-11-15 23:33:52 +00:00
parent 83b8c0e211
commit fc5cf18dab
1 changed files with 2 additions and 2 deletions

View File

@ -975,7 +975,7 @@ static int nii_transmit ( struct net_device *netdev,
/* Construct parameter block */
memset ( &cpb, 0, sizeof ( cpb ) );
cpb.FrameAddr = virt_to_bus ( iobuf->data );
cpb.FrameAddr = ( ( intptr_t ) iobuf->data );
cpb.DataLen = iob_len ( iobuf );
/* Transmit packet */
@ -1043,7 +1043,7 @@ static void nii_poll_rx ( struct net_device *netdev ) {
/* Construct parameter block */
memset ( &cpb, 0, sizeof ( cpb ) );
cpb.BufferAddr = virt_to_bus ( nii->rxbuf->data );
cpb.BufferAddr = ( ( intptr_t ) nii->rxbuf->data );
cpb.BufferLen = iob_tailroom ( nii->rxbuf );
/* Issue command */