]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
15 years agoadd IXP465 and generic IXP425 definition
sam [Tue, 23 Dec 2008 04:46:13 +0000 (04:46 +0000)]
add IXP465 and generic IXP425 definition

15 years agoo enable TT and big-endian MMIO
sam [Tue, 23 Dec 2008 04:44:23 +0000 (04:44 +0000)]
o enable TT and big-endian MMIO
o force a reset before ehci_init to get byte-select setup

LS, FS, and HS devices now work on the Cambria board

15 years agoo add Transaction Translator support (still missing ISOC xfers)
sam [Tue, 23 Dec 2008 04:42:10 +0000 (04:42 +0000)]
o add Transaction Translator support (still missing ISOC xfers)
o add EHCI_SCFLG_BIGEMMIO flag to force big-endian byte-select to be
  set in USBMODE
o split reset work into new public routine ehci_reset so bus shim drivers
  can force big-endian byte-select before ehci_init

15 years agoDon't create a bogus ARP entry for 0.0.0.0.
qingli [Tue, 23 Dec 2008 03:33:32 +0000 (03:33 +0000)]
Don't create a bogus ARP entry for 0.0.0.0.

15 years agoPrevent cross-site forgery attacks on ftpd(8) due to splitting
cperciva [Tue, 23 Dec 2008 01:23:09 +0000 (01:23 +0000)]
Prevent cross-site forgery attacks on ftpd(8) due to splitting
long commands into multiple requests. [08:12]

Avoid calling uninitialized function pointers in protocol switch
code. [08:13]

Merry Christmas everybody...

Approved by: so (cperciva)
Approved by: re (kensmith)
Security: FreeBSD-SA-08:12.ftpd, FreeBSD-SA-08:13.protosw

15 years agoAdd a basic manual page for elf2aout.
trhodes [Tue, 23 Dec 2008 01:22:57 +0000 (01:22 +0000)]
Add a basic manual page for elf2aout.
Alter Makefile and remove NO_MAN.

PR: 109975

15 years agoAdd 9 more Analog Devices codec names.
mav [Mon, 22 Dec 2008 22:40:17 +0000 (22:40 +0000)]
Add 9 more Analog Devices codec names.

15 years agoFix typo for udav include.
alfred [Mon, 22 Dec 2008 21:37:06 +0000 (21:37 +0000)]
Fix typo for udav include.
Add link to the u3g2 driver.

15 years agoImplement a new feature for the "-m" option: if the month number is
wollman [Mon, 22 Dec 2008 21:22:42 +0000 (21:22 +0000)]
Implement a new feature for the "-m" option: if the month number is
followed by 'f' or 'p', use the following or preceding month of that
number, respectively.  Document this.  Also includes other minor
grammatical and punctuation fixes to the manual page (capitalize
Easter, etc.).

MFC after: 1 month

15 years agoOnly show the pathname in verbose output as intended in the last commit (r172862).
thompsa [Mon, 22 Dec 2008 19:52:21 +0000 (19:52 +0000)]
Only show the pathname in verbose output as intended in the last commit (r172862).

15 years agoMake preparations for resurrecting shared/read locks on vm maps:
alc [Mon, 22 Dec 2008 17:32:52 +0000 (17:32 +0000)]
Make preparations for resurrecting shared/read locks on vm maps:

mac_proc_vm_revoke_recurse() requests a read lock on the vm map at the start
but does not handle failure by vm_map_lock_upgrade() when it seeks to modify
the vm map.  At present, this works because all lock request on a vm map are
implemented as exclusive locks.  Thus, vm_map_lock_upgrade() is a no-op that
always reports success.  However, that is about to change, and
proc_vm_revoke_recurse() will require substantial modifications to handle
vm_map_lock_upgrade() failures.  For the time being, I am changing
mac_proc_vm_revoke_recurse() to request a write lock on the vm map at the
start.

Approved by: rwatson
MFC after: 3 months

15 years agoFix a comment to reflect what really happens.
scottl [Mon, 22 Dec 2008 16:58:47 +0000 (16:58 +0000)]
Fix a comment to reflect what really happens.

15 years ago- According to comments in OpenBSD, E{2,4}50 tend to have fragile
marius [Mon, 22 Dec 2008 15:34:06 +0000 (15:34 +0000)]
- According to comments in OpenBSD, E{2,4}50 tend to have fragile
  firmware versions which wedge when using the OFW test service,
  so given that we don't really depend on SUNW,stop-self just nuke
  it altogether instead of risking problems.
- At least Fire V880 have a small hardware glitch which causes the
  reception of IDR_NACKs for CPUs we actually haven't tried to send
  an IPI to, even not as part of the initial try. According to tests
  this apparently can be safely ignored though, so just return if
  checking for the individual IDR_NACKs indicates no outstanding
  dispatch. Serializing the sending of IPIs between MD and MI code
  by the combined usage of smp_ipi_mtx makes no difference to this
  phenomenon. [1]
- Provide relevant debugging bits already with the initial panic
  in case of problems with the IPI dispatch, which would have
  allowed to diagnose the above problem without a specially built
  kernel.
- In case of cheetah_ipi_selected() base the delay we wait for
  other CPUs which also might want to dispatch IPIs on the total
  amount of CPUs instead of just the number of CPUs we let this
  CPU send IPIs to because in the worst case all CPUs also want
  to IPI us at the same time.

Reported and access for extensive tests provided by: Beat Gaetzi [1]

15 years agoo Correct a database name: "group" not "groups".
maxim [Mon, 22 Dec 2008 13:36:15 +0000 (13:36 +0000)]
o Correct a database name: "group" not "groups".

PR: docs/129853
Submitted by: Denis Barov
MFC after: 1 week

15 years agoCorrect variable name in comment.
bz [Mon, 22 Dec 2008 12:54:52 +0000 (12:54 +0000)]
Correct variable name in comment.

MFC after: 4 weeks

15 years agoSimilar to the INET case, do not destroy the nd6 entries for
qingli [Mon, 22 Dec 2008 07:11:15 +0000 (07:11 +0000)]
Similar to the INET case, do not destroy the nd6 entries for
interface addresses until those addresses are removed. I already
made the patch in INET but forgot to bring the code over for
INET6.

15 years agoProvide a condition variable to delay the cloned interface
qingli [Mon, 22 Dec 2008 01:56:56 +0000 (01:56 +0000)]
Provide a condition variable to delay the cloned interface
destroy operation until the referenced clone device has
been closed by the process properly. The behavior is now
consistently with the previous release.

Reviewed by:    Kip Macy

15 years agoSince we don't request reset for rlphy(4), the link state 'UP'
yongari [Mon, 22 Dec 2008 00:53:47 +0000 (00:53 +0000)]
Since we don't request reset for rlphy(4), the link state 'UP'
event from mii(4) may not be delivered if valid link was already
established. To address the issue, check current link state after
driving MII_TICK. This should fix a regression introduced in
r184245.

PR: kern/129647

15 years agoSince we don't request reset for rlphy(4), the link state 'UP'
yongari [Mon, 22 Dec 2008 00:46:22 +0000 (00:46 +0000)]
Since we don't request reset for rlphy(4), the link state 'UP'
event from mii(4) may not be delivered if valid link was already
established. To address the issue, check current link state after
driving MII_TICK. This should fix a regression introduced in
r185753 on fast ethernet controllers.

Reported by: csjp, Bruce Cran < bruce <> cran DOT org DOT uk >
Tested by: csjp, Bruce Cran (initial version)

15 years agoConvert DRM_[DEBUG,ERROR,INFO] macros to c99 __VA_ARGS__.
rnoland [Sun, 21 Dec 2008 22:32:01 +0000 (22:32 +0000)]
Convert DRM_[DEBUG,ERROR,INFO] macros to c99 __VA_ARGS__.

Approved by: kib

15 years agoDeal with 0 length args...
rnoland [Sun, 21 Dec 2008 22:30:37 +0000 (22:30 +0000)]
Deal with 0 length args...

Approved by: kib

15 years agoFix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled.
rnoland [Sun, 21 Dec 2008 22:00:39 +0000 (22:00 +0000)]
Fix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled.

Approved by: kib

15 years agoRevert r185891.
ed [Sun, 21 Dec 2008 21:54:01 +0000 (21:54 +0000)]
Revert r185891.

In r185891 I removed the newlines from messages written to /dev/console,
because it made startup messages from rc-scripts harder to read. This,
unfortunately, causes the kernel message that is printed after a
non-terminated log message to be concatenated.

This could be fixed, but on short term it's better to just revert the
change.

Reported by: Jaakko Heinonen <jh saunalahti fi>

15 years agoSet PTS_FINISHED before waking up any threads.
ed [Sun, 21 Dec 2008 21:16:57 +0000 (21:16 +0000)]
Set PTS_FINISHED before waking up any threads.

Inside ptsdrv_{in,out}wakeup() we call KNOTE_LOCKED() to wake up any
kevent(2) users. Because the kqueue handlers are executed synchronously,
we must set PTS_FINISHED before calling ptsdrv_{in,out}wakeup().

Discovered by: nork

15 years agoFix printing of KASSERT message missed in r163604.
rnoland [Sun, 21 Dec 2008 16:56:13 +0000 (16:56 +0000)]
Fix printing of KASSERT message missed in r163604.

Approved by: kib

15 years agoDisable the pccard, parallel, GbE and wireless lan related devices and
nyan [Sun, 21 Dec 2008 09:01:00 +0000 (09:01 +0000)]
Disable the pccard, parallel, GbE and wireless lan related devices and
some options by default to decrease a kernel size.
Because PC98 does not have so much memory.

MFC after: 3 days

15 years agoFix refcount locking in cd, pass, and sg periphs.
scottl [Sun, 21 Dec 2008 06:20:11 +0000 (06:20 +0000)]
Fix refcount locking in cd, pass, and sg periphs.

15 years agoTeach get_refdir() about FreeBSD's /usr/obj convention.
kientzle [Sun, 21 Dec 2008 00:13:50 +0000 (00:13 +0000)]
Teach get_refdir() about FreeBSD's /usr/obj convention.
In development, I run libarchive_test frequently by hand
and it gets tedious having to specify a suitable -r path
all of the time.

15 years agoo add sys/endian.h now required by ehcivar.h
sam [Sat, 20 Dec 2008 17:55:37 +0000 (17:55 +0000)]
o add sys/endian.h now required by ehcivar.h
o reorder a couple of include's to make this consistent with pci code

15 years agoMissed the sun4v update to ofw_machdep.h in the OFW modularization commit.
nwhitehorn [Sat, 20 Dec 2008 15:11:00 +0000 (15:11 +0000)]
Missed the sun4v update to ofw_machdep.h in the OFW modularization commit.

15 years agoLet wchan names more closely match pre-MPSAFE TTY behaviour.
ed [Sat, 20 Dec 2008 09:36:40 +0000 (09:36 +0000)]
Let wchan names more closely match pre-MPSAFE TTY behaviour.

Right now the wchan strings "ttyinp" and "ttybgw" only differ one
character from the strings we used prior to MPSAFE TTY. Just rename them
back to their pre-MPSAFE TTY counterparts.

Also rename "ttylck" to "ttymtx", which should make it more clear that a
process is blocked on the TTY mutex, not some other form of locking.

15 years agofix build w/ EHCI_DEBUG
sam [Sat, 20 Dec 2008 05:56:08 +0000 (05:56 +0000)]
fix build w/ EHCI_DEBUG

15 years agoMerge support for Gateworks Cambria boards:
sam [Sat, 20 Dec 2008 03:26:09 +0000 (03:26 +0000)]
Merge support for Gateworks Cambria boards:
o add support for IXP435 cpu's (e.g. 64 irq's)
o add support for Cambria-specific devices: npe, led's (front panel and
  octal latch), ehci, mcu, ide cf
o redo memory mapping for xscale/ixp4xx boards: previously memory
  was assumed aliased to 0x10000000 but this appears to be true only
  for ixp425 systems and breaks operation on others; rework so memory
  is assumed to start at 0
o rework NPE configuration support to use NPE id's instead of port #'s;
  these changes also rename the associated MAC's to follow the NPE's
  they are attached to
o update npe firmware to latest rev (same license) and update default fw
  imageid's to match; in particular this adds NPE-A and crypto support
o re-style NPE fw handling code and add a console msg identifying the
  attributes of the loaded fw
o fix numerous problems with handling failures during npe setup
o fix npe rx q setup; need to spin waiting for mailbox responses during
  early boot stages as qmgr interrupts are not delivered; this fixes
  the problem where all 8 traffic classifications were not tied to the
  rx q (and eliminates the console msg "remember to fix rx q setup")
o add DELAY to npe MII wait logic for IXP435
o strip down builtin phys->virt address translation table in resource
  handling to just those resources that require it and add a console msg
  to alert people when this (kludge) table needs to be extended
o purge a bunch of dead netbsd-ism's
o cleanup avila led driver
o add Cambria support to boot2 and rework code for better multi-board support

Notes:
  1. NPE-A doesn't work and causes NPE-C to stop working; it is disabled
     in the hints
  2. USB isn't working yet; controller communicates ok but device
     discovery fails
  3. Cambria support must be configured separately from IXP425 boards;
     multi-board support is TBD

Sponsored by: Hobnob, Gateworks (board donation)
Reviewed by: imp

15 years agoMerge usb changes for Gateworks Cambria boards:
sam [Sat, 20 Dec 2008 03:02:32 +0000 (03:02 +0000)]
Merge usb changes for Gateworks Cambria boards:
o add support to byte swap EHCI descriptor contents; the IXP435
  has dual-EHCI controllers integral but descriptor contents are
  in big-endian format; this support is configured with the
  USB_EHCI_BIG_ENDIAN_DESC option and enabled with EHCI_SCFLG_BIGEDESC
o clean up EHCI USBMODE register setup during init; add #defines for
  bit values
o split debug support out into a new file and enable use through ddb
o while here remove a bunch of lingering netbsd-isms

Reviewed by: imp

15 years agoMFH @ 186335
sam [Sat, 20 Dec 2008 01:29:19 +0000 (01:29 +0000)]
MFH @ 186335

15 years agomove cf size to target config files
sam [Sat, 20 Dec 2008 01:11:10 +0000 (01:11 +0000)]
move cf size to target config files

15 years agoModularize the Open Firmware client interface to allow run-time switching
nwhitehorn [Sat, 20 Dec 2008 00:33:10 +0000 (00:33 +0000)]
Modularize the Open Firmware client interface to allow run-time switching
of OFW access semantics, in order to allow future support for real-mode
OF access and flattened device frees. OF client interface modules are
implemented using KOBJ, in a similar way to the PPC PMAP modules.

Because we need Open Firmware to be available before mutexes can be used on
sparc64, changes are also included to allow KOBJ to be used very early in
the boot process by only using the mutex once we know it has been initialized.

Reviewed by:    marius, grehan

15 years agoFix a typo.
yongari [Sat, 20 Dec 2008 00:04:04 +0000 (00:04 +0000)]
Fix a typo.

Submitted by: clemens fischer via Shigeaki Tagashira

15 years agocorrect wording
sam [Fri, 19 Dec 2008 23:12:14 +0000 (23:12 +0000)]
correct wording

15 years agoadd makefs to the base system; FreeBSD_version bumped just in case
sam [Fri, 19 Dec 2008 23:10:55 +0000 (23:10 +0000)]
add makefs to the base system; FreeBSD_version bumped just in case

Reviewed by: imp

15 years agoMerge nc(1) from OpenBSD 4.4. While there, rename our '-O' (no
delphij [Fri, 19 Dec 2008 23:00:23 +0000 (23:00 +0000)]
Merge nc(1) from OpenBSD 4.4.  While there, rename our '-O' (no
tcp options) to '--no-tcpopt' in order to resolve a comflicit
with OpenBSD's -O semantics.

15 years agofix pathnames to work w/ buildworld
sam [Fri, 19 Dec 2008 22:59:05 +0000 (22:59 +0000)]
fix pathnames to work w/ buildworld

15 years agofix 64-bit build
sam [Fri, 19 Dec 2008 22:58:39 +0000 (22:58 +0000)]
fix 64-bit build

15 years agoburncd(8) doesn't handle signals and interrupting burncd during operation.
obrien [Fri, 19 Dec 2008 20:20:14 +0000 (20:20 +0000)]
burncd(8) doesn't handle signals and interrupting burncd during operation.
For example, ^C (SIGINT) may leave the drive spinning and locked.
This may also happen if you try to write a too-large image to a disc
and burncd(8) exits with an I/O error.

Add signal handling by doing a CDRIOCFLUSH ioctl to attempt to leave
burner in a sane state when burning is interrupted with SIGHUP, SIGINT,
SIGTERM, or in case an I/O error occurs during write.
Note, that blanking will still continue after interrupt but it seems to
finish correctly even after burncd(8) has quit.

Also, while I'm here bump WARNS to "6".

PR: 48730
Submitted by: Jaakko Heinonen <jh@saunalahti.fi>

15 years agoimport netbsd makefs tool
sam [Fri, 19 Dec 2008 18:47:46 +0000 (18:47 +0000)]
import netbsd makefs tool

15 years agoadd properties and FreeBSD id's
sam [Fri, 19 Dec 2008 18:45:43 +0000 (18:45 +0000)]
add properties and FreeBSD id's

15 years agoadd FreeBSD property
sam [Fri, 19 Dec 2008 18:34:40 +0000 (18:34 +0000)]
add FreeBSD property

15 years agoCorrect 5212 ani support so that max noise immunity, spur immunity, and
sam [Fri, 19 Dec 2008 18:33:53 +0000 (18:33 +0000)]
Correct 5212 ani support so that max noise immunity, spur immunity, and
step levels are used.

Noticed by: Jiri Fojtasek <jiri.fojtasek@hlohovec.net>
Reviewed by: rpaulo

15 years agoConstify 'name' field in struct funix. This commit makes syslogd(8)
delphij [Fri, 19 Dec 2008 18:27:51 +0000 (18:27 +0000)]
Constify 'name' field in struct funix.  This commit makes syslogd(8)
WARNS?=6 on amd64 but I have not tested under universe so keep WARNS?=
level as-is for now.

15 years agoFix a typo.
wxs [Fri, 19 Dec 2008 16:56:49 +0000 (16:56 +0000)]
Fix a typo.

Approved by: rwatson

15 years agoFurther beautify the lock strings to be more pleasing to the eye and
ivoras [Fri, 19 Dec 2008 14:49:14 +0000 (14:49 +0000)]
Further beautify the lock strings to be more pleasing to the eye and
self documenting within 6 characters.

Reviewed by: ed (older version)
Approved by: gnn (older version)

15 years agoFix cam_sim_free() wakeup condition and add mtx_asserts.
trasz [Fri, 19 Dec 2008 14:33:29 +0000 (14:33 +0000)]
Fix cam_sim_free() wakeup condition and add mtx_asserts.

Submitted by: Christoph Mallon
Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation

15 years agoPeriph driver fixes, second try.
trasz [Fri, 19 Dec 2008 14:31:40 +0000 (14:31 +0000)]
Periph driver fixes, second try.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation

15 years agoMove mtx_assert lower, when we can be sure that the pointer
trasz [Fri, 19 Dec 2008 14:27:10 +0000 (14:27 +0000)]
Move mtx_assert lower, when we can be sure that the pointer
to the mutex is valid.

Reviewed by: scottl
Approved by: rwatson (mentor)
Sponsored by: FreeBSD Foundation

15 years agoThe proxy-arp code was broken and responds to ARP
qingli [Fri, 19 Dec 2008 11:07:34 +0000 (11:07 +0000)]
The proxy-arp code was broken and responds to ARP
requests for addresses that are not proxied locally.

15 years agoUpdate elf_common.h with new EM_ types found in the latest ELF gABI.
kaiw [Fri, 19 Dec 2008 09:32:31 +0000 (09:32 +0000)]
Update elf_common.h with new EM_ types found in the latest ELF gABI.

This commit is slightly different from the original patch in the PR:
1. EM_ALPHA keeps the old value for compatibility reason.
2. Non-standard SHT_NUM is not added.
3. Style.

PR:     kern/118540
Submitted by: "Pedro F. Giffuni" <giffunip[at]tutopia.com>

15 years agoDo not segfault when procstat -f or procstat -v is called on a process not
marcus [Fri, 19 Dec 2008 06:50:15 +0000 (06:50 +0000)]
Do not segfault when procstat -f or procstat -v is called on a process not
owned by the current user.  If kinfo_getfile() or kinfo_getvmmap() return
NULL, simply exit, and do not try and derefernce the memory.

Reviewed by: peter
Approved by: peter

15 years agoInitialize the cntp pointer to 0 prior to doing any work so that callers
marcus [Fri, 19 Dec 2008 06:47:59 +0000 (06:47 +0000)]
Initialize the cntp pointer to 0 prior to doing any work so that callers
don't try to iterate through garbage or NULL memory.  Additionally, return
NULL instead of 0 on error.

Reviewed by: peter
Approved by: peter

15 years agoThe ppp application relies on the if_tun interface to properly
qingli [Fri, 19 Dec 2008 01:37:20 +0000 (01:37 +0000)]
The ppp application relies on the if_tun interface to properly
install a p2p host route between the end points. The ppp module
upates this router based on user configuration later on. The
rt_Update() seems to always set the RTF_GATEWAY flag, which is
broken.

15 years agoadd delays around 16-bit enable/disable a la the driver; w/o this
sam [Fri, 19 Dec 2008 00:56:47 +0000 (00:56 +0000)]
add delays around 16-bit enable/disable a la the driver; w/o this
operation on my ixp435 Cambria board is unreliable

15 years agoconvert MALLOC/FREE to malloc/free
sam [Thu, 18 Dec 2008 23:00:09 +0000 (23:00 +0000)]
convert MALLOC/FREE to malloc/free

15 years agoAdd ULI M5461 chipset and vendor ID.
mav [Thu, 18 Dec 2008 22:04:13 +0000 (22:04 +0000)]
Add ULI M5461 chipset and vendor ID.

15 years agoGarbage collect entries from pcireg.h since we now include it.
rnoland [Thu, 18 Dec 2008 22:01:46 +0000 (22:01 +0000)]
Garbage collect entries from pcireg.h since we now include it.

Approved by: kib@
MFC after: 2 weeks

15 years agoWe only want drm to ever attach to the primary pci device.
rnoland [Thu, 18 Dec 2008 21:58:57 +0000 (21:58 +0000)]
We only want drm to ever attach to the primary pci device.
Intel 855 chips present the same pci id for both heads.  This prevents
us from attaching to the dummy second head.  All other chips that I
am aware of either only present a single pci id, or different ids
for each head so that we only match on the correct head.

Approved by: kib@
MFC after: 2 weeks

15 years agoUpdate the ipfw man page to reflect last change (-q option with nat option).
piso [Thu, 18 Dec 2008 21:46:18 +0000 (21:46 +0000)]
Update the ipfw man page to reflect last change (-q option with nat option).

MFC after: 3 days

15 years agoHonor the quiet (-q) option while adding a nat rule.
piso [Thu, 18 Dec 2008 21:37:31 +0000 (21:37 +0000)]
Honor the quiet (-q) option while adding a nat rule.

Submitted by: Andrey V. Elsukov<bu7cher@yandex.ru>
MFC after: 3 days

15 years agoBefore modularization commit, atapci driver was attaching only to devices of
mav [Thu, 18 Dec 2008 21:13:46 +0000 (21:13 +0000)]
Before modularization commit, atapci driver was attaching only to devices of
storage class. This check was lost. It is not important for the most cases,
but as it was reported on current@, it does important for sis driver and
surely inportant for AHCI driver. So restore it there.

Submitted by:   Toshikazu ICHINOSEKI, Andrey V. Elsukov
Discussed on:   current@

15 years agorework drm_scatter.c which allocates scatter / gather pages for use by
rnoland [Thu, 18 Dec 2008 21:04:50 +0000 (21:04 +0000)]
rework drm_scatter.c which allocates scatter / gather pages for use by
ati pci gart to use bus_dma to handle the allocations.  This fixes
a garbled screen issue on at least some radeons (X1400 tested).  It is
also likely that this is the correct fix for PR# 119324, though that
is not confirmed yet.

Reviewed by: jhb@ (mentor, prior version)
Approved by: kib@
MFC after: 2 weeks

15 years agoFix last commit, ttydisc_rint_bypass returns the total, not remainder.
thompsa [Thu, 18 Dec 2008 19:15:25 +0000 (19:15 +0000)]
Fix last commit, ttydisc_rint_bypass returns the total, not remainder.

15 years agoOnly unlock the llentry if it is actually valid.
bz [Thu, 18 Dec 2008 19:09:14 +0000 (19:09 +0000)]
Only unlock the llentry if it is actually valid.

Reported by: ed

15 years agoAttempt to handoff the entire buffer with ttydisc_rint_bypass() before banging
thompsa [Thu, 18 Dec 2008 19:08:19 +0000 (19:08 +0000)]
Attempt to handoff the entire buffer with ttydisc_rint_bypass() before banging
each char separately.

15 years agoBe a little bit more pestimistic in argument handling - check if we've
obrien [Thu, 18 Dec 2008 18:44:46 +0000 (18:44 +0000)]
Be a little bit more pestimistic in argument handling - check if we've
overflown our internal buffer (though after the fact), and s/strncpy/strlcpy/

Reviewed by: rodrigc
Obtained from: Juniper Networks

15 years ago- Failing to register as interrupt controller during attach shouldn't
marius [Thu, 18 Dec 2008 18:29:15 +0000 (18:29 +0000)]
- Failing to register as interrupt controller during attach shouldn't
  be fatal so just inform about this instead of panicing.
- Ensure we use the right softc in case the interrupt of a child is
  is routed to the companion PBM instead. This hasn't been seen in the
  wild so far but given that it's the case for the Schizo interrupts,
  handling this situation also for child interrupts as a precaution
  seemed a good idea.
- Deal with broken firmware versions which miss child entries in the
  ino-bitmap as seen on V880 by belatedly registering as interrupt
  controller in schizo_setup_intr(). [1]
- Add missing '\n' when printing the warning regarding Schizo Errata
  I-13.

Reported and tested by: Beat Gaetzi [1]

15 years agoMinor spelling fix in E500 locore.
raj [Thu, 18 Dec 2008 18:28:03 +0000 (18:28 +0000)]
Minor spelling fix in E500 locore.

15 years agoExtend and improve MPC85XX Local Bus management.
raj [Thu, 18 Dec 2008 18:27:12 +0000 (18:27 +0000)]
Extend and improve MPC85XX Local Bus management.

- Make LBC resources management self-contained: introduce explicit LBC
  resources definition (much like the OCP), provide dedicated rman for LB mem
  space.

- Full configuration of an LB chip select device: program LAW and BR/OR, map
  into KVA, handle all LB attributes (bus width, machine select, ecc,
  write protect etc).

- Factor out LAW manipulation routines into shared code, adjust OCP area
  accordingly.

- Other LBC fixes and clean-ups.

Obtained from: Semihalf

15 years agoRemoved a comment made obsolete by revisions 157927 and 174292.
ru [Thu, 18 Dec 2008 15:56:12 +0000 (15:56 +0000)]
Removed a comment made obsolete by revisions 157927 and 174292.

15 years agoBy popular request, stringify kern.vm_guest sysctl. Now it returns a
ivoras [Thu, 18 Dec 2008 15:34:38 +0000 (15:34 +0000)]
By popular request, stringify kern.vm_guest sysctl. Now it returns a
short, self-documenting string describing the detected virtual
environment.

Approved by: gnn (mentor) (earlier version)

15 years agoRemove spaces in wait object names to make top (1) output prettier and
ivoras [Thu, 18 Dec 2008 15:25:33 +0000 (15:25 +0000)]
Remove spaces in wait object names to make top (1) output prettier and
unbreak scripts that examine ps (1) output.

Reviewed by: ed
Approved by: gnn (mentor)

15 years agoAdd new tool tionxcl to bring ttys out of exclusive mode when
bms [Thu, 18 Dec 2008 15:12:04 +0000 (15:12 +0000)]
Add new tool tionxcl to bring ttys out of exclusive mode when
left by e.g. legacy uucp or tip.

15 years agoCheck in the actual module recognition code for the Chelsio
gnn [Thu, 18 Dec 2008 14:21:35 +0000 (14:21 +0000)]
Check in the actual module recognition code for the Chelsio
driver.

Obtained from: Chelsio Inc.

15 years agoExit with error code 2 when run with -k (continue if errors) and build failed.
fjoe [Thu, 18 Dec 2008 12:16:51 +0000 (12:16 +0000)]
Exit with error code 2 when run with -k (continue if errors) and build failed.

15 years agoDo not busy twice the mount point where a quota operation is performed.
kib [Thu, 18 Dec 2008 12:01:53 +0000 (12:01 +0000)]
Do not busy twice the mount point where a quota operation is performed.

Tested by: pho
MFC after: 1 month

15 years agoThe quotactl, statfs and fstatfs syscall implementations may dereference
kib [Thu, 18 Dec 2008 12:01:19 +0000 (12:01 +0000)]
The quotactl, statfs and fstatfs syscall implementations may dereference
NULL pointer to struct mount if the looked up vnode is reclaimed. Also,
these syscalls only mnt_ref() the mp, still allowing it to be unmounted;
only struct mount memory is kept from being reused.

Lock the vnode when doing name lookup, then reference its mount point,
unlock the vnode and vfs_busy the mountpoint. This sequence shall take
care of both races.

Reported and tested by: pho
Discussed with: attilio
MFC after: 1 month

15 years agoDo not return success and doomed vnode from lookup. LK_UPGRADE allows
kib [Thu, 18 Dec 2008 11:58:12 +0000 (11:58 +0000)]
Do not return success and doomed vnode from lookup. LK_UPGRADE allows
the vnode to be reclaimed.

Tested by: pho
MFC after: 1 month

15 years agoif_rtdel is always called with the RADIX_NODE_HEAD lock held
kmacy [Thu, 18 Dec 2008 09:59:24 +0000 (09:59 +0000)]
if_rtdel is always called with the RADIX_NODE_HEAD lock held

15 years agoo Synchronize comment and example. Add missed comma.
maxim [Thu, 18 Dec 2008 06:38:11 +0000 (06:38 +0000)]
o Synchronize comment and example.  Add missed comma.

PR: misc/129699
Submitted by: Glen Barber [1]
MFC after: 2 weeks

15 years agoturn warnx into a debug msg
sam [Thu, 18 Dec 2008 05:58:14 +0000 (05:58 +0000)]
turn warnx into a debug msg

15 years agoenable support for st_flags and st_gen
sam [Thu, 18 Dec 2008 05:55:26 +0000 (05:55 +0000)]
enable support for st_flags and st_gen

15 years agoanother nbtool turd
sam [Thu, 18 Dec 2008 05:54:54 +0000 (05:54 +0000)]
another nbtool turd

15 years agofix stuff i broke
sam [Thu, 18 Dec 2008 05:41:51 +0000 (05:41 +0000)]
fix stuff i broke

15 years agoadd ifnet_byindex_locked to allow for use of IFNET_RLOCK
kmacy [Thu, 18 Dec 2008 04:50:44 +0000 (04:50 +0000)]
add ifnet_byindex_locked to allow for use of IFNET_RLOCK

15 years agoIf the filesystem size rounded up to a multiple of the block size
sam [Thu, 18 Dec 2008 04:38:47 +0000 (04:38 +0000)]
If the filesystem size rounded up to a multiple of the block size
is larger than what a user specified then round down to get something
that works but wastes a little space.

This happens reliably for me when building filesystems for CF parts
>1G; not sure why noone else is complaining.

15 years agounbreak cg_chkmagic_swap
sam [Thu, 18 Dec 2008 04:36:44 +0000 (04:36 +0000)]
unbreak cg_chkmagic_swap

15 years agoFixing !INET6 builds after bumping WARNS to 3.
avatar [Thu, 18 Dec 2008 04:03:29 +0000 (04:03 +0000)]
Fixing !INET6 builds after bumping WARNS to 3.

15 years agoIt seems that we don't need to reserve a TBD to set total TCP
yongari [Thu, 18 Dec 2008 01:36:46 +0000 (01:36 +0000)]
It seems that we don't need to reserve a TBD to set total TCP
payload length in TSO case. Leaving unused TBD also seem to cause
SCB timeouts under certain conditions when TSO/non-TSO traffics
are active at the same time.

15 years agoApply the big hammer:
sam [Thu, 18 Dec 2008 00:54:15 +0000 (00:54 +0000)]
Apply the big hammer:
o remove all of compat except for pwcache and strstuftoll; these might
  end up in libutil or similar so keep them in the subdir
o mv getid.c up to the top level; this looks like something that'll be
  makefs-specific
o eliminate private versions of .h files in sys; use system files instead
o eliminate private ffs_tables.c; use the system version directly (might
  want to adopt const'ification at some point but that's the only diff I
  can see)
o mv remaining code from sys to ffs and strip out unused bits; this now
  becomes part of makefs
o add compat defs and shims to makefs.h
o strip all vestiges of nbtool_config.h, compat_defs.h, etc.
o fixup includes after file shuffling
o rename system #defines that do implicit byte swapping to have an _swap
  suffix; e.g. DIRSIZ -> DIRSIZ_SWAP, cg_inosused -> cg_inosused_swap; if
  we ever add endian-agnostic support to the kernel these can go back to
  their original names
o strip some netbsd'isms that aren't worth shim'ing (e.g. _DIAGASSERT)

Code compiles w/o complaints but is untested.

15 years agoAdd TWINAX (Twin Axial Copper for 10G networking) media types.
gnn [Wed, 17 Dec 2008 22:59:29 +0000 (22:59 +0000)]
Add TWINAX (Twin Axial Copper for 10G networking) media types.

Add code to the Chelsio driver so that it can recognize different
module types which may be plugged into it, including SR, LR lasers
and TWINAX copper cables.

Obtained from: Chelsio Inc.
MFC after: 1 week

15 years agogone
sam [Wed, 17 Dec 2008 22:07:44 +0000 (22:07 +0000)]
gone

15 years agofparseln is in libutil
sam [Wed, 17 Dec 2008 22:03:31 +0000 (22:03 +0000)]
fparseln is in libutil

15 years agogetmode+setmode are in libc, remove
sam [Wed, 17 Dec 2008 21:55:51 +0000 (21:55 +0000)]
getmode+setmode are in libc, remove