Commit Graph

88289 Commits

Author SHA1 Message Date
Adrian Chadd
6d24c7dbab Debugging output fixes:
* use the correct frame status - although the completion descriptor is
  the _last_ in the frame/aggregate, the status is currently stored in
  the _first_ buffer.

* Print out ath_buf specific fields once, not per descriptor in an ath_buf.
2012-09-24 19:48:41 +00:00
Hans Petter Selasky
391d3f18dc DWC OTG host mode improvements:
- Make HSIC selection dynamic.
 - Make LOW speed USB devices work through HIGH speed USB HUB.
2012-09-24 16:34:13 +00:00
Alexander Motin
076b76e871 Fix panic caused by wrong pointer dereference, left after pin sense rewrite
at r230551.

Also while there, make sense polling use reported for each node separately
instead of reporting accumulated total status.

Submitted by:	Barbara <barbara.freebsd@gmail.com> (1)
MFC after:	3 days
2012-09-24 08:23:05 +00:00
Adrian Chadd
0c54de88e6 Prepare for software retransmission of non-aggregate frames but ensure
it's disabled.

The previous commit to enable CLRDMASK setting didn't do it at all
correctly for non-aggregate sessions - so the CLRDMASK bit would be
cleared and never re-set.

* move ath_tx_update_clrdmask() to be called by functions that setup
  descriptors and queue frames to the hardware, rather than scattered
  everywhere.

* Force CLRDMASK to be set on all non-aggregate session frames being
  transmitted.

* Use ath_tx_normal_comp() now on non-aggregate sessoin frames
  that are queued via ath_tx_xmit_normal().  That way the TID hwq is
  updated and they can trigger (eventual) filter frame queue resets
  and software retransmits.

There's still a bit more work to do in this area to reverse the silly
short-sightedness on my part, however it's likely going to be better
to fix this now than just reverting the patch.

Thanks to people on the freebsd-wireless@ mailing list for promptly
pointing this out.
2012-09-24 06:42:20 +00:00
Adrian Chadd
94eefcf1dc In (eventual) preparation for supporting disabling the whole 11n/software
retry path - add some code to make it obvious (to me!) how to disable
the software tx path.
2012-09-24 06:00:51 +00:00
Pedro F. Giffuni
c148237d44 Partial revert of r239963:
The following change caused rpc.lockd to exit after startup:
____

libtirpc: be sure to free cl_netid and cl_tp

When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the
same way.
____

MFC after:	3 days
Reported by:	David Wolfskill
Tested by:	David Wolfskill
2012-09-24 03:14:17 +00:00
Sean Bruno
126a39ce60 This patch fixes a nit in the em, lem, and igb driver statistics. Increment
adapter->dropped_pkts instead of if_ierrors because if_ierrors is
overwritten by hw stats collection.

Submitted by:	Andrew Boyer <aboyer@averesystems.com>
Reviewed by:	Jack F Vogel <jfv@freebsd.org>
MFC after:	2 weeks
2012-09-23 22:53:39 +00:00
Pawel Jakub Dawidek
c622f88dd2 It is possible to recursively destroy snapshots even if the snapshot
doesn't exist on a dataset we are starting from. For example if we
have the following configuration:

	tank
	tank/foo
	tank/foo@snap
	tank/bar
	tank/bar@snap

We can execute:

	# zfs destroy -t tank@snap

eventhough tank@snap doesn't exit.

Unfortunately it is not possible to do the same with recursive rename:

	# zfs rename -r tank@snap tank@pans
	cannot open 'tank@snap': dataset does not exist

...until now. This change allows to recursively rename snapshots even if
snapshot doesn't exist on the starting dataset.

Sponsored by:	rsync.net
MFC after:	2 weeks
2012-09-23 20:12:10 +00:00
Andrew Turner
c2257f93ba Clean up the bcm2835 initarm. It is now identical to the other ARMv6 copies
Tested by:	Alexander Yerenkow
2012-09-23 19:48:29 +00:00
Pawel Jakub Dawidek
bcb77be2b7 Add TRIM support.
The code builds a map of regions that were freed. On every write the
code consults the map and eventually removes ranges that were freed
before, but are now overwritten.

Freed blocks are not TRIMed immediately. There is a tunable that defines
how many txg we should wait with TRIMming freed blocks (64 by default).

There is a low priority thread that TRIMs ranges when the time comes.
During TRIM we keep in-flight ranges on a list to detect colliding
writes - we have to delay writes that collide with in-flight TRIMs in
case something will be reordered and write will reached the disk before
the TRIM. We don't have to do the same for in-flight writes, as
colliding writes just remove ranges to TRIM.

Sponsored by:	multiplay.co.uk

This work includes some important fixes and some improvements obtained
from the zfsonlinux project, including TRIMming entire vdevs on pool
create/add/attach and on pool import for spare and cache vdevs.

Obtained from:	zfsonlinux
Submitted by:	Etienne Dechamps <etienne.dechamps@ovh.net>
2012-09-23 19:40:58 +00:00
Alan Cox
1f11f2bff4 Address a race condition that was introduced in r238212. Unless the page
queues lock is acquired before the page lock is released, there is no
guarantee that the page will still be in that same page queue when
vm_page_requeue() is called.

Reported by:		pho
In collaboration with:	kib
MFC after:	3 days
2012-09-23 17:42:39 +00:00
Nathan Whitehorn
2383d92ae8 Move the prototype for savectx from cpu.h to pcb.h, as it is on other
platforms, as well as putting it in an #ifdef KERNEL block.

MFC after:	2 weeks
2012-09-23 17:33:16 +00:00
Hans Petter Selasky
3eabad2587 DWC OTG host mode improvements. Add support for the 3-strikes and you are
gone rule. Optimise use of channels so that when a channel
is not ready another channel is used. Instead of using the SOF interrupt
use the system timer to drive the host statemachine. This might
give lower throughput and higher latency, but reduces the CPU usage
significantly. The DWC OTG host mode support should not be considered
for serious USB host controller applications. Some problems are still
seen with LOW speed USB devices.
2012-09-23 12:19:19 +00:00
Hans Petter Selasky
3c12706c5e Correct driver name.
MFC after:	1 weeks
2012-09-23 09:39:04 +00:00
Yoshihiro Takahashi
47c6c015ff MFi386: revision 237445
Commit changes missed from r237435.  Properly calculate the signal
  trampoline addresses after the shared page is enabled.  Handle FreeBSD
  ABIs without shared page support too.

MFi386: revision 238792

  Introduce curpcb magic variable.
2012-09-23 09:13:57 +00:00
Yoshihiro Takahashi
a112b2d0e4 MFi386: revision 240637
loader/i386: replace ugly inb/outb re-implementations with cpufunc.h
2012-09-23 08:50:54 +00:00
Andrew Turner
610ba83a97 Fix a typo in a Broadcom initarm debug printf 2012-09-23 08:49:41 +00:00
Yoshihiro Takahashi
4794983d3e Cosmetic changes. 2012-09-23 08:46:44 +00:00
Kevin Lo
cecaa4738c Remove unused variable ma. 2012-09-23 08:44:12 +00:00
Michael Tuexen
e06f3469e0 Whitespace change.
MFC after:	3 days
2012-09-23 07:43:10 +00:00
Michael Tuexen
a98809db78 Declare a static function as such.
MFC after:	3 days
2012-09-23 07:23:18 +00:00
Andrew Turner
1f008b99cc Pull out the SoC specific parts of initarm into separate functions 2012-09-23 03:46:03 +00:00
Andrew Turner
70203625fb Update different versions of physmap_init to be identical in preparation
for merging them.
2012-09-23 02:01:59 +00:00
Andrew Turner
d98d8a1e83 Reduce the diff between the FDT implementations of initarm.
This only touches whitespace and comments.
2012-09-22 22:41:38 +00:00
Michael Tuexen
efb0814c24 Fix a bug related to handling Re-config chunks. It is not true that
the association can be removed if the socket is gone.

MFC after:	3 days
2012-09-22 22:04:17 +00:00
Gleb Smirnoff
51e02a31d0 EBUSY is a better reply for refusing to unload pf(4) or pfsync(4).
Submitted by:	pluknet
2012-09-22 19:03:11 +00:00
Gleb Smirnoff
e9e4cb7345 Use M_NOWAIT in wtab_alloc(), too. Convert panic() to
a soft failure here. wtab_alloc() is used by red_alloc(),
which can fail.

Reported by:	Kim Culhan <w8hdkim gmail.com>
2012-09-22 18:47:14 +00:00
Pawel Jakub Dawidek
45a1f1e1ff Add rounddown2() macro similar to the roundup2() macro. 2012-09-22 17:49:25 +00:00
Andriy Gapon
81c4584e30 zfs: allow a zvol to be used as a pool vdev, again
Do this by checking if spa_namespace_lock is already held and not taking
it again in that case.
Add a comment explaining why that is done and why it is safe.

Reviewed by:	pjd
MFC after:	24 days
2012-09-22 17:42:53 +00:00
Pawel Jakub Dawidek
a6512306ce Fix an obvious typo. 2012-09-22 17:41:56 +00:00
Pawel Jakub Dawidek
3c5a057574 As in r226967, r226987 and r232401 changes to UFS and TMPFS remove cache
entries associated with the source and the target of rename().

MFC after:	1 week
2012-09-22 17:32:40 +00:00
Michael Tuexen
2089750009 Small cleanups. No functional change.
MFC after:	10 days
2012-09-22 14:39:20 +00:00
Gleb Smirnoff
03fb709e1f Convert more M_WAITOK malloc() to M_NOWAIT.
Reported by:	Kim Culhan <w8hdkim gmail.com>
2012-09-22 12:49:36 +00:00
Pawel Jakub Dawidek
171f6b3a34 Use the topology lock to protect list of providers while withering them.
It is possible that provider is destroyed while we are iterating over the
list.

Reported by:	Brian Parkison <parkison@panzura.com>
Discussed with:	phk
MFC after:	1 week
2012-09-22 12:41:49 +00:00
Konstantin Belousov
787a64ddd2 Do not skip two elements of the tid_buffer when reusing the buffer
slot. This eventually results in exhaustion of the tid space, causing
new threads get tid -1 as identifier.

The bad effect of having the thread id equal to -1 is that
UMTX_OP_UMUTEX_WAIT returns EFAULT for a lock owned by such thread,
because casuword cannot distinguish between literal value -1 read from
the address and -1 returned as an indication of faulted
access. _thr_umutex_lock() helper from libthr does not check for
errors from _umtx_op_err(2), causing an infinite loop in
mutex_lock_sleep().

We observed the JVM processes hanging and consuming enormous amount of
system time on machines with approximately 100 days uptime.

Reported by:	Mykola Dzham <freebsd levsha org ua>
MFC after:	1 week
2012-09-22 12:17:09 +00:00
Gleb Smirnoff
29bdd62c85 When connection rate hits and we overload a source to a table,
we are actually editing table, which means editing rules,
thus we need writer access to 'em.

Fix this by offloading the update of table to the same taskqueue,
we already use for flushing. Since taskqueues major task is now
overloading, and flushing is optional, do mechanical rename
s/flush/overload/ in the code related to the taskqueue.

Since overloading tasks do unsafe referencing of rules, provide
a bandaid in pf_purge_unlinked_rules(). If the latter sees any
queued tasks, then it skips purging for this run.

In table code:
- Assert any lock in pfr_lookup_addr().
- Assert writer lock in pfr_route_kentry().
2012-09-22 10:14:47 +00:00
Gleb Smirnoff
e706fd3a3a In pfr_insert_kentry() return ENOMEM if memory allocation failed. 2012-09-22 10:04:48 +00:00
Gleb Smirnoff
7348c5240d Fix fallout from r236397 in pfr_update_stats(), that was missed
later in r237155. We need to zero sockaddr before lookup. While
here, make pfr_update_stats() panic on unknown af.
2012-09-22 10:02:44 +00:00
Hans Petter Selasky
9b42038b8a Apply some more casting. 2012-09-22 08:02:42 +00:00
Rui Paulo
5ea861555c Improve the check for p4 opened files.
Now we only search for opened files in ${SYSDIR}, which makes it
possible to use multiple source trees.
2012-09-22 07:44:36 +00:00
Hans Petter Selasky
8692ca3647 Apply correct casting. 2012-09-22 07:27:24 +00:00
Alan Cox
6b7d314db2 Since UMA_ZONE_NOFREE is specified when l2zone and l2table_zone are created,
there is no need to release and reacquire the pmap and pvh global locks
around calls to uma_zfree().  Recursion into the pmap simply won't occur.

Eliminate the use of M_USE_RESERVE.  It is deprecated and, in fact, counter-
productive, meaning that it actually makes the memory allocation request
more likely to fail.

Eliminate the macros pmap_{alloc,free}_l2_dtable().  They are of limited
utility, and pmap_free_l2_dtable() was inconsistently used.

Tidy up pmap_init().  In particular, change the initialization of the PV
zone so that it doesn't span the initialization of the l2 and l2table zones.

Tested by:	jmg
2012-09-22 06:54:03 +00:00
Andrew Turner
1161298251 Create a common set_stackptrs in sys/arm/machdep.c.
On single core devices set_stackptrs is only ever called with cpu = 0 in
initarm and will be identical to the existing function. On SMP this needs
to be implemented for sys/arm/mp_machdep.c, but the implementations are
identical for each SoC.
2012-09-22 06:41:56 +00:00
Andreas Tobler
bf23276b69 Remove leftover from r215163. 2012-09-21 21:27:57 +00:00
Rui Paulo
b0bf1a1836 Remove #ident macro. 2012-09-21 19:18:39 +00:00
Andreas Tobler
777813c555 Implement elfN(reloc) for powerpc. With this change the kernel is now able to
resolve dependencies of modules at boot time and load additional modules when
needed.

MFC after:	1 week
2012-09-21 18:21:31 +00:00
Dimitry Andric
f99157cced After r205013, amd64 and i386 CPU family and model IDs were printed out
in hexadecimal, but without any 0x prefix, which can be very misleading.

MFC after:	3 days
2012-09-21 10:31:19 +00:00
Hans Petter Selasky
2a4e4c6772 Fix typo. 2012-09-20 15:11:59 +00:00
Kevin Lo
26f370d011 Fix typo: s/protocl/protocol 2012-09-20 10:07:31 +00:00
Gleb Smirnoff
3b7d677b8f Convert lagg(4) to use if_transmit instead of if_start.
In collaboration with:	thompsa, sbruno, fabient
2012-09-20 10:05:10 +00:00