From: Michael Brown Date: Thu, 9 Oct 2025 15:27:49 +0000 (+0100) Subject: [intelxl] Use default dummy MSI-X target address X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5438299649d26edce89c39803f4d85477e315781;p=thirdparty%2Fipxe.git [intelxl] Use default dummy MSI-X target address Use the default dummy MSI-X target address that is now allocated and configured automatically by pci_msix_enable(). Signed-off-by: Michael Brown --- diff --git a/src/drivers/net/intelxl.c b/src/drivers/net/intelxl.c index 31a3e2577..76b9ff48f 100644 --- a/src/drivers/net/intelxl.c +++ b/src/drivers/net/intelxl.c @@ -63,35 +63,20 @@ int intelxl_msix_enable ( struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector ) { int rc; - /* Map dummy target location */ - if ( ( rc = dma_map ( intelxl->dma, &intelxl->msix.map, - &intelxl->msix.msg, sizeof ( intelxl->msix.msg ), - DMA_RX ) ) != 0 ) { - DBGC ( intelxl, "INTELXL %p could not map MSI-X target: %s\n", - intelxl, strerror ( rc ) ); - goto err_map; - } - /* Enable MSI-X capability */ - if ( ( rc = pci_msix_enable ( pci, &intelxl->msix.cap ) ) != 0 ) { + if ( ( rc = pci_msix_enable ( pci, &intelxl->msix ) ) != 0 ) { DBGC ( intelxl, "INTELXL %p could not enable MSI-X: %s\n", intelxl, strerror ( rc ) ); goto err_enable; } - /* Configure interrupt to write to dummy location */ - pci_msix_map ( &intelxl->msix.cap, vector, - dma ( &intelxl->msix.map, &intelxl->msix.msg ), 0 ); - /* Enable dummy interrupt */ - pci_msix_unmask ( &intelxl->msix.cap, vector ); + pci_msix_unmask ( &intelxl->msix, vector ); return 0; - pci_msix_disable ( pci, &intelxl->msix.cap ); + pci_msix_disable ( pci, &intelxl->msix ); err_enable: - dma_unmap ( &intelxl->msix.map, sizeof ( intelxl->msix.msg ) ); - err_map: return rc; } @@ -106,13 +91,10 @@ void intelxl_msix_disable ( struct intelxl_nic *intelxl, struct pci_device *pci, unsigned int vector ) { /* Disable dummy interrupts */ - pci_msix_mask ( &intelxl->msix.cap, vector ); + pci_msix_mask ( &intelxl->msix, vector ); /* Disable MSI-X capability */ - pci_msix_disable ( pci, &intelxl->msix.cap ); - - /* Unmap dummy target location */ - dma_unmap ( &intelxl->msix.map, sizeof ( intelxl->msix.msg ) ); + pci_msix_disable ( pci, &intelxl->msix ); } /****************************************************************************** diff --git a/src/drivers/net/intelxl.h b/src/drivers/net/intelxl.h index 6c7865aa2..d23acf96e 100644 --- a/src/drivers/net/intelxl.h +++ b/src/drivers/net/intelxl.h @@ -891,16 +891,6 @@ intelxl_init_ring ( struct intelxl_ring *ring, unsigned int count, size_t len, #define INTELXL_PFGEN_PORTNUM_PORT_NUM(x) \ ( ( (x) >> 0 ) & 0x3 ) /**< Port number */ -/** MSI-X interrupt */ -struct intelxl_msix { - /** PCI capability */ - struct pci_msix cap; - /** MSI-X dummy interrupt target */ - uint32_t msg; - /** DMA mapping for dummy interrupt target */ - struct dma_mapping map; -}; - /** MSI-X interrupt vector */ #define INTELXL_MSIX_VECTOR 0 @@ -934,7 +924,7 @@ struct intelxl_nic { /** PCI Express capability offset */ unsigned int exp; /** MSI-X interrupt */ - struct intelxl_msix msix; + struct pci_msix msix; /** Admin command queue */ struct intelxl_admin command;