marius [Thu, 2 Nov 2006 00:01:15 +0000 (00:01 +0000)]
- In sunkbd_probe_keyboard() don't bother to determine the keyboard layout
as we have no use for that info. Instead let this function return the
keyboard ID and verify at its invocation in sunkbd_configure() that we're
talking to a Sun type 4/5/6 keyboard, i.e. a keyboard supported by this
driver.
- Add an option SUNKBD_EMULATE_ATKBD whose code is based on the respective
code in ukbd(4) and like UKBD_EMULATE_ATSCANCODE causes this driver to
emit AT keyboard/KB_101 compatible scan codes in K_RAW mode as assumed by
kbdmux(4). Unlike UKBD_EMULATE_ATSCANCODE, SUNKBD_EMULATE_ATKBD also
triggers the use of AT keyboard maps and thus allows to use the map files
in share/syscons/keymaps with this driver at the cost of an additional
translation (in ukbd(4) this just is the way of operation).
- Implement an option SUNKBD_DFLT_KEYMAP, which like the equivalent options
of the other keyboard drivers allows to specify the default in-kernel
keyboard map. For obvious reasons this made to only work when also using
SUNKBD_EMULATE_ATKBD.
- Implement sunkbd_check(), sunkbd_check_char() and sunkbd_clear_state(),
which are also required for interoperability with kbdmux(4).
- Implement K_CODE mode and FreeBSD keypad compose.
- As a minor hack define KBD_DFLT_KEYMAP also in the !SUNKBD_EMULATE_ATKBD
case so we can obtain fkey_tab from <dev/kbd/kbdtables.h> rather than
having to duplicate it and #ifdef some more code.
- Don't use the TX-buffer for writing the two command bytes for setting the
keyboard LEDs as this consequently requires a hardware FIFO that is at
least two bytes in depth, which the NMOS-variant of the Zilog SCCs doesn't
have. Thus use an inlined version of uart_putc() to consecutively write
the command bytes (a cleaner approach would be to do this via the soft
interrupt handler but that variant wouldn't work while in ddb(4)). [1]
- Fix some minor style(9) bugs.
pjd [Wed, 1 Nov 2006 22:51:49 +0000 (22:51 +0000)]
Now, that we have gjournal in the tree add possibility to configure
gmirror and graid3 in a way that it is not resynchronized after a
power failure or system crash.
It is safe when gjournal is running on top of gmirror/graid3.
jhb [Wed, 1 Nov 2006 15:36:47 +0000 (15:36 +0000)]
Fix botch in last commit (I tested on 6.x which doesn't have TSO):
- Test the mac_type rather than if_hwassist (since ifp doesn't exist yet)
to determine if the adapter supports TSO and thus to change the sizes
for the bus_dma tag.
cognet [Wed, 1 Nov 2006 12:41:43 +0000 (12:41 +0000)]
Do not include both <sys/types.h> and <sys/param.h>, it is a style bug as
sys/types.h is included in sys/param.h, so instead just move the
#include <sys/param.h> before the headers that need it.
pjd [Wed, 1 Nov 2006 09:37:11 +0000 (09:37 +0000)]
Update the code to the current sync(2) version:
- Do not modify mnt_flag without mount interlock held.
- Do not touch MNT_ASYNC flag, as this can lead to a race with nmount(2).
thompsa [Wed, 1 Nov 2006 09:07:47 +0000 (09:07 +0000)]
Bring in support for the Rapid Spanning Tree Protocol (802.1w).
RSTP provides faster spanning tree convergence, the protocol will exchange
information with neighboring switches to quickly transition to forwarding
without creating loops. The code will default to RSTP mode but will downgrade
any port connected to a legacy STP network so is fully backward compatible.
When building an upgraded make, don't worry about processing it for
use with DTrace because the normal buildworld will do that when the
tools are built.
Add a build option to support WITH_CDDL and WITHOUT_CDDL, defaulting
to WITH_CDDL.
This option enables building code that is licensed under Sun's CDDL.
The DTrace code is licensed that way, so by default it will get built
unless the WITHOUT_CDDL option is used.
There is another build toggle, NO_CTF, which turns off execution of
ctfconvert and ctfmerge in sys.mk, but this can't be implemented as
WITH_/WITHOUT because bsd.own.mk isn't included in all Makefiles and
sys.mk is included automatically by make.
Add a cnputs() function to write a string to the console with
a lock to prevent interspersed strings written from different CPUs
at the same time.
To avoid putting a buffer on the stack or having to malloc one,
space is incorporated in the per-cpu structure. The buffer
size if 128 bytes; chosen because it's the next power of 2 size
up from 80 characters.
String writes to the console are buffered up the end of the line
or until the buffer fills. Then the buffer is flushed to all
console devices.
Existing low level console output via cnputc() is unaffected by
this change. ithread calls to log() are also unaffected to avoid
blocking those threads.
A minor change to the behaviour in a panic situation is that
console output will still be buffered, but won't be written to
a tty as before. This should prevent interspersed panic output
as a number of CPUs panic before we end up single threaded
running ddb.
pjd [Tue, 31 Oct 2006 22:06:56 +0000 (22:06 +0000)]
Implements gjournal support. If file system has gjournal support enabled
and -p flag was given perform fast file system checking (bascially only
garbage collecting of orphaned objects).
Rename bread() to blread() and bwrite() to blwrite() as we now link to
the libufs library, which also implement functions with that names.
pjd [Tue, 31 Oct 2006 21:52:28 +0000 (21:52 +0000)]
Add -J flag to both newfs(8) and tunefs(8) which allows to enable gjournal
support.
I left -j flag for UFS journal implementation which we may gain at some
point.
pjd [Tue, 31 Oct 2006 21:48:54 +0000 (21:48 +0000)]
Add gjournal specific code to the UFS file system:
- Add FS_GJOURNAL flag which enables gjournal support on a file system.
- Add cg_unrefs field to the cylinder group structure which holds
number of unreferenced (orphaned) inodes in the given cylinder group.
- Add fs_unrefs field to the super block structure which holds
total number of unreferenced (orphaned) inodes.
- When file or a directory is orphaned (last reference is removed, but
object is still open), increase fs_unrefs and cg_unrefs fields,
which is a hint for fsck in which cylinder groups looks for such
(orphaned) objects.
- When file is last closed, decrease {fs,cg}_unrefs fields.
- Add VV_DELETED vnode flag which points at orphaned objects.
pjd [Tue, 31 Oct 2006 21:38:51 +0000 (21:38 +0000)]
Add MNT_GJOURNAL flag which indicates, that file system has gjournal
support enabled.
Add mnt_gjprovider field which keeps gjournal provider's name on which
file system is placed on. This allows to not place file system on gjournal
directly and allows gjournal class to pair gjournal provider with file
system.
pjd [Tue, 31 Oct 2006 21:31:00 +0000 (21:31 +0000)]
Add gjournal GEOM class (kernel side), which implements block level
journaling and can be tought about marking file system as clean before
doing journal switch, which easly allows to add journaling to file
systems that don't have this feature.
pjd [Tue, 31 Oct 2006 21:11:21 +0000 (21:11 +0000)]
Add a new I/O request - BIO_FLUSH, which basically tells providers below to
flush their caches. For now will mostly be used by disks to flush their
write cache.
mohans [Tue, 31 Oct 2006 20:25:37 +0000 (20:25 +0000)]
Make EWOULDBLOCK a recoverable error so that the request is retransmitted.
This bug results in data corruption with NFS/TCP. Writes are silently dropped
on EWOULDBLOCK (because socket send buffer is full and sockbuf timer fires).
jhb [Tue, 31 Oct 2006 17:21:14 +0000 (17:21 +0000)]
Allocate receive and transmit data structures during attach() and free them
during detach() similar to other NIC drivers rather than allocating them
during init() and freeing them during stop():
- Move creation of tx bus_dma tag amd maps and tx_buffer_area from
em_setup_transmit_structures() to em_allocate_transmit_structures().
- Call em_allocate_xxx_structures() in em_attach().
- Only call em_free_xxx_structures() in em_detach().
- Change em_setup_xxx_structures() to free any existing tx or rx buffers
and in the case of rx repopulate the ring with newer buffers.
jhb [Tue, 31 Oct 2006 17:05:02 +0000 (17:05 +0000)]
- Use callout_init_mtx() to close various callout-related races.
- Drain the two timers in detach.
- Check IFF_DRV_RUNNING in the link task and bail w/o doing anything if
it is clear.
glebius [Tue, 31 Oct 2006 16:19:21 +0000 (16:19 +0000)]
Rework the transmit register handling. In em_encap() store index of
the EOP descriptor in the first descriptor of the packet. And then
in em_txeof() search for DD bits set only in the EOP descriptors,
embedding the cleanup of all packet's descriptors into inner loop.
This change is important for future chips, where DD bit is going
to be set only on the EOP descriptors.
glebius [Tue, 31 Oct 2006 15:00:14 +0000 (15:00 +0000)]
Merge new vendor release - 6.2.9.
Details:
o if_em.c changes:
- Added several new PCI ids.
- Check em_check_phy_reset_block() before doing SIOCSIFMEDIA ioctl.
- Don't touch TARC registers, they are now handled in shared
code in if_em_hw.c.
- Move RDH and RDT setting to the end of
em_initialize_receive_unit().
- Declare em_read_pcie_cap_reg(), now empty.
o if_em_hw.c dropped in from vendor, then restored rev. 1.15.
o if_em_hw.h dropped in from vendor, then modified:
- Added RX overrun interrupt flag to interrupt enable mask.
- Remove declarations of em_io_read(), em_io_write().
harti [Tue, 31 Oct 2006 10:23:28 +0000 (10:23 +0000)]
Bind to INADDR_ANY in the default configuration. This makes bsnmpd(1)
automatically work on multi-homed hosts and without explicite specification
of the hostname in the config file.
harti [Tue, 31 Oct 2006 10:09:10 +0000 (10:09 +0000)]
Define a base OID for the FreeBSD version as returned in sysObjectID
by bsnmpd(1). The actual OID is formed by appending the release numbers
to this base OID.
harti [Tue, 31 Oct 2006 09:00:35 +0000 (09:00 +0000)]
Vendor patch: synthesize the initial value for sysObjectId from the value
of uname -r in FreeBSD. This value can be overwritten in the configuration
file.
mjacob [Tue, 31 Oct 2006 05:53:29 +0000 (05:53 +0000)]
The first of 3 major steps to move the CAM layer forward to using
the CAM_NEW_TRAN_CODE that has been in the tree for some years now.
This first step consists solely of adding to or correcting
CAM_NEW_TRAN_CODE pieces in the kernel source tree such
that a both a GENERIC (at least on i386) and a LINT build
with CAM_NEW_TRAN_CODE as an option will compile correctly
and run (at least with some the h/w I have).
After a short settle time, the other pieces (making
CAM_NEW_TRAN_CODE the default and updating libcam
and camcontrol) will be brought in.
This will be an incompatible change in that the size of structures
related to XPT_PATH_INQ and XPT_{GET,SET}_TRAN_SETTINGS change
in both size and content. However, basic system operation and
basic system utilities work well enough with this change.
Reviewed by: freebsd-scsi and specific stakeholders
delphij [Tue, 31 Oct 2006 02:22:36 +0000 (02:22 +0000)]
Correct a security issue introduced in previous commit:
instead of removing the file and issue a warning about
the removal, do not do any operation at all in case -P
is specified when the dinode has hard links.
With -f and -P specified together, we assume that the
user wants rm to overwrite the contents of the file
and remove it (destroy the contents of file but leave
its hard links as is).
The reason of doing it this way is that, in case where
a hard link is created by a malicious user (currently
this is permitted even if the user has no access to the
file). Losing the link can potentially mean that the
actual owner would lose control completely to the user
who wants to obtain access in a future day.
markus [Tue, 31 Oct 2006 00:26:58 +0000 (00:26 +0000)]
- Add a 'verbose' switch -v
- Only dump items that are being used for padding when being verbose. This
brings bthidcontrol in line with the behaviour of usbhidctl(1).
- Update the manpage accordingly
imp [Mon, 30 Oct 2006 22:46:33 +0000 (22:46 +0000)]
Assign start to the value we were able to allocate and use that to
write out the BAR. Otherwise, we were trying to shift a 32-bit
quantity on 32-bit platforms. Also, 'start' check sanity to where it
is known.
marius [Mon, 30 Oct 2006 21:50:11 +0000 (21:50 +0000)]
In the replacement text of the __bswapN_const() macros encapsulate the
argument in parentheses so these macros are safe to use and invocations
with an expression as the argument like __bswap32_const(42 << 23 | 13)
work as expected. Additionally, mask all the individually shifted bytes
as appropriate so the bytes which exceed the width of the respective
__bswapN_const() macro in invocations like __bswap16_const(0xdead600d)
are ignored like it's the case with the corresponding __bswapN_var()
function.
julian [Mon, 30 Oct 2006 19:50:01 +0000 (19:50 +0000)]
Add configuration stubs for adding package derived files to the various
sample configurations.
Submitted by Jeremie Le Hen and tested by Jean Milanez Melo.
imp [Mon, 30 Oct 2006 19:18:46 +0000 (19:18 +0000)]
More fully support 64-bit bars. Prior to this commit, we supported
only those bars that had addresses assigned by the BIOS and where the
bridges were properly programmed. Now even unprogrammed ones work.
This was needed for sun4v. We still only implement up to 2GB memory
ranges, even for 64-bit bars. PCI standards at least through 2.2 say
that this is the max (or 1GB is, I only know it is < 32bits).
o Always define pci_addr_t as uint64_t. A pci address is always 64-bits,
but some hosts can't address all of them.
o Preserve the upper half of the 64-bit word during resource probing.
o Test to make sure that 64-bit values can fit in a u_long (true on some
platforms, but not others). Don't use those that can't.
o minor pedantry about data sizes.
o Better bridge resource reporting in bootverbose case.
o Minor formatting changes to cope with different data types on different
platforms.
Submitted by: jmg, with many changes by me to fully support 64-bit
addresses.
takawata [Mon, 30 Oct 2006 05:38:48 +0000 (05:38 +0000)]
Driver for some ASUS desktop motherboard extras.
Though it is named after overclocking tool for ASUS motherboards,
it is not capable to change clock ratio or CPU core voltage.
This driver exports Templature, Power output voltage, Fan RPM under
dev.acpi_aiboost.0.*.
Descriptions for these values are set to sysctl describe, which can be
get by sysctl -d.
delphij [Mon, 30 Oct 2006 03:32:09 +0000 (03:32 +0000)]
Be more reasonable when overwrite mode is specified while there
is hard links. Overwritting when links > 1 would cause data
loss, which is usually undesired.
Inspired by: discussion on -hackers@
Suggested by: elessar at bsdforen de
Obtained from: OpenBSD
marius [Mon, 30 Oct 2006 01:58:50 +0000 (01:58 +0000)]
Forced commit to denote that the third item of the previous commit
message should have read:
- Remove the hw.dc_quick SYSCTL, which allowed to turn off the above
mentioned optimization, as like the equivalent and already removed
hw.sis_quick it existed for testing purposes only.
marius [Sun, 29 Oct 2006 20:24:27 +0000 (20:24 +0000)]
- Wrap code optimized for architectures without alignment constraints
in #ifdef __NO_STRICT_ALIGNMENT rather than #ifdef __i386__. This
means that amd64 now also uses the optimized code. [1]
While at it, fix a nearby style(9) bug.
- Remove the hw.dc_quick SYSCTL, which allowed to turn off the above
mentioned optimization, as like the equivalent and already removed
- In dc_setcfg() suppress printing a warning when forcing the receiver
and transceiver to idle state times out for chips where the status
bits in question just never change (observed in detail with DM9102A)
and therefore the warning would be highly likely false positive. [2]
- In dc_ifmedia_sts() add a missing DC_UNLOCK().
marius [Sun, 29 Oct 2006 20:19:41 +0000 (20:19 +0000)]
Wrap code optimized for architectures without alignment constraints
in #ifdef __NO_STRICT_ALIGNMENT rather than #if defined(__i386__) ||
defined(__amd64__). Currently this change is cosmetic only though.
While at it, fix a nearby style(9) bug and remove a no longer used
header.