aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xen-pciback
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/xen/xen-pciback')
-rw-r--r--drivers/xen/xen-pciback/pci_stub.c13
-rw-r--r--drivers/xen/xen-pciback/pciback.h2
-rw-r--r--drivers/xen/xen-pciback/pciback_ops.c14
3 files changed, 14 insertions, 15 deletions
diff --git a/drivers/xen/xen-pciback/pci_stub.c b/drivers/xen/xen-pciback/pci_stub.c
index cd50d251998e..9204126f1560 100644
--- a/drivers/xen/xen-pciback/pci_stub.c
+++ b/drivers/xen/xen-pciback/pci_stub.c
@@ -272,8 +272,8 @@ void pcistub_put_pci_dev(struct pci_dev *dev)
272 up_write(&pcistub_sem); 272 up_write(&pcistub_sem);
273} 273}
274 274
275static int __devinit pcistub_match_one(struct pci_dev *dev, 275static int pcistub_match_one(struct pci_dev *dev,
276 struct pcistub_device_id *pdev_id) 276 struct pcistub_device_id *pdev_id)
277{ 277{
278 /* Match the specified device by domain, bus, slot, func and also if 278 /* Match the specified device by domain, bus, slot, func and also if
279 * any of the device's parent bridges match. 279 * any of the device's parent bridges match.
@@ -292,7 +292,7 @@ static int __devinit pcistub_match_one(struct pci_dev *dev,
292 return 0; 292 return 0;
293} 293}
294 294
295static int __devinit pcistub_match(struct pci_dev *dev) 295static int pcistub_match(struct pci_dev *dev)
296{ 296{
297 struct pcistub_device_id *pdev_id; 297 struct pcistub_device_id *pdev_id;
298 unsigned long flags; 298 unsigned long flags;
@@ -310,7 +310,7 @@ static int __devinit pcistub_match(struct pci_dev *dev)
310 return found; 310 return found;
311} 311}
312 312
313static int __devinit pcistub_init_device(struct pci_dev *dev) 313static int pcistub_init_device(struct pci_dev *dev)
314{ 314{
315 struct xen_pcibk_dev_data *dev_data; 315 struct xen_pcibk_dev_data *dev_data;
316 int err = 0; 316 int err = 0;
@@ -428,7 +428,7 @@ static int __init pcistub_init_devices_late(void)
428 return 0; 428 return 0;
429} 429}
430 430
431static int __devinit pcistub_seize(struct pci_dev *dev) 431static int pcistub_seize(struct pci_dev *dev)
432{ 432{
433 struct pcistub_device *psdev; 433 struct pcistub_device *psdev;
434 unsigned long flags; 434 unsigned long flags;
@@ -463,8 +463,7 @@ static int __devinit pcistub_seize(struct pci_dev *dev)
463 return err; 463 return err;
464} 464}
465 465
466static int __devinit pcistub_probe(struct pci_dev *dev, 466static int pcistub_probe(struct pci_dev *dev, const struct pci_device_id *id)
467 const struct pci_device_id *id)
468{ 467{
469 int err = 0; 468 int err = 0;
470 469
diff --git a/drivers/xen/xen-pciback/pciback.h b/drivers/xen/xen-pciback/pciback.h
index a7def010eba3..f72af87640e0 100644
--- a/drivers/xen/xen-pciback/pciback.h
+++ b/drivers/xen/xen-pciback/pciback.h
@@ -124,7 +124,7 @@ static inline int xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev,
124static inline void xen_pcibk_release_pci_dev(struct xen_pcibk_device *pdev, 124static inline void xen_pcibk_release_pci_dev(struct xen_pcibk_device *pdev,
125 struct pci_dev *dev) 125 struct pci_dev *dev)
126{ 126{
127 if (xen_pcibk_backend && xen_pcibk_backend->free) 127 if (xen_pcibk_backend && xen_pcibk_backend->release)
128 return xen_pcibk_backend->release(pdev, dev); 128 return xen_pcibk_backend->release(pdev, dev);
129} 129}
130 130
diff --git a/drivers/xen/xen-pciback/pciback_ops.c b/drivers/xen/xen-pciback/pciback_ops.c
index 97f5d264c31e..37c1f825f513 100644
--- a/drivers/xen/xen-pciback/pciback_ops.c
+++ b/drivers/xen/xen-pciback/pciback_ops.c
@@ -135,7 +135,6 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
135 struct pci_dev *dev, struct xen_pci_op *op) 135 struct pci_dev *dev, struct xen_pci_op *op)
136{ 136{
137 struct xen_pcibk_dev_data *dev_data; 137 struct xen_pcibk_dev_data *dev_data;
138 int otherend = pdev->xdev->otherend_id;
139 int status; 138 int status;
140 139
141 if (unlikely(verbose_request)) 140 if (unlikely(verbose_request))
@@ -144,8 +143,9 @@ int xen_pcibk_enable_msi(struct xen_pcibk_device *pdev,
144 status = pci_enable_msi(dev); 143 status = pci_enable_msi(dev);
145 144
146 if (status) { 145 if (status) {
147 printk(KERN_ERR "error enable msi for guest %x status %x\n", 146 pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI for guest %u: err %d\n",
148 otherend, status); 147 pci_name(dev), pdev->xdev->otherend_id,
148 status);
149 op->value = 0; 149 op->value = 0;
150 return XEN_PCI_ERR_op_failed; 150 return XEN_PCI_ERR_op_failed;
151 } 151 }
@@ -223,10 +223,10 @@ int xen_pcibk_enable_msix(struct xen_pcibk_device *pdev,
223 pci_name(dev), i, 223 pci_name(dev), i,
224 op->msix_entries[i].vector); 224 op->msix_entries[i].vector);
225 } 225 }
226 } else { 226 } else
227 printk(KERN_WARNING DRV_NAME ": %s: failed to enable MSI-X: err %d!\n", 227 pr_warn_ratelimited(DRV_NAME ": %s: error enabling MSI-X for guest %u: err %d!\n",
228 pci_name(dev), result); 228 pci_name(dev), pdev->xdev->otherend_id,
229 } 229 result);
230 kfree(entries); 230 kfree(entries);
231 231
232 op->value = result; 232 op->value = result;