mirror of https://github.com/ipxe/ipxe.git
[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
parent
83b8c0e211
commit
fc5cf18dab
|
@ -975,7 +975,7 @@ static int nii_transmit ( struct net_device *netdev,
|
||||||
|
|
||||||
/* Construct parameter block */
|
/* Construct parameter block */
|
||||||
memset ( &cpb, 0, sizeof ( cpb ) );
|
memset ( &cpb, 0, sizeof ( cpb ) );
|
||||||
cpb.FrameAddr = virt_to_bus ( iobuf->data );
|
cpb.FrameAddr = ( ( intptr_t ) iobuf->data );
|
||||||
cpb.DataLen = iob_len ( iobuf );
|
cpb.DataLen = iob_len ( iobuf );
|
||||||
|
|
||||||
/* Transmit packet */
|
/* Transmit packet */
|
||||||
|
@ -1043,7 +1043,7 @@ static void nii_poll_rx ( struct net_device *netdev ) {
|
||||||
|
|
||||||
/* Construct parameter block */
|
/* Construct parameter block */
|
||||||
memset ( &cpb, 0, sizeof ( cpb ) );
|
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 );
|
cpb.BufferLen = iob_tailroom ( nii->rxbuf );
|
||||||
|
|
||||||
/* Issue command */
|
/* Issue command */
|
||||||
|
|
Loading…
Reference in New Issue