mirror of
https://github.com/ipxe/ipxe
synced 2025-12-11 22:11:08 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user