Commit Graph

192152 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
e861fb376a vt(4): If the cursor is globally disabled, don't mark its position as dirty
This avoids unnecessary redraw. In particular, during boot, where the
cursor is disabled and its fake position is [0;0], this triggered a
refresh of the whole screen each time vt_flush() is called.

MFC after:	1 week
2014-08-21 14:12:11 +00:00
Jean-Sébastien Pédron
c5dabe0780 vt(4): Mark cursor old position as dirty before reading the dirty area
Otherwise, the redraw is done during the next vt_flush run.

MFC after:	1 week
2014-08-21 13:28:48 +00:00
Jean-Sébastien Pédron
c4ad232a03 vt(4): Handle global and per-window mouse cursor toggle in one place
Before the global flag was set/unset using the CONS_MOUSECTL ioctl, and
the per-window flag through the MOUSE_SETLEVEL or MOUSE_SETMODE ioctls.

Also, if the cursor is already enabled/disabled, return immediatly. This
avoids to reset the cursor's position to the center of the screen.

This matches syscons' behavior.

While here, remove a trailing space and a redundant variable
declaration.
2014-08-21 13:04:34 +00:00
Bjoern A. Zeeb
ac4dd4a91c Document MAC address selection and setting for atse(4).
Submitted by:	brooks
MFC after:	3 days
Sponsored by:	DARPA/AFRL
2014-08-21 12:50:11 +00:00
Jean-Sébastien Pédron
a5d099afa9 vt(4): Fix an inconsistency between the mouse cursor bitmap and its mask
MFC after:	1 week
2014-08-21 10:54:39 +00:00
Davide Italiano
e957745707 Revert r270227. GCC doesn't like the lack of LL suffix,
so this makes powerpc build failing.
2014-08-21 09:01:42 +00:00
Xin LI
d291a3bd9c Provide compatibility shim for atomic_dec_64_nv.
X-MFC-with:	r270247
MFC after:	13 days
2014-08-21 08:25:46 +00:00
Gavin Atkinson
f8569ca154 Add a missing brace to callout_init_rm() to fix syntax.
MFC after:	1 week
2014-08-21 07:52:51 +00:00
Pedro F. Giffuni
0fa46a4231 Always check the limits of array index variables before using them.
Obtained from:	DragonFlyBSD
MFC after:	1 week
2014-08-21 02:40:33 +00:00
Adrian Chadd
f8cdacdd18 Add missing locking.
Whilst here, assert that the lock is held when calling epstop().

Tested:

ep0: <3com Megahertz 574B>
2014-08-21 00:57:32 +00:00
Navdeep Parhar
9721a22d4a Change netmap's global lock to sx instead of a mutex.
Reviewed by:	luigi@
MFC after:	1 day
2014-08-20 23:37:44 +00:00
Gavin Atkinson
8382d842d5 Fix return type of callout_init_rm() and add return type to
callout_deactivate().

PR:		192520
Submitted by:	yaneurabeya gmail com
MFC after:	3 days
2014-08-20 23:29:34 +00:00
Warner Losh
15f48aaad6 Turns out that IDENTIFY DEVICE and IDENTIFY PACKET DEVICE return data
that's only mostly similar. Specifically word 78 bits are defined for
IDENTIFY DEVICE as
	5 Supports Hardware Feature Control
while a IDENTIFY PACKET DEVICE defines them as
	5 Asynchronous notification supported
Therefore, only pay attention to bit 5 when we're talking to ATAPI
devices (we don't use the hardware feature control at this time).
Ignore it for ATA devices. Remove kludge that papered over this issue
for Samsung SATA SSDs, since Micron drives also have the bit set and
the error was caused by this bad interpretation of the spec (which is
quite easy to do, since bits aren't normally overlapping like this).
2014-08-20 22:58:12 +00:00
Xin LI
7c1db36b28 MFV r270196:
Illumos issue:
    5047 don't use atomic_*_nv if you discard the return value

MFC after:	2 weeks
2014-08-20 22:39:26 +00:00
Xin LI
249ddb42f6 MFC r270195:
Illumos issue:
    5045 use atomic_{inc,dec}_* instead of atomic_add_*

MFC after:	2 weeks
2014-08-20 21:44:48 +00:00
Jilles Tjoelker
dd6d480a3e sh: Remove two redundant (uintmax_t) casts.
Submitted by:	jmallett
2014-08-20 20:15:43 +00:00
Xin LI
2bcc37f99c MFV r270193:
Illumos issues:
    5042 stop using deprecated atomic functions

MFC after:	2 weeks
2014-08-20 18:29:18 +00:00
Hiroki Sato
d292a6c795 Recover sin6_scope_id of gateway addresses in riprecv() by using the if_index
where a RIP packet was received.  This fixes a bug which prevented gateway
addresses in fe80::/64 from being added.
2014-08-20 17:27:15 +00:00
Stefan Eßer
5a0fb8c8d6 The conversion tools have been further improved and some erroneous
conversions have been detected and fixed.

It is now possible to add options after the encoding in the parameter
list for convert-keymap.pl. This is currently used to selectively
enable interpretation of the ISO8859-1 currency symbol as the Euro
sign found in ISO5589-15, or to add a Yen symbol in place of '\' for
specific Japanese keyboards. The option are appended to the parameter
list, as in e.g. "convert-keymap.pl german.iso.kbd ISO5589-1 EURO".

The options are appended to the encoding in the form "+EURO" or "+YEN"
in KBDFILES.map, to keep the meaning of the columns intact.

MFC after:	3 days
2014-08-20 17:07:41 +00:00
Alan Somers
81ade99c2c Misc fixes suggested by Coverity.
sbin/devd/tests/client_test.c
	* In the event that popen fails, don't dereference its return value.
	* Fix array overwrite in the stream and seqpacket tests.
	* Close sockets at the end of successful ATF tests.

Reported by:	Coverity scan
CID:		1232019, 1232020, 1232029, 1232030
MFC after:	1 week
Sponsored by:	Spectra Logic
2014-08-20 17:04:49 +00:00
Luiz Otavio O Souza
801abb3eba Rewrite of ti_i2c based on gonzo's patch, fix the following bugs/problems:
. interrupt storm detected on "intr70:"; throttling interrupt source;

  . Added access serialization on iicbus_transfer(), previously there was
    no such protection and a new transfer could easily confuse the
    controller;

  . Add error checkings (i.e. stop the transfer when a error is detected
    and do _not_ overwrite the previous error);

  . On command done interrupt do not assume that the transfer was finished
    sucessfully as we will receive the command done interrupt even after
    errors;

  . Simplify the FIFO handling;

  . Reset the FIFO between the transfers as the FIFO may contain data from
    the last (failed) transfer;

  . Fix the iicbus speed for AM335x, which in turn will make better use of
    the I2C noise filter (set to one internal clock cycle);

  . Move the read and write handler to ithread instead of notifying the
    requesting thread with wakeup(9);

  . Fix the comments based on OMAP4 TRM.

The above changes allows me to read the EDID from my HDMI monitor on BBB
with gonzo's patches to support TDA19988 (which does 128 bytes reads) and
repeatedly scan the iicbus (with a modified i2c(8)) without lock up the bus.

Phabric:	D465
2014-08-20 17:02:37 +00:00
Stefan Eßer
fdd869bd8a Another rpund of fixes, after checking keymaps for plausibility and with
several updates to the converter tools. There is now support for hybrid
source keymaps, which e.g. use ISO8859-1 (not -15) but still provide an
Euro key (on the "E" key). ISO8859-1 currency symbols on other keys are
still converted to that character, not the Euro sign. A similar hack was
applied to the Japanese keyboards to add the Yen key, that could not be
expressed in SYSCONS.

Several modifications have been applied after the conversion (removal of
unused accents tables, some reformatting, exchange of a few key symbols).

The German keymap (de.kbd) is now using deadkeys only for those keys,
that behave that way under Windows. There are now ".acc" and ".noacc"
variants, which use deadkeys vs. nodeadkeys for all accent keys.

I'm still in the process of comparing keymaps that existed in different
encodings in SYSCONS. These are generally translated slightly differently,
either because of mistakes, or because of different preferences, or due
to limitations of the respective encoding.

MFC after:	3 days
2014-08-20 17:00:47 +00:00
Alan Somers
e594026d6d Numerous small fixes, mostly suggested by Coverity.
tests/sys/kern/unix_seqpacket_test.c
	* Remove a duplicate error check in mk_pair_of_sockets
	* Always close sockets in the success path of ATF test cases.  Don't
	  bother with the error paths, because those are mostly assertions
	  anyway.  Most of these socket leaks were reported by Coverity.
	  All of them are harmless, because each ATF test case runs in its
	  own process.
	* Fix the len argument to send in shutdown_send and
	  shutdown_send_sigpipe.  The old version was using sizeof a pointer
	  instead of sizeof the char array.  Reported by Coverity.
	* Change a few ATF_CHECK to ATF_REQUIRE if the test can't reasonably
	  continue past a failure.

Reported by:	Coverity Scan
CID:		1229995, 1229991, 1229988, 1229994, 1229989, 1229992
CID:		1229993, 1229990, 1229984, 1229967, 1230005, 1229977
CID:		1229966, 1230004, 1229976
MFC after:	1 week
Sponsored by:	Spectra Logic
2014-08-20 16:59:33 +00:00
Davide Italiano
d0091d6625 Make Bruce happy removing the "LL abomination" from time.h
It's not necessary in all the three instances because
they already have the correct type on all the supported
arches.

Requested by:	bde
2014-08-20 16:32:02 +00:00
John Baldwin
e6e574516a Add kernel modules for si(4), wds(4), and wl(4). 2014-08-20 16:09:05 +00:00
John Baldwin
cef60f1868 Unexpand TAILQ_FOREACH(). 2014-08-20 16:07:56 +00:00
John Baldwin
669eac89c5 Fix build of si(4) and enable it in LINT on amd64 and i386. 2014-08-20 16:07:17 +00:00
John Baldwin
64d6de263b Bump MAXCPU on amd64 from 64 to 256. In practice APIC only permits 255
CPUs (IDs 0 through 254).  Getting above that limit requires x2APIC.

MFC after:	1 month
2014-08-20 16:06:24 +00:00
John Baldwin
b45968a8ea Bump the default size of cpuset_t masks in userland from 128 bits to 256.
This should not be an ABI change since the various public APIs that use
cpusets all include an explicit size parameter in addition to the cpuset
parameter.

MFC after:	1 week
2014-08-20 16:05:15 +00:00
Davide Italiano
b40ea294f9 Replace dev_clone with cdevpriv(9) KPI in audit_pipe code.
This is (yet another) step towards the removal of device
cloning from our kernel.

CR:	https://reviews.freebsd.org/D441
Reviewed by:	kib, rwatson
Tested by:	pho
2014-08-20 16:04:30 +00:00
Enji Cooper
b6130f8189 Add ${LIBC} to DPADD to fix "make checkdpadd"
Phabric: D632
Approved by: jmmv (mentor)
MFC after: 2 weeks
2014-08-20 15:43:26 +00:00
Pedro F. Giffuni
6804aa1b68 Add missing break.
CID:	603368
2014-08-20 14:58:25 +00:00
Roger Pau Monné
073bf9dd70 pci: make MSI(-X) enable and disable methods of the PCI bus
Make the functions pci_disable_msi, pci_enable_msi and pci_enable_msix
methods of the newbus PCI bus. This code should not include any
functional change.

Sponsored by: Citrix Systems R&D
Reviewed by: imp, jhb
Differential Revision: https://reviews.freebsd.org/D354

dev/pci/pci.c:
 - Convert the mentioned functions to newbus methods.
 - Fix the callers of the converted functions.

sys/dev/pci/pci_private.h:
dev/pci/pci_if.m:
 - Declare the new methods.

dev/pci/pcivar.h:
 - Add helpers to call the newbus methods.

ofed/include/linux/pci.h:
 - Add define to prevent the ofed version of pci_enable_msix from
   clashing with the FreeBSD native version.
2014-08-20 14:57:20 +00:00
Edward Tomasz Napierala
5e8c3d974e Remove useless - and buggy, it resulted in spurious warnings in logs - code.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-20 13:54:27 +00:00
Edward Tomasz Napierala
543bed9345 Add description for the "automounted" mount flag.
Reviewed by:	emaste@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-20 13:52:47 +00:00
Edward Tomasz Napierala
2f438a99cd Rework ".." lookup; previous one failed to properly busy the mountpoint.
Reviewed by:	kib@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2014-08-20 13:46:51 +00:00
Adrian Chadd
ebb1240823 After much toying around with this AMRR initial rate stuff,
I've decided that for 11n rates it's best to start (very) low and work
our way up.

So, from now on, the initial rate for AMRR 11n is MCS4.
It doesn't try MCS12 or MCS20 - at low signal strengths those don't
work very well at all.

AMRR will step the rate control up over time if things work out better.

Tested:

* Intel 5100
* Intel 5300 (using local diffs to test out 3x3 stream support)
2014-08-20 09:10:03 +00:00
Konstantin Belousov
29d03af1e4 Do not busy the UFS mount point inside VOP_RENAME(). The
kern_renameat() already starts write on the mp, which prevents
parallel unmount from proceed.  Busying mp after vn_start_write()
deadlocks the unmount.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-08-20 08:15:23 +00:00
Konstantin Belousov
4ce90426e0 Correct the test for condition to suspend UFS filesystem during
unmount.  There is no need to suspend read-only filesystem, while we
need suspension on modificable mount point.

Reported by:	rwatson
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-08-20 08:13:03 +00:00
Konstantin Belousov
3165194c6b Increase max number of physical segments on amd64 to 63.
Eventually, the vmd_segs of the struct vm_domain should become bitset
instead of long, to allow arbitrary compile-time selected maximum.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2014-08-20 08:07:08 +00:00
Konstantin Belousov
14fb217784 Add arch-specific macro SFBUF_PHYS_DMAP(), which should translate the
physical address of the page to direct map address, in case
SFBUF_OPTIONAL_DIRECT_MAP returns true.  The case of PowerPC AIM
64bit, where the page physical address is identical to the direct map
address, is accidental.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
2014-08-20 08:02:38 +00:00
Stefan Eßer
0ee7262a72 Fix conversion errors leading to malformed keymap files.
MFC after:	3 days
2014-08-20 07:48:09 +00:00
Stefan Eßer
83886c28c9 Fix further conversion errors found while testing the converted keymaps.
MFC after:	3 days
2014-08-20 07:46:28 +00:00
Xin LI
d323149132 5047 don't use atomic_*_nv if you discard the return value
Reviewed by: Garrett D'Amore <garrett@damore.org>
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@640c1670a1
2014-08-20 06:25:43 +00:00
Xin LI
48aeb6148d 5045 use atomic_{inc,dec}_* instead of atomic_add_*
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@1a5e258f54
2014-08-20 06:22:59 +00:00
Xin LI
d7c2a73f1d 5043 remove deprecated atomic functions' prototypes
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@6ed9368a13
2014-08-20 06:20:06 +00:00
Xin LI
ecc3be1fdf 5042 stop using deprecated atomic functions
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author:	Josef 'Jeff' Sipek <josef.sipek@nexenta.com>

illumos/illumos-gate@75d94465db
2014-08-20 06:15:53 +00:00
Kevin Lo
51a25d3479 If eapol packets are sent at the lowest rate, key negotiation will
become more reliable.

Submitted by:	Akinori Furukoshi <moonlightakkiy at yahoo dot ca>
2014-08-20 01:32:04 +00:00
Kevin Lo
d4bcd25553 Add the D-Link DWA-125 rev D1.
Tested by myself.
2014-08-20 01:26:27 +00:00
Ian Lepore
fad3f0e44f Don't stop other legs of a parallel build due to a failure in make_check.
The whole point is to see if there's any failure, which is handled by
building a newer version of make.
2014-08-20 00:33:37 +00:00