diff mbox series

i2c: designware-pci: Remove needless pci_set_master() call

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

Commit Message

Jarkko Nikula Sept. 6, 2019, 12:40 p.m. UTC
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(-)

Comments

Mika Westerberg Sept. 6, 2019, 12:43 p.m. UTC | #1
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?
Jarkko Nikula Sept. 6, 2019, 1 p.m. UTC | #2
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.
Felipe Balbi Sept. 6, 2019, 1:03 p.m. UTC | #3
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)
Felipe Balbi Sept. 6, 2019, 1:04 p.m. UTC | #4
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)
Jarkko Nikula Sept. 6, 2019, 1:13 p.m. UTC | #5
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 mbox series

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");