Commit Graph

153123 Commits

Author SHA1 Message Date
pooka e2d2f0dc15 pool_get(): use PR_WAITOK, not M_WAITOK (which happens to be PR_NOWAIT ..)
XXX: not the first time this mistake has been made
2006-10-21 17:01:56 +00:00
tsutsui 587d5e790a Fix hardware VLAN tagging support on vge(4):
- On TX, vge(4) seems to assume that tags are written in little endian.
  We already use htole32() to write values into descriptors,
  so extra byteswap by htons() is not needed there.

- On RX, vge(4) seems to store tags in network byteorder.
  We have to swap byteorder regardless of host's byteorder
  (i.e. we have to use bswap16() rather than ntohs())
  because we already use le32toh() to read values from descriptors.

Anyway, no need to use htons()/ntohs() because there is no stream data.

Tested on both i386 and macppc, and OK'ed by Pavel Cahyna.
2006-10-21 16:26:35 +00:00
tsutsui f89487b7e5 Use aprint_error(9) to print error messages. 2006-10-21 16:13:21 +00:00
bjh21 d726ea385c Remove cruft left over from when this code was copied from some TURBOchannel
framebuffer or other.
2006-10-21 14:24:46 +00:00
bouyer 2e7bb67d96 Note Intel 80003 support in wm(4). 2006-10-21 14:12:42 +00:00
bouyer 154d613f0b Add support for the Intel 80003 Gigabit Ethernet controller (found e.g. in
newer server chipsets) to wm(4), from the FreeBSD em(4) driver.
While there, add a few other Intel Ethernet controller that should work as
is.
Properly update the RX error and TX collision counters.
Add ikphy(4), a driver for the Intel i82563 Kumeran 10/100/1000 Ethernet PHYs
2006-10-21 14:10:32 +00:00
bouyer 7bdd26b810 Restart negotiation when we change media even if autoneg is not enabled.
Otherwise switching from a fixed media to another fixed media isn't noticed
by the switch and the effective speed doesn't change.
2006-10-21 13:55:30 +00:00
yamt 80e1bbb713 add sack_dump(), a function to dump sack holes, if defined(DDB). 2006-10-21 10:26:21 +00:00
yamt 7253aad93f constify. 2006-10-21 10:24:47 +00:00
yamt c31e22237d - constify.
- make tcp_dooptions and tcpipqent_pool static.
2006-10-21 10:08:54 +00:00
yamt 6c6dad782f matches_spec: fix a bug so that "+host111,host1" actually matches to host1.
add a simple sanity check.
2006-10-21 09:42:26 +00:00
yamt 977e208912 add ecalloc. 2006-10-21 09:36:39 +00:00
skrll c837287aab s/out/bad/ in cpu_dumpconf so this compiles. 2006-10-21 08:11:49 +00:00
mrg 065b4dbdca fix errors in the previous changes. 2006-10-21 08:09:58 +00:00
skrll 3d92eb6b84 De-__P() 2006-10-21 07:24:20 +00:00
skrll b560533af2 Pass the cookie (not the function address) to bus_space_alloc.
From OpenBSD.
2006-10-21 07:22:48 +00:00
kardel d094ff8f40 Avoid printf() the selected timecounter as it is called in the path of hardclock().
The information is available via sysctl anyway.
2006-10-21 07:16:54 +00:00
mrg 648bbec934 in cpu_dumpconf(), don't panic() if we can't bdevsw_lookup() the
dumpdev.  this occurs when we try to set the dumpdev to a device
with no driver loaded.  this fixes PR#34872.

in sys_swapctl, if bdevsw_lookup() fails, set dumpdev = NODEV
before calling cpu_dumpconf().  (this also fixes PR#34872.)

XXX: cpu_dumpconf() should probably be changed to take a dumpdev
XXX: and return an error in such cases, but that is a much more
XXX: intrusive change.

XXX2: this is only run-tested on sparc64 and compile tested on a
XXX2: couple of platforms.
2006-10-21 05:54:31 +00:00
mrg 1c6384e73d fix a merge-botch from our GCC3 fixes.
TARGET_5200 is TARGET_COLDFIRE now.
2006-10-21 05:31:41 +00:00
itohy 3c46d522e6 Remove unneeded \ from awk script.
Fix PR port-sparc64/34863.

This also caused warning on old NetBSD environments (with GNU awk) like
awk: cmd. line:80: warning: escape sequence `\#' treated as plain `#'
2006-10-21 04:48:29 +00:00
tsutsui 5227317a1e Use CSR_WRITE_1() to write RTK_TXSTART register because it is localted
at an odd address (0xd9) and noted "8 bit" in rtl81x9reg.h.

XXX: FreeBSD and OpenBSD also use CSR_WRITE_1() to write RTK_GTXSTART
XXX: for 8169 even though there is a "16 bits" comment at GTXSTART macro.
XXX: Which is correct?
2006-10-21 03:44:47 +00:00
mrg 877957f469 add a "mach sir" command to call sir instruction ('software initiated
reset').  this is a much more drastic way to do "mach prom", but it
works when used from cpu>0, which "mach prom" currently does not.
2006-10-21 03:16:05 +00:00
elad 815337c3da Kill KAUTH_GENERIC_ISSUSER usage. 2006-10-21 00:13:57 +00:00
elad d53df4ed98 Document KAUTH_NETWORK_INTERFACE arguments. 2006-10-21 00:07:40 +00:00
elad 305fe09181 Introduce a new action on the network scope, KAUTH_NETWORK_INTERFACE,
used to manage network interfaces.

Add four sub-actions to fulfill generic needs for now, until a more
carefully defined usage of the interface is documented: get, set,
getpriv, and setpriv.
2006-10-20 23:10:33 +00:00
elad a5d447aee5 Add an XXX to remind me why it's there when grepping. (securelevel ref) 2006-10-20 22:22:48 +00:00
mrg e54ce8ca38 avoid yet another GCC uninitialised warning at -O3. 2006-10-20 22:12:57 +00:00
elad 0c8de7ee9e Kill another KAUTH_GENERIC_ISSUSER. 2006-10-20 22:04:13 +00:00
elad fab05f403b Add a new ALTQ kauth(9) request, KAUTH_REQ_NETWORK_ALTQ_JOBS. 2006-10-20 22:02:54 +00:00
elad b8093b8985 Kill some KAUTH_GENERIC_ISSUSER. 2006-10-20 21:55:56 +00:00
mrg e76360da33 avoid yet another GCC uninitialised warning error that only comes
up with -O3.
2006-10-20 21:50:41 +00:00
reinoud 19cb20fb7b Back out TAILQ_FOREACH in the vflush() since vgone() and vclean() are
called, the TAILQ_NEXT() derefers 0xdeadbeef....

Implemented again using an explicit `for' loop that keep the next pointer
available.
2006-10-20 20:29:52 +00:00
liamjfoy cd64dacbef Remove some dead code - From OpenBSD Rev. 1.129 2006-10-20 19:13:02 +00:00
reinoud 0ce809091d Replace the LIST structure mp->mnt_vnodelist to a TAILQ structure since all
vnodes were synced and processed backwards. This meant that the last
accessed node was processed first and the earlierst last.

An extra benefit is the removal of the ugly hack from the Berkly days on
LFS.

In the proces, i've also replaced the various variations hand written loops
by the TAILQ_FOREACH() macro's.
2006-10-20 18:58:12 +00:00
martin d55cb18cdc A few -Wextra nits 2006-10-20 18:26:26 +00:00
reinoud f64c33e88b Define DPRINTF(x) as an empty block to prevent gcc from complaining about
empty statements. This is still an empty statement but it will be filtered
out still.
2006-10-20 18:14:59 +00:00
christos 8c97c569de include ecalloc() from our anonymous user. 2006-10-20 17:40:39 +00:00
christos 284c960b4d typo from our anonymous user. 2006-10-20 17:40:18 +00:00
tsutsui f236f53515 In re_newbuf():
- adjust m_data and m_len directly rather than calling m_adj(9)
- more cosmetics
2006-10-20 17:11:36 +00:00
tsutsui 2cc86b486f KNF, remove register decls, TAB/space cosmetics etc. 2006-10-20 16:46:47 +00:00
kiyohara 9bb8dc5407 alphabetical order. 2006-10-20 16:38:15 +00:00
tsutsui 572ce0789f u_intNN_t -> uintNN_t 2006-10-20 16:31:08 +00:00
christos 2933708c6a remove 3d magic. 2006-10-20 15:54:45 +00:00
tsutsui 7245fafc22 Add re at pci and rgephy at mii. 2006-10-20 15:48:37 +00:00
tsutsui d27d349474 Use BUS_DMA_COHERENT on mapping DMA memory for TX/RX descriptors.
I can't think of a good way to avoid race condition between writeback and
DMA write against descriptors if cachelinesize > sizeof(struct rtk_desc)...

Anyway, now re(4) is functional on O2 (and probably other mips ports).
2006-10-20 15:44:00 +00:00
tsutsui a7ca335bad Try to avoid race condition between cache writeback from CPU and DMA write
from re(4) chip as much as possible.
2006-10-20 15:19:01 +00:00
tsutsui 620e93c99c while (1) -> for (;;) 2006-10-20 14:51:06 +00:00
tsutsui d2c63dd7b9 - bcopy -> memcpy
- bcmp -> memcmp
2006-10-20 14:28:55 +00:00
tsutsui 55b9847900 There is no particular reason to use BUS_DMA_ALLOCNOW on bus_dmamap_create(9). 2006-10-20 14:00:49 +00:00
tsutsui 920add0c28 Tweak a for() loop a bit in re_rxeof(). 2006-10-20 13:44:31 +00:00