Commit Graph

93647 Commits

Author SHA1 Message Date
Jim Harris
666b0fab76 For ATA_PASSTHROUGH commands, pretend isci(4) supports multiword DMA
by treating it as UDMA.

This fixes a problem introduced in r249933/r249939, where CAM sends
ATA_DSM_TRIM to SATA devices using ATA_PASSTHROUGH_16.  scsi_ata_trim()
sets protocol as DMA (not UDMA) which is for multi-word DMA, even
though no such mode is selected for the device.  isci(4) would fail
these commands which is the correct behavior but not consistent with
other HBAs, namely LSI's.

smh@ did some further testing on an LSI controller, which rejected
ATA_PASSTHROUGH_16 commands with mode=UDMA_OUT, even though only
a UDMA mode was selected on the device.  So this precludes adding
any kind of mode detection in CAM to determine which mode to use on
a per-device basis.

Sponsored by:	Intel
Discussed with:	scottl, smh
Reported by:	scottl
Tested by:	scottl
MFC after:	3 days
2013-06-26 22:08:45 +00:00
Justin T. Gibbs
9985113b61 In the Xen block front driver, take advantage of backends that
support cache flush and write barrier commands.

sys/dev/xen/blkfront/block.h:
	Add per-command flag that specifies that the I/O queue must
	be frozen after this command is dispatched.  This is used
	to implement "single-stepping".

	Remove the unused per-command flag that indicates a polled
	command.

	Add block device instance flags to record backend features.

	Add a block device instance flag to indicate the I/O queue
	is frozen until all outstanding I/O completes.

	Enhance the queue API to allow the number of elements in a
	queue to be interrogated.

	Prefer "inline" to "__inline".

sys/dev/xen/blkfront/blkfront.c:
	Formalize queue freeze semantics by adding methods for both
	global and command-associated queue freezing.

	Provide mechanism to freeze the I/O queue until all outstanding
	I/O completes.  Use this to implement barrier semantics
	(BIO_ORDERED) when the backend does not support
	BLKIF_OP_WRITE_BARRIER commands.

	Implement BIO_FLUSH as either a BLKIF_OP_FLUSH_DISKCACHE
	command or a 0 byte write barrier.  Currently, all publicly
	available backends perform a diskcache flush when processing
	barrier commands, and this frontend behavior matches what
	is done in Linux.

	Simplify code by using new queue length API.

	Report backend features during device attach and via sysctl.

Submitted by:	Roger Pau Monné
Submitted by:	gibbs (Merge with new driver queue API, sysctl support)
2013-06-26 20:39:07 +00:00
Pedro F. Giffuni
fafb835a0b Minor sorting.
MFC after:	3 days
2013-06-26 19:43:22 +00:00
Alexander Motin
6016474b3c Fix some UTF-8 chars slipped into r252204 via copy/paste. 2013-06-26 09:56:33 +00:00
Adrian Chadd
0cfc028fcb Add the EEPROM start offset and size in so ath_ahb will use the
supplied EEPROM data.

This needs to die in a fire and replaced with the firmware API
to store the calibration data early ..
2013-06-26 05:03:47 +00:00
Adrian Chadd
5dbf20a630 Add in the vendor / device id so the ath_ahb glue works. 2013-06-26 05:02:47 +00:00
Adrian Chadd
46b620a1aa Add the wireless support to the AR933x base kernel, as the support
actually works now.
2013-06-26 05:02:30 +00:00
Adrian Chadd
8805f7656f Add in two new configuration options for the current generation SoCs. 2013-06-26 05:01:50 +00:00
Adrian Chadd
30be7dd9c9 Extend the AHB code to work on chips besides the AR9130.
The AHB code:

* hard coded the AR9130 device id;
* assumes a 4k flash calibration space.

This code now extends this:

* hint.ath.X.eepromsize now overrides the eeprom range, instead of 4k
* hint.ath.X.device_id and hint.ath.X.vendor_id can now be overridden.

Tested:

* AR9330 board (Carambola 2)
2013-06-26 04:58:25 +00:00
Adrian Chadd
92b9076a70 If EEPROM data is provided by the AHB layer, copy it in.
This is required for the flash layer code to correctly work.

Tested:

* AR9330 SoC (carambola 2)
2013-06-26 04:53:33 +00:00
Adrian Chadd
860487123c Re-enable the channel set code for the AR933x.
This required a HAL change to map the 2GHz frequency back to an IEEE
channel number in order to fetch some value(s) to program in.
2013-06-26 04:46:43 +00:00
Adrian Chadd
03f2665670 Add a HAL local routine to map the 2GHz channel frequency to an IEEE
channel.

There's some HAL code in the AR9300 HAL that requires a back-mapping
and using the net80211 code isn't appropriate here.
2013-06-26 04:46:03 +00:00
Adrian Chadd
9855e2aff2 In preparation to support AR933x SoC builds, allow the AH_SUPPORT_AR93(xx)
options to set the AR9300 HAL defines.

This enables the Wasp, Hornet (and later Scorpion) SoC code.
2013-06-26 04:34:45 +00:00
Adrian Chadd
a778f8a19a Add a stub AR93xx RF module just to keep the linker happy.
When building AR933x test images, I'd like to only build only the ar9300
HAL.  To do this, it needs to supply an RF linker entry or it won't compile.

Tested:

* AR933x test builds
2013-06-26 04:33:57 +00:00
Rui Paulo
8ab18d3034 Print the 'setting internal ...' message only with bootverbose. 2013-06-26 02:56:54 +00:00
Pyun YongHyeon
91bd90d8c2 Don't blidly clear GPIOs configuration. Just use firmware configured
one.  This change also fixes non-working traffic LED on BCM57780.

Submitted by:	Masanobu SAITOH <msaitoh@NetBSD.org>
Tested by:	Alexander Milanov <a@amilanov.com>
2013-06-26 01:15:40 +00:00
Jeff Roberson
6fd34d6f67 - Resolve bucket recursion issues by passing a cookie with zone flags
through bucket_alloc() to uma_zalloc_arg() and uma_zfree_arg().
 - Make some smaller buckets for large zones to further reduce memory
   waste.
 - Implement uma_zone_reserve().  This holds aside a number of items only
   for callers who specify M_USE_RESERVE.  buckets will never be filled
   from reserve allocations.

Sponsored by:	EMC / Isilon Storage Division
2013-06-26 00:57:38 +00:00
Xin LI
e33806a54a MFV r252215:
Restore a previous behavior before r251646, where when destructing
ZFS snapshot, the ioctl would return ENOENT when it hit any of
them in the errlist (the new behavior was only return ENOENT when
all returns error).

Illumos ZFS issues:
  3829 fix for 3740 changed behavior of zfs destroy/hold/release ioctl

MFC after:	1 week
2013-06-25 22:14:32 +00:00
John Baldwin
b5fb43e572 A few mostly cosmetic nits to aid in debugging:
- Call lock_init() first before setting any lock_object fields in
  lock init routines.  This way if the machine panics due to a duplicate
  init the lock's original state is preserved.
- Somewhat similarly, don't decrement td_locks and td_slocks until after
  an unlock operation has completed successfully.
2013-06-25 20:23:08 +00:00
John Baldwin
cd32bd7ad1 Several improvements to rmlock(9). Many of these are based on patches
provided by Isilon.
- Add an rm_assert() supporting various lock assertions similar to other
  locking primitives.  Because rmlocks track readers the assertions are
  always fully accurate unlike rw_assert() and sx_assert().
- Flesh out the lock class methods for rmlocks to support sleeping via
  condvars and rm_sleep() (but only while holding write locks), rmlock
  details in 'show lock' in DDB, and the lc_owner method used by
  dtrace.
- Add an internal destroyed cookie so that API functions can assert
  that an rmlock is not destroyed.
- Make use of rm_assert() to add various assertions to the API (e.g.
  to assert locks are held when an unlock routine is called).
- Give RM_SLEEPABLE locks their own lock class and always use the
  rmlock's own lock_object with WITNESS.
- Use THREAD_NO_SLEEPING() / THREAD_SLEEPING_OK() to disallow sleeping
  while holding a read lock on an rmlock.

Submitted by:	andre
Obtained from:	EMC/Isilon
2013-06-25 18:44:15 +00:00
David C Somayajulu
711bcba0bb Add Qlogic 10Gb Ethernet Driver for Qlogic 8100 Series CNA Adapter
Driver version (v2.0.0)

Submitted by: David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
Approved by: George Neville-Neil (gnn@freebsd.org)
2013-06-25 17:50:22 +00:00
Alexander Motin
1a5fc4190d Add bunch of names for Seagate and HGST vennor-specififc ASC/ASCQ codes. 2013-06-25 10:50:17 +00:00
Alexander Motin
f49c619850 Add test for SATA registers writability and skip using them if it failed.
There are some systems reported, where PCI BAR(5), used for SATA registers
access, is present, but not functional.  Attempt to use it brakes devices
detection logic.  Try to detect those cases on attach by setting and testing
some bits in SControl register.  If bits are unsettable, fallback to legacy
ATA without hot-plug detection, speed control/reporting, etc.

MFC after:	2 weeks
2013-06-25 09:15:49 +00:00
Kevin Lo
1d02cf7c8d Add support for D-Link DWA-131. 2013-06-25 06:43:04 +00:00
Pyun YongHyeon
7008404ddd Add Lenovo USB 2.0 Ethernet adapter.
PR:		usb/179920
MFC After:	1 week
2013-06-25 00:26:30 +00:00
Qing Li
f672f56f21 Due to the routing related networking kernel redesign work
in FBSD 8.0, interface routes have been returened to the
applications without the RTF_GATEWAY bit. This incompatibility
has caused some issues with Zebra, Qugga and the like.
This patch provides the RTF_GATEWAY flag bit in returned interface
routes so to behave similarly to pre 8.0 systems.

Reviewed by:	    hrs
Verified by:	    mackn at opendns dot com
2013-06-25 00:10:49 +00:00
Marius Strobl
f33856104f Flag mpt(4) as supporting unmapped I/O; all necessary conversion actually
already has been done as part of r246713 except for a comment update.

MFC after:	3 days
2013-06-24 21:27:15 +00:00
John Baldwin
19e1c4d115 Disable hw.pci.realloc_bars by default. It wasn't needed for the original
tester of this fix, and realloc_bars breaks some other cases as a small
BAR that is reallocated can end up grabbing space needed by a much larger
BAR in the existing window of a PCI-PCI bridge.

MFC after:	3 days
2013-06-24 18:30:44 +00:00
Gleb Smirnoff
4aa4cd8e92 Typo in comment. 2013-06-24 13:36:16 +00:00
Pyun YongHyeon
fec40c2d03 When RX checksum offloading is active, AX88772B will prepend a
checksum header.  The header contains a received frame length but
the defined length for AX88772B is different with other ASIX
controllers.  When the RX checksum is off, AX88772B controller does
not prepend a checksum header so driver has to use normal header
length mask.
This change should fix RX errors when RX checksum offloading is
off.

Tested by:	kevlo
MFC After:	1 week
2013-06-24 05:18:31 +00:00
Qing Li
378aa8d85e Delete the nd6 entries associated with an off-link prefix
if the same prefix cannot be found on an alternative
interface.

Reviewed by:	hrs
MFC after:	1 week
2013-06-24 05:01:13 +00:00
Thomas Quinot
73ecbbb39c Revert previous change to uark.c (restore previous rev), which was
committed by mistake.
2013-06-23 20:22:49 +00:00
Thomas Quinot
9aa5c929ba Fix minor typo in comment 2013-06-23 20:19:51 +00:00
Justin Hibbits
53c13dd1ab Cache the Open Firmware CPU properties at attach time, so we don't always
enter it at runtime to get static data.
2013-06-23 14:20:54 +00:00
Pedro F. Giffuni
da057ed2d3 Define and use e2fs_lbn_t in ext2fs.
In line to what is done in UFS, define an internal type
e2fs_lbn_t for the logical block numbers.

This change is basically a no-op as the new type is unchanged
(int32_t) but it may be useful as bumping this may be required
for ext4fs.

Also, as pointed out by Bruce Evans:

-Use daddr_t for daddr in ext2_bmaparray(). This seems to
improve reliability with the reallocblks option.
- Add a cast to the fsbtodb() macro as in UFS.

Reviewed by:	bde
MFC after:	3 days
2013-06-23 02:44:42 +00:00
Rick Macklem
2e6a4b0c55 Fix r252074 so that it builds on 64bit arches. 2013-06-22 21:58:21 +00:00
Rick Macklem
1dd95a046c The NFSv4.1 LayoutCommit operation requires a valid offset and length.
(0, 0 is not sufficient) This patch a loop for each file layout, using
the offset, length of each file layout in a separate LayoutCommit.
2013-06-21 22:46:16 +00:00
Rick Macklem
562395581b When the NFSv4.1 client is writing to a pNFS Data Server (DS), the
file's size attribute does not get updated. As such, it is necessary
to invalidate the attribute cache before clearing NMODIFIED for pNFS.

MFC after:	2 weeks
2013-06-21 22:26:18 +00:00
Rick Macklem
315c38d135 Since some NFSv4 servers enforce the requirement for a reserved port#,
enable use of the (no)resvport mount option for NFSv4. I had thought
that the RFC required that non-reserved port #s be allowed, but I couldn't
find it in the RFC.

MFC after:	2 weeks
2013-06-21 19:41:30 +00:00
Oleksandr Tymoshenko
db5815641c Rename run(4) firmware file from runfw to run.fw. Previous name was the
same as top-level target name for "device runfw" kernel option and
caused cyclic dependancy that lead to kernel build breakage

Module change is not strictly required and done for name unification sake

PR:		conf/175751
Submitted by:	    Issei <i10a at herbmint.jp>
2013-06-21 18:16:54 +00:00
Steven Hartland
43e695497c Switch ZFS mutex_owner macro to use sx_xholder as its now exported via sx.h
MFC after:	1 week
2013-06-21 15:55:03 +00:00
Steven Hartland
9446debe6b Fix intermittent ZFS lock panic when kernel is compiled with debugging caused
by access of uninitialized smlock in mmutex_init.

MFC after:	1 week
2013-06-21 15:47:10 +00:00
Steven Hartland
5f921c5911 Fixed import of destroyed ZFS pools failing due to vdev_geom incorrectly
preventing config loads from devices associated with destroyed pools.

Reviewed by:	avg
MFC after:	1 week
2013-06-21 12:02:09 +00:00
Gleb Smirnoff
42a253e6a1 Fix kmod_*stat_inc() after r249276. The incorrect code actually
increased the pointer, not the memory it points to.

In collaboration with:	kib
Reported & tested by:	Ian FREISLICH <ianf clue.co.za>
Sponsored by:		Nginx, Inc.
2013-06-21 06:36:26 +00:00
Steven Hartland
ef27aa40a5 Corrected ATA Passthrough defines from decimal to hex
Reviewed by:	scottl
MFC after:	1 week
2013-06-20 21:38:08 +00:00
Jeff Roberson
af5263743c - Add a per-zone lock for zones without kegs.
- Be more explicit about zone vs keg locking.  This functionally changes
   almost nothing.
 - Add a size parameter to uma_zcache_create() so we can size the buckets.
 - Pass the zone to bucket_alloc() so it can modify allocation flags
   as appropriate.
 - Fix a bug in zone_alloc_bucket() where I missed an address of operator
   in a failure case.  (Found by pho)

Sponsored by:	EMC / Isilon Storage Division
2013-06-20 19:08:12 +00:00
Konstantin Belousov
9dbb63fe03 Allow immediate operand.
Sponsored by:	The FreeBSD Foundation
2013-06-20 14:30:04 +00:00
Andrey V. Elsukov
a04d64d875 Use corresponding macros to update statistics for AH, ESP, IPIP, IPCOMP,
PFKEY.

MFC after:	2 weeks
2013-06-20 11:44:16 +00:00
Andrey V. Elsukov
6659296cb0 Use IPSECSTAT_INC() and IPSEC6STAT_INC() macros for ipsec statistics
accounting.

MFC after:	2 weeks
2013-06-20 09:55:53 +00:00
Pedro F. Giffuni
3f5747b69d Rename some prefixes in the Block Group Descriptor fields to ext4bgd_
Change prefix to avoid confusion and denote that these fields
are generally only available starting with ext4.

MFC after:	3 days
2013-06-20 00:00:33 +00:00