search for: ifc_err

Displaying 9 results from an estimated 9 matches for "ifc_err".

2019 Nov 06
0
[PATCH 2/2] IFC VDPA layer
...+{ > + struct ifcvf_hw *vf = IFC_PRIVATE_TO_VF(private); > + struct ifcvf_adapter *ifcvf; > + int i, ret = 0; > + > + ifcvf = container_of(vf, struct ifcvf_adapter, vf); > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + if (!vf->vring[i].ready) { > + IFC_ERR(ifcvf->dev, > + "Failed to start datapath, vring %d not ready.\n", i); > + return -EINVAL; > + } This should be not related. Driver can choose to not start a virtqueue. > + > + if (!vf->vring[i].size) { > + IFC_ERR(ifcvf->dev, > + "Failed t...
2019 Oct 16
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...cvf_hw *hw, struct virtio_pci_cap *cap) > +{ > + u8 bar = cap->bar; > + u32 length = cap->length; > + u32 offset = cap->offset; > + struct ifcvf_adapter *ifcvf = > + container_of(hw, struct ifcvf_adapter, vf); > + > + if (bar >= IFCVF_PCI_MAX_RESOURCE) { > + IFC_ERR(ifcvf->dev, > + "Invalid bar number %u to get capabilities.\n", bar); > + return NULL; > + } > + > + if (offset + length < offset) { > + IFC_ERR(ifcvf->dev, "offset(%u) + length(%u) overflows\n", > + offset, length); > + return NULL; >...
2019 Oct 21
0
[RFC 1/2] vhost: IFC VF hardware operation layer
...;>> +??? u32 length = cap->length; >>> +??? u32 offset = cap->offset; >>> +??? struct ifcvf_adapter *ifcvf = >>> +??????? container_of(hw, struct ifcvf_adapter, vf); >>> + >>> +??? if (bar >= IFCVF_PCI_MAX_RESOURCE) { >>> +??????? IFC_ERR(ifcvf->dev, >>> +??????????? "Invalid bar number %u to get capabilities.\n", bar); >>> +??????? return NULL; >>> +??? } >>> + >>> +??? if (offset + length < offset) { >>> +??????? IFC_ERR(ifcvf->dev, "offset(%u) + length(...
2019 Oct 16
0
[RFC 2/2] vhost: IFC VF vdpa layer
...ter *adapter) > +{ > + int vector, i, ret, irq; > + struct pci_dev *pdev = to_pci_dev(adapter->dev); > + struct ifcvf_hw *vf = &adapter->vf; > + > + ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, > + IFCVF_MAX_INTR, PCI_IRQ_MSIX); > + if (ret < 0) { > + IFC_ERR(adapter->dev, "Failed to alloc irq vectors.\n"); > + return ret; > + } > + > + for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { > + vector = i + IFCVF_MSI_QUEUE_OFF; > + irq = pci_irq_vector(pdev, vector); > + ret = request_irq(irq, ifcvf_intr_handler, 0, &...
2019 Nov 08
0
[PATCH 1/2] IFC hardware operation layer
...gt; + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev) > +{ > + struct virtio_pci_cap cap; > + u16 notify_off; > + int ret; > + u8 pos; > + u32 i; > + > + ret = pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "Failed to read PCI capability list.\n"); > + return -EIO; > + } > + > + while (pos) { > + ret = ifcvf_read_config_range(dev, (u32 *)&cap, > + sizeof(cap), pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "F...
2019 Nov 05
1
[PATCH 1/2] IFC hardware operation layer
...gt; + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev) > +{ > + struct virtio_pci_cap cap; > + u16 notify_off; > + int ret; > + u8 pos; > + u32 i; > + > + ret = pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "Failed to read PCI capability list.\n"); > + return -EIO; > + } > + > + while (pos) { > + ret = ifcvf_read_config_range(dev, (u32 *)&cap, > + sizeof(cap), pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "F...
2019 Nov 05
0
[PATCH 1/2] IFC hardware operation layer
...gt; + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev) > +{ > + struct virtio_pci_cap cap; > + u16 notify_off; > + int ret; > + u8 pos; > + u32 i; > + > + ret = pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "Failed to read PCI capability list.\n"); > + return -EIO; > + } > + > + while (pos) { > + ret = ifcvf_read_config_range(dev, (u32 *)&cap, > + sizeof(cap), pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "F...
2019 Nov 06
0
[PATCH 1/2] IFC hardware operation layer
...gt; + > +int ifcvf_init_hw(struct ifcvf_hw *hw, struct pci_dev *dev) > +{ > + struct virtio_pci_cap cap; > + u16 notify_off; > + int ret; > + u8 pos; > + u32 i; > + > + ret = pci_read_config_byte(dev, PCI_CAPABILITY_LIST, &pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "Failed to read PCI capability list.\n"); > + return -EIO; > + } > + > + while (pos) { > + ret = ifcvf_read_config_range(dev, (u32 *)&cap, > + sizeof(cap), pos); > + > + if (ret < 0) { > + IFC_ERR(&dev->dev, "F...
2019 Oct 21
0
[RFC 2/2] vhost: IFC VF vdpa layer
...dev *pdev = to_pci_dev(adapter->dev); >>> +??? struct ifcvf_hw *vf = &adapter->vf; >>> + >>> +??? ret = pci_alloc_irq_vectors(pdev, IFCVF_MAX_INTR, >>> +??????????? IFCVF_MAX_INTR, PCI_IRQ_MSIX); >>> +??? if (ret < 0) { >>> +??????? IFC_ERR(adapter->dev, "Failed to alloc irq vectors.\n"); >>> +??????? return ret; >>> +??? } >>> + >>> +??? for (i = 0; i < IFCVF_MAX_QUEUE_PAIRS * 2; i++) { >>> +??????? vector = i + IFCVF_MSI_QUEUE_OFF; >>> +??????? irq = pci_irq_vecto...