| .. | .. |
|---|
| 22 | 22 | #include <linux/bitops.h> |
|---|
| 23 | 23 | #include <linux/time.h> |
|---|
| 24 | 24 | #include <linux/ktime.h> |
|---|
| 25 | +#include <linux/swiotlb.h> |
|---|
| 25 | 26 | #include <xen/platform_pci.h> |
|---|
| 26 | 27 | |
|---|
| 27 | 28 | #include <asm/xen/swiotlb-xen.h> |
|---|
| .. | .. |
|---|
| 76 | 77 | |
|---|
| 77 | 78 | static DEFINE_SPINLOCK(pcifront_dev_lock); |
|---|
| 78 | 79 | static struct pcifront_device *pcifront_dev; |
|---|
| 79 | | - |
|---|
| 80 | | -static int verbose_request; |
|---|
| 81 | | -module_param(verbose_request, int, 0644); |
|---|
| 82 | 80 | |
|---|
| 83 | 81 | static int errno_to_pcibios_err(int errno) |
|---|
| 84 | 82 | { |
|---|
| .. | .. |
|---|
| 190 | 188 | struct pcifront_sd *sd = bus->sysdata; |
|---|
| 191 | 189 | struct pcifront_device *pdev = pcifront_get_pdev(sd); |
|---|
| 192 | 190 | |
|---|
| 193 | | - if (verbose_request) |
|---|
| 194 | | - dev_info(&pdev->xdev->dev, |
|---|
| 195 | | - "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", |
|---|
| 196 | | - pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), |
|---|
| 197 | | - PCI_FUNC(devfn), where, size); |
|---|
| 191 | + dev_dbg(&pdev->xdev->dev, |
|---|
| 192 | + "read dev=%04x:%02x:%02x.%d - offset %x size %d\n", |
|---|
| 193 | + pci_domain_nr(bus), bus->number, PCI_SLOT(devfn), |
|---|
| 194 | + PCI_FUNC(devfn), where, size); |
|---|
| 198 | 195 | |
|---|
| 199 | 196 | err = do_pci_op(pdev, &op); |
|---|
| 200 | 197 | |
|---|
| 201 | 198 | if (likely(!err)) { |
|---|
| 202 | | - if (verbose_request) |
|---|
| 203 | | - dev_info(&pdev->xdev->dev, "read got back value %x\n", |
|---|
| 204 | | - op.value); |
|---|
| 199 | + dev_dbg(&pdev->xdev->dev, "read got back value %x\n", |
|---|
| 200 | + op.value); |
|---|
| 205 | 201 | |
|---|
| 206 | 202 | *val = op.value; |
|---|
| 207 | 203 | } else if (err == -ENODEV) { |
|---|
| .. | .. |
|---|
| 229 | 225 | struct pcifront_sd *sd = bus->sysdata; |
|---|
| 230 | 226 | struct pcifront_device *pdev = pcifront_get_pdev(sd); |
|---|
| 231 | 227 | |
|---|
| 232 | | - if (verbose_request) |
|---|
| 233 | | - dev_info(&pdev->xdev->dev, |
|---|
| 234 | | - "write dev=%04x:%02x:%02x.%d - " |
|---|
| 235 | | - "offset %x size %d val %x\n", |
|---|
| 236 | | - pci_domain_nr(bus), bus->number, |
|---|
| 237 | | - PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); |
|---|
| 228 | + dev_dbg(&pdev->xdev->dev, |
|---|
| 229 | + "write dev=%04x:%02x:%02x.%d - offset %x size %d val %x\n", |
|---|
| 230 | + pci_domain_nr(bus), bus->number, |
|---|
| 231 | + PCI_SLOT(devfn), PCI_FUNC(devfn), where, size, val); |
|---|
| 238 | 232 | |
|---|
| 239 | 233 | return errno_to_pcibios_err(do_pci_op(pdev, &op)); |
|---|
| 240 | 234 | } |
|---|
| .. | .. |
|---|
| 291 | 285 | vector[i] = op.msix_entries[i].vector; |
|---|
| 292 | 286 | } |
|---|
| 293 | 287 | } else { |
|---|
| 294 | | - printk(KERN_DEBUG "enable msix get value %x\n", |
|---|
| 295 | | - op.value); |
|---|
| 288 | + pr_info("enable msix get value %x\n", op.value); |
|---|
| 296 | 289 | err = op.value; |
|---|
| 297 | 290 | } |
|---|
| 298 | 291 | } else { |
|---|
| .. | .. |
|---|
| 364 | 357 | err = do_pci_op(pdev, &op); |
|---|
| 365 | 358 | if (err == XEN_PCI_ERR_dev_not_found) { |
|---|
| 366 | 359 | /* XXX No response from backend, what shall we do? */ |
|---|
| 367 | | - printk(KERN_DEBUG "get no response from backend for disable MSI\n"); |
|---|
| 360 | + pr_info("get no response from backend for disable MSI\n"); |
|---|
| 368 | 361 | return; |
|---|
| 369 | 362 | } |
|---|
| 370 | 363 | if (err) |
|---|
| 371 | 364 | /* how can pciback notify us fail? */ |
|---|
| 372 | | - printk(KERN_DEBUG "get fake response frombackend\n"); |
|---|
| 365 | + pr_info("get fake response from backend\n"); |
|---|
| 373 | 366 | } |
|---|
| 374 | 367 | |
|---|
| 375 | 368 | static struct xen_pci_frontend_ops pci_frontend_ops = { |
|---|
| .. | .. |
|---|
| 1104 | 1097 | case XenbusStateClosed: |
|---|
| 1105 | 1098 | if (xdev->state == XenbusStateClosed) |
|---|
| 1106 | 1099 | break; |
|---|
| 1107 | | - /* Missed the backend's CLOSING state -- fallthrough */ |
|---|
| 1100 | + fallthrough; /* Missed the backend's CLOSING state */ |
|---|
| 1108 | 1101 | case XenbusStateClosing: |
|---|
| 1109 | 1102 | dev_warn(&xdev->dev, "backend going away!\n"); |
|---|
| 1110 | 1103 | pcifront_try_disconnect(pdev); |
|---|