aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-20 19:44:00 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 19:44:00 -0500
commit6ab33d51713d6d60c7677c0d020910a8cb37e513 (patch)
tree546c2ff099b2757e75cf34ddace874f1220f740e /drivers/net/ixgbe/ixgbe_main.c
parent7be6065b39c3f1cfa796667eac1a2170465acc91 (diff)
parent13d428afc007fcfcd6deeb215618f54cf9c0cae6 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c62
1 files changed, 30 insertions, 32 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 6fb873889e74..7ad07a00680a 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1301,7 +1301,36 @@ static void ixgbe_set_itr(struct ixgbe_adapter *adapter)
1301 return; 1301 return;
1302} 1302}
1303 1303
1304static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter); 1304/**
1305 * ixgbe_irq_disable - Mask off interrupt generation on the NIC
1306 * @adapter: board private structure
1307 **/
1308static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
1309{
1310 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
1311 IXGBE_WRITE_FLUSH(&adapter->hw);
1312 if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
1313 int i;
1314 for (i = 0; i < adapter->num_msix_vectors; i++)
1315 synchronize_irq(adapter->msix_entries[i].vector);
1316 } else {
1317 synchronize_irq(adapter->pdev->irq);
1318 }
1319}
1320
1321/**
1322 * ixgbe_irq_enable - Enable default interrupt generation settings
1323 * @adapter: board private structure
1324 **/
1325static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
1326{
1327 u32 mask;
1328 mask = IXGBE_EIMS_ENABLE_MASK;
1329 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE)
1330 mask |= IXGBE_EIMS_GPI_SDP1;
1331 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
1332 IXGBE_WRITE_FLUSH(&adapter->hw);
1333}
1305 1334
1306/** 1335/**
1307 * ixgbe_intr - legacy mode Interrupt Handler 1336 * ixgbe_intr - legacy mode Interrupt Handler
@@ -1410,37 +1439,6 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
1410} 1439}
1411 1440
1412/** 1441/**
1413 * ixgbe_irq_disable - Mask off interrupt generation on the NIC
1414 * @adapter: board private structure
1415 **/
1416static inline void ixgbe_irq_disable(struct ixgbe_adapter *adapter)
1417{
1418 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, ~0);
1419 IXGBE_WRITE_FLUSH(&adapter->hw);
1420 if (adapter->flags & IXGBE_FLAG_MSIX_ENABLED) {
1421 int i;
1422 for (i = 0; i < adapter->num_msix_vectors; i++)
1423 synchronize_irq(adapter->msix_entries[i].vector);
1424 } else {
1425 synchronize_irq(adapter->pdev->irq);
1426 }
1427}
1428
1429/**
1430 * ixgbe_irq_enable - Enable default interrupt generation settings
1431 * @adapter: board private structure
1432 **/
1433static inline void ixgbe_irq_enable(struct ixgbe_adapter *adapter)
1434{
1435 u32 mask;
1436 mask = IXGBE_EIMS_ENABLE_MASK;
1437 if (adapter->flags & IXGBE_FLAG_FAN_FAIL_CAPABLE)
1438 mask |= IXGBE_EIMS_GPI_SDP1;
1439 IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, mask);
1440 IXGBE_WRITE_FLUSH(&adapter->hw);
1441}
1442
1443/**
1444 * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts 1442 * ixgbe_configure_msi_and_legacy - Initialize PIN (INTA...) and MSI interrupts
1445 * 1443 *
1446 **/ 1444 **/