]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
17 years agoo Remove duplicate includes.
Maxim Konovalov [Sat, 20 Jan 2007 08:24:02 +0000 (08:24 +0000)]
o Remove duplicate includes.

Obtained from: Slava Semushin via NetBSD

17 years agoRetire old ncurses build glue
Rong-En Fan [Sat, 20 Jan 2007 07:49:43 +0000 (07:49 +0000)]
Retire old ncurses build glue

Approved by: delphij

17 years agoSwitch to new ncurses build glue
Rong-En Fan [Sat, 20 Jan 2007 07:48:10 +0000 (07:48 +0000)]
Switch to new ncurses build glue

Approved by: delphij

17 years agoIntroduce new ncurses build glues which are part of ncurses 5.6 update.
Rong-En Fan [Sat, 20 Jan 2007 07:46:45 +0000 (07:46 +0000)]
Introduce new ncurses build glues which are part of ncurses 5.6 update.

Approved by: delphij
Inspired by: DragonFly's and lib/bind

17 years agoForce commit to note the following repocopies:
Rong-En Fan [Sat, 20 Jan 2007 07:43:46 +0000 (07:43 +0000)]
Force commit to note the following repocopies:

lib/libform/Makefile -> lib/ncurses/form/Makefile
lib/libmenu/Makefile -> lib/ncurses/menu/Makefile
lib/libncurses/Makefile -> lib/ncurses/ncurses/Makefile
lib/libncurses/ncurses_cfg.h -> lib/ncurses/ncurses/ncurses_cfg.h
lib/libncurses/pathnames.h -> lib/ncurses/ncurses/pathnames.h
lib/libncurses/termcap.c -> lib/ncurses/ncurses/termcap.c
lib/libpanel/Makefile -> lib/ncurses/panel/Makefile

Approved by: delphij
Repocopied by: kuriyama

17 years ago- Resolve conflicts
Rong-En Fan [Sat, 20 Jan 2007 07:39:17 +0000 (07:39 +0000)]
- Resolve conflicts
- Remove files that are removed in vender branch

Approved by: delphij

17 years agoGrumble- let a linux-ism slip in and had an llx which
Matt Jacob [Sat, 20 Jan 2007 07:38:31 +0000 (07:38 +0000)]
Grumble- let a linux-ism slip in and had an llx which
then choked on a 64 bit platforms. Oops.

17 years agoThis commit was generated by cvs2svn to compensate for changes in r166124,
Rong-En Fan [Sat, 20 Jan 2007 07:32:02 +0000 (07:32 +0000)]
This commit was generated by cvs2svn to compensate for changes in r166124,
which included commits to RCS files with non-trunk default branches.

17 years agoImport ncurses 5.6-20061217 onto the vender branch
Rong-En Fan [Sat, 20 Jan 2007 07:32:02 +0000 (07:32 +0000)]
Import ncurses 5.6-20061217 onto the vender branch

Approved by: delphij

17 years agoAdd the following knobs for quotas if they are enabled:
Mike Pritchard [Sat, 20 Jan 2007 04:24:20 +0000 (04:24 +0000)]
Add the following knobs for quotas if they are enabled:

quotaon_flags - flags for the quotaon command
quotaoff_flags - flags for the quotaoff command
quotacheck_flags - flags for the quotacheck command

17 years agoMFP4: Move default setting to the end of isp_reset instead of the
Matt Jacob [Sat, 20 Jan 2007 04:00:21 +0000 (04:00 +0000)]
MFP4: Move default setting to the end of isp_reset instead of the
front of isp_init so we can read NVRAM even if we're role ISP_NONE.
Prepare for reintroduction of channels (for FC) for N-Port
Virtualization.

Fix a botch in handle assignment that caused us to nuke one device
when a new one arrives and end up with two devices with the same
identity in the virtual target mapping table.

17 years agoAdd a section about RSTP support.
Andrew Thompson [Sat, 20 Jan 2007 02:39:34 +0000 (02:39 +0000)]
Add a section about RSTP support.

17 years ago- Display the media instance numbers and allow the user to set the active
Marius Strobl [Sat, 20 Jan 2007 00:56:49 +0000 (00:56 +0000)]
- Display the media instance numbers and allow the user to set the active
  one. This is based on NetBSD but unlike NetBSD this implementation prints
  the instance number for all media instances and doesn't skip it for the
  first one as I don't see a reason to suppress it except for the vague
  reason to preserve the output for single-instance configurations.
- Fix some whitespace nits.

17 years ago- In miibus_attach() remove IFM_IMASK from the dontcare_mask of the
Marius Strobl [Sat, 20 Jan 2007 00:55:03 +0000 (00:55 +0000)]
- In miibus_attach() remove IFM_IMASK from the dontcare_mask of the
  ifmedia_init() invocation. IFM_IMASK makes only sense here when all of
  the maxium of 32 PHYs on each one MII bus support disjoint sets of media,
  which generally isn't the case (though it would be nice if we had a way
  to let NIC drivers indicate that for the few card models where the PHY
  configuration is known/fixed and IFM_IMASK actually makes sense).
- Add and use a miibus_print_child() for the bus_print_child method which
  additionally prints the PHY number (which actually is the PHY address)
  so one can figure out the media instance <-> PHY number mapping from the
  PHY driver attach output. This is intented to be usefull in situations
  where the addresses of the PHYs on the bus are known (f.e. of internal/
  integrated PHYs) so one can feed the appropriate media instance number
  to ifconfig(8) (with the upcoming change for ifconfig(8)).
  This is more or less inspired by the NetBSD mii_print().

17 years ago- Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations with
Marius Strobl [Sat, 20 Jan 2007 00:52:29 +0000 (00:52 +0000)]
- Don't set MIIF_NOISOLATE so ukphy(4) can be used in configurations with
  multiple PHYs. In case some PHYs currently driven by ukphy(4) exhibit
  problems when isolating due to incomplete implementations or silicon bugs
  we'll need to add specific drivers for these. Looking at NetBSD and
  OpenBSD I don't expect problems here though (quite the contrary; we still
  seem to set MIIF_NOISOLATE without good reason in a bunch of PHY drivers).
- Fix a style(9) whitespace nit.

17 years ago- Change the PCI-X registers constants to be relative to the PCI-X PCI
John Baldwin [Fri, 19 Jan 2007 22:37:52 +0000 (22:37 +0000)]
- Change the PCI-X registers constants to be relative to the PCI-X PCI
  capability rather than hardcoded offsets for a particular card.  While
  I'm here, expand the constants some.
- Change the ahd(4) driver to use pci_find_extcap() to locate the PCI-X
  capability to keep up with the first change.

Reviewed by: scottl, gibbs (earlier version)

17 years agoMajor revamp of ULE's cpu load balancing:
Jeff Roberson [Fri, 19 Jan 2007 21:56:08 +0000 (21:56 +0000)]
Major revamp of ULE's cpu load balancing:
 - Switch back to direct modification of remote CPU run queues.  This added
   a lot of complexity with questionable gain.  It's easy enough to
   reimplement if it's shown to help on huge machines.
 - Re-implement the old tdq_transfer() call as tdq_pickidle().  Change
   sched_add() so we have selectable cpu choosers and simplify the logic
   a bit here.
 - Implement tdq_pickpri() as the new default cpu chooser.  This algorithm
   is similar to Solaris in that it tries to always run the threads with
   the best priorities.  It is actually slightly more complex than
   solaris's algorithm because we also tend to favor the local cpu over
   other cpus which has a boost in latency but also potentially enables
   cache sharing between the waking thread and the woken thread.
 - Add a bunch of tunables that can be used to measure effects of different
   load balancing strategies.  Most of these will go away once the
   algorithm is more definite.
 - Add a new mechanism to steal threads from busy cpus when we idle.  This
   is enabled with kern.sched.steal_busy and kern.sched.busy_thresh.  The
   threshold is the required length of a tdq's run queue before another
   cpu will be able to steal runnable threads.  This prevents most queue
   imbalances that contribute the long latencies.

17 years agoAdd a reference too pthread_cancel(3).
Olivier Houchard [Fri, 19 Jan 2007 17:34:52 +0000 (17:34 +0000)]
Add a reference too pthread_cancel(3).
Submitted by: Jeremie Le-Hen

17 years agoRemove remnants from the sparc64 origin of this file and which are
Marius Strobl [Fri, 19 Jan 2007 12:22:50 +0000 (12:22 +0000)]
Remove remnants from the sparc64 origin of this file and which are
unlikely to be ever used and misplaced on sun4v respectively.

17 years agoConvert the remainder of the low hanging fruits regarding including
Marius Strobl [Fri, 19 Jan 2007 11:15:34 +0000 (11:15 +0000)]
Convert the remainder of the low hanging fruits regarding including
headers in .S directly rather than getting to their macros through
genassym.c/assym.s so there are less headers genassym.c has to be
kept in sync with.
While at it fix some stytle(9) bugs (indentation, prototype format,
sort headers, etc) and remove trailing whitespace.

17 years agoCope gracefully with device_get_children returning an error.
Warner Losh [Fri, 19 Jan 2007 08:49:28 +0000 (08:49 +0000)]
Cope gracefully with device_get_children returning an error.

Obtained from: Hans Petter Selasky
P4: http://perforce.freebsd.org/chv.cgi?CH=112957

17 years agoMake DK-HOSTMASTER show contact info for .dk domains.
Poul-Henning Kamp [Fri, 19 Jan 2007 08:13:17 +0000 (08:13 +0000)]
Make DK-HOSTMASTER show contact info for .dk domains.

Submitted by: Søren Hansen <shan@soeren-hansen.dk>

17 years agoOn FreeBSD/arm, any value > 50 bits will result in a rediculously huge
Warner Losh [Fri, 19 Jan 2007 01:16:35 +0000 (01:16 +0000)]
On FreeBSD/arm, any value > 50 bits will result in a rediculously huge
number being returned for mktime and timegm calls.  Choose 48 because
that works well.  This does reduce the dynamic range of tm_year from
about 2 billion years down to "only" about 9 million years.  Please
contact me if this restriction poses a problem.

Due to the complexity of the code, I admit that I didn't trace down
what, exactly, was overflowing with longer bits.  This fixes software
that we run on the embedded systems we have.

17 years agoUse eaccess() instead of access() for the type builtin, like we do for the
Stefan Farfeleder [Thu, 18 Jan 2007 22:31:22 +0000 (22:31 +0000)]
Use eaccess() instead of access() for the type builtin, like we do for the
test builtin.

Submitted by: Martin Kammerhofer

17 years ago- Add a uart_rxready() and corresponding device-specific implementations
Marius Strobl [Thu, 18 Jan 2007 22:01:19 +0000 (22:01 +0000)]
- Add a uart_rxready() and corresponding device-specific implementations
  that can be used to check whether receive data is ready, i.e. whether
  the subsequent call of uart_poll() should return a char, and unlike
  uart_poll() doesn't actually receive data.
- Remove the device-specific implementations of uart_poll() and implement
  uart_poll() in terms of uart_getc() and the newly added uart_rxready()
  in order to minimize code duplication.
- In sunkbd(4) take advantage of uart_rxready() and use it to implement
  the polled mode part of sunkbd_check() so we don't need to buffer a
  potentially read char in the softc.
- Fix some mis-indentation in sunkbd_read_char().

Discussed with: marcel

17 years agoA less draconian fix to the build.
Matt Jacob [Thu, 18 Jan 2007 19:41:39 +0000 (19:41 +0000)]
A less draconian fix to the build.

17 years ago- Probe the CS4231 in USIII machines.
Marius Strobl [Thu, 18 Jan 2007 19:19:19 +0000 (19:19 +0000)]
- Probe the CS4231 in USIII machines.
- Remove unused variables. [1]

Reported by: Coverity Prevent (CID 700, 701) [1]

17 years agoTemporarily comment out the KASSERT that broke the kernel build.
David E. O'Brien [Thu, 18 Jan 2007 18:53:13 +0000 (18:53 +0000)]
Temporarily comment out the KASSERT that broke the kernel build.

17 years ago- Rename UPA_BUS_SPACE to NEXUS_BUS_SPACE; besides an UPA bus, nexus(4)
Marius Strobl [Thu, 18 Jan 2007 18:32:26 +0000 (18:32 +0000)]
- Rename UPA_BUS_SPACE to NEXUS_BUS_SPACE; besides an UPA bus, nexus(4)
  may also reflect a Fireplane/Safari or JBus bus (or a virtual bus which
  in turn reflects a JBus bus or something like that...).
- In the both the sparc64 and sun4v bus_machdep.c use __FBSDID.
- Spell SBus the official way in comments.
- Replace hardcoded function names (all of which were actually outdated)
  in panic and status strings with __func__.
- Fix whitespace nits.

17 years agoAdd missing comma.
Joel Dahl [Thu, 18 Jan 2007 15:27:15 +0000 (15:27 +0000)]
Add missing comma.

Noticed by: ru

17 years agoRevise the ng_ppp(4) node, so that code flow is more clear. All non-link
Gleb Smirnoff [Thu, 18 Jan 2007 13:55:21 +0000 (13:55 +0000)]
Revise the ng_ppp(4) node, so that code flow is more clear. All non-link
hooks get their per hook rcvdata methods, and all functions are organized
corresponding to protocol stack model.

Submitted by: Alexander Motin <mav alkar.net>
Reviewed by: archie, julian

17 years agoRemove the compat shims for the ISA old-stlye in{b,w,l}()/out{b,w,l}()
Marius Strobl [Thu, 18 Jan 2007 13:52:44 +0000 (13:52 +0000)]
Remove the compat shims for the ISA old-stlye in{b,w,l}()/out{b,w,l}()
and friends along with all hacks required to implement them. None of
the drivers currently built (as part of GENERIC, LINT or modules) on
sparc64 or sun4v and none of those we might want to use there in
future uses them, AFAICT there actually never was a driver hooked up
to the sparc64 or sun4v build that correctly used these functions
(and it looks like that due to a bug read{b,w,l}()/write{b,w,l}() and
the other functions working on a memory handle never actually worked on
sun4v). All they ever were good for on sparc64 and sun4v was erroneously
dragging in dependencies on isa(4) in drivers like f.e. dpt(4), si(4)
and syscons(4) in source files that supposedly were bus-neutral and
hiding issues with drivers like f.e. ng_bt3c(4) that used these
functions with busses other than isa(4) and therefore couldn't work on
these platforms.

17 years agoWrap the EISA-specific parts of the dpt(4) and si(4) back-ends in
Marius Strobl [Thu, 18 Jan 2007 13:33:36 +0000 (13:33 +0000)]
Wrap the EISA-specific parts of the dpt(4) and si(4) back-ends in
the newly added DEV_EISA. This is done so that these back-ends can
be compiled on platforms not providing in{b,w,l}()/out{b,w,l}() and
friends (but may wish to use them together with bus front-ends other
than the EISA one).

17 years agoOn sparc64 also use the fillw() this header provides for ia64 so
Marius Strobl [Thu, 18 Jan 2007 13:08:08 +0000 (13:08 +0000)]
On sparc64 also use the fillw() this header provides for ia64 so
the sparc64 MD code doesn't need to provide a memsetw() along with
the ISA compat cruft.

17 years agoForced commit to note that rev. 1.100 added support for
Konstantin Belousov [Thu, 18 Jan 2007 10:42:10 +0000 (10:42 +0000)]
Forced commit to note that rev. 1.100 added support for
LINUX_O_DIRECTORY, LINUX_O_DIRECT and LINUX_O_NOFOLLOW flags
to linux_open().

Noted by: netchild

17 years ago - most all includes (#include <>) migrate to the sctp_os_bsd.h file
Randall Stewart [Thu, 18 Jan 2007 09:58:43 +0000 (09:58 +0000)]
 - most all includes (#include <>) migrate to the sctp_os_bsd.h file
 - Finally all splxx() are removed
 - Count error fixed in mapping array which might
   cause a wrong cumack generation.
 - Invariants around panic for case D + printf when no invariants.
 - one-to-one model race condition fixed by using
   a pre-formed connection and then completing the
   work so accept won't happen on a non-formed
   association.
 - Some additional paranoia checks in sctp_output.
 - Locks that were missing in the accept code.

Approved by: gnn

17 years agoAdd support for LINUX_O_DIRECT, LINUX_O_DIRECT and LINUX_O_NOFOLLOW flags
Konstantin Belousov [Thu, 18 Jan 2007 09:32:08 +0000 (09:32 +0000)]
Add support for LINUX_O_DIRECT, LINUX_O_DIRECT and LINUX_O_NOFOLLOW flags
to open() [1].
Improve locking for accessing session control structures [2].
Try to document (most likely harmless) races in the code [3].

Based on submission by: Intron (intron at intron ac) [1]
Reviewed by: jhb [2]
Discussed with: netchild, rwatson, jhb [3]

17 years agoFix definitions of kilobits etc.
Ruslan Ermilov [Thu, 18 Jan 2007 09:24:08 +0000 (09:24 +0000)]
Fix definitions of kilobits etc.

PR: bin/106116
Nudged by: Rostislav Krasny
MFC after: 3 days

17 years agoSet topology change propagation on all ports _except_ the caller.
Andrew Thompson [Thu, 18 Jan 2007 07:13:01 +0000 (07:13 +0000)]
Set topology change propagation on all ports _except_ the caller.

17 years agoRevert previous change.
Craig Rodrigues [Thu, 18 Jan 2007 05:46:32 +0000 (05:46 +0000)]
Revert previous change.

Requested by: kan

17 years agoOops... Revert previous commit because "installathon" is really a contest's
Xin LI [Thu, 18 Jan 2007 03:07:04 +0000 (03:07 +0000)]
Oops...  Revert previous commit because "installathon" is really a contest's
name and not a typo.

17 years agoFix a typo.
Xin LI [Thu, 18 Jan 2007 03:04:56 +0000 (03:04 +0000)]
Fix a typo.

Submitted by: applecom at inbox ru

17 years agoForward declare __pcpu as a pointer type instead of an array type to
Craig Rodrigues [Thu, 18 Jan 2007 02:00:04 +0000 (02:00 +0000)]
Forward declare __pcpu as a pointer type instead of an array type to
eliminate GCC 4.1 error: "array type has incomplete element type".

17 years agoDocument the loader tunables which control hard process memory limits.
Bruce M Simpson [Wed, 17 Jan 2007 22:23:28 +0000 (22:23 +0000)]
Document the loader tunables which control hard process memory limits.

Reviewed by: ru

17 years agoUse FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.
Xin LI [Wed, 17 Jan 2007 15:05:52 +0000 (15:05 +0000)]
Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.

17 years agoUse FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.
Xin LI [Wed, 17 Jan 2007 14:58:53 +0000 (14:58 +0000)]
Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form.

17 years ago"If I only had a brain..."
Dag-Erling Smørgrav [Wed, 17 Jan 2007 14:54:53 +0000 (14:54 +0000)]
"If I only had a brain..."

MFC after:  3 weeks

17 years agoCorrect errors in previous commit. I didn't realize that ${CPUTYPE} is
Dag-Erling Smørgrav [Wed, 17 Jan 2007 14:49:13 +0000 (14:49 +0000)]
Correct errors in previous commit.  I didn't realize that ${CPUTYPE} is
passed unmodified to gcc.  Therefore, "prescott" should be used for Prescott,
Nocona, Core and Core 2 CPUs when building 32-bit code, and "nocona" should
be used for Prescott, Nocona and Core 2 CPUs when building 64-bit code.

MFC after: 3 weeks

17 years ago- Add a small section on boot-time configuration.
Joel Dahl [Wed, 17 Jan 2007 14:27:03 +0000 (14:27 +0000)]
- Add a small section on boot-time configuration.
- Add more Xrefs.
- Fix minor nits.

Reviewed by: ru

17 years agoOn i386, make "prescott" an alias for "nocona" (instead of the other way
Dag-Erling Smørgrav [Wed, 17 Jan 2007 12:43:06 +0000 (12:43 +0000)]
On i386, make "prescott" an alias for "nocona" (instead of the other way
around), and introduce "core", along with the alias "core2".  All of these
enable SSE3.

On amd64, add "core2" (enables SSE3).

MFC after: 3 weeks

17 years agoFix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and the
Markus Brueffer [Wed, 17 Jan 2007 03:50:45 +0000 (03:50 +0000)]
Fix a buffer overflow iff USB_DEBUG is set, hw.usb.ums.debug is > 5 and the
total size of all input reports is < 6.

PR: usb/106435
Submitted by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Approved by: emax (mentor)
MFC after: 3 days

17 years agoAdd PCI Id's for upcoming controllers.
Scott Long [Wed, 17 Jan 2007 02:58:41 +0000 (02:58 +0000)]
Add PCI Id's for upcoming controllers.

Obtained from: LSI Corp.
MFC After: 3 days

17 years agoAdd 3436 file system regression tests in 184 files.
Pawel Jakub Dawidek [Wed, 17 Jan 2007 01:42:12 +0000 (01:42 +0000)]
Add 3436 file system regression tests in 184 files.
Almost all regression tests are based on very flexible fstest tool.
They verify correctness (POSIX conformance) of almost all file
system-related system calls.

The motivation behind this work is my ZFS port and POSIX, who doesn't
provide free test suites.

Runs on: FreeBSD/UFS, FreeBSD/ZFS, Solaris/UFS, Solaris/ZFS

To try it out:

# cd fstest
# make
# find tests/* -type d | xargs prove

17 years agoCreate bus dma tags for both the PCI bus and the IXP425 root bus. Set the
Olivier Houchard [Wed, 17 Jan 2007 00:58:25 +0000 (00:58 +0000)]
Create bus dma tags for both the PCI bus and the IXP425 root bus. Set the
PCI bus' one as the default one, and explicitely use the other one for
non-PCI devices.
This is needed because the PCI bus can only address 64MB of RAM, while some
IXP425 boards have 128MB or more, and most of the PCI drivers do not bother
providing the parent dma tag.

17 years ago- Add bounce pages for arm, largely based on the i386 implementation.
Olivier Houchard [Wed, 17 Jan 2007 00:53:05 +0000 (00:53 +0000)]
- Add bounce pages for arm, largely based on the i386 implementation.
- Add a default parent dma tag, similar to what has been done for sparc64.
- Before invalidating the dcache in POSTREAD, save the bits which are in the
same cachelines than our buffers, but not part of it, and restore them after
the invalidation.

17 years agoAdd a 3rd entry in the cache, which keeps the end position
Tom Rhodes [Tue, 16 Jan 2007 23:43:14 +0000 (23:43 +0000)]
Add a 3rd entry in the cache, which keeps the end position
from just before extending a file.  This has the desired effect
of keeping the write speed constant.  And yes, that helps a lot
copying large files always at full speed now, and I have seen
improvements using benchmarks/bonnie.

Stolen from: NetBSD
Reviewed by: bde

17 years agoRemove hptlock from the static witness table, now that it's a regular sleep
Suleiman Souhlal [Tue, 16 Jan 2007 22:56:28 +0000 (22:56 +0000)]
Remove hptlock from the static witness table, now that it's a regular sleep
mutex.

17 years agoResurrect upa(4), now used for the subordinate/slave UPA bridge and
Marius Strobl [Tue, 16 Jan 2007 22:08:27 +0000 (22:08 +0000)]
Resurrect upa(4), now used for the subordinate/slave UPA bridge and
bus hanging off from the Fireplane/Safari bus in some USIII machines.
This is part 3/4 of allowing creator(4) to work in these machines.
The little info needed on how to configure the bridge and to work
around the incorrect values contained in the `interrupts' properties
of its children were obtained form OpenSolaris.

17 years ago- Merge sys/sparc64/creator/creator_upa.c into sys/dev/fb/creator.c.
Marius Strobl [Tue, 16 Jan 2007 21:08:22 +0000 (21:08 +0000)]
- Merge sys/sparc64/creator/creator_upa.c into sys/dev/fb/creator.c.
  The separate bus front-end was inherited from the OpenBSD creator(4),
  which at that time had a mainbus(4) (for USI/II machines, which use
  an UPA interconnection bus as the nexus) and an upa(4) (for USIII
  machines, which use a subordinate/slave UPA bus hanging off from the
  Fireplane/Safari interconnection bus) front-end. With FreeBSD and
  newbus there is/will be no need to have two separate bus front-ends
  for these busses, so we can easily coallapse the shared front-end
  and the back-end into a single source file (note that the FreeBSD
  creator_upa.c was misnomer anyway; based on what it actually attached
  to that should have been creator_nexus.c), actually OpenBSD meanwhile
  also has moved to a shared front-end and a single source file. Due
  to the low-level console support creator.c also wasn't free from bus
  related things before.
  While at it, also split sys/sparc64/creator/creator.h into a
  sys/dev/fb/creatorreg.h that only contains register macros and move
  the structures to the top of sys/dev/fb/creator.c as suggested by
  style(9) so creator(4) is no longer scattered over two directories.
- Use OF_decode_addr()/sparc64_fake_bustag() to obtain the bus tags and
  handles for the low-level console support instead of hardcoding
  support for AFB/FFB hanging off from nexus(4) only. This is part 2/4
  of allowing creator(4) to work in USIII machines (which have a UPA
  bus hanging off from the Fireplane/Safari bus reflected by the nexus),
  which already makes it work as the low-level console there.
- Allocate resources in the bus attach routine regardless of whether
  creator(4) is used as for the low-level console and thus the required
  bus tags and handles have been already obtained or not so the resources
  are marked as taken in the respective RMAN.
- For both obtaining the bus tags and handles for the low-level console
  support as well as allocating the corresponding resources in the
  regular bus attach routine don't bother to get all for the maximum of
  24 register banks but only (for) the two tag/handle pairs required for
  providing the video interface for syscons(4) support. If we can't
  allocate the rest of them just limit the memory range accessible via
  creator_fb_mmap() accordingly.
- Sanity check the memory range spanned by the first and last resources
  and the resources in between as far as possible, as the XFree86/Xorg
  sunffb(4) expects to be able to access the whole region, even though
  the backing resources are actually non-continuous. Limit and check
  the memory range accessible via creator_fb_mmap() accordingly.
- Reduce the size of buffers for OFW properties to what they actually
  need to hold.
- Rename some tables to creator_<foo> for consistency.
- Also for the sizes in the creator_fb_mmap() mapping table entries use
  macros for consistency, add macros for the remaining register banks
  for completeness.

17 years agoTeach OF_decode_addr() about the bus space used for devices on the
Marius Strobl [Tue, 16 Jan 2007 20:42:21 +0000 (20:42 +0000)]
Teach OF_decode_addr() about the bus space used for devices on the
nexus (which might or might not reflect an UPA interconnection bus;
accordingly UPA_BUS_SPACE should be renamed to NEXUS_BUS_SPACE at a
later point) and subordinate/slave UPA busses. This is part 1/4 of
allowing creator(4) to work in USIII machines (which have a UPA bus
hanging off from the Fireplane/Safari bus reflected by the nexus).

17 years agoo In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
Marius Strobl [Tue, 16 Jan 2007 20:35:23 +0000 (20:35 +0000)]
o In re_newbuf() and re_encap() if re_dma_map_desc() aborts the mapping
  operation as it ran out of free descriptors or if there are too many
  segments in the first place, call bus_dmamap_unload() in order to
  unload the already loaded segments.
  For trying to map the defragmented mbuf (chain) in re_encap() this
  introduces re_dma_map_desc() setting arg.rl_maxsegs to 0 as a new
  failure mode. Previously we just ignored this case, corrupting our
  view of the TX ring.
o In re_txeof():
  - Don't clear IFF_DRV_OACTIVE unless there are at least 4 free TX
    descriptors. Further down the road re_encap() will bail if there
    aren't at least 4 free TX descriptors, causing re_start() to
    abort and prepend the dequeued mbuf again so it makes no sense
    to pretend we could process mbufs again when in fact we won't.
    While at it replace this magic 4 with a macro RL_TX_DESC_THLD
    throughout this driver.
  - Don't cancel the watchdog timeout as soon as there's at least one
    free TX descriptor but instead only if all descriptors have been
    handled. It's perfectly normal, especially in the DEVICE_POLLING
    case, that re_txeof() is called when only a part of the enqueued
    TX descriptors have been handled, causing the watchdog to be
    disarmed prematurely.
o In re_encap():
  - If m_defrag() fails just drop the packet like other NIC drivers
    do. This should only happen when there's a mbuf shortage, in which
    case it was possible to end up with an IFQ full of packets which
    couldn't be processed as they couldn't be defragmented as they
    were taking up all the mbufs themselves. This includes adjusting
    re_start() to not trying to prepend the mbuf (chain) if re_encap()
    has freed it.
  - Remove dupe initialization of members of struct rl_dmaload_arg to
    values that didn't change since trying to process the fragmented
    mbuf chain.
    While at it remove an unused member from struct rl_dmaload_arg.
o In re_start() remove a abandoned, banal comment. The corresponding
  code was moved to re_attach() some time ago.

With these changes re(4) now survives one day (until stopped) of
hammering out packets here.

Reviewed by: yongari
MFC after: 2 weeks

17 years agoFix a typo in a comment, introduced in rev. 1.19.
Christian Brueffer [Tue, 16 Jan 2007 19:46:05 +0000 (19:46 +0000)]
Fix a typo in a comment, introduced in rev. 1.19.

17 years agoDisable MSI for the Intel 845 and 865 chipsets and update comment for
John Baldwin [Tue, 16 Jan 2007 19:44:45 +0000 (19:44 +0000)]
Disable MSI for the Intel 845 and 865 chipsets and update comment for
E7210 to note it is the same devid as the 875 chipset.

17 years agoFix a spelling error. heirarchy -> hierarchy.
Mike Pritchard [Tue, 16 Jan 2007 19:40:25 +0000 (19:40 +0000)]
Fix a spelling error.  heirarchy -> hierarchy.

Obtained from: OpenBSD

17 years agoFix a spelling error in some comments. heirarchy -> hierarchy.
Mike Pritchard [Tue, 16 Jan 2007 19:35:43 +0000 (19:35 +0000)]
Fix a spelling error in some comments.  heirarchy -> hierarchy.

Obtained from: OpenBSD

17 years agoo Remove duplicate #include <errno.h>.
Maxim Konovalov [Tue, 16 Jan 2007 18:28:43 +0000 (18:28 +0000)]
o Remove duplicate #include <errno.h>.

Obtained from: NetBSD (submitted by Slava Semushin)

17 years agoCorrect driver_t brgphy_driver, which was forgotten from the last commit.
Jung-uk Kim [Tue, 16 Jan 2007 17:48:57 +0000 (17:48 +0000)]
Correct driver_t brgphy_driver, which was forgotten from the last commit.

17 years agoFix the subvendor ID for PCI-PCI bridges.
John Baldwin [Tue, 16 Jan 2007 17:04:42 +0000 (17:04 +0000)]
Fix the subvendor ID for PCI-PCI bridges.
- Retire the PCI_SUB*_1 constants and don't try to read a subvendor ID out
  of them.  There isn't a standard subvendor ID field for PCI-PCI bridges.
  Instead, the dword at offset 0x34 is actually mostly reserved except for
  the LSB which is the capabilities pointer.
- Add support for the PCI-PCI bridge subvendor ID capability (13) and use
  it to set the subvendor ID for PCI-PCI bridges.

MFC after:  1 month

17 years agoRemove duplicate variable initialization.
John Baldwin [Tue, 16 Jan 2007 17:01:42 +0000 (17:01 +0000)]
Remove duplicate variable initialization.

CID: 1706
Found by: Coverity Prevent (tm)

17 years agoAvoid infinite loop if nicmp6 and nip6 are not on the same mbuf.
Hajimu UMEMOTO [Tue, 16 Jan 2007 15:55:29 +0000 (15:55 +0000)]
Avoid infinite loop if nicmp6 and nip6 are not on the same mbuf.
NetBSD PR 34994+35333

MFC after: 3 days

17 years agoWhen we try to set set-gid bit with chmod(2) on a file, which we own, but our
Pawel Jakub Dawidek [Tue, 16 Jan 2007 15:17:27 +0000 (15:17 +0000)]
When we try to set set-gid bit with chmod(2) on a file, which we own, but our
effective group ID (and any of our group) doesn't match the group ID of the
file, we get EPERM.  This doesn't conform POSIX. POSIX requires that we should
return 0, but silently clear the set-gid bit.

17 years agoFix typo in a comment.
Joel Dahl [Tue, 16 Jan 2007 12:27:13 +0000 (12:27 +0000)]
Fix typo in a comment.

17 years agoRemoves useless (flags | ) KASSERT. The ^ one that actually
Randall Stewart [Tue, 16 Jan 2007 11:40:55 +0000 (11:40 +0000)]
Removes useless (flags | ) KASSERT. The ^ one that actually
does what we want.

Submitted by: Li Xin delphij@delphij.net
Reviewed by: rrs
Approved by: gnn

17 years agoAdd French dvorak keymap that supports accents. Based on Francis
Murray Stokely [Tue, 16 Jan 2007 10:47:56 +0000 (10:47 +0000)]
Add French dvorak keymap that supports accents.  Based on Francis
Leboutte's french layout.

Submitted by: Clement Pillias <clementpillias@nerim.net>
MFC after: 1 week

17 years agoProvide a more accurate description of the size of the ports collection.
Murray Stokely [Tue, 16 Jan 2007 10:29:10 +0000 (10:29 +0000)]
Provide a more accurate description of the size of the ports collection.

17 years agoMove MII model and revision into softc.
Jung-uk Kim [Tue, 16 Jan 2007 00:52:26 +0000 (00:52 +0000)]
Move MII model and revision into softc.

17 years agoFix warning by adding extra parentheses
Kip Macy [Tue, 16 Jan 2007 00:09:58 +0000 (00:09 +0000)]
Fix warning by adding extra parentheses

17 years agoDocument that uniq(1) limits input line length to LINE_MAX characters.
Giorgos Keramidas [Mon, 15 Jan 2007 23:25:51 +0000 (23:25 +0000)]
Document that uniq(1) limits input line length to LINE_MAX characters.

PR: docs/107578
Submitted by: Jan Schaumann, jschauma.at.netmeister.org
MFC after: 3 days

17 years agoCheck the return value of bus_setup_intr() when setting up the
Marius Strobl [Mon, 15 Jan 2007 22:37:59 +0000 (22:37 +0000)]
Check the return value of bus_setup_intr() when setting up the
over-temperature and power-fail interrupts.

Suggested by: Coverity Prevent (CID 683)
MFC after: 1 week

17 years ago- Move Ethernet@WireSpeed and jumbo frame configurations to separate
Jung-uk Kim [Mon, 15 Jan 2007 22:21:44 +0000 (22:21 +0000)]
- Move Ethernet@WireSpeed and jumbo frame configurations to separate
functions.  The idea is taken from OpenBSD.
- Set/clear jumbo frame configurations for bge(4).
- Re-add BCM5750 PHY workaround for bce(4), which was mistakenly removed
from the previous commit.

17 years ago- Fix BCM5754 support found in Dell PowerEdge SC440.
Jung-uk Kim [Mon, 15 Jan 2007 21:43:43 +0000 (21:43 +0000)]
- Fix BCM5754 support found in Dell PowerEdge SC440.
- Move some PHY bug detections from brgphy.c to if_bge.c.
- Do not penalize working PHYs.
- Re-arrange bge_flags roughly by their categories.
- Fix minor style(9) nits.

PR: kern/107257
Obtained from: OpenBSD
Tested by: Mike Hibler <mike at flux dot utah dot edu>

17 years agoRewrite the udf_read() routine to use a file vnode instead of the devvp vnode.
Pav Lucistnik [Mon, 15 Jan 2007 18:45:36 +0000 (18:45 +0000)]
Rewrite the udf_read() routine to use a file vnode instead of the devvp vnode.
The code is modelled after cd9660, including support for simple read-ahead
courtesy of clustered read.

Fix udf_strategy to DTRT.

This change fixes sendfile(2) not to send out garbage.

Reviewed by: scottl
MFC after: 1 month

17 years agoClean up some debug prints from last commit and move one under boot -v.
Nate Lawson [Mon, 15 Jan 2007 18:17:36 +0000 (18:17 +0000)]
Clean up some debug prints from last commit and move one under boot -v.
Reminded by: bruno

17 years agoAdd a missing mutex unlock to an error path.
Scott Long [Mon, 15 Jan 2007 16:22:20 +0000 (16:22 +0000)]
Add a missing mutex unlock to an error path.

Submitted by: Yuxiang Luo
PR: 107943

17 years agoTidy up formatting and some wording.
Ruslan Ermilov [Mon, 15 Jan 2007 15:25:15 +0000 (15:25 +0000)]
Tidy up formatting and some wording.

17 years ago- Macroizes the V6ONLY flag check.
Randall Stewart [Mon, 15 Jan 2007 15:12:10 +0000 (15:12 +0000)]
- Macroizes the V6ONLY flag check.
- Added a short time wait (not used yet) constant
- Corrected the type of the crc32c table (it was
  unsigned long and really is a uint32_t
- Got rid of the user of MHeaders until they
  are truely needed by lower layers.
- Fixed an initialization problem in the readq structure
  (ordering was off).
- Found yet another collision bug when the random number
  generator returns two numbers on one side (during a collision)
  that are the same. Also added some tracking of cookies
  that will go away when we know that we have the last collision
  bug gone.
- Fixed an init bug for book_size_scale, that was causing
  Early FR code to run when it should not.
- Fixed a flight size tracking bug that was associated with
  Early FR but due to above bug also effected all FR's
- Fixed it so Max Burst also will apply to Fast Retransmit.
- Fixed a bug in the temporary logging code that allowed a
  static log array overflow
- hashinit_flags is now used.
- Two last mcopym's were converted to the macro sctp_m_copym that
  has always been used by all other places
- macro sctp_m_copym was converted to upper case.
- We now validate sinfo_flags on input (we did not before).
- Fixed a bug that prevented a user from sending data and immediately
  shuting down with one send operation.
- Moved to use hashdestroy instead of free() in our macros.
- Fixed an init problem in our timed_wait vtag where we
  did not fully initialize our time-wait blocks.
- Timer stops were re-positioned.
- A pcb cleanup method was added, however this probably will
  not be used in BSD.. unless we make module loadable protocols
- I think this fixes the mysterious timer bug.. it was a
  ordering of locks problem in the way we did timers. It
  now conforms to the timeout(9) manual (except for the
  _drain part, we had to do this a different way due
  to locks).
- Fixed error return code so we get either CONNREUSED or CONNRESET
  depending on where one is in progression
- Purged an unused clone macro.
- Fixed a read erro code issue where we were NOT getting the proper
  error when the connection was reset.
- Purged an unused clone macro.
- Fixed a read erro code issue where we were NOT getting the proper
  error when the connection was reset.
Approved by: gnn

17 years agoReviewed by: rwatson
Randall Stewart [Mon, 15 Jan 2007 15:06:28 +0000 (15:06 +0000)]
Reviewed by: rwatson
Approved by: gnn

Add a new function hashinit_flags() which allows NOT-waiting
for memory (or waiting). The old hashinit() function now
calls hashinit_flags(..., HASH_WAITOK);

17 years agoo Add FreeBSD 6.2, bump copyright years.
Maxim Konovalov [Mon, 15 Jan 2007 06:14:50 +0000 (06:14 +0000)]
o Add FreeBSD 6.2, bump copyright years.

17 years agoWhitespace cleanup.
Gleb Smirnoff [Mon, 15 Jan 2007 05:55:56 +0000 (05:55 +0000)]
Whitespace cleanup.

Checked with: cvs diff -b

17 years agoUpdate ip and tcp pointers after m_pullup().
Gleb Smirnoff [Mon, 15 Jan 2007 05:01:31 +0000 (05:01 +0000)]
Update ip and tcp pointers after m_pullup().

Submitted by: Alexander Motin <mav alkar.net>

17 years agoadd compat shim for ath_hal_isgsmsku until the new hal gets committed
Sam Leffler [Mon, 15 Jan 2007 04:26:19 +0000 (04:26 +0000)]
add compat shim for ath_hal_isgsmsku until the new hal gets committed

17 years agoAdd initial support for 900MHz channels; still has some rough
Sam Leffler [Mon, 15 Jan 2007 01:20:28 +0000 (01:20 +0000)]
Add initial support for 900MHz channels; still has some rough
edges but ifconfig ath0 list chan works and you can use ieee
channel #'s to lock/select a channel.

MFC after: 1 month

17 years agosave changes for handling 5416/5418 parts
Sam Leffler [Mon, 15 Jan 2007 01:17:44 +0000 (01:17 +0000)]
save changes for handling 5416/5418 parts

17 years agoAdd initial support for 900MHz cards like the Ubiquiti SR9:
Sam Leffler [Mon, 15 Jan 2007 01:15:57 +0000 (01:15 +0000)]
Add initial support for 900MHz cards like the Ubiquiti SR9:
o eliminate assumptions that half/quarter rate channels on exist in 11a
o handle frequency mapping between hal and net80211; hal gives us freq's
  in the range 2422..2437 that we remap

MFC after: 1 month

17 years agoAdd initial support for 900MHz cards like the Ubiquiti SR9:
Sam Leffler [Mon, 15 Jan 2007 01:12:28 +0000 (01:12 +0000)]
Add initial support for 900MHz cards like the Ubiquiti SR9:
o add channel flag to enable freq <-> ieee channel # mapping (can
  go away in the future when ieee number is precomputed)
o add mapping between 900mhz freq's and channel #'s that gives a
  unique channel # for each half/quarter/full width channel
o remove assumptions that half/quarter rate channels on happen in 11a
o remove assumptions that all 11g channels are full width
o ensure ic_curchan is reset on mode change so changing the channel
  list (e.g. on countrycode change) doesn't leave curchan set to an
  invalid channel

There is still an issue with switching rate sets; to be fixed separately.

MFC after: 1 month

17 years agoPropagate the CPU model to the hw.model sysctl.
Marcel Moolenaar [Sun, 14 Jan 2007 21:45:05 +0000 (21:45 +0000)]
Propagate the CPU model to the hw.model sysctl.

17 years agoo Increment requests counter right before send out an ARP query actually.
Maxim Konovalov [Sun, 14 Jan 2007 18:44:17 +0000 (18:44 +0000)]
o Increment requests counter right before send out an ARP query actually.
Otherwise the code could lead to the spurious EHOSTDOWN errors.

PR: kern/107807
Submitted by: Dmitrij Tejblum
MFC after: 1 month

17 years agoMFp4 (112379):
Alexander Leidinger [Sun, 14 Jan 2007 16:34:43 +0000 (16:34 +0000)]
MFp4 (112379):
Implement SETALL/GETALL IPC primitives. This fixes some LTP testcases and
LabView is able to proceed a little bit further.

Submitted by: rdivacky

17 years agoMFp4 (112893):
Alexander Leidinger [Sun, 14 Jan 2007 16:20:37 +0000 (16:20 +0000)]
MFp4 (112893):
Make linux_vfork() actually work. This enables make to work again with 2.6.
It also fixes the LTP vfork tests.

Submitted by: rdivacky

17 years agoMFp4 (112705):
Alexander Leidinger [Sun, 14 Jan 2007 16:07:01 +0000 (16:07 +0000)]
MFp4 (112705):
Inherit setting of the default emulation version to the jails.

Pointed out by: jhb
Submitted by: rdivacky