dougb [Mon, 2 Jun 2008 20:54:45 +0000 (20:54 +0000)]
Add proper mime-types for files that they are relevant for.
This is useful for things like *.pdf files that svn needs
to know about, and will probably be useful down the road
for other things.
- Remove unused members related to bus addresses in struct sym_hcb.
- sym(4) takes care of allocating an instance of struct sym_hcb
itself so don't let newbus allocate it as an unused softc also.
- 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.
marius [Fri, 30 May 2008 19:59:38 +0000 (19:59 +0000)]
MFC: 1.56; 1.57; 1.58; 1.63; 1.66; 1.68
- Fix -Wundef.
- FreeBSD has had endian conversion macros for a long time. Axe the custom
macros in this driver.
- Fix typo in comment.
- Fix various compilation warnings for gcc-4.2.
- Use NULL instead of 0 for pointers.
- Remove superfluous returns in functions returning void.
- In sym_alloc_lcb_tags() return directly instead of jumping
to a label which just returns.
- Fix some spelling in comments.
- Remove trailing whitespace.
emax [Fri, 30 May 2008 00:42:50 +0000 (00:42 +0000)]
MFC:
Bluetooth SIG is being difficult and keep moving specification
documents away from being public accessible. Replace link to
the Bluetooth specification document with the document name.
Pointed out by: SoftLover < slserg at uic dot tula dot ru >
antoine [Tue, 27 May 2008 18:33:17 +0000 (18:33 +0000)]
MFC to RELENG_6:
Move "1000baseT" from IFM_SUBTYPE_ETHERNET_DESCRIPTIONS to
IFM_SUBTYPE_ETHERNET_ALIASES: there is already "1000baseTX" in
IFM_SUBTYPE_ETHERNET_DESCRIPTIONS. This doesn't change ifconfig
behaviour.
mckusick [Fri, 23 May 2008 18:08:32 +0000 (18:08 +0000)]
MFC of an update to the dump program to save extended attributes
and an update to the restore program to restore all dumped extended
attributes. The affected files and the version being MFC'ed:
Note that this code will not compile until these header
files have been updated: <protocols/dumprestore.h> and
<sys/extattr.h>. This should happen in the course of doing
a normal `buildworld'.
dwmalone [Tue, 20 May 2008 11:32:03 +0000 (11:32 +0000)]
MFC:
Dummynet has a limit of 100 slots queue size (or 1MB, if you give
the limit in bytes) hard coded into both the kernel and userland.
Make both these limits a sysctl, so it is easy to change the limit.
dwmalone [Tue, 20 May 2008 11:17:51 +0000 (11:17 +0000)]
MFC:
If we are walking the IPv6 header chain and we hit an IPPROTO_NONE
header, then don't try to pullup anything, because there is no next
header if we hit IPPROTO_NONE. Set ulp to a non-NULL value so the
search for an upper layer header terinates.
philip [Tue, 20 May 2008 10:53:58 +0000 (10:53 +0000)]
MFC: moused.c rev 1.84
moused.8 rev 1.62
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.
dwmalone [Tue, 20 May 2008 10:51:27 +0000 (10:51 +0000)]
Sync with -current:
- ability to traceroute with packets with no upper layer header.
- clean __P use.
- place each router entry on its own line.
- get ipsec.h from netipsec directory.
- Use the name returned by device_get_nameunit(9) for the name of the
counter-timer timecounter so the associated SYSCTL nodes don't clash on
machines having multiple U2P and U2S bridges as well as establishing a
clear mapping between these bridges and their timecounter device.
- Don't bother setting up a "nice" name for the IOMMU, just use the name
returned by device_get_nameunit(9), too.
- Correct a typo in sbus_alloc_resource() which caused (pass-through)
allocations to only work down to the grandchildren of the bus, which
wasn't a real problem so far as we don't support any devices which are
great-grandchildren or greater of a U2S bridge, yet.
- Fix some minor style(9) bugs.
- Use __FBSDID in counter.c and iommu.c.
emax [Mon, 19 May 2008 16:46:42 +0000 (16:46 +0000)]
MFC:
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>
kib [Mon, 19 May 2008 11:50:48 +0000 (11:50 +0000)]
MFC
rev. 1.15 of lib/libc/gen/readdir.c
rev. 1.11 of lib/libc/gen/telldir.c
rev. 1.3 of lib/libc/gen/telldir.h
Do not read away the target directory entry when encountering deleted
files after a seekdir().
The seekdir shall set the position for the next readdir operation.
When the _readdir_unlocked() encounters deleted entry, dd_loc is
already advanced. Continuing the loop leads to premature read of
the target entry.
Submitted by: Marc Balmer <mbalmer at openbsd org>
Obtained from: OpenBSD
flz [Mon, 19 May 2008 09:21:24 +0000 (09:21 +0000)]
MFC: Don't require a configuration file. Ntpd will be perfectly happy if there's
none or if the file doesn't exist (there's no ntp.conf in the base install).
kib [Sat, 17 May 2008 12:46:24 +0000 (12:46 +0000)]
MFC the MPSAFE quotas.
kern/vfs_syscalls.c rev. 1.433:
Busy filesystem around call of VFS_QUOTACTL() vfs op.
ufs/ffs/ffs_softdep.c remaining parts of the rev. 1.206 after 1.181.2.24:
Replace unconditional acquision of Giant when QUOTAS are defined with
VFS_LOCK_GIANT(NULL) call.
ufs/ffs/ffs_vfsops.c rev. 1.327, 1.328
rev. 1.327: Implement fine-grained locking for UFS quotas.
rev. 1.328: Mark UFS as being MP-Safe in "options QUOTA" case too.
ufs/ufs/quota.h remaining parts of the rev. 1.30 after 1.27.2.3:
Implement fine-grained locking for UFS quotas.
ufs/ufs/ufs_lookup.c rev. 1.83:
Call getinoquota() before allocating new block for the directory to properly
account for block allocation.
ufs/ufs/ufs_quota.c rev. 1.93:
Implement fine-grained locking for UFS quotas.
ufs/ufs/ufs_vnops.c rev. 1.289:
Remove unneeded getinoquota() call in the ufs_access().
mav [Sat, 17 May 2008 08:45:58 +0000 (08:45 +0000)]
MFC rev. 1.158
Use separate UMA zone for data items allocation. It is a partial
rev. 1.149 rework.
It allows to save several percents of CPU time on SMP by using UMA's
internal per-CPU allocation limits instead of own global variable
each time updated with atomics.
Also it restores NG_WAITOK flag processing.
remko [Sat, 17 May 2008 01:29:44 +0000 (01:29 +0000)]
MFC rev 1.32 and rev 1.33 termios.4
The first of thirteen patches by Ed that resolves a documentation
issue in termios.4, ttydefaults.h does not exist in /usr/include
but in /usr/include/sys.
MFC after: 3 days
Submitted by: Ed Schouten (ed at 80386 dot nl)
kib [Fri, 16 May 2008 11:41:50 +0000 (11:41 +0000)]
MFC part of the rev. 1.210, and the rev. 1.211.
In the giant_XXX wrappers for the device methods of the D_NEEDGIANT
drivers, do not dereference the cdev->si_devsw. It is racing with
the destroy_devl() clearing of the si_devsw. Instead, use the
dev_refthread() and return ENXIO for the destroyed device.
kib [Fri, 16 May 2008 10:35:16 +0000 (10:35 +0000)]
MFC rev. 1.24 of the sys/fs/devfs/devfs_rule.c,
rev. 1.218 of the sys/vm/vm_mmap.c
Do not dereference cdev->si_cdevsw, use the dev_refthread() to properly
obtain the reference. In particular, this fixes the panic reported in
the PR. Remove the comments stating that this needs to be done.
kib [Fri, 16 May 2008 10:32:52 +0000 (10:32 +0000)]
MFC rev. 1.320:
The wakeup() line from the rev. 1.319 is wrong and reintroduces
a panic race on module unload. The wakeup() is internal to
kproc_exit/kthread_exit. The correct fix is to fix the msleep() in
detach to sleep on fdc->fdc_thread instead of &fdc->fdc_thread.
MFC rev. 1.319:
Wakeup the thread doing the fdc_detach() when the fdc worker thread exits [1].
Write access to the write-protected floppy shall call device_unbusy() to
pair the device_busy() in the fd_access() [2].
brooks [Thu, 15 May 2008 01:59:20 +0000 (01:59 +0000)]
MFC rev 1.8: When sending packets directly to the DHCP server, use a socket
and send directly rather than bogusly sending it out as a link layer
broadcast (which fails to be received on some networks).
brooks [Thu, 15 May 2008 01:53:46 +0000 (01:53 +0000)]
MFC: Add very limited support for the isc-dhclient. It will almostly certaintly
only work if there's just one interface doing dhcp. This version implements
the same logic as the version in the PR, but uses pgrep to be less verbose.
marius [Wed, 14 May 2008 21:22:17 +0000 (21:22 +0000)]
MFC: 1.206 (partial)
Use more appropriate maxsize, nsegments and maxsegsize parameters
when creating the parent bus DMA tag. While at it correct the style
and a nearby comment.
mtm [Mon, 12 May 2008 07:37:40 +0000 (07:37 +0000)]
MFC:
o Change the warning dialog for the 'W' command in both the label
and partition editors to reflect the fact that this is a stand-alone
application, not sysinstall(8).
o Change an instance of sade(8) refering to itself as sysinstall(8) in
a confirmation dialog.
dfr [Sun, 11 May 2008 08:53:55 +0000 (08:53 +0000)]
MFC kern_lockf.c revision 1.64:
When blocking on an F_FLOCK style lock request which is upgrading a
shared lock to exclusive, drop the shared lock before deadlock
detection.
jhb [Fri, 9 May 2008 18:47:10 +0000 (18:47 +0000)]
MFC: Rework how kgdb manages kernel and vmcore files to be a bit more
gdb-ish. Specifically, you can now use the 'file' and 'core' commands.
Also, the kernel module stuff now works for remote targets.
mtm [Tue, 6 May 2008 09:45:40 +0000 (09:45 +0000)]
MFC rev. 1.328:
date: 2008/03/06 14:01:10; author: mtm; state: Exp; lines: +1 -1
The rarpd(8) daemon must be instructed to start on all interfaces or a
specific one. Instruct it to listen on all interfaces so that enabling
it in rc.conf(5) works "out of the box."
MFC:
Have the man page catch up with the namespace pollution cleanup that
occurred between 2001-2003. Thanks to bde for the history lesson[1]
concerning sys/types.h and the many system calls that at one time
(pre-2001) were required by POSIX to include it.
Delay the global registration of the struct ifnet in if_alloc() until after
we're certain the allocation will entierly succeed. This fixes a leak in a
fairly unlikely case.
Reported by: vijay singh <vijjus at rocketmail dot com>
- Fix bugs where the value of arithmetic expansion$((...)) was trucated
to type int.
- Change the type used for arithmetic expansion to intmax_t (ie. 64 bit on all
currently supported FreeBSD architectures). SUSv3 requires at least type
long but allows for larger types. Other shells (eg. bash, zsh, NetBSD's sh)
do that too.
PR: 122659
Submitted by: Jaakko Heinonen (minor modifications by me)
- style(9) cleanup.
- dummynet_io() declaration has changed.
- Alter packet flow inside dummynet and introduce 'fast' mode of dummynet
operation: allow certain packets to bypass dummynet scheduler. Benefits are:
-- lower latency: if packet flow does not exceed pipe bandwidth, packets
will not be (up to tick) delayed (due to dummynet's scheduler granularity).
-- lower overhead: if packet avoids dummynet scheduler it shouldn't reenter
ip stack later. Such packets can be fastforwarded.
-- recursion (which can lead to kernel stack exhaution) eliminated. This fix
long existed panic, which can be triggered this way:
kldload dummynet
sysctl net.inet.ip.fw.one_pass=0
ipfw pipe 1 config bw 0
for i in `jot 30`; do ipfw add 1 pipe 1 icmp from any to any; done
ping -c 1 localhost
- New sysctl nodes:
net.inet.ip.dummynet.io_fast - enables 'fast' dummynet io
net.inet.ip.dummynet.io_pkt - packets passed to dummynet
net.inet.ip.dummynet.io_pkt_fast - packets avoided dummynet scheduler
net.inet.ip.dummynet.io_pkt_drop - packets dropped by dummynet
- Workaround p->numbytes overflow, which can result in infinite loop inside
dummynet module (prerequisite is using queues with "fat" pipe).
- Spelling fix for interupt -> interrupt
- Fix function prototype for device_shutdown method.
- Take advantage of bus_dmamap_load_mbuf_sg(9).
- Sync with other NIC drivers and prepend a TX mbuf if the first attempt
to load it fails with an error other than EFBIG and stop trying instead
of freeing it and keeping on trying to enqueue more mbufs. Also ensure
the driver queue isn't empty before trying to enqueue mbufs in order to
reduce locking operations.
- In xl_ifmedia_upd() add a missing XL_UNLOCK(). [1]
- Const'ify the xl_devs array.
- Remove an outdated comment.
antoine [Sun, 20 Apr 2008 16:32:20 +0000 (16:32 +0000)]
MFC to RELENG_6:
Merge changes from NetBSD on humanize_number.c, 1.8 -> 1.13
Significant changes:
- rev. 1.11: Use PRId64 instead of a cast to long long and %lld to print
an int64_t.
- rev. 1.12: Fix a bug that humanize_number() produces "1000" where it
should be "1.0G" or "1.0M". The bug reported by Greg Troxel.
MFC some small optimizations:
rev. 1.151: Remove impossible (hk_peer == NULL) check.
rev. 1.152: Remove ng_setisr() call from ng_dequeue().
rev. 1.153: There is no need to erase hook->hk_node before freeing hook.
rev. 1.154: Use new atomic_fetchadd() primitive instead of looping atomic_cmpset().
rev. 1.158: ng_address_hook() microoptimization.
MFC if_rl.c, rev 1.174 to RELENG_6.
It seems that RealTek 8129/8139 chip reports invalid length of
received frame under certain conditions. wpaul said the length
0xfff0 is special meaning that indicates hardware is in the
process of copying a packet into host memory. But it seems
there are other cases that hardware is busy or stuck in bad
situation even if the received frame length is not 0xfff0.
To work-around this condition, add a check that verifys that
recevied frame length is in valid range. If received length is out
of range reinitialize hardware to recover from stuck condition.