Commit Graph

175443 Commits

Author SHA1 Message Date
Xin LI
9e8bad8106 Add ID for Nuvoton WPCM450RA0BX found on Supermicro X9SCA-F motherboards.
While I'm there, also make this driver to attach to devices that have
an unknown device ID.

MFC after:	1 month
2013-01-11 10:22:09 +00:00
Andrey Zonov
cde4a72547 - Improve readability of sys_obreak().
Suggested by:	alc
Reviewed by:	alc
Approved by:	kib (mentor)
MFC after:	1 week
2013-01-11 09:58:35 +00:00
Konstantin Belousov
ddd6b3fc33 Add flags argument to vfs_write_resume() and remove
vfs_write_resume_flags().

Sponsored by:	The FreeBSD Foundation
2013-01-11 06:08:32 +00:00
Adrian Chadd
4c2f84b119 Place-holders for enable/active parameter flags. 2013-01-11 02:25:39 +00:00
Navdeep Parhar
c66c36a454 Overhaul the stid allocator so that it can be used for IPv6 servers
too.  The entry for an IPv6 server in the TCAM takes up the equivalent
of two ordinary stids and must be properly aligned too.

MFC after:	1 week
2013-01-11 00:07:01 +00:00
Warner Losh
d5cd45a38d Use better arm memory barrier 2013-01-11 00:03:19 +00:00
Navdeep Parhar
b174b65819 cxgbe(4): Add functions to help synchronize "slow" operations (those not
on the fast data path) and use them instead of frobbing the adapter lock
and busy flag directly.

Other changes made while reworking all slow operations:
- Wait for the reply to a filter request (add/delete).  This guarantees
  that the operation is complete by the time the ioctl returns.
- Tidy up the tid_info structure.
- Do not allow the tx queue size to be set to something that's not a
  power of 2.

MFC after:	1 week
2013-01-10 23:56:50 +00:00
Dimitry Andric
bfd6a1d202 Add an ugly hack to libgcc's unwind code, to make it behave properly at
runtime on amd64, when it is compiled by clang.  Some versions of clang
don't save and restore all callee registers, if a __builtin_eh_return()
intrinsic is used in a function.  This is particularly bad on amd64.

Until the problem gets fixed by upstream, use an asm statement to force
clang to assume the registers in question are clobbered, when invoking
__builtin_eh_return(), so it will emit code to save and restore them.

This should fix the crashes reported on -current with some C++ programs,
particularly those that throw exceptions over multiple function
boundaries.

Reported by:	stefanf
MFC after:	3 days
2013-01-10 23:36:02 +00:00
Brooks Davis
3da2132e52 Add xargs to the set of install tools when zoneinfo is not disabled.
This fixes installworld which I had broken in r245265.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
2013-01-10 23:29:36 +00:00
Dag-Erling Smørgrav
edd42017c9 Remove all support for legacy NOFOO and NO_FOO build options. 2013-01-10 22:44:19 +00:00
Sergey Kandaurov
e86fef2a0b The Giant lock is no longer used in the vm_map(9) part of the VM.
While here, document that the process lock is acquired in vm_map_stack, too.

MFC after:	1 week
2013-01-10 22:36:30 +00:00
Alexander Motin
f404e02afd Remove not very useful printf, that can be too chatty.
ASUS P8Z77-V board reports _AC2, _AC3 and _AC4 setpoints as 0C.  With active
cooling already automatically set to _AC2, that still caused driver to print
two useless lines about temperature above _AC3 and _AC4 every ten seconds.
Three setponts of 0C is probably a board bug, but the same spam could happen
also in correct case if system is runnign not with the lowest cooling level.
2013-01-10 21:38:31 +00:00
Brooks Davis
78e832b82d Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1).
This was the one place in installworld where files (vs links) were
installed by a tool other than install.

Reviewed by:	edwin, jilles
2013-01-10 19:46:08 +00:00
Xin LI
290a1ba9a4 The current ZFS code expects ddt_zap_count to always succeed by asserting
the underlying zap_count() to return no errors.  However, it is possible
that the pool reaches to such a state where zap_count would return error,
leading to panics when a pool is imported.

This commit changes the ddt_zap_count to return error returned from
zap_count and handle the error appropriately.  With this change, it's now
possible to let zpool rollback damaged transaction groups and import the
pool.

Obtained from:	ZFS on Linux github (e8fd45a0f9)
MFC after:	1 month
2013-01-10 19:26:56 +00:00
Warner Losh
81b450cfee Clang complains about the comparision of fak < 0 always being
false. It is right. Delete it because on the next line we catch all
'negative' cases with the test > 2, since 'negative' numbers are just
really big unsigned numbers and we do an identical action.
2013-01-10 18:51:35 +00:00
Konstantin Belousov
6b17595133 When nullfs mount is forcibly unmounted and nullfs vnode is reclaimed,
get back the leased write reference from the lower vnode.  There is no
other path which can correct v_writecount on the lowervp.

Reported by:	flo
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2013-01-10 18:24:48 +00:00
Hajimu UMEMOTO
f09c52c333 Re-enable ip6addrctl support but only for IPv6 address.
Requested by:	Ben Morrow <ben__at__morrow.me.uk>
MFC after:	1 week
2013-01-10 14:08:19 +00:00
Andrey Zonov
3ac7d29722 - Reduce kernel size by removing unnecessary pointer indirections.
GENERIC kernel size reduced in 16 bytes and RACCT kernel in 336 bytes.

Suggested by:	alc
Reviewed by:	alc
Approved by:	kib (mentor)
MFC after:	1 week
2013-01-10 12:43:58 +00:00
Steven Hartland
1a71c5b935 Changed scsi_da device requests to use the sysctl tunable value for retry_count
and da_default_timeout where their current hardcoded values matched the current
default value for said tunables.

PR:		kern/169976
Reviewed by:	pjd (mentor)
Approved by:	mav
2013-01-10 12:25:00 +00:00
Steven Hartland
fd16fbdd70 Updates delete_method sysctl changes to always maintain disk d_flags
DISKFLAG_CANDELETE. While this change makes this layer consistent
other layers such as UFS and ZFS BIO_DELETE support may not notice
any change made manually via these device sysctls until the device
is reopened via a mount.

Also corrected var order in dadeletemethodsysctl

PR:		kern/169801
Reviewed by:	pjd (mentor)
Approved by:	mav
MFC after:	2 weeks
2013-01-10 11:57:46 +00:00
Steven Hartland
d8e8ee3177 Removes essentially unused variables from scsi_da probe setups
PR:		kern/169835
Reviewed by:	pjd (mentor)
Approved by:	mav
MFC after:	2 weeks
2013-01-10 11:28:12 +00:00
Steven Hartland
7ef204a2a9 Allow perl scripts to be used in rc.d scripts
PR:		conf/117027
Reviewed by:	pjd (mentor)
Approved by:	hrs
MFC after:	2 weeks
2013-01-10 11:08:22 +00:00
Hans Petter Selasky
bdf43bb5c3 Bugfix: Fix sizeof() argument.
Found by:	Haakon Loevdal
MFC after:	1 week
2013-01-10 08:06:12 +00:00
Hans Petter Selasky
60867f577a Fix detection of Razer Copperhead as a USB mouse.
Factor out USB mouse and keyboard detection logic.
Reject USB keyboards which have mouse alike HID items
in their HID descriptors.

Submitted by:	Matthew W
MFC after:	1 week
2013-01-10 07:45:46 +00:00
Andrey V. Elsukov
3ea87cb57f Simplify in6_setscope() function to get better performance.
Currently we use interface indeces as zone IDs for link-local and
interface-local scopes, and since we don't have any tool to configure
zone IDs, there is no need to acquire the afdata lock several times per
packet only to read if_index value.
So, now in6_setscope reads zone IDs for interface-local, link-local and
global scopes without a lock.

Sponsored by:	Yandex LLC
MFC after:	2 weeks
2013-01-10 00:10:24 +00:00
Navdeep Parhar
c9bfe3d179 cxgbe(4): updates to the configuration file that controls how hardware
resources are partitioned.

- Reduce the number of virtual interfaces reserved for PF4.  This leaves
  spare room in the source MAC table and allows the driver to setup
  filters that rewrite the source MAC address.

- Reduce the number of filters and use the freed up space for the CLIP
  (Compressed Local IPv6 addresses) table.  This is a prerequisite for
  IPv6 TOE support which will follow separately in a series of commits.

MFC after:	1 week
2013-01-09 21:27:14 +00:00
Brooks Davis
624c4889c7 Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default.

Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked
as /usr/sbin/mtree as well as /usr/sbin/nmtree.
2013-01-09 21:07:08 +00:00
John Baldwin
6c0ef8957f Don't drop options from the third retransmitted SYN by default. If the
SYNs (or SYN/ACK replies) are dropped due to network congestion, then the
remote end of the connection may act as if options such as window scaling
are enabled but the local end will think they are not.  This can result in
very slow data transfers in the case of window scaling disagreements.

The old behavior can be obtained by setting the
net.inet.tcp.rexmit_drop_options sysctl to a non-zero value.

Reviewed by:	net@
MFC after:	2 weeks
2013-01-09 20:27:06 +00:00
Glen Barber
d28396ae13 Update where porters handbook lives.
MFC after:	3 days
2013-01-09 20:10:45 +00:00
Andrey V. Elsukov
99d9e4ec60 Fix the bindto parameter declaration.
Submitted by:	sem
2013-01-09 19:49:35 +00:00
Andrey V. Elsukov
6e9a5a5e52 Remove unneeded variable.
MFC after:	1 week
2013-01-09 18:54:58 +00:00
Adrian Chadd
1efdee81a9 Add the "enable at reset" functionality to trigger spectral scan upon
a channel change/reset.
2013-01-09 18:50:06 +00:00
Hajimu UMEMOTO
164051cea5 Add no_prefer_iface option.
It stops treating the address on the interface as special by source
address selection rule even when the interface is outgoing interface.
This is desired in some situation.

Requested by:	hrs
Reviewed by:	IHANet folks including hrs
MFC after:	1 week
2013-01-09 18:18:08 +00:00
Kenneth D. Merry
744c26b250 Make CTL work a little better with loading and unloading drivers.
Previously CTL would leave individual LUNs enabled in the target
driver, whether or not the port as a whole was enabled.  It would
also leave the wildcard LUN enabled indefinitely.

This change means that CTL will enable and disable any active LUNs,
as well as the wildcard LUN, when enabling and disabling a port.

Also, fix a bug that could crop up due to an uninitialized CCB
type.

ctl.c:		Before calling ctl_frontend_online(), run through
		the LUN list and enable all active LUNs.

		After calling ctl_frontend_offline(), run through
		the LUN list and disble all active LUNs.

scsi_ctl.c:	Before bringing a port online, allocate the
		wildcard peripheral for that bus.  And after taking
		a port offline, invalidate the wildcard peripheral
		for that bus.

		Make sure that we hold the SIM lock around all
		calls to xpt_action() and other transport layer
		interfaces that require it.

		Use CAM_SIM_{LOCK|UNLOCK} consistently to acquire
		and release the SIM lock.

		Update a number of outdated comments.  Some of
		these should have been fixed long ago.

		Actually do LUN disbables now.  The newer drivers
		in the tree work correctly for this as far as I
		know.

		Initialize the CCB type to CTLFE_CCB_DEFAULT to
		avoid a panic due to uninitialized memory.

Submitted by:	Chuck Tuffli (partially)
MFC after:	1 week
2013-01-09 17:02:08 +00:00
Kenneth D. Merry
43ab9660c5 Fix a bug in the device pager code that can trigger an assertion
in devfs if a particular race condition is hit in the device pager
code.

This was a side effect of change 227530 which changed the device
pager interface to call a new destructor routine for the cdev.
That destructor routine, old_dev_pager_dtor(), takes a VM object
handle.

The object handle is cast to a struct cdev *, and passed into
dev_rel().

That works in most cases, except the case in cdev_pager_allocate()
where there is a race condition between two threads allocating an
object backed by the same device.  The loser of the race
deallocates its object at the end of the function.

The problem is that before inserting the object into the
dev_pager_object_list, the object's handle is changed from the
struct cdev pointer to the object's own address.  This is to avoid
conflicts with the winner of the race, which already inserted an
object in the list with a handle that is a pointer to the same cdev
structure.

The object is then passed to vm_object_deallocate(), and eventually
makes its way down to old_dev_pager_dtor().  That function passes
the handle pointer (which is actually a VM object, not a struct
cdev as usual) into dev_rel().  dev_rel() decrements the reference
count in the assumed struct cdev (which happens to be 0), and
that triggers the assertion in dev_rel() that the reference count
is greater than or equal to 0.

The fix is to add a cdev pointer to the VM object, and use that
pointer when calling the cdev_pg_dtor() routine.

vm_object.h:	Add a struct cdev pointer to the VM object
		structure.

device_pager.c:	In cdev_pager_allocate(), populate the new cdev
		pointer.

		In dev_pager_dealloc(), use the new cdev pointer
		when calling the object's cdev_pg_dtor() routine.

Reviewed by:	kib
Sponsored by:	Spectra Logic Corporation
MFC after:	1 week
2013-01-09 16:48:38 +00:00
Hajimu UMEMOTO
d38f4ead6f Disable destination address selection support of
getipnodebyname(1).  RFC 2553 mentions IPv6 addresses
are returned 1st.

Spotted by:	uqs
MFC after:	1 week
2013-01-09 15:22:37 +00:00
Hans Petter Selasky
6799bce965 Change function argument type instead of casting.
Suggested by:	glebius @
2013-01-09 09:29:22 +00:00
Hans Petter Selasky
f3a2bb16ba Fix compile warning when using GCC:
Comparison between signed and unsigned.

MFC after:	1 week
2013-01-09 09:09:09 +00:00
Neel Natu
95102a8bcb Add a "pause" to busy wait loops in the cpu reset path.
This should not matter much when running on bare metal but it makes the guest
more friendly when running inside a virtual machine.

Discussed with:	jhb
Obtained from:	NetApp
2013-01-09 02:11:16 +00:00
Olivier Houchard
6db9b3528e Define IPI_IRQ_START and IPI_IRQ_END. 2013-01-09 01:54:17 +00:00
Olivier Houchard
00100b0eec Use get_pcpu() instead of using pcpup, as it's wrong for SMP.
Submitted by:	Lukasz Plachno <luk@semihalf.com>
2013-01-09 01:52:28 +00:00
Andrey V. Elsukov
78c235c99f The in6_setscope() function determines the scope zone id of an address
and embeds it into address. Inside the kernel we keep addresses with
embedded zone id only for two scopes: link-local and interface-local.

For other scopes this function is nop in most cases. To reduce an
overhead of locking, first check that address is capable for embedding.
Also, handle the loopback address before acquire the lock.

Sponsored by:	Yandex LLC
MFC after:	1 week
2013-01-09 00:36:06 +00:00
Olivier Houchard
ac021d82d2 Remove old declarations. 2013-01-08 22:55:39 +00:00
Adrian Chadd
3aa1b9569d Fix format size. 2013-01-08 22:42:15 +00:00
Adrian Chadd
e1c562d83a Add support for triggering spectral scan upon a channel reset/change.
This is intended to support reporting FFT results during active channel
scans, for users who would like to fiddle around with writing applications
that do both FFT visualisation _and_ AP scanning.

* add a new ioctl to enable/trigger spectral scan at channel change/reset;
* set do_spectral consistently if it's enabled, so a channel set/reset
  will carry forth the correct PHY error configuration so frames
  are actually received;
* for NICs that don't do spectral scan, don't bother checking the
  spectral scan state on channel change/reset.

Tested:

* AR9280 - STA and scanning;
* AR5416 - STA, ensured that the SS code doesn't panic
2013-01-08 22:15:13 +00:00
Xin LI
dea85013f1 Use calloc() to get zeroed memory.
MFC after:	1 month
2013-01-08 22:14:45 +00:00
Adrian Chadd
f29c6bdec5 If spectral scan is enabled, ensure radar report PHY errors are also
enabled.
2013-01-08 22:12:45 +00:00
Hiroki Sato
0e4b6f5ed7 ISO 9660 specification allows only "d-characters" and "a-characters" in the
Volume Descriptor (section 7.4).  In short, upper-case alphanumeric + some
symbols only.  While the makefs utility automatically converts the characters,
$LABEL should be consistent in the scripts.
2013-01-08 21:13:58 +00:00
Hans Petter Selasky
6317f31612 Shave off another register write to save some more
microseconds of PCI access time.

Tested by:	sos @
Submitted by:	sos @
MFC after:	1 week
2013-01-08 19:38:57 +00:00
David E. O'Brien
9b6b681624 Following r226271, allow disabling lzma support with "WITHOUT_LZMA_SUPPORT".
Correct r226271 which should have used WITHOUT_BZIP2_SUPPORT per r166255.

Obtained from:	Juniper Networks
2013-01-08 18:37:12 +00:00