On Mon, Nov 16, 2009 at 08:00:30PM +0800, Joe Jin wrote:
> Hi,
>
> When device driver unload, it may call pci_disable_msi(), if msi did not
> enabled but do msi_unmap_pirq(), then later driver reload and without
Where does that happen? That looks to be a driver bug as well.
> msi, then will failed in request_irq() for irq_desc[irq]->chip valie is
> no_irq_chip. So when did not enable msi during driver initializing, then
Won't that mean it is unusable? As in, you can't allocate an IRQ
to the device when the irq_desc[irq]->chip_value==no_irq_chip?
What kernel is this for? It does not look like the 2.6.18-xen.hg?
Either way, patch looks fine (except the spelling error).
> unloaded driver will not try to disable it.
>
> Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
> ---
> msi-xen.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> --- a/drivers/pci/msi-xen.c 2009-11-16 10:48:26.000000000 +0800
> +++ b/drivers/pci/msi-xen.c 2009-11-16 19:27:17.000000000 +0800
> @@ -670,6 +670,12 @@ void pci_disable_msi(struct pci_dev* dev
> if (!pos)
> return;
>
> + if (!(dev->msi_enabled)) {
> + printk(KERN_INFO "PCI: %s: Device did not eanble MSI.\n",
^^^^^- enable.
> + pci_name(dev));
> + return;
> + }
> +
> pirq = dev->irq;
> /* Restore dev->irq to its default pin-assertion vector */
> dev->irq = dev->irq_old;
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|