Re: [PATCH 4/25] msi: Simplify msi enable and disable.

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

 



Rajesh Shah <rajesh.shah@xxxxxxxxx> writes:

> On Tue, Jun 20, 2006 at 04:28:17PM -0600, Eric W. Biederman wrote:
>> 
>> @@ -937,27 +936,8 @@ int pci_enable_msi(struct pci_dev* dev)
>>  	if (!pos)
>>  		return -EINVAL;
>>  
>> -	if (!msi_lookup_vector(dev, PCI_CAP_ID_MSI)) {
>> -		/* Lookup Sucess */
>> -		unsigned long flags;
>> +	BUG_ON(!msi_lookup_vector(dev, PCI_CAP_ID_MSI));
>>  
> A driver that calls pci_enable_msi() while MSI is already enabled
> will hit this BUG_ON. This is different from the behavior of
> some other pci functions like pci_enable_device(), which
> silently return success if the requested operation is a nop.
> It's pretty easy to do the same here too (ditto for MSI-X).

With MSI-X we can't be a NOOP so it is clearly a bug.

With MSI it might happen, and I don't have a problem if it becomes
a noop.  At the same time I'm not convinced it isn't a bug.

All I really care about is that we don't try and do the impossible and
enable the msi from a half initialized software state like we were doing
before.

That was really ugly and impossible to get right.

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

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux