Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 126105 Details for
Bug 186282
Changes on 2.6.23 git for sky2 driver backport to gs
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
sky21.patch (text/plain), 2.40 KB, created by
Daniel Drake (RETIRED)
on 2007-07-27 02:03:40 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Daniel Drake (RETIRED)
Created:
2007-07-27 02:03:40 UTC
Size:
2.40 KB
patch
obsolete
>From: Stephen Hemminger <shemminger@linux-foundation.org> >Date: Mon, 9 Jul 2007 22:33:36 +0000 (-0700) >Subject: sky2: check for more work before leaving NAPI >X-Git-Tag: v2.6.23-rc1~1151^2~36 >X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=5c11ce700f77fada15b6264417d72462da4bbb1c > >sky2: check for more work before leaving NAPI > >This patch avoids generating another IRQ if more packets >arrive while in the NAPI poll routine. Before marking device as >finished, it rechecks that the status ring is empty. > >Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> >Signed-off-by: Jeff Garzik <jeff@garzik.org> >--- > >diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c >index 90b1b97..c8e51cf 100644 >--- a/drivers/net/sky2.c >+++ b/drivers/net/sky2.c >@@ -2477,8 +2477,7 @@ static void sky2_err_intr(struct sky2_hw *hw, u32 status) > static int sky2_poll(struct net_device *dev0, int *budget) > { > struct sky2_hw *hw = ((struct sky2_port *) netdev_priv(dev0))->hw; >- int work_limit = min(dev0->quota, *budget); >- int work_done = 0; >+ int work_done; > u32 status = sky2_read32(hw, B0_Y2_SP_EISR); > > if (unlikely(status & Y2_IS_ERROR)) >@@ -2490,25 +2489,25 @@ static int sky2_poll(struct net_device *dev0, int *budget) > if (status & Y2_IS_IRQ_PHY2) > sky2_phy_intr(hw, 1); > >- work_done = sky2_status_intr(hw, work_limit); >- if (work_done < work_limit) { >- /* Bug/Errata workaround? >- * Need to kick the TX irq moderation timer. >- */ >- if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) { >- sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); >- sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START); >- } >- netif_rx_complete(dev0); >+ work_done = sky2_status_intr(hw, min(dev0->quota, *budget)); >+ *budget -= work_done; >+ dev0->quota -= work_done; > >- /* end of interrupt, re-enables also acts as I/O synchronization */ >- sky2_read32(hw, B0_Y2_SP_LISR); >- return 0; >- } else { >- *budget -= work_done; >- dev0->quota -= work_done; >+ /* More work? */ >+ if (hw->st_idx != sky2_read16(hw, STAT_PUT_IDX)) > return 1; >+ >+ /* Bug/Errata workaround? >+ * Need to kick the TX irq moderation timer. >+ */ >+ if (sky2_read8(hw, STAT_TX_TIMER_CTRL) == TIM_START) { >+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); >+ sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_START); > } >+ netif_rx_complete(dev0); >+ >+ sky2_read32(hw, B0_Y2_SP_LISR); >+ return 0; > } > > static irqreturn_t sky2_intr(int irq, void *dev_id)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 186282
:
125937
| 126105