FreeBSD Bugzilla – Attachment 24067 Details for
Bug 41220
[PATCH] Minor sk driver enhancements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.88 KB, created by
Craig Leres
on 2002-08-01 07:00:02 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Craig Leres
Created:
2002-08-01 07:00:02 UTC
Size:
1.88 KB
patch
obsolete
>*** if_sk.c.virgin Wed Jul 31 22:43:58 2002 >--- if_sk.c Wed Jul 31 22:55:52 2002 >*************** >*** 76,81 **** >--- 76,82 ---- > #include <sys/kernel.h> > #include <sys/socket.h> > #include <sys/queue.h> >+ #include <sys/sysctl.h> > > #include <net/if.h> > #include <net/if_arp.h> >*************** >*** 171,176 **** >--- 172,187 ---- > static void sk_setfilt __P((struct sk_if_softc *, caddr_t, int)); > static void sk_setmulti __P((struct sk_if_softc *)); > >+ #ifdef LBL >+ /* >+ * sysctl'able interrupt moderation. >+ * You must "ifconfig ... up" after changing this before it takes effect >+ */ >+ static int sk_interrupt_mod = 200; >+ SYSCTL_INT(_debug, OID_AUTO, sk_interrupt_mod, CTLFLAG_RW, >+ &sk_interrupt_mod, 0, ""); >+ #endif >+ > #ifdef SK_USEIOSPACE > #define SK_RES SYS_RES_IOPORT > #define SK_RID SK_PCI_LOIO >*************** >*** 1052,1058 **** >--- 1063,1075 ---- > * register represents 18.825ns, so to specify a timeout in > * microseconds, we have to multiply by 54. > */ >+ #ifdef LBL >+ printf("skc%d: sk_reset: interrupt moderation is %d us\n", >+ sc->sk_unit, sk_interrupt_mod); >+ sk_win_write_4(sc, SK_IMTIMERINIT, SK_IM_USECS(sk_interrupt_mod)); >+ #else > sk_win_write_4(sc, SK_IMTIMERINIT, SK_IM_USECS(200)); >+ #endif > sk_win_write_4(sc, SK_IMMR, SK_ISR_TX1_S_EOF|SK_ISR_TX2_S_EOF| > SK_ISR_RX1_EOF|SK_ISR_RX2_EOF); > sk_win_write_1(sc, SK_IMTIMERCTL, SK_IMCTL_START); >*************** >*** 2114,2119 **** >--- 2131,2143 ---- > > /* Configure TX LED */ > SK_IF_WRITE_1(sc_if, 0, SK_TXLED1_CTL, SK_TXLEDCTL_COUNTER_START); >+ >+ #ifdef LBL >+ /* Set interrupt moderation (in case it was changed via sysctl) */ >+ printf("%s%d: sk_init: interrupt moderation is %d us\n", >+ ifp->if_name, ifp->if_unit, sk_interrupt_mod); >+ sk_win_write_4(sc, SK_IMTIMERINIT, SK_IM_USECS(sk_interrupt_mod)); >+ #endif > > /* Configure I2C registers */ >
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 41220
: 24067 |
24068