bus/pci: fix interrupt handler type
For virtio legacy device, testpmd startup fails when using uio_pci_generic.
The issue is caused by invoking the function pci_ioport_map. The correct
value of intr_handle.type is already set before calling it, we should avoid
overwriting the default value "RTE_INTR_HANDLE_UNKNOWN" in this function.
Besides, the removal has no harm to other cases because it is set to 0 by a
memset on the whole struct during allocation in the function pci_scan_one.
Such assignments are removed in the meanwhile in pci_uio_map_resource(),
pci_vfio_map_resource_primary() and pci_vfio_map_resource_secondary() in
order to keep consistencies and avoid future questions.
Fixes: 756ce64b1e
("eal: introduce PCI ioport API")
Cc: stable@dpdk.org
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Reviewed-by: Thomas Monjalon <thomas@monjalon.net>
This commit is contained in:
parent
3b792ed9c8
commit
6c7001480a
@ -694,7 +694,6 @@ pci_ioport_map(struct rte_pci_device *dev, int bar __rte_unused,
|
||||
if (!found)
|
||||
return -1;
|
||||
|
||||
dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
|
||||
p->base = start;
|
||||
RTE_LOG(DEBUG, EAL, "PCI Port IO found start=0x%x\n", start);
|
||||
|
||||
|
@ -430,7 +430,6 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev)
|
||||
struct pci_map *maps;
|
||||
|
||||
dev->intr_handle.fd = -1;
|
||||
dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
|
||||
|
||||
/* store PCI address string */
|
||||
snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
|
||||
@ -547,7 +546,6 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev)
|
||||
struct pci_map *maps;
|
||||
|
||||
dev->intr_handle.fd = -1;
|
||||
dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
|
||||
|
||||
/* store PCI address string */
|
||||
snprintf(pci_addr, sizeof(pci_addr), PCI_PRI_FMT,
|
||||
|
@ -90,7 +90,6 @@ pci_uio_map_resource(struct rte_pci_device *dev)
|
||||
|
||||
dev->intr_handle.fd = -1;
|
||||
dev->intr_handle.uio_cfg_fd = -1;
|
||||
dev->intr_handle.type = RTE_INTR_HANDLE_UNKNOWN;
|
||||
|
||||
/* secondary processes - use already recorded details */
|
||||
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
|
||||
|
Loading…
Reference in New Issue
Block a user