diff options
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 35 |
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 933e87f1cc68..805a7dcf5508 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include "sky2.h" | 50 | #include "sky2.h" |
51 | 51 | ||
52 | #define DRV_NAME "sky2" | 52 | #define DRV_NAME "sky2" |
53 | #define DRV_VERSION "1.5" | 53 | #define DRV_VERSION "1.6" |
54 | #define PFX DRV_NAME " " | 54 | #define PFX DRV_NAME " " |
55 | 55 | ||
56 | /* | 56 | /* |
@@ -121,6 +121,11 @@ static const struct pci_device_id sky2_id_table[] = { | |||
121 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, | 121 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4361) }, |
122 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, | 122 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4362) }, |
123 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, | 123 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4363) }, |
124 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4364) }, | ||
125 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4365) }, | ||
126 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4366) }, | ||
127 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4367) }, | ||
128 | { PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x4368) }, | ||
124 | { 0 } | 129 | { 0 } |
125 | }; | 130 | }; |
126 | 131 | ||
@@ -1926,12 +1931,6 @@ static inline void sky2_tx_done(struct net_device *dev, u16 last) | |||
1926 | } | 1931 | } |
1927 | } | 1932 | } |
1928 | 1933 | ||
1929 | /* Is status ring empty or is there more to do? */ | ||
1930 | static inline int sky2_more_work(const struct sky2_hw *hw) | ||
1931 | { | ||
1932 | return (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX)); | ||
1933 | } | ||
1934 | |||
1935 | /* Process status response ring */ | 1934 | /* Process status response ring */ |
1936 | static int sky2_status_intr(struct sky2_hw *hw, int to_do) | 1935 | static int sky2_status_intr(struct sky2_hw *hw, int to_do) |
1937 | { | 1936 | { |
@@ -2022,6 +2021,9 @@ static int sky2_status_intr(struct sky2_hw *hw, int to_do) | |||
2022 | } | 2021 | } |
2023 | } | 2022 | } |
2024 | 2023 | ||
2024 | /* Fully processed status ring so clear irq */ | ||
2025 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
2026 | |||
2025 | exit_loop: | 2027 | exit_loop: |
2026 | if (buf_write[0]) { | 2028 | if (buf_write[0]) { |
2027 | sky2 = netdev_priv(hw->dev[0]); | 2029 | sky2 = netdev_priv(hw->dev[0]); |
@@ -2231,19 +2233,16 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
2231 | sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2); | 2233 | sky2_descriptor_error(hw, 1, "transmit", Y2_IS_CHK_TXA2); |
2232 | 2234 | ||
2233 | work_done = sky2_status_intr(hw, work_limit); | 2235 | work_done = sky2_status_intr(hw, work_limit); |
2234 | *budget -= work_done; | 2236 | if (work_done < work_limit) { |
2235 | dev0->quota -= work_done; | 2237 | netif_rx_complete(dev0); |
2236 | |||
2237 | if (status & Y2_IS_STAT_BMU) | ||
2238 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
2239 | 2238 | ||
2240 | if (sky2_more_work(hw)) | 2239 | sky2_read32(hw, B0_Y2_SP_LISR); |
2240 | return 0; | ||
2241 | } else { | ||
2242 | *budget -= work_done; | ||
2243 | dev0->quota -= work_done; | ||
2241 | return 1; | 2244 | return 1; |
2242 | 2245 | } | |
2243 | netif_rx_complete(dev0); | ||
2244 | |||
2245 | sky2_read32(hw, B0_Y2_SP_LISR); | ||
2246 | return 0; | ||
2247 | } | 2246 | } |
2248 | 2247 | ||
2249 | static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs) | 2248 | static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs) |