Message ID | 20190906124029.25406-1-jarkko.nikula@linux.intel.com |
---|---|
State | Rejected |
Headers | show |
Series | i2c: designware-pci: Remove needless pci_set_master() call | expand |
On Fri, Sep 06, 2019 at 03:40:29PM +0300, Jarkko Nikula wrote: > I failed to notice the pci_set_master() call is needless in the > commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") > due the fact driver don't support DMA. Hmm, MSI still needs bus mastering to be enabled, no?
On 9/6/19 3:43 PM, Mika Westerberg wrote: > On Fri, Sep 06, 2019 at 03:40:29PM +0300, Jarkko Nikula wrote: >> I failed to notice the pci_set_master() call is needless in the >> commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") >> due the fact driver don't support DMA. > > Hmm, MSI still needs bus mastering to be enabled, no? > At least Documentation/PCI/msi-howto.rst doesn't mention it and I think I saw some commit adding MSI support without pci_set_master() but I'll dig more.
Jarkko Nikula <jarkko.nikula@linux.intel.com> writes: > On 9/6/19 3:43 PM, Mika Westerberg wrote: >> On Fri, Sep 06, 2019 at 03:40:29PM +0300, Jarkko Nikula wrote: >>> I failed to notice the pci_set_master() call is needless in the >>> commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") >>> due the fact driver don't support DMA. >> >> Hmm, MSI still needs bus mastering to be enabled, no? >> > At least Documentation/PCI/msi-howto.rst doesn't mention it and I think > I saw some commit adding MSI support without pci_set_master() but I'll > dig more. Read PCI documentation (see attached)
Jarkko Nikula <jarkko.nikula@linux.intel.com> writes: > I failed to notice the pci_set_master() call is needless in the > commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") > due the fact driver don't support DMA. > > Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> NAK (see reply on sub-thread)
On 9/6/19 4:03 PM, Felipe Balbi wrote: > Jarkko Nikula <jarkko.nikula@linux.intel.com> writes: > >> On 9/6/19 3:43 PM, Mika Westerberg wrote: >>> On Fri, Sep 06, 2019 at 03:40:29PM +0300, Jarkko Nikula wrote: >>>> I failed to notice the pci_set_master() call is needless in the >>>> commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") >>>> due the fact driver don't support DMA. >>> >>> Hmm, MSI still needs bus mastering to be enabled, no? >>> >> At least Documentation/PCI/msi-howto.rst doesn't mention it and I think >> I saw some commit adding MSI support without pci_set_master() but I'll >> dig more. > > Read PCI documentation (see attached) > Thanks, that explains it. So please drop this patch.
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index 050adda7c1bd..1fa6171e253b 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c @@ -234,8 +234,6 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev, return r; } - pci_set_master(pdev); - r = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev)); if (r) { dev_err(&pdev->dev, "I/O memory remapping failed\n");
I failed to notice the pci_set_master() call is needless in the commit 21aa3983d619 ("i2c: designware-pci: Switch over to MSI interrupts") due the fact driver don't support DMA. Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> --- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 -- 1 file changed, 2 deletions(-)