Commit Graph

157726 Commits

Author SHA1 Message Date
Kevin Lo
d0654c8566 Shut the compiler up; initializes the sotype variable to zero in
nfs_tryproto().

Reviewed by:	rmacklem
2010-09-04 08:42:19 +00:00
Jilles Tjoelker
96e75396e1 libedit: Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.

Behaviour in vi mode is unchanged (for 'x').
2010-09-03 22:24:26 +00:00
Jilles Tjoelker
fe5d61a4cf sh: Do not use locale for determining if something is a name.
This makes it impossible to use locale-specific characters in variable
names.

Names containing locale-specific characters make scripts only work with the
correct locale setting. Also, they did not even work in many practical cases
because multibyte character sets such as utf-8 are not supported.

This also avoids weirdness if LC_CTYPE is changed in the middle of a script.
2010-09-03 22:13:54 +00:00
Jilles Tjoelker
10ea2923a9 sh: Add a test that 'read' leaves the file pointer at the correct place.
Naive buffering would break the common while read x... construct, which did
not appear to be tested yet.
2010-09-03 21:17:33 +00:00
Pyun YongHyeon
443f331ec5 Fix another bug introduced in r212109. We should unload DMA maps
only after sending the last fragment of a frame so the mbuf pointer
also should be stored in the last descriptor index.
2010-09-03 18:00:17 +00:00
Matthew D Fleming
181ff3d503 Use a better #if guard.
Suggested by pluknet <pluknet at gmail dot com>.
2010-09-03 17:42:17 +00:00
Matthew D Fleming
c05dbe7a54 Style(9) fixes and eliminate the use of min(). 2010-09-03 17:42:12 +00:00
Matthew D Fleming
969292fb1b Fix user-space libsbuf build. Why isn't CTASSERT available to
user-space?
2010-09-03 17:23:26 +00:00
Matthew D Fleming
f5a5dc5da8 Fix brain fart when converting an if statement into a KASSERT. 2010-09-03 16:12:39 +00:00
Matthew D Fleming
f4bafab8da Use math rather than iteration when the desired sbuf size is larger than
SBUF_MAXEXTENDSIZE.
2010-09-03 16:09:17 +00:00
Roman Divacky
27d4fea6c5 Change the parameter passed to the inline assembly to u_short
as we are dealing with 16bit segment registers. Change mov
to movw.

Approved by:    rpaulo (mentor)
Reviewed by:    kib, rink
2010-09-03 14:25:17 +00:00
Fabien Thomas
eb707d6039 When an asm location cannot be resolved to a function the cost
will be spread as small value and then filtered by the threshold.
As a first step solution display the number of event that cannot
be resolved as a valid function location.

MFC after:	1week
2010-09-03 13:54:02 +00:00
Andriy Gapon
a9b89cf1c1 vm_page.c: include opt_msgbuf.h for MSGBUF_SIZE use in vm_page_startup
vm_page_startup uses MSGBUF_SIZE value for adding msgbuf pages to minidump.
If opt_msgbuf.h is not included and MSGBUF_SIZE is overriden in kernel
config, then not all msgbuf pages will be dumped.  And most importantly,
struct msgbuf itself will not be included.  Thus the dump would look
corrupted/incomplete to tools like kgdb, dmesg, etc that try to access
struct msgbuf as one of the first things they do when working on a crash
dump.

MFC after:	5 days
2010-09-03 10:40:53 +00:00
Poul-Henning Kamp
9f5b45662f We need to copy the ports config files before we launch the prefetch 2010-09-03 09:34:15 +00:00
Andriy Gapon
b1f9b9965b acpi: update stale comments about order of cpu devices probing
These comments should have been updated in r203776 when the order was
changed.

Pointyhat to:	avg
MFC after:	3 days
2010-09-03 08:07:04 +00:00
Peter Grehan
d8acfb88ad - Bump MAXCPU to 4. Tested on a quad G5 with both 32 and 64-bit kernels.
A make buildkernel -j4 uses ~360% CPU.
- Bracket the AP spinup printf with a mutex to avoid garbled output.
- Enable SMP by default on powerpc64.

Reviewed by:	nwhitehorn
2010-09-03 03:56:09 +00:00
Warner Losh
42908e80e6 Allow / in the NANO_DEVICE
PR:		149729
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
2010-09-03 03:48:06 +00:00
John-Mark Gurney
ec6f1f4a71 fix the move so that it matches what the rest of the internet
says about this game...  This move also makes more sense...

MFC after:	1 week
2010-09-03 03:20:34 +00:00
Pyun YongHyeon
0af3989be9 Initial WOL support. NS DP8315 was tested but SiS900/SiS7016 was
not tested.
While I'm here, clean up SIOCSIFCAP handler.
2010-09-03 00:34:45 +00:00
Pyun YongHyeon
7968da57dc Implement initial device suspend/resume method. 2010-09-02 22:37:13 +00:00
Nathan Whitehorn
fa942e6074 In the case of non-sequential mappings, ofw_mapmem() could ask Open
Firmware to map a memory region with negative length, causing crashes
and Undefined Behavior. Add the appropriate check to make the behavior
defined.
2010-09-02 22:26:49 +00:00
Edwin Groothuis
287cf3e528 Adding a missing firstname (Monique)
PR:		conf/150049
Submitted by:	Thierry Thomas <thierry@pompo.net>
2010-09-02 21:48:35 +00:00
Gavin Atkinson
f806ea8af1 Correct spelling mistake, int -> into
MFC after:	3 days
2010-09-02 21:29:50 +00:00
Pyun YongHyeon
629cb67ffa Better wording.
Submitted by:	jkim
2010-09-02 20:43:01 +00:00
Justin T. Gibbs
f03f7a0ca3 Correct bioq_disksort so that bioq_insert_tail() offers barrier semantic.
Add the BIO_ORDERED flag for struct bio and update bio clients to use it.

The barrier semantics of bioq_insert_tail() were broken in two ways:

 o In bioq_disksort(), an added bio could be inserted at the head of
   the queue, even when a barrier was present, if the sort key for
   the new entry was less than that of the last queued barrier bio.

 o The last_offset used to generate the sort key for newly queued bios
   did not stay at the position of the barrier until either the
   barrier was de-queued, or a new barrier (which updates last_offset)
   was queued.  When a barrier is in effect, we know that the disk
   will pass through the barrier position just before the
   "blocked bios" are released, so using the barrier's offset for
   last_offset is the optimal choice.

sys/geom/sched/subr_disk.c:
sys/kern/subr_disk.c:
	o Update last_offset in bioq_insert_tail().

	o Only update last_offset in bioq_remove() if the removed bio is
	  at the head of the queue (typically due to a call via
	  bioq_takefirst()) and no barrier is active.

	o In bioq_disksort(), if we have a barrier (insert_point is non-NULL),
	  set prev to the barrier and cur to it's next element.  Now that
	  last_offset is kept at the barrier position, this change isn't
	  strictly necessary, but since we have to take a decision branch
	  anyway, it does avoid one, no-op, loop iteration in the while
	  loop that immediately follows.

	o In bioq_disksort(), bypass the normal sort for bios with the
	  BIO_ORDERED attribute and instead insert them into the queue
	  with bioq_insert_tail().  bioq_insert_tail() not only gives
	  the desired command order during insertion, but also provides
	  barrier semantics so that commands disksorted in the future
	  cannot pass the just enqueued transaction.

sys/sys/bio.h:
	Add BIO_ORDERED as bit 4 of the bio_flags field in struct bio.

sys/cam/ata/ata_da.c:
sys/cam/scsi/scsi_da.c
	Use an ordered command for SCSI/ATA-NCQ commands issued in
	response to bios with the BIO_ORDERED flag set.

sys/cam/scsi/scsi_da.c
	Use an ordered tag when issuing a synchronize cache command.

	Wrap some lines to 80 columns.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
sys/geom/geom_io.c
	Mark bios with the BIO_FLUSH command as BIO_ORDERED.

Sponsored by:	Spectra Logic Corporation
MFC after:	1 month
2010-09-02 19:40:28 +00:00
Pyun YongHyeon
f0092b8fc8 Document tunable dev.sis.%unit.manual_pad
While I'm here Xref vlan(4) as sis(4) supports VLAN oversized
frames.
2010-09-02 18:22:06 +00:00
Pyun YongHyeon
57ec924c77 Enable sis(4). sis(4) should work on all architectures. 2010-09-02 18:12:54 +00:00
Pyun YongHyeon
94222398d1 Unlike most other controllers, NS DP83815/DP83816 controllers seem
to pad with 0xFF when it encounter short frames.  According to RFC
1042 the pad bytes should be 0x00.
Because manual padding consumes extra CPU cycles, introduce a new
tunable which controls the padding behavior. Turning this tunable
on will have driver pad manually but it's disabled by default. Users
can enable software padding by setting the following tunable to
non-zero value.

dev.sis.%d.manual_pad="1"

PR:	kern/35422 (patch not used)
2010-09-02 18:10:11 +00:00
Pyun YongHyeon
74e8a3238f Fix the last endianness issue on handling station address which
prevented driver from working on big-endian machines. Also rewrite
station address programming to make it work on strict-alignment
architectures. With this change, sis(4) now works on sparc64 and
performance number looks good even though sis(4) have to apply
fixup code to align received frames on 2 bytes boundary on sparc64.
2010-09-02 17:51:41 +00:00
Bjoern A. Zeeb
1b48d24533 MFp4 CH=183052 183053 183258:
In protosw we define pr_protocol as short, while on the wire
  it is an uint8_t.  That way we can have "internal" protocols
  like DIVERT, SEND or gaps for modules (PROTO_SPACER).
  Switch ipproto_{un,}register to accept a short protocol number(*)
  and do an upfront check for valid boundries. With this we
  also consistently report EPROTONOSUPPORT for out of bounds
  protocols, as we did for proto == 0.  This allows a caller
  to not error for this case, which is especially important
  if we want to automatically call these from domain handling.

  (*) the functions have been without any in-tree consumer
  since the initial introducation, so this is considered save.

  Implement ip6proto_{un,}register() similarly to their legacy IP
  counter parts to allow modules to hook up dynamically.

Reviewed by:	philip, will
MFC after:	1 week
2010-09-02 17:43:44 +00:00
Jung-uk Kim
90017de999 Disable video ROM shadowing by default as I originally intended. I found
a case where video ROM for an IGP is too tightly coupled with system BIOS
to get relocated.
2010-09-02 17:22:12 +00:00
Matthew D Fleming
ba4932b5a2 Fix UP build.
MFC after:	2 weeks
2010-09-02 16:23:05 +00:00
Bjoern A. Zeeb
73e39d6137 MFp4 CH=183259:
No reason to use if_free_type() as we don't change our type.
  Just if_free() is fine.

MFC after:	3 days
2010-09-02 16:11:12 +00:00
Dag-Erling Smørgrav
2cd149f045 Remove the freelist, which simply duplicates some of the zone allocator's
functionality.

Submitted by:	Daniel Braniss <danny@cs.huji.ac.il>
MFC after:	3 weeks
2010-09-02 14:13:43 +00:00
Ed Maste
2d15ca416e Remove trailing whitespace. 2010-09-02 14:05:32 +00:00
Alexander Motin
a6c48c7c72 Add fix for SiI3114 and SiI3512 chips bug, which caused sending R_ERR in
response to DMA activate FIS under certain circumstances. This is
recommended fix from chip datasheet. If triggered, this bug most likely
cause write command timeout.

MFC after:	2 weeks
2010-09-02 12:32:29 +00:00
Alexander Motin
a250a687f7 SATA1.x SiliconImage controllers on power-on reset TFD Status register into
value 0xff. On hot-plug this value confuses ata_generic_reset() device
presence detection logic. As soon as we already know drive presence from
SATA hard reset, hint ata_generic_reset() to wait for device signature
until success or full timeout.
2010-09-02 11:18:43 +00:00
Maxim Konovalov
a1482dccab o csup(1) does not have -g flag. Remove it from the example.
PR:		conf/150214
Submitted by:	Li
MFC after:	1 week
2010-09-02 05:07:34 +00:00
Andrew Thompson
ae538d8533 Reduce the need to accesss struct usb_device by providing functions to access
the product, manufacturer and serial strings.

Submitted by:	Hans Petter Selasky
2010-09-02 04:39:45 +00:00
Andrew Thompson
d2d71ce7a8 Add support for power mode filtering as some USB hardware does not support
power saving.

Submitted by:	Hans Petter Selasky
2010-09-02 04:05:00 +00:00
Andrew Thompson
527aa7b226 Change argument for usbd_get_dma_delay() from USB bus to USB device, some
embedded hardware needs to know exactly which device is in question before it
exactly can decide the required delay.

Submitted by:	Hans Petter Selasky
2010-09-02 04:01:18 +00:00
Andrew Thompson
dd5c0f870a Fix setting of the rx_max and tx_max variables. If the expected buffer size is
greater than 65535 bytes then the CDC driver might not work as expected, which
is not likely with the existing USB speeds.

Submitted by:	Hans Petter Selasky
2010-09-02 03:55:08 +00:00
Andrew Thompson
1f27b68522 Fix UMS_BUTTON_MAX define name 2010-09-02 03:52:04 +00:00
Andrew Thompson
13226c4c02 Fix build breakage from r212127 2010-09-02 03:50:11 +00:00
Andrew Thompson
edd913eb1a Add GPIO programming for more PHY hardware.
Submitted by:	yongari
2010-09-02 03:47:07 +00:00
Andrew Thompson
ee6e1a6f5a Add support for extra buttons on the Kensington Slimblade Trackball.
Submitted by:	Lee, Chung-Yeol
2010-09-02 03:44:56 +00:00
Andrew Thompson
a6eb83193e Silence debug error by default.
PR:		usb/141212
Submitted by:	Hans Petter Selasky
2010-09-02 03:42:26 +00:00
Andrew Thompson
8d8bdb018d We need to grab a node reference count to vap->iv_bss before using it as it is
possible for the node to be replaced and freed at any time by
ieee80211_sta_join1().
2010-09-02 03:28:03 +00:00
Rick Macklem
4176401397 Modify pxe.c to use the version of nfs_getrootfh() that returns
the file handle's size and was recently committed to
lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work
correcty for non-FreeBSD as well as FreeBSD NFS servers.
If built with OLD_NFSV2 defined, the old
code that predated this patch will be used.

Tested by:	danny at cs.huji.ac.il
2010-09-02 01:05:10 +00:00
Rick Macklem
de5f647070 Modify lib/libstand/nfs.c to use NFSv3 instead of NFSv2.
This allows the nfs_getrootfh() function to return the
correct file handle size to pxe.c for pxeboot. It also
results in NFSv2 no longer being used by default anywhere
in FreeBSD. If built with OLD_NFSV2 defined, the old
code that predated this patch will be built and NFSv2
will be used.

Tested by:	danny at cs.huji.ac.il
MFC after:	2 weeks
2010-09-02 01:00:13 +00:00