Commit Graph

171588 Commits

Author SHA1 Message Date
Navdeep Parhar
c8d954ab75 Fix a bug in code that calculates the number of the first interrupt
vector for a port.  This affected the gigabit ports of T422 cards (the
ones with 2x10G ports and 2x1G ports).

MFC after:	will check with re@
2012-07-09 21:53:50 +00:00
John Baldwin
d706ec297a Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h>
on x86 and use that to implement stop_emulating() in the fpu/npx code.
Reimplement start_emulating() in the non-XEN case by using load_cr0() and
rcr0() instead of the 'lmsw' and 'smsw' instructions.  Intel explicitly
discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in
the description of these instructions in Volume 2 of the ADM.

Reviewed by:	kib
MFC after:	1 month
2012-07-09 20:55:39 +00:00
John Baldwin
5355f65974 Partially revert r217515 so that the mem_range_softc variable is always
present on x86 kernels.  This fixes the build of kernels that include
'device acpi' but do not include 'device mem'.

MFC after:	1 month
2012-07-09 20:42:08 +00:00
Mikolaj Golub
7edc3d88eb In epair_clone_destroy(), when destroying the second half, we have to
switch to its vnet before calling ether_ifdetach(). Otherwise if the
second half resides in a different vnet, if_detach() silently fails
leaving a stale pointer in V_ifnet list, and the system crashes trying
to access this pointer later.

Another solution could be not to allow to destroy epair unless both
ends are in the home vnet.

Discussed with:	bz
Tested by:	delphij
2012-07-09 20:38:18 +00:00
Hiroki Sato
5a6d2079d5 Fix a missing ";". 2012-07-09 20:11:32 +00:00
Marcel Moolenaar
cbf1d2e3f6 Revert revision 238172 of agp_i810.c. Correctness is considered more
important than avoiding confusion.

Feedback from: kib, jhb
2012-07-09 16:23:59 +00:00
Joel Dahl
bb21242625 Remove end of line whitespace. 2012-07-09 15:44:35 +00:00
Ed Maste
21151865d5 Restore error handling lost in r191603
This was missed in the change from IFQ_ENQUEUE to if_transmit.

Sponsored by:   ADARA Networks
2012-07-09 14:16:49 +00:00
Michael Tuexen
5db75fc724 Fix a bug introduced in r237715.
MFC after:i 3 days.
2012-07-09 10:59:39 +00:00
Jayachandran C.
92184b6098 Support Netlogic XLP 8xx B1 revisions in xlpge.
Updates to the MDIO access code for the new revision of the
XLP chip.
2012-07-09 10:39:57 +00:00
Jayachandran C.
fe60722c96 Identify Netlogic XLP 8xx B1 chip revisions
Add functions to check for 8xx B0 and 3xx Ax revisions which will
be used in network block initialization.
2012-07-09 10:24:45 +00:00
Jayachandran C.
21221d1f6b Fix PCIe hardware swap configuration for Netlogic XLP
The last 12 bits of the limit registers have to be set to 1. These
bits are not significant in bridge BARs and are 0 on read, but the
bits are valid in the swap limit register and needs to be set.
2012-07-09 10:17:06 +00:00
Takanori Watanabe
2ef23c6d3b Add range and table revision checking to avoid abend.
PR:bin/169707
Submitted by:Dan Lukes <dan@obluda.cz>
MFC after:3 days.
2012-07-09 09:38:53 +00:00
David Xu
5985d61556 If you have pressed CTRL+Z and a process is suspended, then you use gdb
to attach to the process, it is surprising that the process is resumed
without inputting any gdb commands, however ptrace manual said:
  The tracing process will see the newly-traced process stop and may
  then control it as if it had been traced all along.
But the current code does not work in this way, unless traced process
received a signal later, it will continue to run as a background task.
To fix this problem, just send signal SIGSTOP to the traced process after
we resumed it, this works like that you are attaching to a running process,
it is not perfect but better than nothing.
2012-07-09 09:24:46 +00:00
Adrian Chadd
3d184db2f8 Further preparations for the RX EDMA support.
Break out the DMA descriptor setup/teardown code into a method.
The EDMA RX code doesn't allocate descriptors, just ath_buf entries.
2012-07-09 08:37:59 +00:00
Hiroki Sato
ef23194991 - Add IFT_L2VLAN (vlan(4)) support.
- Add -P option to support PID file.  When -a is specified /var/run/rarpd.pid
  is used, and when an interface is specified /var/run/rarpd.<ifname>.pid is
  used by default.
2012-07-09 08:11:16 +00:00
Andrey V. Elsukov
131f6ef034 We don't need to check the result of sending signal when -R option is
specified.

Submitted by:	Ilya A. Arkhipov
MFC after:	1 week
2012-07-09 07:37:10 +00:00
Adrian Chadd
0a6b6951b2 Introduce the EDMA related HAL capabilities.
Whilst here, fix a typo in a previous commit.

Obtained from:	Qualcomm Atheros
2012-07-09 07:31:26 +00:00
Hiroki Sato
739047446d Make usbusN logging pseudo-interface used by usbdump(8) clonable. One is
now created/destroyed automatically by usbdump(8).

Note that "hw.usb.no_pf" loader tunable is now obsolete.

Reviewed by:	hselasky
2012-07-09 07:25:09 +00:00
Adrian Chadd
d60a0680ba Extend the RX HAL API to include the RX queue identifier.
The AR93xx and later chips support two RX FIFO queues - a high and low
priority queue.

For legacy chips, just assume the queues are high priority.

This is inspired by the reference driver but is a reimplementation of
the API and code.
2012-07-09 07:19:11 +00:00
Hiroki Sato
8efbd296e0 Make ipfw0 logging pseudo-interface clonable. It can be created automatically
by $firewall_logif rc.conf(5) variable at boot time or manually by ifconfig(8)
after a boot.

Discussed on:	freebsd-ipfw@
2012-07-09 07:16:19 +00:00
Adrian Chadd
ba7de9be0d Extend the debugging flags to include some AR9300 HAL related options.
Obtained from:	Qualcomm Atheros
2012-07-09 06:41:18 +00:00
Adrian Chadd
74732ec4e1 Extend the RX descriptor completion debugging to log the larger
AR93xx receive descriptors.

This isn't entirely complete - the AR93xx and later descriptors
don't have a link/buffer pointer; the descriptor contents just
start.
2012-07-09 06:39:46 +00:00
Hiroki Sato
be5033937a - Add support of the following USB devices to run(4):
* Logitec LAN-W150N/U2
 * Buffalo WLI-UC-GNM2

- Add device id of Planex GW-USValue-EZ.
2012-07-09 06:34:15 +00:00
Hiroki Sato
f6c336fe66 Remove "prefer_source" address selection option. FreeBSD has had an
implementation of RFC 3484 for this purpose for a long time and "prefer_source"
was never implemented actually.  ND6_IFF_PREFER_SOURCE macro is left intact.
2012-07-09 06:21:46 +00:00
Mateusz Guzik
4fd85c4b5d Follow-up commit to r238220:
Pass only FEXEC (instead of FREAD|FEXEC) in fgetvp_exec. _fget has to check for
!FWRITE anyway and may as well know about FREAD.

Make _fget code a bit more readable by converting permission checking from if()
to switch(). Assert that correct permission flags are passed.

In collaboration with:	kib
Approved by:	trasz (mentor)
MFC after:	6 days
X-MFC: with r238220
2012-07-09 05:39:31 +00:00
Adrian Chadd
6a9f8e0a06 Add a debug category for RX EDMA. 2012-07-09 05:23:02 +00:00
Alexander V. Chernikov
30835e6d50 Finally fix lookup (account remaining '\0') and deletion
(provide valid key length for radix lookup).

Submitted by:    Ihor Kaharlichenko<madkinder at gmail.com>  (prev version)
Approved by:     kib(mentor)
MFC after:       3 days

Sponsored by:    Shtorm ISP
2012-07-08 21:13:04 +00:00
Konstantin Belousov
a4156419ca Avoid vm page queues lock leak after r238212.
Reported and tested by:	Michael Butler <imb protected-networks net>
Reviewed by:	alc
Pointy hat to:	kib
MFC after:	20 days
2012-07-08 18:04:26 +00:00
Marcel Moolenaar
0aa31a3393 Move PCPU initialization to a new function called cpu_pcpu_setup().
This makes it easier to add additional CPU or platform information
to the per-CPU structure without duplicated code.
2012-07-08 18:00:22 +00:00
Marcel Moolenaar
6d5cb58b5f Unleash the APs at SI_SUB_KICK_SCHEDULER so that we have them all
up and running to service interrupts. This is especially important
when the firmware has bound interrupts to CPUs, like for the SGI
Altix 350. We wake up APs at SI_SUB_CPU time and they sit and spin
until we unleash them, so there's nothing fundamentally different
from a MD perspective.
2012-07-08 17:43:25 +00:00
Nathan Whitehorn
eb90003fa8 After the binutils 2.17.50 import, the assembler supports AS_REL16
relocations.
2012-07-08 17:02:14 +00:00
Bjoern A. Zeeb
4018ea9a2b Implement handling of "atomic fragements" as outlined in
draft-gont-6man-ipv6-atomic-fragments to mitigate one class of
possible fragmentation-based attacks.

MFC after:	5 days
2012-07-08 15:30:24 +00:00
Andriy Gapon
029468d82c acpi_cpu: we are able to handle _CST change notifications...
so un-ifdef code that is supposed to tell ACPI platform about that

Tested by:	Taku YAMAMOTO <taku@tackymt.homeip.net>
MFC after:	2 weeks
2012-07-08 10:57:49 +00:00
Bjoern A. Zeeb
8dcc26febe As mentioned in the commit message of r237571 (copied from a prototype
patch of mine) also check if the 2nd in6_setscope() failed and return
the error in that case.

MFC after:	5 days
2012-07-08 08:49:37 +00:00
Eitan Adler
b71073c4bc Fix always 0 tautologly revealed by gcc46
Approved by:	cperciva
MFC after:	1 week
2012-07-08 00:52:54 +00:00
Mateusz Guzik
28a7f60741 Unbreak handling of descriptors opened with O_EXEC by fexecve(2).
While here return EBADF for descriptors opened for writing (previously it was ETXTBSY).

Add fgetvp_exec function which performs appropriate checks.

PR:		kern/169651
In collaboration with:	kib
Approved by:	trasz (mentor)
MFC after:	1 week
2012-07-08 00:51:38 +00:00
Edward Tomasz Napierala
7027e4dac4 Add trivial resize handling to gnop(8).
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:22:13 +00:00
Edward Tomasz Napierala
74badfa6ba Add trivial resize handling to gmountver(8).
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:20:47 +00:00
Edward Tomasz Napierala
c79ea20306 Make the da(4) driver notify GEOM about LUN size change.
Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 22:19:51 +00:00
Edward Tomasz Napierala
bc97ce36f7 Add disk_resize(), to make it possible for the disk drivers such as da(4)
to notify GEOM about LUN size change.

Reviewed by:	mav (earlier version)
Sponsored by:	FreeBSD Foundation
2012-07-07 21:28:31 +00:00
Edward Tomasz Napierala
dc604f0cf6 Make it possible to resize md(4) devices.
Reviewed by:	kib
Sponsored by:	FreeBSD Foundation
2012-07-07 20:32:21 +00:00
Jack F Vogel
fcc144ad4e Change the interface to the Energy Efficient Ethernet (EEE)
setting in the igb and em driver. This was necessitated by
a shared code change that I was given late in the game, a data
type changed from bool to int, in the last update I dealt with
it by a cast, but it was pointed out (thanks jhb) that there
was a potential problem with this. John suggested this safer
approach, and it is fine with me...

MFC after:2 days (to catch the 9.1 update)
2012-07-07 20:21:05 +00:00
Edward Tomasz Napierala
245899cc97 Add a new GEOM method, resize(), which is called after provider size changes.
Add a new routine, g_resize_provider(), to use to notify GEOM about provider
change.

Reviewed by:	mav
Sponsored by:	FreeBSD Foundation
2012-07-07 20:13:40 +00:00
Konstantin Belousov
48cc2fc774 Drop page queues mutex on each iteration of vm_pageout_scan over the
inactive queue, unless busy page is found.

Dropping the mutex often should allow the other lock acquires to
proceed without waiting for whole inactive scan to finish. On machines
with lot of physical memory scan often need to iterate a lot before it
finishes or finds a page which requires laundring, causing high
latency for other lock waiters.

Suggested and reviewed by:	alc
MFC after:	3 weeks
2012-07-07 19:39:08 +00:00
Eitan Adler
c288b54837 Add missing sleep stat increase
PR:		kern/168211
Submitted by:	linimon
Reviewed by:	alc
Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:46:11 +00:00
Eitan Adler
7961b54a39 Add a description of the Spanish Dvorak keymap added in r235251
PR:		conf/160235
Submitted by:	gavin
Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:35:34 +00:00
Eitan Adler
089d61ec12 Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by:	cperciva
MFC after:	3 days
2012-07-07 17:25:36 +00:00
Eitan Adler
029b129de8 Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:52 +00:00
Eitan Adler
eb5f456981 Remove ancient vnconfig symlink
Submitted by:	ak
Approved by:	cperciva
MFC after:	1 week
2012-07-07 17:20:27 +00:00