Message ID | 20170102092343.87106-3-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/drivers/tty/serial/8250/8250_mid.c b/drivers/tty/serial/8250/8250_mid.c index 85011c9ac0ee..5fee143f6578 100644 --- a/drivers/tty/serial/8250/8250_mid.c +++ b/drivers/tty/serial/8250/8250_mid.c @@ -181,6 +181,8 @@ static int dnv_setup(struct mid8250 *mid, struct uart_port *p) if (ret) return 0; + pci_set_master(pdev); + mid->dma_dev = pdev; p->handle_irq = dnv_handle_irq; @@ -289,8 +291,6 @@ static int mid8250_probe(struct pci_dev *pdev, const struct pci_device_id *id) if (ret) return ret; - pci_set_master(pdev); - mid = devm_kzalloc(&pdev->dev, sizeof(*mid), GFP_KERNEL); if (!mid) return -ENOMEM;
There is no need to set PCI bus mastering when device is not doing any DMA. Though on Intel Denverton DMA is a part of UART IP and thus shares same device in Linux kernel. Enable bus mastering only for Denverton case. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> --- drivers/tty/serial/8250/8250_mid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)