Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-4] src/sys/arch/sgimips/mace



Module Name:    src
Committed By:   snj
Date:           Wed Nov  5 20:50:56 UTC 2008

Modified Files:
        src/sys/arch/sgimips/mace [netbsd-4]: if_mec.c if_mecreg.h

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #1221):
        sys/arch/sgimips/mace/if_mec.c: revision 1.9
        sys/arch/sgimips/mace/if_mec.c: revision 1.12
        sys/arch/sgimips/mace/if_mec.c: revision 1.14
        sys/arch/sgimips/mace/if_mec.c: revision 1.17
        sys/arch/sgimips/mace/if_mec.c: revision 1.18
        sys/arch/sgimips/mace/if_mec.c: revision 1.20
        sys/arch/sgimips/mace/if_mec.c: revision 1.21 via patch
        sys/arch/sgimips/mace/if_mec.c: revision 1.22
        sys/arch/sgimips/mace/if_mec.c: revision 1.23
        sys/arch/sgimips/mace/if_mec.c: revision 1.24
        sys/arch/sgimips/mace/if_mec.c: revision 1.25
        sys/arch/sgimips/mace/if_mec.c: revision 1.26 via patch
        sys/arch/sgimips/mace/if_mec.c: revision 1.27 via patch
        sys/arch/sgimips/mace/if_mec.c: revision 1.28
        sys/arch/sgimips/mace/if_mec.c: revision 1.29
        sys/arch/sgimips/mace/if_mec.c: revision 1.30 via patch
        sys/arch/sgimips/mace/if_mecreg.h: revision 1.4
Accept RX packets which are larger than ETHER_MAX_LEN but can be stored
into RX mbufs.
(BTW, is there any way to allocate RX mbufs aligned at PAGE_SIZE?)
sprinkle delay() and mec_mii_wait() in MII access functions
with this I no longer get spontaneous reboots during network traffic
Fix typo in comments. Mostly from OpenBSD.
- call mec_reset() to make sure DMA stopped (inspired by OpenBSD)
- also stop DMA in mec_reset() before resetting chip
- set MAC address to MAC_STATION reg in mec_attach(), not in mec_reset()
Possibly fixes occasional interrupt storm from mec(4) (i.e. hangup) at boot.
Add a hack to deal with hardware that misses the machine's serial number
for whatever reason - just generate a MAC address from another environemt
variable, so that the admin can adjust it.
Normalize my licenses.
- check TX_RING pointer in MEC_INT_STATUS in mec_rxintr() (from OpenBSD)
- preserve the last TX descriptor to avoid wraparound (as per Linux driver)
- check IFQ_IS_EMPTY() on calling mec_start() in mec_intr()
- clear IFF_OACTIVE only if a number of descriptors are freed in mec_txintr()
Seems to fix mec(4) hangup problem (and silent reboot by crime watchdog)
on heavy load.  Tested by martin@ and Jorge Acereda Macia on port-sgimips.
(though Jorge still has some problem, but this should have fixed one issue)
Specify PAGE_SIZE boundary for TX dmamaps.
mec(4) hardware may have the restriction.
The last txdesc is now preserved, so also set IFF_OACTIVE properly.
Use while(cond){} instead of for(;;){if(!cond)break;}.
- no need to set the TXCMD_TXINT bit against the last enqueued TX packet
  because TX_EMPTY interrupt is enough to serve it on TX completion
- start TX right after each TX packet has been prepared
A quick ttcp(1) test shows ~5% improvements.
In mec_intr() call mec_init() on errors for workaround.
Don't forget to unload TX dmamap on failure (in !MEC_TXSTAT_SUCCESS case).
Fix a critical botch (inverted test) I put in rev 1.20.
Set MEC_TXCMD_TXINT every MEC_NTXDESC_INTR packets
if more than half txdescs have been queued because
TX_EMPTY interrupts will rarely happen if TX queue is so stacked.
Make sure to free an allocated mbuf on failure path.


To generate a diff of this commit:
cvs rdiff -r1.8 -r1.8.12.1 src/sys/arch/sgimips/mace/if_mec.c
cvs rdiff -r1.3 -r1.3.24.1 src/sys/arch/sgimips/mace/if_mecreg.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Home | Main Index | Thread Index | Old Index