Commit Graph

86980 Commits

Author SHA1 Message Date
John Baldwin
a7b5acac1a Add a 'wmask' variable to hold the expression '(1ul << w->step) - 1' in
pcib_grow_window().  This makes the code slightly easier to read and
prevents the type of bug fixed in r237271.

MFC after:	3 days
2012-06-19 16:06:27 +00:00
John Baldwin
1ba9eae287 Fix another off-by-one error in the previous fix so that the new start
address is properly aligned.  While here, use a simpler expression to
align the new end address that we use elsewhere for aligning the end.
2012-06-19 15:15:35 +00:00
Alan Cox
2f49b6b831 Condition the implementation of pv_entry_count on PV_STATS. On amd64,
pv_entry_count is purely informational.  It does not serve any functional
purpose.

Add PV chunk locking to get_pv_entry().
2012-06-19 08:12:44 +00:00
Navdeep Parhar
09fe63205c - Updated TOE support in the kernel.
- Stateful TCP offload drivers for Terminator 3 and 4 (T3 and T4) ASICs.
  These are available as t3_tom and t4_tom modules that augment cxgb(4)
  and cxgbe(4) respectively.  The cxgb/cxgbe drivers continue to work as
  usual with or without these extra features.

- iWARP driver for Terminator 3 ASIC (kernel verbs).  T4 iWARP in the
  works and will follow soon.

Build-tested with make universe.

30s overview
============
What interfaces support TCP offload?  Look for TOE4 and/or TOE6 in the
capabilities of an interface:
# ifconfig -m | grep TOE

Enable/disable TCP offload on an interface (just like any other ifnet
capability):
# ifconfig cxgbe0 toe
# ifconfig cxgbe0 -toe

Which connections are offloaded?  Look for toe4 and/or toe6 in the
output of netstat and sockstat:
# netstat -np tcp | grep toe
# sockstat -46c | grep toe

Reviewed by:	bz, gnn
Sponsored by:	Chelsio communications.
MFC after:	~3 months (after 9.1, and after ensuring MFC is feasible)
2012-06-19 07:34:13 +00:00
Rick Macklem
53e1b8fba5 Fix the NFSv4 client for the case where mmap'd files are
written, but not msync'd by a process. A VOP_PUTPAGES()
called when VOP_RECLAIM() happens will usually fail, since
the NFSv4 Open has already been closed by VOP_INACTIVE().
Add a vm_object_page_clean() call to the NFSv4 client's
VOP_INACTIVE(), so that the write happens before the NFSv4
Open is closed. kib@ suggested using vgone() instead and
I will explore this, but this patch fixes things in the
meantime. For some reason, the VOP_PUTPAGES() is still
attaempted in VOP_RECLAIM(), but having this fail doesn't
cause any problems except a "stateid0 in write" being logged.

Reviewed by:	kib
MFC after:	1 week
2012-06-18 22:17:28 +00:00
Konstantin Belousov
c59f3d4d22 Adjust the fix in r236953, by not generating the signal manually, but
performing the return to usermode using full return path.  This
consolidates the handling of exceptional situations in less number of
places, and is less code as well.

Reviewed by:   jhb
MFC after:     1 week
2012-06-18 21:08:48 +00:00
Marius Strobl
d80b202dd2 Revert r236529, re-enabling verification of the flashed content as
the underlying problem was dealt with in r237239 (in fact, disabling
verification also actually only made the problem less likely to occur).
2012-06-18 20:19:07 +00:00
Marius Strobl
e1020aef06 Revert the part of r236495 that introduced checking of SPI_SR_TXEMPTY
for TX transfer completion as for reasons unknown this occasionally
causes SPI_SR_RXBUFF and SPI_SR_ENDRX to not rise.
In any case, once the RX part of the transfer is done it's obvious
that the preceding TX part had finished and checking of SPI_SR_TXEMPTY
was introduced to rule out a possible cause for the data corruption
mentioned in r236495 but which didn't turn out to be the problem
anyway.

MFC after:	3 days
2012-06-18 20:14:42 +00:00
Marius Strobl
da20f734c0 Try to bring this file closer to style(9). 2012-06-18 19:47:25 +00:00
Marius Strobl
352a43b07f Unbreak after r236658 by comparing the right things. 2012-06-18 19:22:10 +00:00
Marius Strobl
f3b44896bb Refine r237102 a bit:
- Anounce JTAG interfaces deliberately skipped.
- Bring back empty lines too eagerly removed.

MFC after:	3 days
2012-06-18 19:18:31 +00:00
Michael Tuexen
5ad9e57b3f Add rate limitation for SCTP OOTB responses.
MFC after: 3 days
2012-06-18 17:11:24 +00:00
Michael Tuexen
285052f0aa Cleanup the UDP decapsulation code.
MFC after: 3 days
2012-06-18 17:09:39 +00:00
Alan Cox
06de588446 Add PV chunk and list locking to pmap_page_exists_quick(),
pmap_page_is_mapped(), and pmap_remove_pages().  These functions
are no longer serialized by the pvh global lock.
2012-06-18 16:21:59 +00:00
Alexander V. Chernikov
36374fcf4b Make radix lookup on src and dst flow addresses optional
and configurable on per-interface basis.
Remove __inline__ for several functions being called once per
flow (e.g once per 10-20 packets on common traffic flows).
Update manual page to simplify search for BPF data link types.

Sponsored by Yandex LLC

Reviewed by:      glebius
Approved by:      ae(mentor)
MFC after:        2 weeks
2012-06-18 13:56:36 +00:00
Alexander V. Chernikov
0bd6bb6bb0 Simplify IP pointer recovery in case of mbuf reallocation.
Reviewed by:     glebius (previous version)
Approved by:     ae(mentor)
MFC after:       2 weeks
2012-06-18 13:50:41 +00:00
Alexander Motin
ca5598a415 Remove never used CD/DA_FLAG_TAGGED_QUEUING flags.
MFC after:	1 week
2012-06-18 12:45:35 +00:00
Poul-Henning Kamp
00c5291f29 Fix the previous commit to only copy the data we were asked to and not
twice as much.

Spotted by:	Taku YAMAMOTO
2012-06-18 07:54:10 +00:00
Peter Holm
e84a11e7ff In tty_makedev() the following construction:
dev = make_dev_cred();
dev->si_drv1 = tp;

leaves a small window where the newly created device may be opened
and si_drv1 is NULL.

As this is a vary rare situation, using a lock to close the window
seems overkill. Instead just wait for the assignment of si_drv1.

Suggested by:	kib
MFC after:	1 week
2012-06-18 07:34:38 +00:00
Adrian Chadd
8a3860d5b4 Extend the radiotap code to be aware of the size of any extra vendor
bitmaps that may occur.

The way this works is:

* the beginning of the radiotap frame has a 32 bit "radiotap" namespace
  bitmap;
* if the vendor bitmap bit is set, then the next bitmap will be interpreted
  as a vendor bitmap;
* this can keep going on and on (ie, more vendor and radiotap namespace
  bitmaps can be added) until the last bitmap with no "more bitmaps" set.

Now, the radiotap code gets its grubby fingers into the supplied
radiotap rx/tx buffer and replaces the channel configuration
for each frame.  I don't know why it's not up to the drivers themselves
to do this, but I digress.  So, if a vendor bitmap (or two, etc) exists,
the offset calculations will be all completely wrong.

This particular patch introduces ieee80211_radiotap_attachv(), which
includes the number of vendor bitmaps (well, any other bitmaps, vendor
or otherwise) between the end of the bitmap/header and the start of the
actual radiotap field entries.  This makes the radiotap calculations
"right", so it correctly calculates where to overwrite the channel
configuration.

The long term fix is to go through and make each driver update the channel
configuration, as some of the fields are already being updated.

That, however, is a longer term fix that will need each driver fixed.

I leave that as an exercise to someone in the future.
2012-06-18 02:08:04 +00:00
Matt Jacob
061b8865d1 Roll to the latest 2400/2500 firmware available from the public QLogic
website.

Sponsored by: Spectralogic
MFC after:	1 week
2012-06-17 21:47:24 +00:00
Matt Jacob
ad0ab75379 Prepare for FC-Tape support. This involved doing a lot of little cleanups
and crosschecks against firmware documentation. We now check and report
FC firmware attributes and at least are now prepared for the upper 48 bits
of f/w attributes (which are probably for the 8100 or later cards). This
involed changing how inbits and outbits are calculated for varios commands,
hopefully clearer and cleaner. This also caused me to clean up the actual
mailbox register usage. Finally, we are now unconditionally using a CRN
for initiator mode.

A longstanding issue with the 2400/2500 is that they do *not* support
a "Prefer PTP followed by loop", which explains why enabling that
caused the f/w to crash.

A slightly more invasive change is to let the firmware load entirely
drive whether multi_id support is enabled or not.

Sponsored by:	Spectralogic
MFC after:	1 week
2012-06-17 21:39:40 +00:00
Pawel Jakub Dawidek
d99e1d5fd6 Don't check for race with close on advisory unlock (there is nothing smart we
can do when such a race occurs). This saves lock/unlock cycle for the filedesc
lock for every advisory unlock operation.

MFC after:	1 month
2012-06-17 21:04:22 +00:00
Poul-Henning Kamp
fc9174db51 On certain newer Intel Atom based motherboards, for instance the
D2500CC which I have, syscons in text-mode fails to show the expected
contents due to write errors into video-memory.

At least one of the causes is that we copy from syscons internal buffer
to the video memory with optimized bcopy(9) which uses >16bit operations.

Until now, 32bit and wider operations have always worked on the video
memory, but since I cannot find a single source which says that this
SHALL work, and since these chipsets/bugs are now out there, this
commit changes syscons to always use 16bit copies on i386 & amd64.

This may be relevevant for PR's:
	166262
	166639
and various other bug reports floating elsewhere on the net, but
I lack hardware to test those.
2012-06-17 21:02:48 +00:00
Rick Macklem
79cafccd40 Move the nfsrpc_close() call in ncl_reclaim() for the NFSv4 client
to below the vnode_destroy_vobject() call, since that is where
writes are flushed.

Suggested by:	kib
MFC after:	1 week
2012-06-17 18:34:04 +00:00
Pawel Jakub Dawidek
604a7c2f00 Extend the comment about checking for a race with close to explain why
it is done and why we don't return an error in such case.

Discussed with:	kib
MFC after:	1 month
2012-06-17 16:59:37 +00:00
Pawel Jakub Dawidek
fd6049b186 If VOP_ADVLOCK() call or earlier checks failed don't check for a race with
close, because even if we had a race there is nothing to unlock.

Discussed with:	kib
MFC after:	1 month
2012-06-17 16:32:32 +00:00
Mitsuru IWASAKI
5e33d57ff1 Resotre LCD brightness level on resuming.
MFC after:	3 days
2012-06-17 16:19:09 +00:00
Davide Italiano
f39e915e19 Disable hwpmc(4) support for Intel Xeon Sandy Bridge (Model 0x2D).
Due to some differences in MSRs between Xeon Sandy Bridge and Core Sandy
Bridge (Model 0x2A), wrmsr() may generate in a GP# fault exception and so a
panic of the machine.

Approved by:		gnn (mentor)
MFC after:		3 days
2012-06-17 13:48:39 +00:00
Davide Italiano
68cefd64ad The variable 'error' in sys_poll() is initialized in declaration to value
zero but in any case is overwritten by successive copyin(), making the
previous initialization useless. Remove this.
As an added bonus this fixes a style(9) bug.

Discussed with:		kib
Approved by:		gnn (mentor)
MFC after:		3 days
2012-06-17 13:03:50 +00:00
Adrian Chadd
3acbfe72fc AR9287 tidyups:
* Add an OS_A_REG_WRITE() routine - analog writes require a 100usec delay
  on AR9280 and later, so create a method to do it.

* Use it for the AR9287 analog writes.

* Re-indent and style(9) the code.
2012-06-17 05:56:27 +00:00
Adrian Chadd
1b86b1d21a Add an disabled workaround for the AR9285SE.
This just requires a little HAL change (add a new config parameter) and
some glue in if_ath_pci.c, however I'm leaving this up for someone else
to do.

Obtained from:	Qualcomm Atheros
2012-06-17 05:34:41 +00:00
Adrian Chadd
daf9887596 Bring over the AR9285 specific PCIe suspend/resume/ASPM workarounds.
Obtained from:	Qualcomm Atheros, Linux ath9k
2012-06-17 04:48:47 +00:00
Adrian Chadd
d1328898eb After some discussion with bschmidt@, it's likely better to just go
through ieee80211_suspend_all() and ieee80211_resume_all().
All the other wireless drivers are doing that particular dance.

PR:		kern/169084
2012-06-17 03:08:33 +00:00
Eitan Adler
f181f0e74b attach_generic causes missing devices in /dev when the driver
interacts with some non-highpoint controollers. Change attach_generic to
be off by default.

PR:		kern/168910
Submitted by:	Richard Yao <ryao@gentoo.org>
Approved by:	cperciva
No objections by:	-hackers
Obtained from:	Gentoo FreeBSD
MFC after:	2 weeks
2012-06-17 02:46:27 +00:00
Adrian Chadd
891f9ad6f2 .. and this wasn't supposed to be in the previous commit either. 2012-06-16 22:28:36 +00:00
Adrian Chadd
af0c4b9e4f oops, remove this, it wasn't supposed to be committed. 2012-06-16 22:26:45 +00:00
Attilio Rao
db9ba57895 Do a more targeted check on the page cache and avoid to check the cache
pointer directly in vnode_pager_setsize() by using newly introduced
vm_page_is_cached() function.

Reviewed by:	alc
MFC after:	2 weeks
X-MFC:		r234039,234064
2012-06-16 21:39:00 +00:00
Adrian Chadd
b25c1f2af0 A few nitpicks:
* Use ATH_RC_NUM instead of '4' when iterating over the ratecontrol series
  array.

* A few style(9) fixes, hopefully no regressions here.

* Add some comments that better describe what's going on.
2012-06-16 21:37:15 +00:00
Konstantin Belousov
ec528f07de Fix build. 2012-06-16 20:49:08 +00:00
Alan Cox
6031c68de4 The page flag PGA_WRITEABLE is set and cleared exclusively by the pmap
layer, but it is read directly by the MI VM layer.  This change introduces
pmap_page_is_write_mapped() in order to completely encapsulate all direct
access to PGA_WRITEABLE in the pmap layer.

Aesthetics aside, I am making this change because amd64 will likely begin
using an alternative method to track write mappings, and having
pmap_page_is_write_mapped() in place allows me to make such a change
without further modification to the MI VM layer.

As an added bonus, tidy up some nearby comments concerning page flags.

Reviewed by:	kib
MFC after:	6 weeks
2012-06-16 18:56:19 +00:00
Alexander V. Chernikov
e8cce25549 Use time_uptime instead of getnanotime for accouting integer number of seconds.
Reviewed by:     glebius
Approved by:     ae(mentor)
MFC after:       1 week
2012-06-16 13:55:31 +00:00
Alexander V. Chernikov
6a0d28ec21 Set netflow v9 observation domain value to fib number instead of node id.
This fixes multi-fib netflow v9 export.

Reviewed by:     glebius
Approved by:     kib(mentor)
MFC after:       1 week
2012-06-16 13:53:14 +00:00
Alexander V. Chernikov
f75083f064 Fix improper L4 header handling for IPv6 packets passed via DLT_RAW.
Reported by:     Emil Muratov <gpm@hotplug.ru>
Reviewed by:     glebius
Approved by:     ae(mentor)
MFC after:       1 week
2012-06-16 13:51:01 +00:00
Pawel Jakub Dawidek
cff2dcd10d Revert r237073. 'td' can be NULL here.
MFC after:	1 month
2012-06-16 12:56:36 +00:00
Adrian Chadd
375d4f068a Shuffle some more fields in ath_buf so it's not too big.
This shaves off 20 bytes - from 288 bytes to 268 bytes.

However, it's still too big.
2012-06-16 04:41:35 +00:00
Adrian Chadd
3dd2db6646 Shave four (or eight) bytes off of ath_buf - this field isn't used. 2012-06-16 04:36:08 +00:00
Warner Losh
6212b9963b Throw this debug behind bootverbose. The information isn't all that
exciting once the initial board bring up is over.
2012-06-16 04:34:46 +00:00
Warner Losh
d94f5b01c2 Remove stray line from merge. 2012-06-15 16:50:32 +00:00
Adrian Chadd
83567110bd Oops - use the actual 11n enable option. 2012-06-15 15:32:16 +00:00