]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[intelxl] Use default dummy MSI-X target address
authorMichael Brown <mcb30@ipxe.org>
Thu, 9 Oct 2025 15:27:49 +0000 (16:27 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 9 Oct 2025 15:37:14 +0000 (16:37 +0100)
Use the default dummy MSI-X target address that is now allocated and
configured automatically by pci_msix_enable().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/intelxl.c
src/drivers/net/intelxl.h

index 31a3e25774dad6b7136229229f1fbf6267ab6fc9..76b9ff48fcd659f273cbce9d76b8a26a8527d524 100644 (file)
@@ -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 );
 }
 
 /******************************************************************************
index 6c7865aa253e479a643de5a2ea46a490f721aff4..d23acf96ef6d9079ffbc453d5695d118a92f9105 100644 (file)
@@ -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;