Commit Graph

27 Commits

Author SHA1 Message Date
Poul-Henning Kamp
6f75979695 Remove unused variable(s).
Add /* FALLTHROUGH */

Found by:       FlexeLint
2003-05-31 20:39:28 +00:00
Poul-Henning Kamp
b4b138c27f Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
2003-03-18 08:45:25 +00:00
Warner Losh
a163d034fa Back out M_* changes, per decision of the TRB.
Approved by: trb
2003-02-19 05:47:46 +00:00
Alfred Perlstein
44956c9863 Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.
Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
2003-01-21 08:56:16 +00:00
John Baldwin
d0ffe397df Use %z and %j to quiet warnings. 2002-11-07 22:21:38 +00:00
Peter Wemm
c5d8f2e6b1 Fix warnings:
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:449: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 3)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 4)
musycc.c:453: warning: long unsigned int format, unsigned int arg (arg 5)
These warnings used to be confined to the alpha but are on all now.
2001-06-15 00:19:43 +00:00
Poul-Henning Kamp
a1f0ac133e Dang, I lost the sign in that brucification. DTRT with PCATCH.
Cut Out In Cardboard by:	bde
2001-05-26 09:37:42 +00:00
Poul-Henning Kamp
840d4a82e4 Use '+' not '|' to add PCATCH to tsleep. 2001-05-23 17:54:58 +00:00
Poul-Henning Kamp
0c8834cea6 Fix a race condition in the transmit path caused by the controller
caching a bit more than we were told initially.

More statistics gathering as well.
2001-03-13 09:29:37 +00:00
Poul-Henning Kamp
ee613f9cb8 Use correct index when counting short errors. 2001-02-07 08:44:42 +00:00
Poul-Henning Kamp
18d5982009 Update these netgraph drivers in current so that these changes can be
MFC'ed i due time.  I can't test it under current right now because
netgraph seems to do unethical things with mutexes.

musycc:
	Add status per channel.
	Reduce printf chattyness
	Keep error counters line if_mn does.
	Increase descriptor count.

if_mn:
	Support experimental unframed E1 lines.

These two drivers should share more code relating to framed channelized
TDM media in general (T1/E1/E3/T3, Sonet).  Anyone interested email me.
2001-01-21 22:16:20 +00:00
Julian Elischer
30400f03aa Part 2 of the netgraph rewrite.
This is mostly cosmetic changes, (though I caught a bug or two while
makeing them)
Reviewed by:	archie@freebsd.org
2001-01-08 05:34:06 +00:00
Bosko Milekic
ad4032fe09 *Blush* Fix a dumb typo in previous commit.
Pointed out by: phk
2001-01-06 23:36:42 +00:00
Bosko Milekic
e1a0b830b5 Make sure musycc driver deals with the possibility of any type of mbuf
allocation not succeeding.

In this case, make sure the driver doesn't leak any memory by freeing all
necessary buffers; make sure to loop and free all the previously allocated
mbufs in this routine.

Reviewed by: alfred
2001-01-06 20:44:39 +00:00
Julian Elischer
069154d55f Rewrite of netgraph to start getting ready for SMP.
This version is functional and is aproaching solid..
notice I said APROACHING. There are many node types I cannot test
I have tested: echo hole ppp socket vjc iface tee bpf async tty
The rest compile and "Look" right.  More changes to follow.
DEBUGGING is enabled in this code to help if people have problems.
2001-01-06 00:46:47 +00:00
Bosko Milekic
2a0c503e7a * Rename M_WAIT mbuf subsystem flag to M_TRYWAIT.
This is because calls with M_WAIT (now M_TRYWAIT) may not wait
  forever when nothing is available for allocation, and may end up
  returning NULL. Hopefully we now communicate more of the right thing
  to developers and make it very clear that it's necessary to check whether
  calls with M_(TRY)WAIT also resulted in a failed allocation.
  M_TRYWAIT basically means "try harder, block if necessary, but don't
  necessarily wait forever." The time spent blocking is tunable with
  the kern.ipc.mbuf_wait sysctl.
  M_WAIT is now deprecated but still defined for the next little while.

* Fix a typo in a comment in mbuf.h

* Fix some code that was actually passing the mbuf subsystem's M_WAIT to
  malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the
  value of the M_WAIT flag, this could have became a big problem.
2000-12-21 21:44:31 +00:00
Julian Elischer
589f6ed8ce Divorce the kernel binary ABI version number from the message
format version number. (userland programs should not need to be
recompiled when the netgraph kernel internal ABI is changed.

Also fix modules that don;t handle the fact that a caller may not supply
a return message pointer. (benign at the moment because the calling code
checks, but that will change)
2000-12-18 20:03:32 +00:00
Julian Elischer
d00a91423d I always forget this file. It's netgraph, but not one of mine..... 2000-12-12 23:05:19 +00:00
David Malone
7cc0979fd6 Convert more malloc+bzero to malloc+M_ZERO.
Submitted by:	josh@zipperup.org
Submitted by:	Robert Drehmel <robd@gmx.net>
2000-12-08 21:51:06 +00:00
Poul-Henning Kamp
baef67f10f Always emply the NCO to attenuate jitter. The Receive clock recovery
circuit generates too much jitter to be used directly as xmit clock.

Don't miscount pending bytes in weird error conditions.

Drop the rest of a packet if we run out of tx-md's.

Trig the xmit-frame signal on rising edge, this fixed the one-bit-too-late
position of the HDLC frames in E1 mode.
2000-11-04 23:23:27 +00:00
Poul-Henning Kamp
62e12bb630 Make internal clock sourcing work right by tying the NCO to the
Xtal reference instead of the CLADI input.

In unframed E1 mode, tie SIGFRZ low so that the mysycc doesn't
get confused.

Don't mask errors with OOF.  Don't ignore OOF errors.

Stop the channel before freeing mbufs in disconnect.

I still have no T1 devices to test with, so the T1 code is non-existent.
2000-11-01 22:04:15 +00:00
Poul-Henning Kamp
e2ea84222c Many and sundry changes. Still alpha quality. 2000-08-29 12:32:01 +00:00
Poul-Henning Kamp
3765820607 Add transmit buffer limitation depending on actual bandwidth.
Add unframed E1 mode.
Various cleanup.
2000-07-22 17:08:52 +00:00
Poul-Henning Kamp
cdd075277a Driver for LMC1504 card: four port E1 or fractional E1.
T1 support is possible but I have no T1 hardware to test with.

The vendor can be found at: www.lanmedia.com
2000-07-18 11:34:15 +00:00
Poul-Henning Kamp
6aafb00805 This in essence completes the receive path. 2000-07-12 09:57:00 +00:00
Poul-Henning Kamp
4357cccbdd Checkpoint commit. I can actually receive HDLC frames now. 2000-06-21 14:47:18 +00:00
Poul-Henning Kamp
9b808911f6 The very feeble beginnings of a driver for the LanMedia LMC1504 card.
New-Bus wizards are encouraged to look at this, I think it poses a
challenge for the current newbus design.
2000-06-11 19:09:47 +00:00