Commit graph

87091 commits

Author SHA1 Message Date
Bruce M Simpson b7d882304b Fix a typo in MLD query exponent processing.
Submitted by:	rpaulo@
MFC after:	3 days
2012-06-28 23:45:37 +00:00
Bruce M Simpson 289ca95209 In MLDv2 general query processing, do not enforce the strict check
on query origins.

Submitted by:	Gu Yong
MFC after:	3 days
2012-06-28 23:44:47 +00:00
Alan Cox 6c67613030 Avoid some unnecessary PV list locking in pmap_enter(). 2012-06-28 22:03:59 +00:00
Kenneth D. Merry e36042794f Now that the mps(4) driver is endian-safe, add it to the powerpc and
sparc64 GENERIC config files.

MFC after:	3 days
2012-06-28 20:48:24 +00:00
Kenneth D. Merry beedaee94a Add a loader tunable, kern.cam.ctl.disable, that will disable
loading CTL.  This may be useful in very low memory installations.

MFC after:	3 days
2012-06-28 19:39:30 +00:00
Alexander Motin d7f7144a73 Fix millisecond to ticks conversion in drm_msleep().
On systems with HZ=100 it caused Intel eDP video output initialization
(and Xorg startup) to take several minutes instead of several seconds.

Reviewed by:	kib
MFC after:	3 days
2012-06-28 17:15:16 +00:00
Michael Tuexen b1754ad17b Pass the src and dst address of a received packet explicitly around.
MFC after: 3 days
2012-06-28 16:01:08 +00:00
Warner Losh acdb2ef475 Turns out the emulators still need/want a_magic, so put it back here. 2012-06-28 07:37:46 +00:00
Warner Losh f4dc9a4015 Remove an old hack I noticed years ago, but never committed. 2012-06-28 07:33:43 +00:00
Warner Losh cfe4885cf8 Document some MP assumptions for sio.
Submitted by:	bde (years ago)
2012-06-28 07:28:39 +00:00
Warner Losh 96eb909a84 Simplify resource activation a bit. 2012-06-28 07:26:44 +00:00
Warner Losh 6e45677ab7 Add a sysctl to set the cdrom timeout. Data recovery operations from
a CD or DVD drive with a damaged disc often benefit from a shorter
timeout.  Also, when retries are set to 0, an application is expecting
errors and recovering them so do not print the error into the log.
The number of expected errors can literally be in the hundreds of
thousands which significantly slows data recovery.

Reviewed by:	ken@ (but quite some time ago).
2012-06-28 07:01:48 +00:00
Warner Losh f3140a8923 octeon_uart_class was removed some time ago everywhere but here. 2012-06-28 06:49:04 +00:00
Alan Cox 23e59dfa8d Optimize pmap_pv_demote_pde(). 2012-06-28 05:42:04 +00:00
Kenneth D. Merry be4aa869c1 Bring in LSI's latest mps(4) 6Gb SAS and WarpDrive driver, version
14.00.00.01-fbsd.

Their description of the changes is as follows:

1.	Copyright contents has been changed in all respective .c
	and .h files

2.	Support for WRITE12 and READ12 for direct-io (warpdrive only)
	has been added.

3.      Driver has added checks to see if Drive has READ_CAP_16
	support before sending it down to the device.
	If SPC3_SID_PROTECT flag is set in the inquiry data, the
	device supports protection information, and must support
	the 16 byte read capacity command, otherwise continue without
	sending read cap 16. This will optimize driver performance,
	since it will not send READ_CAP_16 to the drive which does
	not have support of READ_CAP_16.

4.      With new approach, "MPTIOCTL_RESET_ADAPTER" IOCTL will not
	use DELAY() which is busy loop implementation.
	It will use <msleep> (Better way to sleep without busy
	loop). Also from the HBA reset code path and some other
	places, DELAY() is replaced with msleep() or "pause()",
	which is based on sleep/wakeup style calls.  Driver use
	msleep()/pause() instead of DELAY based on CAN_SLEEP/NO_SLEEP
	flags to avoid busy loop which is not required all the
	time.e.a

	a. While driver is getting loaded, driver calls most of the
	   commands with NO_SLEEP.
	b. When Driver is functional and it needs Reinit of HBA,
	   CAN_SLEEP flag is used.

5.	<mpslsi> driver is not Endian safe. It will not work on Big
	Endian machines	like Sparc and PowerPC platforms because it
	assumes it is running on a Little Endian machine.

	Driver code is modified such way that it does not assume CPU
	arch is Little Endian.
	a. All places where Driver interacts from HBA to Host, it
	   converts Little Endian format to CPU format.
	b. All places where Driver interacts from Host to HBA, it
	   converts CPU format to Little Endian.

6.	Findout memory leaks in FreeBSD Driver and resolve those,
	such as memory leak in targ's luns creation/deletion.
	Also added additional checks to see memory allocation
	success/fail.

7.	Add loginfo prints as debug message, i.e. When FW sends any
	loginfo, Driver should print those as debug message.
	This will help for debugging purpose.

8.	There is possibility to get config request timeout. Current
	driver is able to detect config request timetout, but it does
	not do anything on config_request timeout.  Driver should
	call mps_reinit() if any request_poll (which is called as
	part of config_request) is time out.

9.	cdb length check is required for 32 byte CDB. Add correct mpi
	control value for 32 bit CDB as below while submitting SCSI IO
	Request to controller.
	mpi_control |= 4 << MPI2_SCSIIO_CONTROL_ADDCDBLEN_SHIFT;

10.	Check the actual status of Message unit reset
	(mps_message_unit_reset).Previously FreeBSD Driver just writes
	MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET and never check the ack
	(it just wait for 50 millisecond).  So, Driver now check the
	status of "MPI2_FUNCTION_IOC_MESSAGE_UNIT_RESET" after writing
	it to the FW.

	Now it also checking for whether doorbell ack uses msleep with
	proper sleep flags, instead of <DELAY>.

11.	Previously CAM does not detect Multi-Lun Devices. In order to
	detect Multi-Lun Devices by CAM the driver needs following change
	set:
	a. There is "max_lun" field which Driver need to set based on
	   hw/fw support. Currently LSI released driver does not set
	   this field.
	b. Default of "max_lun" should not be 0 in OS, but it is
	   currently set to 0 in CAM layer.
	c. Export max_lun capacity to 255

12.	Driver will not reset target info after port enable complete and
	also do Device removal when Device remove from FW.  The detail
	description is as follows
	a. When Driver receive WD PD add events, it will add all
	   information in driver local data structure.
	b. Only for WD, we have below checks after port enable
	   completes, where driver clear off all information retrieved
	   at #1.
	if ((sc->WD_available &&
             (sc->WD_hide_expose == MPS_WD_HIDE_ALWAYS)) ||
             (sc->WD_valid_config && (sc->WD_hide_expose ==
                            MPS_WD_HIDE_IF_VOLUME)) {
		  // clear off target data structure.
	}
	It is mainly not to attach PDs to OS.

	FreeBSD does bus rescan as older Parallel scsi style. So Driver
	needs to handle which Drive is visible to OS.  That is a reason
	we have to clear off targ information for PDs.

	Again, above logic was implemented long time ago. Similar concept
	we have for non-wd also. For that, LSI have introduced different
	logic to hide PDs.

	Eventually, because of above gap, when Phy goes offline, we
	observe below failure. That is what Driver is not doing complete
	removal of device with FW. (which was pointed by Scott)
	Apr  5 02:39:24 Freebsd7 kernel: mpslsi0: mpssas_prepare_remove
	Apr  5 02:39:24 Freebsd7 kernel: mpssas_prepare_remove 497 : invalid handle 0xe

	Now Driver will not reset target info after port enable complete
	and also will do Device removal when Device remove from FW.

13.	Returning "CAM_SEL_TIMEOUT" instead of "CAM_TID_INVALID"
	error code on request to the Target IDs that have no devices
	conected at that moment.  As if "CAM_TID_INVALID" error code
	is returned to the CAM Layaer then it results in a huge chain
	of errors in verbose kernel messages on boot and every
	hot-plug event.

Submitted by:	Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
MFC after:	3 days
2012-06-28 03:48:54 +00:00
Kenneth D. Merry 905cb85d78 Fix a typo in a panic() call.
PR:		kern/169497
Submitted by:	Steven Hartland <steven.hartland@multiplay.co.uk>
MFC after:	3 days
2012-06-28 03:36:13 +00:00
Marius Strobl a6c8226584 For subtractively decoding bridges, don't try to grow windows but pass
the request up the tree in order to be on the safe side. Growing windows
in this case would mean to switch resources to positive decoding and
it's unclear how to correctly handle this. At least with ALi/ULi M5249
PCI-PCI bridges, this also just doesn't work out of the box.

Reviewed by:	jhb
MFC after:	3 days
2012-06-27 22:17:52 +00:00
Jung-uk Kim 3e2c973410 MFV: r237650
Do not malloc(9) while holding a spin lock, to avoid panic.

Reported by:	kib (and many others)
Tested by:	kib (and many others)
2012-06-27 16:15:13 +00:00
Bernhard Schmidt 2289f9b47e Add new firmware for the g2a (6205) and g2b (623x) devices.
MFC after:	3 days
2012-06-27 16:14:28 +00:00
Bernhard Schmidt 7a7a0b8301 We need to defer passing the DELBA request to the firmware until the aggr
queue is empty or the firmware will go nuts.

PR:		kern/167806
Tested by:	osa@, Brandon Gooch (earlier version),
		    Bojan Petrovic (earlier version)
MFC after:	3 days
2012-06-27 16:07:01 +00:00
Kenneth D. Merry c76a6fe732 In g_disk_providergone(), don't continue if the softc is NULL. This may be
the case if we've already gone through g_disk_destroy().

Reported by:	Michael Butler <imb@protected-networks.net>
MFC after:	3 days
2012-06-27 16:05:09 +00:00
Bernhard Schmidt 547ea37a96 Fix a TX aggregation issue, if after the last compressed BA notification
the TX queue is empty, there won't be a TX done notification, effectly
resulting in an mbuf leak. The correct way to handle this is to free
up mbufs on both BA and TX done notifications up to the last sent seqno.

Tested by:	osa@
MFC after:	3 days
2012-06-27 15:55:34 +00:00
Gabor Kovesdan f4ae3eee14 - Bump __FreeBSD_version: default sort is BSD sort 2012-06-27 06:08:02 +00:00
Adrian Chadd df5ea0d85b Fix a subtle corner case surrounding the handling of OFDM restart along
with AMPDU aggregate delimiters.

If there's an OFDM restart during an aggregate, the hardware ACKs
the previous frame, but communicates the RXed frame to the hardware
as having had CRC delimiter error + OFDM_RESTART phy error.
The frame however didn't have a CRC error and since the hardware ACKed
the aggregate to the sender, it thinks the frame was received.

Since I have no idea how often this occurs in the real world, add a
debug statement so trigger whenever this occurs.  I'd appreciate an
email if someone finds this particular situation is triggered.
2012-06-27 05:23:33 +00:00
Pedro F. Giffuni 675cf9154b Bring llquantize support into Dtrace.
Bryan Cantrill implemented the equivalent of semi-log graph
paper for Dtrace so llquantize will use one logarithmic and
one linear scale.

Special thanks to Mark Peek for providing fix to an
assertion and to Fabian Keill for testing the port.

Illumos Revision:	13355:15b74a2a9a9d

Reference:
https://www.illumos/issues/905

Obtained from:	Illumos
Tested by:	Fabian Keill, mp
MFC after:	4 days
2012-06-27 04:39:30 +00:00
Alan Cox e30df26e7b Add new pmap layer locks to the predefined lock order. Change the names
of a few existing VM locks to follow a consistent naming scheme.
2012-06-27 03:45:25 +00:00
Adrian Chadd 37003d2fc3 Bring over some new typedefs as part of the AR9300 HAL import. 2012-06-27 03:24:27 +00:00
Adrian Chadd a6f801b608 Remove duplicate entries. 2012-06-27 03:00:29 +00:00
Adrian Chadd 6479ef780d Bring over the initial 802.11n bluetooth coexistence support code.
The Linux ath9k btcoex code is based off of this code.

Note this doesn't actually implement functional btcoex; there's some
driver glue and a whole lot of verification that is required.

On the other hand, I do have the AR9285+BT and AR9287+BT NICs which
this code supports..

Obtained from:	Qualcomm Atheros, Linux ath9k
2012-06-26 22:16:53 +00:00
Takanori Watanabe ab25c078af Add nand core module and module dependency information.
Reviewed by:gber
2012-06-26 18:08:03 +00:00
Alan Cox 5b5b0ef34d Introduce RELEASE_PV_LIST_LOCK(). 2012-06-26 16:45:18 +00:00
Kenneth D. Merry b79dc8a8da Fix an issue that caused the kernel to panic inside CTL when trying
to attach to target capable HBAs that implement the old immediate
notify (XPT_IMMED_NOTIFY) and notify acknowledge (XPT_NOTIFY_ACK)
CCBs.  The new API has been in place since SVN change 196008 in
2009.

The solution is two-fold:  fix CTL to handle the responses from the
HBAs, and convert the HBA drivers in question to use the new API.

These drivers have not been tested with CTL, so how well they will
interoperate with CTL is unknown.

scsi_target.c:	Update the userland target example code to use the
		new immediate notify API.

scsi_ctl.c:	Detect when an immediate notify CCB is returned
		with CAM_REQ_INVALID or CAM_PROVIDE_FAIL status,
		and just free it.

		Fix a duplicate assignment.

aic79xx.c,
aic79xx_osm.c:	Update the aic79xx driver to use the new API.
		Target mode is not enabled on for this driver, so
		the changes will have no practical effect.

aic7xxx.c,
aic7xxx_osm.c:	Update the aic7xxx driver to use the new API.

sbp_targ.c:	Update the firewire target code to work with the
		new API.

mpt_cam.c:	Update the mpt(4) driver to work with the new API.
		Target mode is only enabled for Fibre Channel
		mpt(4) devices.

MFC after:	3 days
2012-06-26 14:51:35 +00:00
Adrian Chadd 8405fe8662 Make sure the BAR TX session pause is correctly unpaused when a node
is reassociating.

PR:		kern/169432
2012-06-26 07:56:15 +00:00
Alan Cox 0d646df757 Add PV list locking to pmap_enter(). Its execution is no longer serialized
by the pvh global lock.

Add a needed atomic operation to pmap_object_init_pt().
2012-06-26 06:02:43 +00:00
Navdeep Parhar 2cd9f0711d Allow cxgbe(4) running within a VM to attach to its devices that have been
exported via PCI passthrough.

- Do not check for a specific physical function (PF) before claiming a device.
  Different PFs have different device-ids so this check is redundant anyway.

- Obtain the PF# from the WHOAMI register instead of pci_get_function().

- Setup the memory windows using the real BAR0 address, not what the VM says it
  is.

Obtained from:	Chelsio Communications
2012-06-26 00:34:34 +00:00
Xin LI 5b8f1a8676 Fix a LOR acquiring the if_afdata lock while holding an rtentry lock.
Possibly do some entra work in case we would not get into the
ifa0 != NULL paths later as we already do for the mltaddr before.

XXX We should possibly error in case in6_setscope fails.

Reference: http://lists.freebsd.org/pipermail/freebsd-net/2011-September/029829.html

Submitted by:	bz
MFC after:	1 week
2012-06-25 20:56:32 +00:00
Michael Tuexen 6dc5aabcb7 Unify sctp_input() and sctp6_input().
MFC after: 3 days
2012-06-25 19:13:43 +00:00
Oleksandr Tymoshenko 8696e0cb5b Handle case when result of pmap_pte is NULL. This issue was uncovered
by r237367
2012-06-25 17:50:11 +00:00
Michael Tuexen 39803b8c58 Whitespace cleanup.
MFC after: 3 days
2012-06-25 17:15:09 +00:00
Navdeep Parhar 40a29cf009 Fix clang warning when compiling iw_cxgb.
Reported by:	rene, dim
2012-06-25 16:52:27 +00:00
Monthadar Al Jaberi d566999aa5 Mesh mode, potential garbage in QoS subfield.
* qos[1] subfield is never assigned a value before this statement.
qos[1] can potentially be OR:ed with garbage. Make it an assignment instead;
* Remove brackets around if statement;

Approved by: adrian
2012-06-25 11:52:26 +00:00
Ulrich Spörlein 5097809e5b Fix 'make depend'. 2012-06-25 09:46:06 +00:00
Alan Cox aaf3bc56fd Add PV chunk and list locking to pmap_change_wiring(), pmap_protect(), and
pmap_remove().  The execution of these functions is no longer serialized
by the pvh global lock.

Make some stylistic changes to the affected code for the sake of
consistency with related code elsewhere in the pmap.
2012-06-25 07:13:25 +00:00
Kevin Lo de8925a261 Fix size of the bcopy when extracting ethernet address
Obtained from:	DragonFly
2012-06-25 05:47:12 +00:00
Kevin Lo c61325d009 Correct sizeof usage
Obtained from:	DragonFly
2012-06-25 05:41:16 +00:00
Kenneth D. Merry 365e076ed2 Consume spare fields for the providergone pointers added to the g_class and
g_geom structures in change 237518.  The original change would have broken
the ABI.

Suggested by:	ae
MFC after:	4 days
2012-06-25 04:26:10 +00:00
Matt Jacob d42f4bedba Unbreak register tests for parallel SCSI.
You can't overwrite registers 7 and 8.
MFC after:	3 days
2012-06-25 03:06:29 +00:00
Michael Tuexen 20cc2188f3 Pass the packet length explicitly around.
MFC after: 3 days
2012-06-24 23:12:24 +00:00
Michael Tuexen 329204ff00 Remove redundant check.
MFC after: 3 days
2012-06-24 22:22:44 +00:00
Michael Tuexen f938425253 Do packet logging in a consistent way.
MFC after: 3 days
2012-06-24 21:25:54 +00:00