atl1: unconditionally enable MSI
Subsystems (2)
PATCH 1/4 atl1: unconditionally enable MSI
From: Luca Tettamanti <[email protected]>
Unconditionally enable MSI in atl1 driver. Also remove some useless #ifdef since pci_{en,dis}able_msi() are no-op when MSI support is not configured in.
---
drivers/net/atl1/atl1.h | 1 - drivers/net/atl1/atl1_main.c | 22 +++++++--------------- drivers/net/atl1/atl1_param.c | 13 ------------- 3 files changed, 7 insertions(+), 29 deletions(-)
drivers/net/atl1/atl1.h +0 -1
@@ -281,7 +281,6 @@ struct atl1_adapter {struct atl1_smb smb;struct atl1_cmb cmb; -int enable_msi;u32 pci_state[16 ]; };
drivers/net/atl1/atl1_main.c +7 -15
@@ -1793,18 +1793,12 @@ s32 atl1_up(struct atl1_adapter *adapter) goto err_up; } -#ifdef CONFIG_PCI_MSI -if (adapter->enable_msi) { - err =pci_enable_msi (adapter->pdev); -if (err) { -dev_info (&adapter->pdev->dev,"Unable to enable MSI: %d\n" , err); - adapter->enable_msi =0 ; - } - } -#endif -if (!adapter->enable_msi) + err =pci_enable_msi (adapter->pdev); +if (err) { +dev_info (&adapter->pdev->dev,"Unable to enable MSI: %d\n" , err); irq_flags |=IRQF_SHARED ; - + } + err =request_irq (adapter->pdev->irq, &atl1_intr, irq_flags, netdev->name, netdev);if (unlikely (err))
@@ -1821,6 +1815,7 @@ s32 atl1_up(struct atl1_adapter *adapter)free_irq (adapter->pdev->irq, netdev); err_up: +pci_disable_msi (adapter->pdev);/* free rx_buffers */ atl1_clean_rx_ring (adapter);return err;
@@ -1836,10 +1831,7 @@ void atl1_down(struct atl1_adapter *adapter)atl1_irq_disable (adapter);free_irq (adapter->pdev->irq, netdev); -#ifdef CONFIG_PCI_MSI -if (adapter->enable_msi) -pci_disable_msi (adapter->pdev); -#endif +pci_disable_msi (adapter->pdev);atl1_reset_hw (&adapter->hw); adapter->cmb.cmb->int_stats =0 ;
drivers/net/atl1/atl1_param.c +0 -13
@@ -68,10 +68,6 @@ static int num_flash_vendor = 0;module_param_array_named (flash_vendor, flash_vendor, int, &num_flash_vendor,0 );MODULE_PARM_DESC (flash_vendor,"SPI flash vendor" ); -int enable_msi; -module_param (enable_msi, int,0444 ); -MODULE_PARM_DESC (enable_msi,"Enable PCI MSI" ); -#define DEFAULT_INT_MOD_CNT 100/* 200us */ #define MAX_INT_MOD_CNT 65000#define MIN_INT_MOD_CNT 50
@@ -211,13 +207,4 @@ void __devinit atl1_check_options(struct atl1_adapter *adapter) adapter->hw.flash_vendor = (u8) (opt.def); } } - - {/* PCI MSI usage */ - -#ifdef CONFIG_PCI_MSI - adapter->enable_msi = enable_msi; -#else - adapter->enable_msi =0 ; -#endif - } }
Luca
Signature · 3 lines
Inquietudine sintetica Solo, davanti all'ignoto Tienimi stretto a te
The subject line on all four of the current crop of atl1 patches is incorrect; they were generated against *2.6.20-rc6*, not rc5. I apologize for the error.
Jay
Jeff Garzik
AppliedQuoted 8 lines · Jay Cliburn
From: Luca Tettamanti <[email protected]>
Unconditionally enable MSI in atl1 driver. Also remove some useless #ifdef since pci_{en,dis}able_msi() are no-op when MSI support is not configured in.
Signed-off-by Luca Tettamanti <[email protected]>Signed-off-by Jay Cliburn <[email protected]>
applied patches 1-4 to #atl1
The only remaining problem with your patches is that they added trailing whitespace:
[jgarzik@pretzel netdev-2.6]$ git-am --signoff --utf8 /g/tmp/mbox
Applying 'atl1: unconditionally enable MSI'
Adds trailing whitespace.
.dotest/patch:44:
warning: 1 line adds trailing whitespaces. Wrote tree dc738e9c0b8becc628dc3bdbbcb02988b671065a
Committed: ab248491d6e576228710950e3d21ea0731aa2de4
Applying 'atl1: add missing include dma-mapping.h'
Wrote tree 5fb3cad9771ccb59d7e3610367bb69bb33b3b45d
Committed: 13b6ae2c23523e808530681e16998220150c881c
Applying 'atl1: properly use CONFIG_PM'
Wrote tree 9fb334ce776443d59039aaedcd6a5a09790a3d67
Committed: 01e8d5606f0732222baf9ec8664d1e833ac428ca
Applying 'atl1: incorporate reviewer comments'
Adds trailing whitespace.
.dotest/patch:197:static int atl1_get_settings(struct net_device *netdev, Adds trailing whitespace.
.dotest/patch:230:static int atl1_set_settings(struct net_device *netdev, Adds trailing whitespace.
.dotest/patch:240: printk(KERN_DEBUG "%s: ethtool shutting down adapter\n",
Adds trailing whitespace.
.dotest/patch:258: } else
Adds trailing whitespace.
.dotest/patch:292:
warning: squelched 10 whitespace errors
warning: 15 lines add trailing whitespaces.
Wrote tree 75ab9e0e86a96951c542b1f6e7557c917ca6799b
Committed: 37e12a2bd50cb62add05b97fc6661d21782f232b