summaryrefslogtreecommitdiffstats
path: root/drivers/pci/proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/proc.c')
-rw-r--r--drivers/pci/proc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/pci/proc.c b/drivers/pci/proc.c
index dc8912e2d4a1..a2aa58a8fb96 100644
--- a/drivers/pci/proc.c
+++ b/drivers/pci/proc.c
@@ -210,14 +210,15 @@ static long proc_bus_pci_ioctl(struct file *file, unsigned int cmd,
break;
case PCIIOC_WRITE_COMBINE:
- if (arg)
- fpriv->write_combine = 1;
- else
- fpriv->write_combine = 0;
- break;
-
+ if (arch_can_pci_mmap_wc()) {
+ if (arg)
+ fpriv->write_combine = 1;
+ else
+ fpriv->write_combine = 0;
+ break;
+ }
+ /* If arch decided it can't, fall through... */
#endif /* HAVE_PCI_MMAP */
-
default:
ret = -EINVAL;
break;