aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2006-03-20 18:48:17 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-21 16:00:52 -0500
commite07b1aa8b3ebedd3c7e0e1b4b524f1b2d62707cf (patch)
tree15e96ea55b6463d2b75eb94293230d8ee6345165 /drivers/net/sky2.h
parentc4b1580e8ad1aab13e0d8b97c7af3eebab8791ae (diff)
[PATCH] sky2: rework of NAPI and IRQ management
Redo the interupt handling of sky2 driver based on the IRQ mangement documentation. All interrupts are handled by the device0 NAPI poll routine. Don't need to adjust interrupt mask in IRQ context, done only when changing device under RTNL. Therefore don't need hwlock anymore. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/sky2.h')
-rw-r--r--drivers/net/sky2.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/net/sky2.h b/drivers/net/sky2.h
index 2a23f3ad6d9f..db362b69b0bb 100644
--- a/drivers/net/sky2.h
+++ b/drivers/net/sky2.h
@@ -278,13 +278,9 @@ enum {
278 Y2_IS_CHK_TXS1 = 1<<1, /* Descriptor error TXS 1 */ 278 Y2_IS_CHK_TXS1 = 1<<1, /* Descriptor error TXS 1 */
279 Y2_IS_CHK_TXA1 = 1<<0, /* Descriptor error TXA 1 */ 279 Y2_IS_CHK_TXA1 = 1<<0, /* Descriptor error TXA 1 */
280 280
281 Y2_IS_BASE = Y2_IS_HW_ERR | Y2_IS_STAT_BMU | 281 Y2_IS_BASE = Y2_IS_HW_ERR | Y2_IS_STAT_BMU,
282 Y2_IS_POLL_CHK | Y2_IS_TWSI_RDY | 282 Y2_IS_PORT_1 = Y2_IS_IRQ_PHY1 | Y2_IS_IRQ_MAC1,
283 Y2_IS_IRQ_SW | Y2_IS_TIMINT, 283 Y2_IS_PORT_2 = Y2_IS_IRQ_PHY2 | Y2_IS_IRQ_MAC2,
284 Y2_IS_PORT_1 = Y2_IS_IRQ_PHY1 | Y2_IS_IRQ_MAC1 |
285 Y2_IS_CHK_RX1 | Y2_IS_CHK_TXA1 | Y2_IS_CHK_TXS1,
286 Y2_IS_PORT_2 = Y2_IS_IRQ_PHY2 | Y2_IS_IRQ_MAC2 |
287 Y2_IS_CHK_RX2 | Y2_IS_CHK_TXA2 | Y2_IS_CHK_TXS2,
288}; 284};
289 285
290/* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */ 286/* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */
@@ -1832,6 +1828,7 @@ struct sky2_port {
1832 struct net_device *netdev; 1828 struct net_device *netdev;
1833 unsigned port; 1829 unsigned port;
1834 u32 msg_enable; 1830 u32 msg_enable;
1831 spinlock_t phy_lock;
1835 1832
1836 spinlock_t tx_lock ____cacheline_aligned_in_smp; 1833 spinlock_t tx_lock ____cacheline_aligned_in_smp;
1837 struct tx_ring_info *tx_ring; 1834 struct tx_ring_info *tx_ring;
@@ -1866,16 +1863,12 @@ struct sky2_port {
1866 1863
1867 struct net_device_stats net_stats; 1864 struct net_device_stats net_stats;
1868 1865
1869 struct work_struct phy_task;
1870 struct semaphore phy_sema;
1871}; 1866};
1872 1867
1873struct sky2_hw { 1868struct sky2_hw {
1874 void __iomem *regs; 1869 void __iomem *regs;
1875 struct pci_dev *pdev; 1870 struct pci_dev *pdev;
1876 struct net_device *dev[2]; 1871 struct net_device *dev[2];
1877 spinlock_t hw_lock;
1878 u32 intr_mask;
1879 1872
1880 int pm_cap; 1873 int pm_cap;
1881 u8 chip_id; 1874 u8 chip_id;