Commit Graph

91834 Commits

Author SHA1 Message Date
wpaul
accf54d2fd In order to set the MAC address on RealTek NICs, you must flip WRITECFG
bit in the EEPROM mode register on. Also, the address must be written
in two 32-bit register accesses instead of 6 8-bit accesses.

Tested with my 8139B cardbus NIC.

PR:	kern/35900
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-06-29 17:33:33 +00:00
marcel
d8d789fb8b Implement fuword32() and suword32(). These functions are used in
kern_thread.c. This is a best effort implementation.
2003-06-29 17:14:42 +00:00
jdp
536016ad69 Make _thread_suspend work with both the old broken sigtimedwait
implementation and the new improved one.  We now precompute the
signal set passed to sigtimedwait, using an inverted set when
necessary for compatibility with older kernels.
2003-06-29 15:55:44 +00:00
jdp
f7d7f36d14 Bump __FreeBSD_version because the semantics of sigtimedwait and
sigwaitinfo have been corrected.  Some existing code relied on the
original broken semantics.
2003-06-29 15:51:38 +00:00
ru
46e7e66ef3 Unbreak NOCRYPT buildworld.
Reviewed by:	markm
2003-06-29 10:03:35 +00:00
alc
4418bf544e - Remove the calls to pmap_install() from pmap_object_init_pt(); they are
redundant.  Discussed with: marcel
 - MFi386: Add vm object locking to pmap_object_init_pt().
2003-06-29 06:10:32 +00:00
mtm
f9ef847419 Implement individual operations on static and dhcp interfaces. Previously
network interfaces could only be turned on and off as a group (all
static interfaces or all dhcp interfaces).

When used to start the interface a 'long form' ifconfig output is
used to show the status of the interface, but when stopping an interface
the script will simply output the name of the interface. This is simply my
personal preference. Hopefully as this functionality matures we can
stabilize on a prefered form of output for these scripts.

A stop command to the dhclient script now explicitly releases the dhcp lease.
Behaviour at system shutdown; however, is unchanged since dhclient is not,
by default, run at that time. The client will not release its lease
at shutdown.
2003-06-29 05:34:41 +00:00
mtm
39ca7af95e o Hookup rc.d/routing and rc.d/netoptions
o Ensure rc.d/network2 and rc.d/network3 are not automatically run
  during boot
o Modify script headers so rcorder(8) can put the two scripts in the
  correct sequence.
2003-06-29 05:15:57 +00:00
mtm
7fd6742f8d o Repocopied routing and netoptions from network2 and network3, respectively.
o Change the provider names.
o Separate routing into two parts: static routing and routing options. The
  start command will run both parts, but they can be run separately using
  the static and options command, respectively:
  (/etc/rc.d/routing static; /etc/rc.d/routing options)
2003-06-29 05:09:48 +00:00
tjr
8b83d54b5e XXX Copy workaround from UFS: open device for write access even if
the user requests a read-only mount. This is necessary because we
don't do the VOP_OPEN again if they upgrade a read-only mount to
read-write.

Fixes lockup when creating files on msdosfs mounts that have been
mounted read-only then upgraded to read-write. The exact cause of
the lockup is not known, but it is likely to be the kernel getting
stuck in an infinite loop trying to write dirty buffers to a device
without write permission.

Reported/tested by andreas, discussed with phk.
2003-06-29 03:05:59 +00:00
grehan
ebb4fc782d Allow the interrupt controller to be probed - this picks up the
Heathrow PIC, while not affecting the OpenPIC.
2003-06-29 02:05:19 +00:00
wpaul
8647884841 Modify the xl_reset() routine slightly so that, if we're using memory
mapped I/O mode, we pause for .1 seconds after issuing the reset command
before trying to poll the 'command busy' bit in the status register.
With my 3c575C cardbus NIC, my Sony Picturebook locks up when it tries
to read the status register immediately after the reset. This appears
to be a problem only with certain NICs on certain hardware, but the
added delay should not hurt cards that already work.

This bug seems to have been brought to light by the fact that the xl
driver now defaults to memory mapped I/O mode instead of programmed
I/O mode like it used to. With PIO mode, the delay isn't needed and
everything works (which is why this NIC worked with 5.0-RELEASE but
not 5.1). I suspect that what's happening is that when the chip is
reset, it takes a little while for the memory-mapped decoding logic
to recover. Trying to access the chip's registers during this period
causes an error condition of some kind that wedges the system.
2003-06-29 01:38:57 +00:00
bmah
5c2c3d8274 Add ath(4) devices. Also try to be more specific with respect to
what variant of 802.11 is supported by some other devices.
2003-06-29 01:12:57 +00:00
das
71d3f43884 Teach fmtcheck(3) about the flags a, A, F, G, t, and z. 2003-06-29 01:11:31 +00:00
bmah
f5521f77ff Start to fill in amd64 hardware notes based on info from peter.
Translators should be warned that this is somewhat of a moving
target, and so might want to consider holding off working on
this document.
2003-06-29 01:10:45 +00:00
mtm
dffd0ee5d1 The move to _retire() a thread in the GC instead of in the thread's
exit function has invalidated the need for _spin[un]lock_pthread().
The _spin[un]lock() functions can now dereference curthread without
the danger that the ldtentry containing the pointer to the thread
has been cleared out from under them.
2003-06-29 00:12:40 +00:00
ru
348e423dd9 Hiten's patchset for section four manpages, slightly edited by me. 2003-06-28 23:53:39 +00:00
jmallett
e4f0eb6b17 Add code to keep going if you're really intent on fingering someone, but
can't use utmp(5).
2003-06-28 23:11:41 +00:00
ru
bff3635b31 Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here).  Sort options.  Print the file name on error.
2003-06-28 22:30:46 +00:00
ru
9313385436 Punctuation. 2003-06-28 22:18:45 +00:00
ru
5f51066d99 mdoc(7) fix: Use the normal AT&T macro (.At) rather than its
internal string in the macro context.
2003-06-28 22:12:30 +00:00
jeff
a92e8f57c5 - Construct a cpu topology map for Hyper Threading systems so that ULE may
take advantage of them.
2003-06-28 22:07:42 +00:00
jeff
3e2b03aa95 - Add structures for defining cpu topologies more complex than SMP.
smp_topology may be left NULL by architectures which have vanilla SMP
   setups.
2003-06-28 22:06:19 +00:00
alc
9ab695deec Remove GIANT_REQUIRED from kmem_malloc(). 2003-06-28 22:04:52 +00:00
tmm
16b6eb8879 Small fixes for the IOMMU code:
1.) Handle maximum segment sizes which are smaller than the IOMMU page
    size by splitting up pages across multiple segments if needed; this case
    was previously unimplemented, and would cause panics.
2.) KASSERT that the physical address is in range; remove a KASSERT that
    has become pointless.
3.) Add a comment describing what remains to be fixed in the IOMMU code;
    I plan to address these issues soon.

Desired by:	dwhite (1)
2003-06-28 21:52:16 +00:00
alc
247977dd5d MFi386
Add vm object locking to pmap_object_init_pt().
2003-06-28 21:21:04 +00:00
alc
df16822d69 - Add vm object locking to vm_pageout_clean(). 2003-06-28 20:07:54 +00:00
marcel
abc3ed480d Don't use fuword() and suword() on struct members of type int. This
happens to work on 32-bit platforms as sizeof(long)=sizeof(int), but
wrecks all kinds of havoc (garbage reads, corrupting writes and
misaligned loads/stores) on 64-bit architectures.
The fix for now is to use fuword32() and suword32() and change the
type of the applicable int fields to int32. This is to make it
explicit that we depend on these fields being 32-bit. We may want
to revisit this later.

Reviewed by: deischen
2003-06-28 19:45:15 +00:00
marcel
ea0a6b417a Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for
the VMIN and VTIME members of the c_cc array. These members are not
special control characters. By not excluding these members we
changed the noncanonical mode input processing when both members
were 0 on entry (=LINUX_POSIX_VDISABLE) as we would remap them to 255
(=_POSIX_VDISABLE). See termios(4) case A for how that screws up
your terminal I/O.

PR: 23173
Originator: Bjarne Blichfeldt <bbl@dk.damgaard.com>
Patch by: Boris Nikolaus <bn@dali.tellique.de> (original submission)
	  Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
Reminders by: Joseph Holland King <gte743n@cad.gatech.edu>
MFC after: 5 days
2003-06-28 19:32:07 +00:00
peter
1dfc9d7d37 utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime(). 2003-06-28 19:11:42 +00:00
sam
9eae058f9f bring in ath-specific test tool; more to follow 2003-06-28 18:26:23 +00:00
sam
234390ef65 correct bus-isicty of D-Link cards
Submitted by:	Stefan =?iso-8859-1?Q?E=DFer?= <se@freebsd.org>
2003-06-28 17:59:37 +00:00
sam
58f7a38a92 update to new 802.11 support 2003-06-28 17:57:30 +00:00
hrs
99750955df Catch up with the English version:
1.159 -> 1.162	hardware/common/dev.sgml
2003-06-28 17:45:25 +00:00
hrs
5a253de2b6 Merge the following from the English version:
1.5   -> 1.6  	hardware/Makefile
	(new) -> 1.1  	hardware/amd64/Makefile
	(new) -> 1.1  	hardware/amd64/article.sgml
	(new) -> 1.1  	hardware/amd64/proc-amd64.sgml
	1.4   -> 1.5  	hardware/common/hw.ent
	1.5   -> 1.6  	relnotes/Makefile
	(new) -> 1.1  	relnotes/amd64/Makefile
	(new) -> 1.1  	relnotes/amd64/article.sgml
2003-06-28 17:38:02 +00:00
simokawa
4ef60a8729 Add reference to CAM. 2003-06-28 15:43:27 +00:00
ume
7407066674 name union. 2003-06-28 15:37:04 +00:00
luigi
880567e3db Remove a stale comment, fix indentation. 2003-06-28 14:23:22 +00:00
luigi
f8b1841e60 whitespace fix 2003-06-28 14:16:53 +00:00
ticso
0f43ae5b7d enable interrupt routing for mcpcia based systems
Reviewed by:	mjacob, gallatin
2003-06-28 13:47:23 +00:00
nyan
c10af3b119 MFi386: revision 1.566. 2003-06-28 12:35:46 +00:00
simokawa
065a386bdc Fix several problems related to resume:
- Initialize fc->status to process bus reset correctly after resume.
- Initialize AT ring buffer pointer.
- Requeue stdma to stfree for active IR buffer.
- Stop DMA before suspend for safe.
- Set powerstate after resume.
2003-06-28 11:11:36 +00:00
davidxu
7b25bda563 o Use a daemon thread to monitor signal events in kernel, if pending
signals were changed in kernel, it will retrieve the pending set and
  try to find a thread to dispatch the signal. The dispatching process
  can be rolled back if the signal is no longer in kernel.

o Create two functions _thr_signal_init() and _thr_signal_deinit(),
  all signal action settings are retrieved from kernel when threading
  mode is turned on, after a fork(), child process will reset them to
  user settings by calling _thr_signal_deinit(). when threading mode
  is not turned on, all signal operations are direct past to kernel.

o When a thread generated a synchoronous signals and its context returned
  from completed list, UTS will retrieve the signal from its mailbox and try
  to deliver the signal to thread.

o Context signal mask is now only used when delivering signals, thread's
  current signal mask is always the one in pthread structure.

o Remove have_signals field in pthread structure, replace it with
  psf_valid in pthread_signal_frame. when psf_valid is true, in context
  switch time, thread will backout itself from some mutex/condition
  internal queues, then begin to process signals. when a thread is not
  at blocked state and running, check_pending indicates there are signals
  for the thread, after preempted and then resumed time, UTS will try to
  deliver signals to the thread.

o At signal delivering time, not only pending signals in thread will be
  scanned, process's pending signals will be scanned too.

o Change sigwait code a bit, remove field sigwait in pthread_wait_data,
  replace it with oldsigmask in pthread structure, when a thread calls
  sigwait(), its current signal mask is backuped to oldsigmask, and waitset
  is copied to its signal mask and when the thread gets a signal in the
  waitset range, its current signal mask is restored from oldsigmask,
  these are done in atomic fashion.

o Two additional POSIX APIs are implemented, sigwaitinfo() and sigtimedwait().

o Signal code locking is better than previous, there is fewer race conditions.

o Temporary disable most of code in _kse_single_thread as it is not safe
  after fork().
2003-06-28 09:55:02 +00:00
davidxu
edb09b0c7f Use mmap retuned value.
Reviewed by: deischen
2003-06-28 09:48:05 +00:00
davidxu
2a76d14fc7 Temporary disable rwlock based code, replace it with low level KSE locking
code until rtld-elf and libkse can cooperate better, those code can be
restored.

Reviewed by: deischen
2003-06-28 09:47:22 +00:00
davidxu
27c0f951b2 Write new thread pointer back only when success.
Reviewed by: deischen
2003-06-28 09:41:59 +00:00
davidxu
e7f0429dc8 After thread was interrupted by signal, it should relock mutex.
Reviewed by: deischen
2003-06-28 09:40:57 +00:00
davidxu
cec78b1ad3 if thread is exiting, just returns. kse_thr_interrupt interface
was changed, it needs signal parameter, pass -1 to it, it indicates to
interrupt syscall.

Reviewed by: deischen
2003-06-28 09:39:35 +00:00
marcel
96d5411913 Implement cpu_set_upcall_kse(). Elementary testing shows that this
function behaves correctly in principle, but is not expected to be
100% complete. In any case, with this commit we have KSE ported
enough to start runtime testing with threaded applications and fix
whatever bugs or omissions we encounter. Yay!
2003-06-28 09:22:25 +00:00
jeff
47cfe5988b - Don't migrate to stopped cpus. 2003-06-28 09:09:33 +00:00