Commit Graph

128741 Commits

Author SHA1 Message Date
David Xu
3b8a017442 the c_has_waiters is lazily updated, temporarily disable the false
alarm code.
2006-12-05 07:23:58 +00:00
Joel Dahl
6755e2f954 Fix typo. 2006-12-05 06:56:09 +00:00
David Xu
4d617f2d10 Use ucond to implement barrier. 2006-12-05 06:54:25 +00:00
David Xu
670b44d65a Add _thr_ucond_init(). 2006-12-05 06:53:44 +00:00
Warner Losh
07defc61a9 const poison
submitted by: john wehle
2006-12-05 06:19:36 +00:00
Warner Losh
6c818b5fa3 More properly cleanup the iicbus child when deleting it.
These are from patches by John Wehle, but the commentary has been
updated by me.

Obtained from: ports/multimedia/pvr250, indirectly
2006-12-05 06:11:10 +00:00
David Xu
a3f452e8d8 Fix spelling. 2006-12-05 05:31:49 +00:00
David Xu
e986eeec92 Add a test for pthread's cv and cancellation. 2006-12-05 05:14:56 +00:00
Warner Losh
7362a1ad37 Reference Hauppage's cxm_iic bit-bang device here.
Add a note that suggests a cleanup.

Note: This patch was derived based on looking at the pvrxxx/pvr250
ports' Makefiles only, and may be incomplete.  It is not derived from
anything I saw from Hauppage.
2006-12-05 05:06:59 +00:00
David Xu
3ce4e91d4e Tweak _thr_cancel_leave_defer a bit to fix a possible race. 2006-12-05 05:01:57 +00:00
Peter Grehan
6e4f008cbb Fix gdb issue where the i-cache was not being updated when a breakpoint
was written into a user's address space. The fix is to modify uiomove_fromphys
to sync the icache when an executable user-space page is written into.

Alan Cox suggested that there should probably be a higher-level interface
to this in the ptrace code, but agreed that this is an OK short-term solution.

Files changed:

pmap.h - declaration of pmap_page_executable()
pmap_dispatch.c - pass through the page_executable call to the mmu object
mmu_oea.c - implement the page_executable method by examining the PTE_EXEC
 field in the vm_page_t
uio_machdep.c - in uiomove_fromphys(), if the op was a UIO_WRITE to user-space,
 and if the page is executable, sync the icache since this is at the least
 a breakpoint-write from gdb.

Reported by:	marcel
Tested by:	marcel, grehan on g3+g4
Discussed with:	alc
MFC after:	2 weeks
2006-12-05 04:01:52 +00:00
Matt Jacob
2afca7acfb Initial cut at Basic Domain Validation- just add some states to
traverse through during probing.

Reviewed by:	scsi (scottl)
2006-12-04 23:04:13 +00:00
Jung-uk Kim
b34608fea5 MFP4: 109653
Linux mknod(2) can open any files, not just char/block or fifo files.
This fixes Linux Test Project test cases mknod01, mknod07 and mknod09.
2006-12-04 22:46:09 +00:00
Sam Leffler
323c565bed hook npe.4 up to arm build
MFC after:	1 month
2006-12-04 22:42:27 +00:00
Sam Leffler
eaa9497568 start 'o man page for xscale npe ethernet driver
MFC after:	1 month
2006-12-04 22:41:41 +00:00
Jung-uk Kim
b256a1e10b MFP4: 109652
Fixes for 'blocking in fifoor state' problem of LTP tests.
linux_*stat*() functions were opening files with O_RDONLY to get
major/minor pair for char/block special files.  Unfortunately,
when these functions are used against fifo, it is blocked forever
because there is no writer.  Instead, we only open char/block special
files for major/minor conversion.  We have to get rid of kern_open()
entirely from translate_path_major_minor() but today is not the day.
While I am here, add checks for errors before calling
translate_path_major_minor().
2006-12-04 22:38:52 +00:00
Kip Macy
aa077979f6 Bug fix for obscenely large wait times on uncontested locks
if waittime was zero (the lock was uncontested) l->lpo_waittime
in the hash table would not get initialized.

Inspection prompted by questions from: Attilio Rao
2006-12-04 22:15:50 +00:00
Jung-uk Kim
7ee00338c5 - Add BGE_FLAG_JUMBO flag which idicates jumbo frame capability. Some day we
may be able to support jumbo frames for BCM5714 and BCM5780.
- Rename BGE_IS_5705_OR_BEYOND() to BGE_IS_5705_PLUS() for consistency.
2006-12-04 22:12:21 +00:00
Ruslan Ermilov
a82e937c0b Grammar.
OK'ed by:	sam
2006-12-04 20:34:25 +00:00
Jung-uk Kim
0dae9719c3 Use bge_flags to save chipset family and remove dead code while I am here. 2006-12-04 19:50:49 +00:00
Kip Macy
4598ab64b0 - separate out rounding memory ranges to 4M boundaries from OFW memory allocation bug workaround
- create real_phys_avail which includes all memory ranges to be added to the direct map
- merge in nucleus memory to real_phys_avail
- distinguish between tag VA and index VA in tsb_set_tte_real for cases where page_size != index_page_size
- clean up direct map loop
2006-12-04 19:35:40 +00:00
Sam Leffler
78e3a7fdd5 document recent change to return ECONNRESET for tcp sockets
MFC after:	1 month
2006-12-04 18:39:11 +00:00
Hajimu UMEMOTO
909e7467d8 Use _kevent() instead of kevent().
Requested by:	nork
2006-12-04 17:08:43 +00:00
John Baldwin
5505470e4a Fix an edge case in rman_manage_region() where it didn't handle a resource
ending at ULONG_MAX properly.  While here, use TAILQ_FOREACH_SAFE().

Tested by:	"Stephane E. Potvin" <sepotvin at videotron-ca>
MFC after:	1 week
2006-12-04 16:45:23 +00:00
Shteryana Shopova
daacddcac8 Add two new flags to if_bridge(4) indicating whether the edge flag
of the bridge port and path cost have been administratively set or
calculated automatically by RSTP.

Make sure to transition from non-edge to edge when the port goes down
and the edge flag was manually set before.
This is needed to comply with the condition
	((!portEnabled && AdminEdge) || ....)
in the Bridge Detection State Machine (IEE802.1D-2004, p. 171).

Reviewed by:	thompsa
Approved by:	bz (mentor)
2006-12-04 14:45:02 +00:00
Gleb Smirnoff
426742bf4d Fix my error in rev. 1.152
Submitted by:	oleg
2006-12-04 14:35:17 +00:00
David Xu
3c61d00ab6 Fix typo, I was using a wrong header file, and the typo is not detected
by compiler.
2006-12-04 14:27:42 +00:00
David Xu
2bd2c90703 Use kernel provided userspace condition variable to implement pthread
condition variable.
2006-12-04 14:20:41 +00:00
David Xu
745fbd3a72 if a thread blocked on userland condition variable is
pthread_cancel()ed, it is expected that the thread will not
consume a pthread_cond_signal(), therefor, we use thr_wake()
to mark a flag, the flag tells a thread calling do_cv_wait()
in umtx code to not block on a condition variable.
Thread library is expected that once a thread detected itself
is in pthread_cond_wait, it will call the thr_wake() for itself
in its SIGCANCEL handler.
2006-12-04 14:15:12 +00:00
Maxim Konovalov
02f3691e93 o Correct a function prototype. 2006-12-04 14:05:42 +00:00
Olivier Houchard
8cd2513ee1 Do not forget to call pmap_free_l2_bucket() in pmap_remove_pages().
This can fix the pmap-related panics reported on arm.

MFC After:	3 days
2006-12-04 12:55:00 +00:00
Tim Kientzle
5af1711729 Argh. Restore a stat() call that was erroneously removed.
Thanks to: WATANABE, Kazuo
Pointy hat: me, from the handy dispenser I keep nearby.
2006-12-04 08:01:53 +00:00
Kip Macy
63d8511da8 recent changes have caused TRAP_TRACING to induce corruption
disable until the issue has been tracked down
2006-12-04 05:06:47 +00:00
Marius Strobl
e46af1289e Remove the HME_LOCK_ASSERT() in hme_mifinit(), which was added in the
previous revision; it's actually ok when invoking hme_mifinit() from
hme_config() without the lock held.
2006-12-04 01:53:40 +00:00
Marius Strobl
f279f5ced4 - In hme_stop() mask all interrupts.
- In hme_eint() print MIF register contents on MIF interrupts.
- In hme_mifinit() don't bother to preserve the previous MIF config.
  This was mainly done in order to preserve the PHY select bit (external
  or internal PHY) but which only needs to be set as appropriate when
  reading from or writing to the desired PHY in hme_mii_{read,write}reg().
  Similarly don't bother to set the PHY select bit in hme_mii_statchg().
- In hme_mii_{read,write}reg() ignore requests to PHYs other than the
  external and internal PHY one.
- Move enabling/disabling the MII drivers of the external transceiver
  from hme_init_locked() and based on the sheer presence of an external
  to hme_mifinit() and based on the currently selected media, defaulting
  to the internal transceiver when the media hasn't been set, yet.
  Invoke hme_mifinit() from the newly added hme_mediachange_locked() so
  the setting of the MII drivers is updated when changing media.
  These changes keep the MII bus from wedging (which manifests in the HME
  and the PHYs no longer being able to communicate with each other) when
  the PHY device drivers isolate the unused PHY in two-PHY configurations
  as present in f.e. Netra t1 100 while changing media, either from
  hme_init_locked() (see also below) or via ifconfig(8). They also allow
  for using both transceivers/PHYs.
- In the newly added hme_mediachange_locked() also reset the PHYs in two-
  PHY configurations before invoking mii_mediachg(). This is required
  for successfully unisolating the previously unused PHY when switching
  between PHYs.
- Now that changing media should no longer cause problems back out rev.
  1.27 and re-enable setting the current media in hme_init_locked() (see
  the commit message of rev. 1.23 for more info).

These changes are roughly a merge of NetBSD gem.c rev. 1.32 - 1.35 (1.30
was already fixed differently in our 1.36; 1.31 and 1.32 were wrong) with
some parts reworked and things that don't make sense like setting the MII
drivers and restoring the previous MIF and XIF settings in hme_mii_{read,
write}reg() omitted.

MFC after:	2 weeks
2006-12-04 00:51:08 +00:00
Robert Watson
ece4c06484 Improve style(9) conformance of igmp.c. 2006-12-04 00:41:48 +00:00
Luigi Rizzo
9b96fa2da3 - put some common code in a function handle_remount();
- add better checks on non-existing directories to prevent error
  messages at run time;
- introduce a function log() to help debugging diskless booting
  when things don't work;
- modify the parsing of diskless_remount so you can add mount_nfs
  options after the pathname. You could use 'remount' to do something
  similar, but this way is more convenient because you don't have to
  hardwire the server name in the command.
- document the above.

I have been running the above in a diskless lab since february on RELENG_6.

MFC after: 1 week
2006-12-03 23:50:29 +00:00
Shteryana Shopova
b8f45801b0 Fix SIOCGDRVSPEC/BRDGGIFSSTP ioctl: make it copyin() the user
provided buffer length before trying to use it.

Reviewed by:	thompsa
Approved by:	bz (mentor)
MFC after:	3 days
2006-12-03 21:50:57 +00:00
Alexander Leidinger
786e4fc47d MFP4 (110939):
MFi386: return EOPNOTSUPP for unknown module events.

Submitted by:	rdivacky
2006-12-03 21:06:07 +00:00
Alexander Leidinger
43d9d89b3f Sync with i386 (remove the LINUX stuff) now that the module is usable. 2006-12-03 21:02:09 +00:00
Alexander Leidinger
5ac7315788 MFP4 (110957)
Use TAILQ_FOREACH_SAFE instead of the unsafe one where an item is removed
from the queue.

This prevents a panic on kldunload.

Submitted by:	rdivacky
Tested by:	bsam
2006-12-03 21:00:31 +00:00
Diomidis Spinellis
aeecffebe5 Minor clarification. 2006-12-03 19:26:17 +00:00
Diomidis Spinellis
894407d359 New test cases demonstrating fixed bugs, and the reason why
fmtcheck can't be used.
2006-12-03 19:18:41 +00:00
Maxim Konovalov
1c5cf521ae o Do not leave uninitialized birthtime: in MSDOSFSMNT_LONGNAME
set birthtime to FAT CTime (creation time) and in the other cases
set birthtime to -1.

o Set ctime to mtime instead of FAT CTime which has completely
different meaning.

PR:		kern/106018
Submitted by:	Oliver Fromme
MFC after:	1 month
2006-12-03 19:04:26 +00:00
Diomidis Spinellis
f88b45d7df Prevent buffer overflow when forcibly terminating an escape character.
Obtained from:	OpenBSD
Note: In the case of a full buffer the OpenBSD implementation will
leave in the format string an invalid escape sequence.  This appears
to be harmless with our C library, but according to C99 this can
cause undefined behavior.

MFC after:      2 weeks
2006-12-03 17:50:21 +00:00
Diomidis Spinellis
34785a9fc0 Correct handling of format strings with escaped % specifications.
Note: It would be nice to be able to implement getformat() using
fmtcheck(3), but fmtcheck does not distinguish between signed and
unsigned types, a facility jot needs to perform range checks on its
output.

Submitted by:   Per Kristian Hove
MFC after:	2 weeks
2006-12-03 17:05:04 +00:00
Maxim Konovalov
576be2064b o Fix typo: manger -> manager.
PR:		misc/106253
Submitted by:	Niclas Zeising
MFC after:	1 week
2006-12-03 15:25:55 +00:00
Maxim Konovalov
7300fd9b5e o /stand/sysinstall -> /usr/sbin/sysinstall.
PR:		conf/106254
Submitted by:	Simon Olofsson
MFC after:	1 week
2006-12-03 15:22:45 +00:00
Maxim Konovalov
88ce725781 o As POSIX requires confstr(3) returns zero on errors, not -1.
PR:		misc/106234
Submitted by:	Guy Harris
MFC after:	1 week
2006-12-03 08:22:36 +00:00
Matt Jacob
c5da377e0e Fix a massive couple of botches here: the NVRAM settings
read wasn't flagging the SYNC mode was enabled. The temp
values for offset and sync period were uint8_t, but were
being assigned and shifted from a uint32_t value.

This didn't show up in testing because a random number
of 1030 cards set a bit that says "honor BIOS negotiation",
which means this whole code path was skipped.

This should clear up at least some of the negotation
issues that have been seen.
2006-12-03 07:59:12 +00:00