Re: [PATCH] ACHI: Attempt to enable a single MSI if block enable fails

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

 



On Mon, Feb 3, 2014 at 11:01 PM, Alexander Gordeev <agordeev@xxxxxxxxxx> wrote:
> On Mon, Feb 03, 2014 at 03:46:08PM -0500, Tejun Heo wrote:
>> cc'ing Alexander.  Alexander, can you please reply with Reviewed-by?
>
> [...]
>
>> >
>> > - --- drivers/ata/ahci.c.orig       2014-02-03 20:00:04.834008843 +0000
>> > +++ drivers/ata/ahci.c      2014-02-03 19:34:53.737257483 +0000
>> > @@ -1171,7 +1171,7 @@ static int ahci_init_interrupts(struct p
>> >     nvec = rc;
>> >     rc = pci_enable_msi_block(pdev, nvec);
>> >     if (rc)
>> > - -         goto intx;
>> > +           goto single_msi;
>> >
>> >     return nvec;
>
> Single MSI should not be tried in case pci_enable_msi_block() returned a
> negative errno. The correct fix is below. Bjorn already has pulled it to
> his pci.git tree, into pci/msi branch.
>
> @Bjorn,
>
> Mind pushing the branch to the remote?

Done; it's now here:
http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/msi

I'll probably wait to merge it into -next until I pull in some more of
your MSI patches.

> diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c
> index 8516f4d..df24eef4 100644
> --- a/drivers/ata/ahci.c
> +++ b/drivers/ata/ahci.c
> @@ -1117,8 +1117,10 @@ int ahci_init_interrupts(struct pci_dev *pdev, unsigned int n_ports,
>
>         nvec = rc;
>         rc = pci_enable_msi_block(pdev, nvec);
> -       if (rc)
> +       if (rc < 0)
>                 goto intx;
> +       else if (rc > 0)
> +               goto single_msi;
>
>         return nvec;
>
> --
> 1.7.7.6
>
> --
> Regards,
> Alexander Gordeev
> agordeev@xxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux