Commit Graph

44684 Commits

Author SHA1 Message Date
andre
54fd37f35d Move the reduction by one of the syncache limit after the zone has been
allocated.

Reviewed by:    sam (mentor)
Obtained from:  DragonFlyBSD rev 1.6 (hsu)
2004-01-22 23:14:48 +00:00
andre
e4fc02a1bf Remove an unused variable and put the sockaddr_in6 onto the stack instead
of malloc'ing it.

Reviewed by:	sam (mentor)
Obtained from:	DragonFlyBSD rev 1.6 (hsu)
2004-01-22 23:10:11 +00:00
phk
083a677018 Write 100 times for tomorrow:
"Always print time_t as %jd, you never know what width it has"
2004-01-22 19:50:06 +00:00
jhb
fe82d4d646 Fix the PCI attach routine to properly setup the IRQ and port resource
rid's and to deallocate resources if a failure occurs during attach.  This
patch also fixes the driver to return failure if bus_alloc_resource() for
the IRQ fails rather than panic'ing on the next line by passing a NULL
resource to bus_setup_intr().  The other attachments already do all this.

Submitted by:	Jun Su <csujun@263.net>
2004-01-22 16:07:03 +00:00
simokawa
9c3cf58a7c Add missing free() in exception handlers.
Reported by:    Stanford Metacompilation research group
2004-01-22 14:41:17 +00:00
rse
809b1aa946 Fix generation of random multicast MAC address.
In case no real/physical IEEE 802 address is available, both the expired
"draft-leach-uuids-guids-01" (section "4. Node IDs when no IEEE 802
network card is available") and RFC 2518 (section "6.4.1 Node Field
Generation Without the IEEE 802 Address") recommend (quoted from RFC
2518):

  "The ideal solution is to obtain a 47 bit cryptographic quality random
  number, and use it as the low 47 bits of the node ID, with the _most_
  significant bit of the first octet of the node ID set to 1. This bit
  is the unicast/multicast bit, which will never be set in IEEE 802
  addresses obtained from network cards; hence, there can never be a
  conflict between UUIDs generated by machines with and without network
  cards."

Unfortunately, this incorrectly explains how to implement this and
the FreeBSD UUID generator code inherited this generation bug from
the broken reference code in the standards draft. They should instead
specify the "_least_ significant bit of the first octet of the node ID"
as the multicast bit in a memory and hexadecimal string representation
of a 48-bit IEEE 802 MAC address.

This standards bug arised from a false interpretation, as the multicast
bit is actually the _most_ significant bit in IEEE 802.3 (Ethernet)
_transmission order_ of an IEEE 802 MAC address. The standards authors
forgot that the bitwise order of an _octet_ from a MAC address _memory_
and hexadecimal string representation is still always from left (MSB,
bit 7) to right (LSB, bit 0).

Fortunately, this UUID generation bug could have occurred on systems
without any Ethernet NICs only.
2004-01-22 13:34:11 +00:00
ru
e512cf71d1 Only enforce -fno-strict-aliasing for optimization levels that
imply -fstrict-aliasing.

Reviewed by:	bde
2004-01-22 10:01:47 +00:00
grehan
c652e0ed25 Make proc's kg_nice/ki_nice explicitly signed for PPC. This is a
no-op on {i386/alpha/ia64/sparc64} where chars are signed by
default. Should help ARM and S390 which also suffer from this.

Tested on: ppc, i386, objdump disasm before/after diffs
Reviewed by: obrien, bde (a while back)
2004-01-22 06:56:00 +00:00
onoe
c5cd507287 Fix definition of IFM_MODE, which should be refrected the change of
IFM_IEEE80211_ mode.  Also ifconfig(8) must be recompiled.
Pointed out by Sam Leffeler.
2004-01-22 03:23:28 +00:00
wpaul
00bdd194b3 Add suspend and resume methods. I'm not certain this work correctly
since I can't easily test them on my laptop right now, but they
should do the right thing.
2004-01-22 03:00:59 +00:00
wpaul
ea49246bf8 Add support for TCP/IP checksum offload.
No, really.
2004-01-22 02:36:34 +00:00
jhb
3ba56a401e If a transfer to or from a floppy disk crosses a 64k boundary, we have to
use a bounce buffer for the actual transfer to avoid crossing a 64k
boundary.  To do this, we malloc a buffer twice as big as we need and then
find an aligned block within that buffer to do the transfer.  The check
to see which part of the block we use used the wrong variable for part of
the condition meaning that in certain edge cases we would ask the BIOS to
cross a 64k boundary.  The BIOS request would then fail resulting in file
transfers that just magically fail in the middle without any apparent
reason.  Specifically, my tests for the splitfs boot floppies managed to
trigger this edge case.

MFC after:	1 week
X-MFC-info:	along with fixes to libstand filesystems
2004-01-21 23:22:29 +00:00
wpaul
173987bd4f Fix multicast and promiscuous mode handling for Yukon devices.
Submitted by:	Jung-uk Kim <jkim@niksun.com>
2004-01-21 22:32:15 +00:00
wpaul
27cac97bcf Calculate the right register offset when clearing TX buffer pointer
registers in rl_stop().

PR:		kern/60250
2004-01-21 22:29:51 +00:00
wpaul
42ba2206d2 Add structures and definitions for task offload (TCP/IP checksum,
IPSec, TCP large send).
2004-01-21 21:09:09 +00:00
phk
25628e44b9 Add a sysctl (default: off) which enables a log(LOG_INFO...) warning
if the clock is stepped.
2004-01-21 21:05:40 +00:00
phk
7188ab8aaf Simplify timing gymnastics a bit. 2004-01-21 19:20:57 +00:00
wpaul
a07dd1ff5f Make sure to trap failures correctly in ndis_get_info() and ndis_set_info(). 2004-01-21 19:14:52 +00:00
phk
7d8e400e71 Remove #ifdef for ancient source FreeBSD compat. 2004-01-21 19:02:02 +00:00
brooks
e916d7fb52 Don't leak softc's when destroying interfaces.
Init the softc list when loaded.

Noticed by:	Maurycy Pawlowski-Wieronski <maurycy at fouk dot org>
2004-01-21 18:05:38 +00:00
cperciva
aed4043dc1 Fix style(9) of my previous commit.
Noticed by: nate
Approved by: nate, rwatson (mentor)
2004-01-21 18:03:54 +00:00
rwatson
eb2019485b Reduce gratuitous includes: don't include jail.h if it's not needed.
Presumably, at some point, you had to include jail.h if you included
proc.h, but that is no longer required.

Result of:	self injury involving adding something to struct prison
2004-01-21 17:10:47 +00:00
cperciva
d8735de7ac Allow devfs path rules to work on directories. Without this fix,
devfs rule add path fd unhide
is a no-op, while it should unhide the fd subdirectory.

Approved by: phk, rwatson (mentor)
PR: kern/60897
2004-01-21 16:43:29 +00:00
nyan
6faa305fec MFi386: revisions from 1.1116 to 1.1119.
Remove NEWCARD related devices.
2004-01-21 16:28:19 +00:00
nyan
bfb36a1d62 Merged from sys/dev/sio/sio.c revision 1.418. 2004-01-21 16:12:29 +00:00
ume
cd3d56c01e Sync to pccarddevs 1.81. 2004-01-21 16:03:40 +00:00
ume
8c11532daa There is PANASONIC KXLC005 which has another product id. 2004-01-21 16:02:20 +00:00
cognet
1fed0ce2bd Setting pccb->ccb_h.status to CAM_REQ_CMP one time is enough. 2004-01-21 10:49:42 +00:00
ru
310e217f08 The gdbinit.${MACHINE_ARCH} script may not exist. 2004-01-21 08:23:46 +00:00
grehan
87cb3a2ede Add syscons options and enable USB, since there is no conflict between
the OpenFirmware console and the syscons console when using a USB
keyboard.
2004-01-21 05:22:53 +00:00
grehan
400183983b Add required GFB options as well as one for ofw/syscons. 2004-01-21 05:20:58 +00:00
grehan
c371c1646f Add syscons files, and also generate a syscons font since Apple
SVGA adapters don't have one available in their ROMs.
2004-01-21 05:19:59 +00:00
grehan
d7a8e22689 - Catch up with panic __LINE__/__FILE__ changes by moving panic calls
out of asm.
- remove some long-dead code from machdep.c
2004-01-21 05:18:08 +00:00
grehan
c42e61c247 A syscons implementation using the 8-bit framebuffer set up by
OpenFirmware. Not at all optimized, but provides a PC-style
user-experience.

Tested on revA imac, B&W G3, 2k iBook, and G4 eMac.
2004-01-21 05:16:23 +00:00
grehan
353682a237 __powerpc__ conditional code for the syscons OpenFirmware/PPC framebuffer.
Took the opportunity to reduce

 __i386__ || __ia64__ || __amd64__ || __sparc64__ || __powerpc__

 to

 !__alpha__

reviewed by: gallatin
2004-01-21 05:08:51 +00:00
grehan
14dded4776 Update 128-bit long double constants to match what is expected
by libc
2004-01-21 04:56:39 +00:00
sam
5db0bebd8b Fix ipip_output() to always set *mp to NULL on failure, even if 'm'
is NULL, otherwise ipsec4_process_packet() may try to m_freem() a
bad pointer.

In ipsec4_process_packet(), don't try to m_freem() 'm' twice; ipip_output()
already did it.

Obtained from:	netbsd
2004-01-20 22:45:10 +00:00
sam
0a7f2d6b23 fix build after KAME changes 2004-01-20 22:44:21 +00:00
hsu
8ce4d37463 Merge from DragonFlyBSD rev 1.10:
date: 2003/09/02 10:04:47;  author: hsu;  state: Exp;  lines: +5 -6
Account for when Limited Transmit is not congestion window limited.

Obtained from:	DragonFlyBSD
2004-01-20 21:40:25 +00:00
jhb
f2414d2e7d Use getenv_int() rather than reimplementing it. 2004-01-20 21:38:48 +00:00
rwatson
4c7d3f7221 Pay attention to mac_portacl_enabled.
Submitted by:   simon
2004-01-20 18:33:02 +00:00
sos
8714c421ef Update the support for the VIA 8237 southbridge. 2004-01-20 16:51:02 +00:00
wpaul
38c277ac0d Correct instances of mtx_lock()/mtx_unlock() that should have been
mtx_pool_lock()/mtx_pool_unlock().
2004-01-20 08:19:42 +00:00
matk
cae2dd9dfc Reduce latency when using the SNDCTL_DSP_RESET ioctl by calling
chn_resetbuf().

Submited by:	Pyun YongHyeon <yongari@kt-is.co.kr>
Approved by:	tanimura (mentor)
2004-01-20 05:30:09 +00:00
obrien
22ae961cfd Fix sort misordering. 2004-01-20 04:37:07 +00:00
matk
68e191220f Fix a panic when kldloading a sound driver. Do this by replacing the
link-list of dev_t's with named variables.  Remove used code.

Approved by:		tanimura (mentor)
2004-01-20 03:58:57 +00:00
marcel
7976ad15f4 Fix handling of FP traps:
o  For traps, the cr.iip register points to the next instruction to
   execute on interrupt return (modulo slot). Since we need to get
   the bundle of the instruction that caused the FP fault/trap, make
   sure we fetch the previous bundle if the next instruction is in
   fact the first in a bundle.
o  When we call the FPSWA handler, we need to tell it whether it's
   a trap or a fault (first argument). This was hardcoded to mean a
   fault.

Also, for FP faults, when a fault is converted to a trap, adjust the
cr.iip and cr.ipsr registers to point to the next instruction. This
makes sure that the SIGFPE handler gets a consistent state.
2004-01-20 03:29:24 +00:00
marcel
891fa7305a s/framep/tf/g -- this normalizes on the use of tf to point to the
trapframe and improves grep-ability.
2004-01-20 02:35:46 +00:00
ache
f8d77065a1 pread/pwrite:
follow lseek spirit - return EINVAL on negative offset for non-VCHR
2004-01-20 01:27:42 +00:00
phk
4967bebd9f Add linenumber and source filename to panic(9) output.
Ideally a traceback should be printed too, any takers ?
2004-01-19 21:27:11 +00:00