cperciva [Mon, 19 May 2008 18:38:01 +0000 (18:38 +0000)]
Detect if argv[1] is "" and avoid calling malloc(0). Prior to this commit,
running 'tar ""' would print 'No memory' instead of the correct error
message, 'Must specify one of -c, -r, -t, -u, -x' if malloc is set to
System V mode (malloc(0) == NULL).
cperciva [Mon, 19 May 2008 18:09:26 +0000 (18:09 +0000)]
There's no way for entry to possibly be NULL at the end of write_entry
(in fact, there has never been any way for it to be NULL, going all the
way back to revision 1.1 of this file), so remove the check and
unconditionally free entry.
yongari [Mon, 19 May 2008 01:39:59 +0000 (01:39 +0000)]
Add age(4), a driver for Attansic/Atheros L1 gigabit ethernet
controller. L1 has several threshold/timer registers and they
seem to require careful tuned parameters to get best
performance. Datasheet for L1 is not available to open source
driver writers so age(4) focus on stability and correctness of
basic Tx/Rx operation. ATM the performance of age(4) is far from
optimal which in turn means there are mis-programmed registers or
incorrectly configured registers.
Currently age(4) supports all known hardware assistance including
- MSI support.
- TCP Segmentation Offload.
- Hardware VLAN tag insertion/stripping.
- TCP/UDP checksum offload.
- Interrupt moderation.
- Hardware statistics counter support.
- Jumbo frame support.
- WOL support.
L1 gigabit ethernet controller is mainly found on ASUS
motherboards. Note, it seems that there are other variants of
hardware as known as L2(Fast ethernet) and newer gigabit ethernet
(AR81xx) from Atheros. These are not supported by age(4) and
requires a seperate driver. Big thanks to all people who reported
feedback or tested patches.
Tested by: kevlo, bsam, Francois Ranchin < fyr AT fyrou DOT net >
Thomas Nystroem < thn AT saeab DOT se >
Roman Pogosyan < asternetadmin AT gmail DOT com >
Derek Tattersal < dlt AT mebtel DOT net >
Oliver Seitz < karlkiste AT yahoo DOT com >
pjd [Sun, 18 May 2008 22:50:50 +0000 (22:50 +0000)]
- Assert that we don't send new provider event for a provider which has
G_PF_WITHER flag set.
- Fix typo in assertion condition (sorry, but I forgot who report that).
jb [Sun, 18 May 2008 22:11:47 +0000 (22:11 +0000)]
Remove some DTrace hook definitions that are now in dtrace_bsd.h
which contains all the hook definitions rather than splattering
them all over the header files.
The definitions are only valid when the KDTRACE_HOOKS kernel
option is defined, so other kernel sources have no need to
see them.
jb [Sun, 18 May 2008 19:43:52 +0000 (19:43 +0000)]
Add support for the DTrace struct proc and struct thread extended
data via ctor and dtor event handlers.
The size of the extra data is allocated opaquely and this file
contains a function which the dtrace module can call to check
that the kernel supports at least the amount of data that it needs.
This file is optionally compiled into nthe kernel if the KDTRACE_HOOKS
kernel option is defined.
jb [Sun, 18 May 2008 19:32:36 +0000 (19:32 +0000)]
Add kernel support for the Statically Defined Trace provider.
This is BSD licensed code written specifically for FreeBSD.
It initialises using SYSINIT so that the SDT provider, probe and
argument description linkage is done whenever a module is loaded,
regardless of whether the DTrace modules are loaded or not.
This file is optionally compiled into the kernel if the KDTRACE_HOOKS
option is defined.
jb [Sun, 18 May 2008 19:28:51 +0000 (19:28 +0000)]
Add two kernel options:
- KDTRACE_HOOKS for the shim layer of hooks which separate BSD licensed
code from CDDL code.
- DDB_CTF for the code that parses the CTF (compact C type format)
data for use by the DTrace Function Boundary Trace
provider and (possibly) ddb if we plan to do that.
rpaulo [Sun, 18 May 2008 13:55:51 +0000 (13:55 +0000)]
devctl_process_running(): Check for devsoftc.inuse == 1 instead of
devsoftc.async_proc != NULL because the latter might not be true
sometimes.
This way /etc/rc.suspend gets executed.
Reviwed by: njl
Submitted by: Mitsuru IWASAKI <iwasaki at jp.FreeBSD.org>
Tested also by: Andreas Wetzel <mickey242 at gmx.net>
MFC after: 1 week
cperciva [Sun, 18 May 2008 06:24:47 +0000 (06:24 +0000)]
Add SIGINFO (and for portability to SIGINFO-lacking systems, SIGUSR1)
handling to bsdtar. When writing archives (including copying via the
@archive directive) a line is output to stderr indicating what is being
done (adding or copying), the path, and how far through the file we are;
extracting currently does not report progress within each file, but
this is likely to happen eventually.
alc [Sat, 17 May 2008 19:32:48 +0000 (19:32 +0000)]
In order to map device memory using superpages, mmap(2) must find a
superpage-aligned virtual address for the mapping. Revision 1.65
implemented an overly simplistic and generally ineffectual method for
finding a superpage-aligned virtual address. Specifically, it rounds
the virtual address corresponding to the end of the data segment up to
the next superpage-aligned virtual address. If this virtual address
is unallocated, then the device will be mapped using superpages.
Unfortunately, in modern times, where applications like the X server
dynamically load much of their code, this virtual address is already
allocated. In such cases, mmap(2) simply uses the first available
virtual address, which is not necessarily superpage aligned.
This revision changes mmap(2) to use a more robust method,
specifically, the VMFS_ALIGNED_SPACE option that is now implemented by
vm_map_find().
alc [Sat, 17 May 2008 16:26:34 +0000 (16:26 +0000)]
Preset a device object's alignment ("pg_color") based upon the
physical address of the device's memory. This enables
pmap_align_superpage() to propose a virtual address for mapping the
device memory that permits the use of superpage mappings.
cperciva [Sat, 17 May 2008 15:55:29 +0000 (15:55 +0000)]
Add --keep-newer-files option (as in GNU tar: When in -x mode, ignore
files if the existing file is newer than the archive entry).
Currently if any files are ignored, bsdtar will exit with a non-zero
exit status; this is likely to change in the future, but requires some
API changes in libarchive.
brooks [Sat, 17 May 2008 03:38:13 +0000 (03:38 +0000)]
The if_check() function performed three actions:
- verified that the ifp->if_snd.ifq_mtx was initalized for
all attached interfaces. This was pointless because it was
initalized for all interfaces in if_attach() so I've removed it.
- Checked that ifp->if_snd.ifq_maxlen is initalized and set it to
ifqmaxlen if unset. This makes more sense in if_attach() so
I moved it there.
- The first call of if_slowtimo(). Delete if_check() and call
if_slowtimo() directly from the SYSINIT().
jb [Sat, 17 May 2008 02:14:19 +0000 (02:14 +0000)]
Add the statically defined tracing header.
Note that this implementation differs from the one in OpenSolaris, so
it is BSD licensed and can be included anywhere.
The kernel definitions defined here are dependent on the kernel option
KDTRACE_HOOKS so that macros added to the sources are pre-processed
out completely when the DTrace kernel hooks aren't compiled in.
markus [Fri, 16 May 2008 22:31:17 +0000 (22:31 +0000)]
Fix and speedup timestamp calculations which is roughly based on the patch in
the mentioned PR:
- bounds check time->month as it is used as an array index
- fix usage of time->month as array index (month is 1-12)
- fix calculation based on time->day (day is 1-31)
- fix the speedup code as it doesn't calculate correct timestamps before
the year 2000 and reduce the number of calculation in the year-by-year code
- speedup month calculations by replacing the array content with cumulative
values
- add microseconds calculation
- fix an endian problem
jfv [Fri, 16 May 2008 18:46:30 +0000 (18:46 +0000)]
This is driver version 1.4.4 of the Intel ixgbe driver.
-It has new hardware support
-It uses a new method of TX cleanup called Head Write Back
-It includes the provisional generic TCP LRO feature contributed
by Myricom and made general purpose by me. This should move into
the stack upon approval but for this driver drop its in here.
-Also bug fixes and etc...
jhb [Fri, 16 May 2008 15:34:06 +0000 (15:34 +0000)]
Teach truss about 32-bit FreeBSD and Linux binaries on amd64. Some
additional work is needed to handle ABI-specific syscall argument parsing,
but this gets the basic tracing working.
marcel [Fri, 16 May 2008 14:57:48 +0000 (14:57 +0000)]
Fix RID calculation. The RID is really the BAR for PCI cards,
so the index needs to be translated into an offset. While we
did add the offset (0x10), we forgot to account for the width.
marius [Thu, 15 May 2008 20:27:18 +0000 (20:27 +0000)]
- Const'ify firmware and lookup-tables.
- Obsolete redundant inst_name and unit members of struct sym_hcb.
- Fix three more NULL vs. 0 confusions.
- Use device_set_softc(9) to tell the bus layer that this driver
allocates a instance of struct sym_hcb itself.
attilio [Thu, 15 May 2008 20:10:06 +0000 (20:10 +0000)]
- Embed the recursion counter for any locking primitive directly in the
lock_object, using an unified field called lo_data.
- Replace lo_type usage with the w_name usage and at init time pass the
lock "type" directly to witness_init() from the parent lock init
function. Handle delayed initialization before than
witness_initialize() is called through the witness_pendhelp structure.
- Axe out LO_ENROLLPEND as it is not really needed. The case where the
mutex init delayed wants to be destroyed can't happen because
witness_destroy() checks for witness_cold and panic in case.
- In enroll(), if we cannot allocate a new object from the freelist,
notify that to userspace through a printf().
- Modify the depart function in order to return nothing as in the current
CVS version it always returns true and adjust callers accordingly.
- Fix the witness_addgraph() argument name prototype.
- Remove unuseful code from itismychild().
This commit leads to a shrinked struct lock_object and so smaller locks,
in particular on amd64 where 2 uintptr_t (16 bytes per-primitive) are
gained.
alc [Thu, 15 May 2008 18:52:31 +0000 (18:52 +0000)]
Don't call vm_reserv_alloc_page() on device-backed objects. Otherwise, the
system may panic because there is no reservation structure corresponding to
the physical address of the device memory.
philip [Thu, 15 May 2008 15:05:02 +0000 (15:05 +0000)]
Improve the virtual scrolling mechanism to make middle clicking less
difficult. Add a -L option (yet another option, indeed!) which changes the
speed of scrolling and change -U to only affect the scroll threshold.
This should make middle-clicking a much more pleasant experience.
bms [Thu, 15 May 2008 11:00:23 +0000 (11:00 +0000)]
Add support for /conf/T/M/remount_optional.
The rc.initdiskless functionality is used by NanoBSD to allow configuration
files to live on a separate configuration slice, which acts as NVRAM, whilst
the system image is mounted read-only.
Normally, if the remount command fails during boot, this is regarded as
a fatal error. If /conf/T/M/remount_optional is present, this error is
non-fatal. If the file is not present, the default behaviour is unchanged.
This is very useful for people building live CD images using FreeBSD,
where the NVRAM lives somewhere completely differently from the system image,
and may be present on removable media which is not present during the
initial boot.
weongyo [Thu, 15 May 2008 04:29:28 +0000 (04:29 +0000)]
Fix a panic when it occurred during initializing the ndis driver because
it try to read network address through ifnet structure which is NULL
until the ndis driver's initialization is finished.
jhb [Thu, 15 May 2008 03:07:34 +0000 (03:07 +0000)]
Go back to using the process command name (p_comm) for the file name and
command line arguments stored in the note at the beginning of a core dump
instead of the current thread name.
brooks [Thu, 15 May 2008 01:06:10 +0000 (01:06 +0000)]
Change the default value of synchronous_dhclient to NO.
To preserve the existing behavior of etc/rc.d/netif, add code to wait
up to if_up_delay seconds (30 seconds by default) for a default route to
be configured if there are any dhcp interfaces. This should be extended
to test that the interface is actually up.
marius [Wed, 14 May 2008 21:00:27 +0000 (21:00 +0000)]
Improve the integration of BCM5906[M] support:
- Rename BGE_FLAG_EEPROM to BGE_FLAG_EADDR to underline it's absence means
"there's no chip containing an Ethernet address fitted to the BGE chip
so we have to get it from the firmware instead" rather than "there's no
EEPROM, but maybe NVRAM or something else".
- Don't treat BCM5906[M] generally like chips w/o BGE_FLAG_EADDR set, just
in the two cases really necessary. This gets us line with the original
patch for DragonFlyBSD.
- For sparc64 restore the intended behavior of obtaining the Ethernet
address from the firmware in case BGE_FLAG_EADDR is not set, even for
BCM5906[M].
- Fix some style(9) bugs introduced with rev. 1.208 of if_bge.c
Approved by: jhb
Additional testing by: Thomas Nystroem (BCM5906)
emax [Wed, 14 May 2008 16:47:30 +0000 (16:47 +0000)]
Make -t <tty> optional in server mode. If not specified use stdin/stdout.
Document this. Do not require channel number in server mode. If not
specified - bind to ''wildcard'' channel zero. Real channel number will
be obtained automatically and registered with local sdpd(8). While I'm
here fix serial port service registration.
Submitted by: luigi
Tested by: Helge Oldach <freebsd-bluetooth at oldach dot net>
MFC after: 3 days