net/virtio: invoke method directly for setting IRQ config
[dpdk.git] / drivers / net / virtio / virtio_pci.c
index 7903e29..040f1b5 100644 (file)
@@ -304,7 +304,7 @@ legacy_virtio_resource_init(struct rte_pci_device *pci_dev,
        return 0;
 }
 
-static const struct virtio_pci_ops legacy_ops = {
+const struct virtio_pci_ops legacy_ops = {
        .read_dev_cfg   = legacy_read_dev_config,
        .write_dev_cfg  = legacy_write_dev_config,
        .reset          = legacy_reset,
@@ -520,7 +520,7 @@ modern_notify_queue(struct virtio_hw *hw __rte_unused, struct virtqueue *vq)
        io_write16(1, vq->notify_addr);
 }
 
-static const struct virtio_pci_ops modern_ops = {
+const struct virtio_pci_ops modern_ops = {
        .read_dev_cfg   = modern_read_dev_config,
        .write_dev_cfg  = modern_write_dev_config,
        .reset          = modern_reset,
@@ -601,14 +601,6 @@ vtpci_isr(struct virtio_hw *hw)
        return VTPCI_OPS(hw)->get_isr(hw);
 }
 
-
-/* Enable one vector (0) for Link State Intrerrupt */
-uint16_t
-vtpci_irq_config(struct virtio_hw *hw, uint16_t vec)
-{
-       return VTPCI_OPS(hw)->set_config_irq(hw, vec);
-}
-
 static void *
 get_cfg_addr(struct rte_pci_device *dev, struct virtio_pci_cap *cap)
 {
@@ -731,8 +723,6 @@ int
 vtpci_init(struct rte_pci_device *dev, struct virtio_hw *hw,
           uint32_t *dev_flags)
 {
-       hw->dev = dev;
-
        /*
         * Try if we can succeed reading virtio pci caps, which exists
         * only on modern pci device. If failed, we fallback to legacy