Re: Should we check dev->is_busmaster in pci_enable_{msi|msix}?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 15, 2008 at 2:26 PM, David Miller <davem@xxxxxxxxxxxxx> wrote:
> From: Jike Song <albcamus@xxxxxxxxx>
> Date: Mon, 15 Dec 2008 13:44:30 +0800
>
>> Hi all,
>>
>>  In the "PCI Express Base Rev 2.0", Section 7.5.1.1:
>>
>> Bus Master Enable - {snip}
>> Note that as MSI/MSI-X interrupt Messages are in-band memory
>> writes, setting the Bus Master Enable bit to 0b disables
>> MSI/MSI-X interrupt Messages as well.
>>
>>  But we didn't check if bus-master is enabled when enabling
>> MSI/MSI-X, is this correct?  What will happen if a driver calls
>> pci_enable_msi without calling pci_set_master previously?
>
> It really shouldn't matter, as long as the driver enables
> bus mastering before it wants to start receiving interrupts.
>
What will happen if the driver won't enable bus-mastering?

Since MSI/MSI-X messages do depend on bus-mastering,
but the pci core won't check it in pci_enable_msi() as you
pointed out,  so at least something should be documented
in Documentation/PCI/MSI-HOWTO.txt, right?

> And many drivers want to disable bus mastering around suspend and
> resume too.
Got it.
>
> I don't really think tieing these two things together is really a wise
> idea, even though strictly yes these two things have dependencies upon
> each other.
>

-- 
Thanks,
Jike
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux