Commit Graph

81100 Commits

Author SHA1 Message Date
Adrian Chadd
917721a495 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.
2011-02-16 20:07:44 +00:00
Warner Losh
33c45e47f4 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.

Reviewed by:	rdivacky@
2011-02-16 18:05:10 +00:00
Dmitry Chagin
dc4f0a9e11 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.
2011-02-16 17:50:21 +00:00
Sergey Kandaurov
4fd8408ae7 Bump dummynet module version to meet dummynet schedulers' requirements,
and thus unbreak loading dummynet.ko via /boot/loader.conf.

Reported by:	rihad <rihad att mail.ru> on freebsd-net
Approved by:	kib (mentor)
2011-02-16 15:43:35 +00:00
Yoshihiro Takahashi
894cbf138e MFi386: revision 218713
Apply a few small optimizations to boot2's code, to make it shrink a
  little further.
2011-02-16 15:20:37 +00:00
Hans Petter Selasky
1ee72beb56 Fix build breakage in if_mos.c when USB_DEBUG option is set.
Approved by:	thompsa (mentor)
2011-02-16 09:26:56 +00:00
Hans Petter Selasky
b2dce55fe9 Add support for new USB to ethernet controller:
Moschip MCS7730/MCS7830

Submitted by:	Rick van der Zwet <info@rickvanderzwet.nl>
Approved by:	thompsa (mentor)
2011-02-16 08:33:30 +00:00
Dmitry Chagin
09d6cb0a23 For realtime signals fill the sigval value. 2011-02-15 21:46:36 +00:00
Dmitry Chagin
f3481dd9ab 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.
2011-02-15 21:42:48 +00:00
Dmitry Chagin
8c50c56206 Style(9) fix. Wrap long lines in linux_rt_sigtimedwait(). 2011-02-15 21:24:50 +00:00
Dmitry Chagin
d207e753da Put the macro declaration in the relevant include file for future use. 2011-02-15 21:22:09 +00:00
Dimitry Andric
80b9f8b017 In sys/boot/common/ufsread.c, use uint8_t instead of u_int8_t.
Submitted by:	mdf
2011-02-15 21:01:13 +00:00
Dimitry Andric
97bba30626 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.

Submitted by:	rdivacky
Reviewed by:	imp
2011-02-15 20:18:52 +00:00
Pyun YongHyeon
f6ff7180f8 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.

PR:	kern/154667
MFC after:	1 week
2011-02-15 18:16:04 +00:00
Adrian Chadd
69efac96c3 Disable flipping antennas for AR9280.
Flipping antennas when doing 11n would cause all kinds of strange issues.
Just don't do it for now and when it comes time to do it, don't do it here.
2011-02-15 13:29:52 +00:00
Konstantin Belousov
56bdf2dbc2 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.

Reported and tested by:	pho
Reviewed by:	alc
2011-02-15 09:03:58 +00:00
Marius Strobl
37bb79f173 - 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.

Approved by:	mjacob
MFC after:	2 weeks
2011-02-14 21:50:51 +00:00
Adrian Chadd
b986265911 bring this in line with what ath9k does. 2011-02-14 21:35:11 +00:00
Adrian Chadd
f9aa1d90b5 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.
2011-02-14 21:24:54 +00:00
Bjoern A. Zeeb
bf9ce95bd2 Mfp4 CH=177256:
Catch a set vnet upon return to user space. This usually
  means return paths with CURVNET_RESTORE() missing.

  If VNET_DEBUG is turned on we can even tell the function
  that did the CURVNET_SET() which is really helpful; else
  we print "N/A".

  Sponsored by: The FreeBSD Foundation
  Sponsored by: CK Software GmbH
  Reviewed by:  jhb

MFC after:	11 days
2011-02-14 20:49:37 +00:00
Jung-uk Kim
f6c05906ee Rework r218685. Copy just enough data for the resource type.
Reviewed by:	jhb, mdf
2011-02-14 20:05:37 +00:00
Dmitry Chagin
e2ef00a426 Style(9) fix. Do not initialize variables in the declarations. 2011-02-14 17:24:58 +00:00
Matthew D Fleming
224e25e117 Prevent reading from the ACPI_RESOURCE past its actual end. For
paranoia limit to the size of the ACPI_RESOURCE as well.

Reviewd by:	jhb (in spirit)
MFC after:	1 week
2011-02-14 17:20:20 +00:00
Alan Cox
4673c751f8 Further simplify tmpfs_reg_resize(). Also, update its comments, including
style fixes.
2011-02-14 15:36:38 +00:00
Hans Petter Selasky
f417369bdd * 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.

* Simplify some code in run_iter_func().

* Fix typo

* Use memset instead of bzero (hselasky @)

PR:		kern/153938
Submitted by:	PseudoCylon <moonlightakkiy@yahoo.ca>
Approved by:	thompsa (mentor)
2011-02-14 08:14:06 +00:00
Luigi Rizzo
67c1af9d00 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.

Submitted by:	Tommaso Caprai
MFC after:	1 week
2011-02-14 08:09:02 +00:00
Alan Cox
4fb7088490 Retire mp_fixme(). It's no longer used. 2011-02-14 02:37:27 +00:00
Konstantin Belousov
03fa5b34a0 Lock the vnode around clearing of VV_TEXT flag. Remove mp_fixme() note
mentioning that vnode lock is needed.

Reviewed by:	alc
Tested by:	pho
MFC after:	1 week
2011-02-13 21:52:26 +00:00
Dmitry Chagin
49fa1a745e Sort include files in the alphabetical order. 2011-02-13 20:07:48 +00:00
Olivier Houchard
04f86cb130 Oops, wasn't supposed to commit this. 2011-02-13 20:04:29 +00:00
Olivier Houchard
e9e1639ac0 Call init_param1() much earlier, so that msgbufsize is non-zero when we want
to map and use the msgbuf.
2011-02-13 20:02:46 +00:00
Marcel Moolenaar
6e23016fd7 Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the preloaded pool
configuration file/repository.

Sponsored by: Juniper Networks.
2011-02-13 19:46:55 +00:00
Marcel Moolenaar
1e189c0839 Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the preloaded key files.

Sponsored by: Juniper Networks.
2011-02-13 19:34:48 +00:00
Marcel Moolenaar
bba39e1034 Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the PCI vendor data.

Sponsored by: Juniper Networks.
2011-02-13 19:26:51 +00:00
Marcel Moolenaar
01f7b6dad3 Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the bitmap splash image.

Sponsored by: Juniper Networks.
2011-02-13 19:25:48 +00:00
Marcel Moolenaar
efdb11cd58 Use the preload_fetch_addr() and preload_fetch_size() convenience
functions to obtain the address and size of the overriding DSDT.

Sponsored by: Juniper Networks.
2011-02-13 19:24:04 +00:00
Dmitry Chagin
fde6316272 Sort include files in the alphabetical order. 2011-02-13 19:07:48 +00:00
Dmitry Chagin
4ca49f41ec Remove comment about 'ftlk' LOR. 2011-02-13 18:46:34 +00:00
Dmitry Chagin
890c582fe5 Stop printing the LOR, as this is expected behavior. 2011-02-13 18:41:40 +00:00
Dmitry Chagin
7c3b05b99c The bitset field of freshly created futex should be initialized explicity.
Otherwise, REQUEUE operations fails.
2011-02-13 17:56:22 +00:00
Adrian Chadd
1325ba9d01 This should be TX stream, not RX stream. 2011-02-13 15:14:13 +00:00
Randall Stewart
d69e7322cb 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.

MFC after:	1 month
2011-02-13 14:48:11 +00:00
Alan Cox
b10d1d5d60 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.

Apply style fixes to tmpfs_reg_resize().

In collaboration with:	kib
2011-02-13 14:46:39 +00:00
Michael Tuexen
be2a6988a1 Fix several bugs related to stream scheduling.
Obtained from: Robin Seggelmann
MFC after: 3 months.
2011-02-13 13:53:28 +00:00
Daniel Eischen
9d22191d17 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).
2011-02-13 04:44:06 +00:00
Daniel Eischen
f7e6ce6d7a Allow the SO_SETFIB socket option to select the default (0)
routing table.

Reviewed by:	julian
2011-02-13 00:14:13 +00:00
Hans Petter Selasky
773dfc2534 Add missing USB_HOST_ALIGN option.
Approved by:	thompsa (mentor)
2011-02-12 21:17:38 +00:00
Dmitry Chagin
d14cc07d07 Rename used_requeue and use it as bitwise field to store more flags.
Reimplement used_requeue logic with LINUX_XDEPR_REQUEUEOP flag.
2011-02-12 20:58:59 +00:00
Dmitry Chagin
cfa57401b0 Slightly rewrite linux_fork:
1) Remove bogus error checking.
2) A new process exit from kernel through fork_trampoline(),
   so remove bogus check.
2011-02-12 20:16:25 +00:00
Dmitry Chagin
9588e04dde Remove bogus include <machine/frame.h> 2011-02-12 19:14:57 +00:00