Re: [RTnet-developers] [PATCH] rt_igb: Add missing ifdefs for CONFIG_PCI_MSI
Brought to you by:
bet-frogger,
kiszka
|
From: Jan K. <jan...@we...> - 2011-01-07 08:44:39
|
Am 06.01.2011 16:31, Sebastian Smolorz wrote:
> When building rt_igb for a kernel without CONFIG_PCI_MSI set the calls to
> igb_reset_interrupt_capability() and igb_set_interrupt_capability() lead
> to a compilation error because those functions are only known when
> CONFIG_PCI_MSI is set to y. Therefore this patch makes the calls to those
> functions conditional, too.
>
In fact, the #ifdefs missing here were too much elsewhere. Applied your
fix (with cosmetic adjustment) and cleaned up the other spot.
Thanks,
Jan
> Signed-off-by: Sebastian Smolorz <sm...@rt...>
> ---
> drivers/igb/igb_main.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/igb/igb_main.c b/drivers/igb/igb_main.c
> index aca794e..2487aeb 100644
> --- a/drivers/igb/igb_main.c
> +++ b/drivers/igb/igb_main.c
> @@ -1568,8 +1568,9 @@ static void __devexit igb_remove(struct pci_dev *pdev)
> igb_reset_phy(&adapter->hw);
>
> igb_remove_device(&adapter->hw);
> +#ifdef CONFIG_PCI_MSI
> igb_reset_interrupt_capability(adapter);
> -
> +#endif
> igb_free_queues(adapter);
>
> rtskb_pool_release(&adapter->skb_pool);
> @@ -1625,8 +1626,9 @@ static int __devinit igb_sw_init(struct igb_adapter *adapter)
>
> /* This call may decrease the number of queues depending on
> * interrupt mode. */
> +#ifdef CONFIG_PCI_MSI
> igb_set_interrupt_capability(adapter);
> -
> +#endif
> if (igb_alloc_queues(adapter)) {
> dev_err(&pdev->dev, "Unable to allocate memory for queues\n");
> return -ENOMEM;
|