hselasky [Fri, 18 Feb 2011 07:37:30 +0000 (07:37 +0000)]
- Make an enum for all the umidi USB transfers.
- Use the USB stack's builtin clear-stall feature.
- Wrap some long lines.
- Use memcpy() instead of bcopy().
- Use memset() instead of bzero().
- Tested applications:
/usr/ports/audio/fluidsynth
yongari [Fri, 18 Feb 2011 03:37:53 +0000 (03:37 +0000)]
Remove use case of DC_TX_ONE. It was used to limit queue just 1 TX
frame in DM910x controllers. In r67595(more than 10 years ago) it
was replaced to use "Store and Forward" mode and made controller
generate TX completion interrupt for every frame.
yongari [Fri, 18 Feb 2011 02:58:09 +0000 (02:58 +0000)]
Apply special PHY initialization code for 21143 controllers before
any other media configuration. Otherwise some 21143 controller
cannot establish a link. While I'm here remove the PHY
initialization code in dc_setcfg(). Since dc_setcfg() is called
whenever link state is changed, having the PHY initialization code
in dc_setcfg() resulted in continuous link flips.
After driver resets SIA, use default SIA transmit/receive
configuration instead of disabling autosense/autonegotiation.
Otherwise, controller fails to establish a link as well as losing
auto-negotiation capability. For manual media configuration, always
configure 21143 controller with specified media to ensure media
change. This change makes ANA-6922 establish link with/without
auto-negotiation.
While I'm here be more strict on link UP/DOWN detection logic.
Many thanks to marius who fixed several bugs in initial patch and
even tested the patch on a couple of dc(4) controllers.
PR: kern/79262
Reviewed by: marius
Tested by: marius
yongari [Fri, 18 Feb 2011 02:14:53 +0000 (02:14 +0000)]
When driver have to use base softc due to lack of SROM on second
port, copy SROM information from base softc as well and run SROM
parser again. This change is necessary for some dual port
controllers to make dc(4) correctly detect PHY media based on first
port configuration table.
While I'm here add a check for validity of the base softc before
duplicating SROM contents from base softc. If driver failed to
attach to the first port it can access invalid area.
jhb [Thu, 17 Feb 2011 17:03:56 +0000 (17:03 +0000)]
Save a copy of errno before invoking syslog() if accept() or select() fail.
syslog() can trash the errno value causing nfsd to exit for non-fatal
errors like ECONNABORTED from accept().
jpaetzel [Thu, 17 Feb 2011 16:33:41 +0000 (16:33 +0000)]
Add "Extract Only" functionality to pc-sysinstall. This allows disk setup to
be done manually, pc-sysinstall is pointed to a mount-point for installation.
osa [Thu, 17 Feb 2011 12:21:14 +0000 (12:21 +0000)]
Fix the beginning day of the Great Lent, it starts on Monday for 7 weeks before Paskha.
Fix the Exaltation of the Holy Cross day.
Add more Twelve holidays (dvunadesyatye prazdniki).
adrian [Thu, 17 Feb 2011 05:56:03 +0000 (05:56 +0000)]
Add in ANI parameters for the AR9280. These aren't enabled by default
as they're likely not entirely correct, but they give people something
to toy with to compare behaviour/performance.
Disable the anti-noise part, as this apparently interferes with
RIFS. I haven't verified this.
VNET socket push back:
try to minimize the number of places where we have to switch vnets
and narrow down the time we stay switched. Add assertions to the
socket code to catch possibly unset vnets as seen in r204147.
While this reduces the number of vnet recursion in some places like
NFS, POSIX local sockets and some netgraph, .. recursions are
impossible to fix.
The current expectations are documented at the beginning of
uipc_socket.c along with the other information there.
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
Reviewed by: jhb
Tested by: zec
dim [Wed, 16 Feb 2011 20:46:57 +0000 (20:46 +0000)]
Fix the last binary in the base system that still has an executable
stack, /usr/sbin/uathload.
Since this program links in a .o file containing a firmware blob, and
there is no clean way to add a .note.GNU-stack section to this .o file,
we simply use the -z noexecstack option to ld here.
adrian [Wed, 16 Feb 2011 20:07:44 +0000 (20:07 +0000)]
Modify the spi flash driver to allow smaller read IO sizes, but enforce
the larger, aligned write+erase sizes the driver currently implements.
This preserves write behaviour but makes the flash driver usable for things
like a read-only FFS or a geom_uzip/geom_compress .
Note that since GEOM will now return the sector size as being smaller,
writes of sector size/alignment will now fail with an EIO. Code which
writes to the flash device will have to be (for now) manually taught
about the flash write blocksize.
imp [Wed, 16 Feb 2011 18:05:10 +0000 (18:05 +0000)]
Remove reading of symbols from a.out loaded files. Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so). Prefer clang
support over support for these old kernels and remove this code. We
gain about 100 bytes of space this way.
dchagin [Wed, 16 Feb 2011 17:50:21 +0000 (17:50 +0000)]
To avoid excessive code duplication create wrapper for fill regs
from stack frame. Change the trap() code to use newly created function
instead of explicit regs assignment.
dim [Tue, 15 Feb 2011 22:03:09 +0000 (22:03 +0000)]
Fix some leftover binaries and shared libraries in the system that still
have an executable stack, due to linking in hand-assembled .S or .s
files, that have no .GNU-stack sections:
dchagin [Tue, 15 Feb 2011 21:42:48 +0000 (21:42 +0000)]
Make a linux_rt_sigtimedwait() system call is actually working.
1) Translate the native signal number in the appropriate Linux signal.
2) Remove bogus code, which can lead to a panic as it calls
kern_sigtimedwait with same ksiginfo.
3) Return the corresponding signal number.
dim [Tue, 15 Feb 2011 20:18:52 +0000 (20:18 +0000)]
Apply a few small optimizations to boot2's code, to make it shrink a
little further. This gets us further on the way to be able to build it
successfully with clang. Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
yongari [Tue, 15 Feb 2011 18:16:04 +0000 (18:16 +0000)]
Fix a regression introduced in r215906. The change made in r215906
caused link re-negotiation whenever application joins or leaves a
multicast group. If driver is running, it would have established a
link so there is no need to start re-negotiation. The re-negotiation
broke established link which in turn stopped multicast application
working while re-negotiation is in progress.
kib [Tue, 15 Feb 2011 09:03:58 +0000 (09:03 +0000)]
Since r218070 reenabled the call to vm_map_simplify_entry() from
vm_map_insert(), the kmem_back() assumption about newly inserted
entry might be broken due to interference of two factors. In the low
memory condition, when vm_page_alloc() returns NULL, supplied map is
unlocked. If another thread performs kmem_malloc() meantime, and its
map entry is placed right next to our thread map entry in the map,
both entries wire count is still 0 and entries are coalesced due to
vm_map_simplify_entry().
Mark new entry with MAP_ENTRY_IN_TRANSITION to prevent coalesce.
Fix some style issues, tighten the assertions to account for
MAP_ENTRY_IN_TRANSITION state.
marius [Mon, 14 Feb 2011 21:50:51 +0000 (21:50 +0000)]
- Use the correct DMA tag/map pair for synchronize the FC scratch area.
- Allocate coherent DMA memory for the request/response queue area and
and the FC scratch area.
These changes allow isp(4) to work properly on sparc64 with usage of the
IOMMU streaming buffers enabled.
adrian [Mon, 14 Feb 2011 21:24:54 +0000 (21:24 +0000)]
Some statistics additions - prepare for error codes > 32 (since the AR5416
error mask is > 5 bits) and add some extra CRC/HT40/ShortGI counters to
help debug 802.11n issues.
hselasky [Mon, 14 Feb 2011 08:14:06 +0000 (08:14 +0000)]
* Fix page fault caused by referring freed node.
While updating Tx stats, already freed node could be referred and cause
page fault. To avoid such panic, spool Tx stats in driver's softc. Then,
on every ratectl interval, grab node though ieee80211_iterate_nodes() and
update ratectl stats.
luigi [Mon, 14 Feb 2011 08:09:02 +0000 (08:09 +0000)]
Correct a subtle bug in the 'gsched_rr' disk scheduler.
The algorithm is supposed to work as follows:
in order to prevent starvation, when a new client starts being served we
record the start time and reset the counter of bytes served.
We then switch to a new client after a certain amount of time or bytes,
even if the current one still has pending requests.
To avoid charging a new client the time of the first seek,
we start counting time when the first request is served.
Unfortunately a bug in the previous version of the code failed
to set the start time in certain cases, resulting in some processes
exceeding their timeslice.
The fix (in this patch) is trivial, though it took a while to find
out and replicate the bug.
Thanks to Tommaso Caprai for investigating and fixing the problem.
marcel [Sun, 13 Feb 2011 19:46:55 +0000 (19:46 +0000)]
Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the preloaded pool
configuration file/repository.
rrs [Sun, 13 Feb 2011 14:48:11 +0000 (14:48 +0000)]
Fix a bug reported by Jonathan Leighton in his web-sctp testing
at the Univ-of-Del. Basically when a 1-to-1 socket did a
socket/bind/send(data)/close. If the timing was right
we would dereference a socket that is NULL.
alc [Sun, 13 Feb 2011 14:46:39 +0000 (14:46 +0000)]
Eliminate tn_reg.tn_aobj_pages. Instead, correctly maintain the vm
object's size field. Previously, that field was always zero, even
when the object tn_reg.tn_aobj contained numerous pages.
deischen [Sun, 13 Feb 2011 04:44:06 +0000 (04:44 +0000)]
Oops, revert an accidental local change that got added in
my last commit (r218627). No damage was done in the last
commit, just some duplicated code was added (which is now
removed).
simon [Sat, 12 Feb 2011 21:30:46 +0000 (21:30 +0000)]
Fix Incorrectly formatted ClientHello SSL/TLS handshake messages could
cause OpenSSL to parse past the end of the message.
Note: Applications are only affected if they act as a server and call
SSL_CTX_set_tlsext_status_cb on the server's SSL_CTX. This includes
Apache httpd >= 2.3.3, if configured with "SSLUseStapling On".
brucec [Sat, 12 Feb 2011 20:42:53 +0000 (20:42 +0000)]
If the pf.conf(5) example file is copied when setting up a firewall it's
easy to forget about icmp. Update the file to show allowing icmp through
the firewall.