Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329178
b: refs/heads/master
c: 3d92532
h: refs/heads/master
v: v3
  • Loading branch information
Konrad Rzeszutek Wilk committed Sep 17, 2012
1 parent 98cb82a commit feffa5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c468bdee28a1cb61d9b7a8ce9859d17dee43b7d7
refs/heads/master: 3d925320e9e2de162bd138bf97816bda8c3f71be
13 changes: 9 additions & 4 deletions trunk/drivers/pci/xen-pcifront.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/bitops.h>
#include <linux/time.h>

#include <asm/xen/swiotlb-xen.h>
#define INVALID_GRANT_REF (0)
#define INVALID_EVTCHN (-1)

Expand Down Expand Up @@ -668,7 +669,7 @@ static irqreturn_t pcifront_handler_aer(int irq, void *dev)
schedule_pcifront_aer_op(pdev);
return IRQ_HANDLED;
}
static int pcifront_connect(struct pcifront_device *pdev)
static int pcifront_connect_and_init_dma(struct pcifront_device *pdev)
{
int err = 0;

Expand All @@ -681,9 +682,13 @@ static int pcifront_connect(struct pcifront_device *pdev)
dev_err(&pdev->xdev->dev, "PCI frontend already installed!\n");
err = -EEXIST;
}

spin_unlock(&pcifront_dev_lock);

if (!err && !swiotlb_nr_tbl()) {
err = pci_xen_swiotlb_init_late();
if (err)
dev_err(&pdev->xdev->dev, "Could not setup SWIOTLB!\n");
}
return err;
}

Expand Down Expand Up @@ -842,10 +847,10 @@ static int __devinit pcifront_try_connect(struct pcifront_device *pdev)
XenbusStateInitialised)
goto out;

err = pcifront_connect(pdev);
err = pcifront_connect_and_init_dma(pdev);
if (err) {
xenbus_dev_fatal(pdev->xdev, err,
"Error connecting PCI Frontend");
"Error setting up PCI Frontend");
goto out;
}

Expand Down

0 comments on commit feffa5e

Please sign in to comment.