lkml.org 
[lkml]   [2006]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/25] msi: Simplify msi enable and disable.
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).

Rajesh
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-06-21 03:12    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site