198373 Commits

Author SHA1 Message Date
jilles
0bf8cb7b51 MFC r276359: symlink(7): Note that stat(1) does not follow symlinks by
default.
2015-02-08 22:46:29 +00:00
marius
bded83f835 MFC: r275871
Update the use of bus space macros to be more correct.
2015-02-08 22:29:57 +00:00
jilles
25afd7ae71 MFC r268857: ttyname(3): Fix EBADF/ENOTTY error descriptions.
Also, make sure to document the return values and errors for all three
functions in the man page.

PR:		191931
2015-02-08 22:29:06 +00:00
marius
d13c2ab3c3 MFC: r275870
Use the correct macro for listing the maximum bus space size.
2015-02-08 22:27:17 +00:00
jilles
fb8fcd2a04 MFC r278038: ttyname_r(): Return actual error, not always [ENOTTY].
Adjust the test that used to fail because of this bug.

PR:		191936
2015-02-08 22:24:03 +00:00
peter
969542edef Repair ia64 build after r278347 - remove const from set_mcontext 2015-02-08 22:17:20 +00:00
bapt
274501ab1e MFC: r265863
libedit: add H_SAVE_FP which saves history to a file pointer.

H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename.
This is useful when operating in capability mode.

Reviewed by:	christos@NetBSD.org, pfg
2015-02-08 22:11:24 +00:00
jilles
cd2062bcd8 MFC r277862: sem_post(): Fix and document semaphore value overflow error.
The error code is per Austin Group issue #315.

I provided different wording for the manual page change.

Submitted by:	pluknet
2015-02-08 21:58:25 +00:00
marius
ff1f47aebc MFC: r266744, r267712, r276351, r277043
- Add PCI ID for AMT based serial interface found on the Lenovo T61.
- add support for MosChip MCS9922...  This is found on an ExpressCard.. [1]
- Add PCI ID for the Oxford Semiconductor OXPCIe952 device.

PR:	186891 [1]
2015-02-08 21:41:18 +00:00
marius
182ebd1941 MFC: r276344
- Const'ify the ahci_ids table.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
2015-02-08 21:31:40 +00:00
marius
78c1d9653a MFC: r276313
Const'ify a firmware image missed in r251142.
2015-02-08 21:12:48 +00:00
marius
6fdf43daea MFC: r276299
- Make PCI_QUIRK_MSI_INTX_BUG work by using the ID of the actual PCI device
  for the lookup.
- For devices affected by PCI_QUIRK_MSI_INTX_BUG, ensure PCIM_CMD_INTxDIS
  is cleared when using MSI/MSI-X.
- Employ PCI_QUIRK_MSI_INTX_BUG for BCM5714(S)/BCM5715(S)/BCM5780(S) rather
  than clearing PCIM_CMD_INTxDIS unconditionally for all devices in bge(4).
2015-02-08 20:44:44 +00:00
kib
9dc38ea5dc MFC r278001:
Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as const.
2015-02-07 08:47:15 +00:00
kib
834093cd48 MFC r278000:
Update directory times immediately after an entry is created or
removed.
2015-02-07 08:42:11 +00:00
kib
b02e8ddcdf MFC r277970:
Check for the cycle in the chain of dependency for priority-inheritance
mutexes.
2015-02-07 08:35:18 +00:00
kib
822308b9d8 MFC r277642:
Provide individual prototype and generate macros for the red-black tree.
2015-02-07 08:14:20 +00:00
gjb
99687cf094 Document a failure case when using freebsd-update
to upgrade systems that use nss_ldap.

Sponsored by:	The FreeBSD Foundation
2015-02-06 19:44:26 +00:00
jhb
865011c5e6 MFC 276065:
Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.
2015-02-06 18:41:57 +00:00
jhb
1fa38dee26 MFC 277714:
natd(8) will work with an unconfigured interface and effectively not do
anything until the interface is assigned an address.  This fixes
ipfw_nat to do the same by using an IP of INADDR_ANY instead of
aborting the nat setup if the requested interface is not yet configured.
2015-02-06 18:13:29 +00:00
jhb
b2ec547430 MFC 275808:
Check for SS_NBIO in so->so_state instead of sb->sb_flags in
soreceive_stream().
2015-02-06 15:53:13 +00:00
kib
d00b9ac996 MFC r278145:
Fix use after free in pipe_dtor().
2015-02-06 09:02:10 +00:00
kib
e0c8cbf143 MFC r277936:
Use powerof2().  Remove single-use variable.
2015-02-06 08:58:06 +00:00
hselasky
88f22084bd MFC r277136:
Resolve a special case deadlock: When two or more threads are
simultaneously detaching kernel drivers on the same USB device we can
get stuck in the "usb_wait_pending_ref_locked()" function because the
conditions needed for allowing detach are not met.

While at it ensure that "flag_iserror" is only written when "priv_mtx"
is locked, which is protecting it.
2015-02-05 21:18:44 +00:00
jhb
1b3da1fcae MFC 274402:
Add device ID for the T502-BT (dual-port 1G) adapter.
2015-02-05 20:59:03 +00:00
hselasky
34369aa374 MFC r277179, r277199 and r277391:
Add a kernel function to delist our kernel character devices, so that
the device name can be re-used right away in case we are destroying
the character devices in the background.
2015-02-05 20:49:13 +00:00
hselasky
181bf69d80 MFC r266969 and r276717:
Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespaces while at it.
- Add support for PAE.
2015-02-05 20:03:02 +00:00
gjb
8800e37bec Reapply 'Open Issues' to the 10.1-RELEASE errata page,
which was only added to releng/10.1, not stable/10.

Sponsored by:	The FreeBSD Foundation
2015-02-05 16:31:49 +00:00
gjb
47d966effe Apply r278265 from head:
Security Advisory information is included on several
pages in the release notes.  Rather than duplicating
the information between various files, add two new
files to include in all pages that currently display
the information.

Sponsored by:	The FreeBSD Foundation
2015-02-05 16:28:18 +00:00
gjb
8599898fbb Add an entity to use to link to SAs and ENs.
Update the Security Advisories and Errata Notices
section to use the new entity.
Prefer https:// for other URLs.

Sponsored by:	The FreeBSD Foundation
2015-02-05 14:12:05 +00:00
gjb
35b84cbc9e Fill in the Security Advisories and Errata Notices sections.
Sponsored by:	The FreeBSD Foundation
2015-02-05 13:53:31 +00:00
gjb
96fe6d92bc MFC [1] r278115, r278116:
r278115:
  Move the 'Upgrading from Previous Releases of FreeBSD'
  section to the top of the file, following the introduction.

 r278116:
  Overhaul the relnotes page to reorganize the sections.

  With the previous layout, the majority of the release
  notes were categorized under one main "What's New"
  section, which in addition to making the page difficult
  to parse relevant bits, also had a few rendering issues,
  such as 'Note' blocks visually not appearing as if they
  pertain to a particular change.

  This change removes the "What's New" section, integrating
  it with the introduction.  In addition, each section now
  provides a brief description of its contents, broken down
  further into a subsection for each "topic", making it much
  easier to find a specific topic in the page.

[1] This is a direct commit, not an MFC.

Sponsored by:	The FreeBSD Foundation
2015-02-05 13:07:41 +00:00
gjb
46eddd6366 MFC r278101 (hrs):
Add a toc.section.depth=3 parameter to use the same
  ToC depth as DocBook DSSSL stylesheet.

Sponsored by:	The FreeBSD Foundation
2015-02-05 11:54:34 +00:00
ngie
a5b12ae122 MFC r277730:
r277730:

  Honor MK_ACPI in etc/devd and etc/rc.d

  Sponsored by: EMC / Isilon Storage Division
2015-02-05 10:36:38 +00:00
ngie
cf206fc8f2 MFC r270028:
r270028:

  Make the USB and ZFS devd configuration files optional depending on the
  values of MK_USB/MK_ZFS

  Making zfs.conf optional resolves PR # 186971

  PR: 186971
  Phabric: D606
  Approved by: jmmv (mentor)
  Sponsored by: EMC / Isilon Storage Division
2015-02-05 10:21:21 +00:00
ngie
4b0ec0fcb8 MFC r277740,r278053:
r277740:

  Honor MK_WIRELESS with etc/rc.d/hostapd and etc/rc.d/wpa_supplicant

  Sponsored by: EMC / Isilon Storage Division

r278053:

  Remove hostapd and wpa_supplicant from FILES so they're installed conditionally
  if MK_WIRELESS != no
2015-02-05 09:59:18 +00:00
scottl
87b6a908d9 MFC 277717:
Fix the ioctl interface to properly support fetching the header of regular
and extended config pages.

Obtained from:	Netflix, Inc.
2015-02-05 09:29:57 +00:00
ngie
6cbea0fc89 MFC r277733:
r277733:

  Honor MK_AMD with etc/rc.d/amd

  Sponsored by: EMC / Isilon Storage Division
2015-02-04 09:33:42 +00:00
ngie
152cd06f53 MFC r277732:
r277732:

  Honor MK_API in etc/rc.d

  Sponsored by: EMC / Isilon Storage Division
2015-02-04 09:31:10 +00:00
ngie
5f6c6cdef0 MFC r277731,r277734:
r277731:

  Honor MK_LPR with etc/rc.d/lpd

  Sponsored by: EMC / Isilon Storage Division

r277734:

  Remove explicit inclusion of lpd from FILES

  Sponsored by: EMC / Isilon Storage Division
2015-02-04 09:21:07 +00:00
ngie
4387ccbff5 MFC r277738:
r277738:

  Honor MK_BLUETOOTH with etc/defaults/bluetooth.device.conf

  Sponsored by: EMC / Isilon Storage Division
2015-02-04 09:14:07 +00:00
ngie
50ffbe800b MFC r277739:
r277739:

  Honor MK_JAIL with etc/rc.d/jail

  Sponsored by: EMC / Isilon Storage Division
2015-02-04 09:10:46 +00:00
delphij
250dcf712f MFC r276571: Add a manual page for phttpget(8). 2015-02-04 00:56:55 +00:00
delphij
c2a80f71df MFC r277433: MFV r277432:
Plug various memory leaks in libzfs import implementation.

Illumos issue:
    5518 Memory leaks in libzfs import implementation
2015-02-04 00:51:50 +00:00
delphij
4022cf7d2e MFC r277463:
Fix xz handling for files larger than 32K.

Submitted by:	Stefan Ehmann <shoesoft gmx net>
PR:		bin/186861
2015-02-04 00:45:02 +00:00
gjb
cb1ae98039 MFC r277837, r277838:
r277837:
  Provide a description for the 'tests.txz' distribution
  in the MANIFEST file.

  Turn off the test suite installation by default.

 r277838:
  Fix a typo in a comment.

Sponsored by:	The FreeBSD Foundation
2015-02-04 00:34:12 +00:00
ken
75c5e5b66c MFC isp(4) driver changes:
r276839, r276842, r277513, r277514, r277515

  ------------------------------------------------------------------------
  r276839 | ken | 2015-01-08 10:41:28 -0700 (Thu, 08 Jan 2015) | 49 lines

  Fix Fibre Channel Command Reference Number handling in the isp(4) driver.

  The Command Reference Number is used for precise delivery of
  commands, and is part of the FC-Tape functionality set.  (This is
  only enabled for devices that support precise delivery of commands.)
  It is an 8-bit unsigned number that increments from 1 to 255.  The
  commands sent by the initiator must be processed by the target in
  CRN order if the CRN is non-zero.

  There are certain scenarios where the Command Reference Number
  sequence needs to be reset.  When the target is power cycled, for
  instance, the initiator needs to reset the CRN to 1.  The initiator
  will know this because it will see a LIP (when directly connected)
  or get a logout/login event (when connected to a switch).

  The isp(4) driver was not resetting the CRN when a target
  went away and came back.  When it saw the target again after a
  power cycle, it would continue the CRN sequence where it left off.
  The target would ignore the command because the CRN sequence is
  supposed to be reset to 1 after a power cycle or other similar
  event.

  The symptom that the user would see is that there would be lots of
  aborted INQUIRY commands after a tape library was power cycled, and
  the library would fail to probe.  The INQUIRY commands were being
  ignored by the tape drive due to the CRN issue mentioned above.

  isp_freebsd.c:
  	Add a new function, isp_fcp_reset_crn().  This will reset
  	all of the CRNs for a given port, or the CRNs for all LUNs
  	on a target.

  	Reset the CRNs for all targets on a port when we get a LIP,
  	loop reset, or loop down event.

  	Reset the CRN for a particular target when it arrives, is changed
  	or departs.  This is less precise behavior than the
  	clearing behavior specified in the FCP-4 spec (which says
  	that it should be reset for PRLI, PRLO, PLOGI and LOGO),
  	but this is the level of information we have here.  If this
  	is insufficient, then we will need to add more precise
  	notification from the lower level isp(4) code.

  isp_freebsd.h:
  	Add a prototype for isp_fcp_reset_crn().

  Sponsored by:	Spectra Logic
  MFC after:	1 week

  ------------------------------------------------------------------------
  r276842 | ken | 2015-01-08 10:51:12 -0700 (Thu, 08 Jan 2015) | 44 lines

  Close a race in the isp(4) driver that caused devices to disappear
  and not automatically come back if they were gone for a short
  period of time.

  The isp(4) driver has a 30 second gone device timer that gets
  activated whenever a device goes away.  If the device comes back
  before the timer expires, we don't send a notification to CAM that
  it has gone away.  If, however, there is a command sent to the
  device while it is gone and before it comes back, the isp(4) driver
  sends the command back with CAM_SEL_TIMEOUT status.

  CAM responds to the CAM_SEL_TIMEOUT status by removing the device.
  In the case where a device comes back within the 30 second gone
  device timer window, though, we weren't telling CAM the device
  came back.

  So, fix this by tracking whether we have told CAM the device is
  gone, and if we have, send a rescan if it comes back within the 30
  second window.

  ispvar.h:
  	In the fcportdb_t structure, add a new bitfield,
  	reported_gone.  This gets set whenever we return a command
  	with CAM_SEL_TIMEOUT status on a Fibre Channel device.

  isp_freebsd.c:
  	In isp_done(), if we're sending CAM_SEL_TIMEOUT for for a
  	command sent to a FC device, set the reported_gone bit.

  	In isp_async(), in the ISPASYNC_DEV_STAYED case, rescan the
  	device in question if it is mapped to a target ID and has
  	been reported gone.

  	In isp_make_here(), take a port database entry argument,
  	and clear the reported_gone bit when we send a rescan to
  	CAM.

  	In isp_make_gone(), take a port database entry as an
  	argument, and set the reported_gone bit when we send an
  	async event telling CAM consumers that the device is gone.

  Sponsored by:	Spectra Logic
  MFC after:	1 week

  ------------------------------------------------------------------------
  r277514 | will | 2015-01-21 13:27:11 -0700 (Wed, 21 Jan 2015) | 18 lines

  Force commit to record the correct log for r277513.

  If the user sends an XPT_RESET_DEV CCB, make sure to reset the
  Fibre Channel Command Reference Number if we're running on a FC
  controller.

  We send a SCSI Target Reset when we get this CCB, and as a result
  need to reset the CRN to 1 on the next command.

  isp_freebsd.c:
  	In the XPT_RESET_DEV implementation in isp_action(), reset
  	the CRN if we're on a FC controller.

  Submitted by:	ken
  MFC after:	1 week
  Sponsored by:	Spectra Logic
  MFSpectraBSD:	1112787 on 2015/01/15

  ------------------------------------------------------------------------
  r277515 | will | 2015-01-21 13:32:36 -0700 (Wed, 21 Jan 2015) | 25 lines

  Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.

  The newer boards don't have the response field that indicates
  whether the SCSI status byte is present.  You have to just look to
  see whether it is non-zero.

  The code was looking to see whether the sense length was valid
  before propagating the SCSI status byte (and sense information) up
  the stack.  With a status like Reservation Conflict, there is no
  sense information, only the SCSI status byte.  So it wasn't getting
  correctly returned.

  isp.c:
  	In isp_intr(), if we are on a 2400 or 2500 type board and
  	get a response, look at the actual contents of the
  	SCSI status value and set the RQSF_GOT_STATUS flag
  	accordingly so that return any SCSI status value we get.  The
  	RQSF_GOT_SENSE flag will get set later on if there is
  	actual sense information returned.

  Submitted by:	ken
  MFC after:	1 week
  Sponsored by:	Spectra Logic
  MFSpectraBSD:	1112791 on 2015/01/15

  ------------------------------------------------------------------------

Sponsored by:	Spectra Logic
2015-02-03 22:49:12 +00:00
ken
d2ea45e16c MFC r276835:
r276835 | ken | 2015-01-08 09:58:40 -0700 (Thu, 08 Jan 2015) | 91 lines

  Improve camcontrol(8) handling of drive defect data.

  This includes a new summary mode (-s) for camcontrol defects that
  quickly tells the user the most important thing: how many defects
  are in the requested list.  The actual location of the defects is
  less important.

  Modern drives frequently have more than the 8191 defects that can
  be reported by the READ DEFECT DATA (10) command.  If they don't
  have that many grown defects, they certainly have more than 8191
  defects in the primary (i.e. factory) defect list.

  The READ DEFECT DATA (12) command allows for longer parameter
  lists, as well as indexing into the list of defects, and so allows
  reporting many more defects.

  This has been tested with HGST drives and Seagate drives, but
  does not fully work with Seagate drives.  Once I have a Seagate
  spec I may be able to determine whether it is possible to make it
  work with Seagate drives.

  scsi_da.h:	Add a definition for the new long block defect
  		format.

  		Add bit and mask definitions for the new extended
  		physical sector and bytes from index defect
  		formats.

  		Add a prototype for the new scsi_read_defects() CDB
  		building function.

  scsi_da.c:	Add a new scsi_read_defects() CDB building function.
  		camcontrol(8) was previously composing CDBs manually.
  		This is long overdue.

  camcontrol.c:	Revamp the camcontrol defects subcommand.  We now
  		go through multiple stages in trying to get defect
  		data off the drive while avoiding various drive
  		firmware quirks.

  		We start off by requesting the defect header with
  		the 10 byte command.  If we're in summary mode (-s)
  		and the drive reports fewer defects than can be
  		represented in the 10 byte header, we're done.
  		Otherwise, we know that we need to issue the
  		12 byte command if the drive reports the maximum
  		number of defects.

  		If we're in summary mode, we're done if we get a
  		good response back when asking for the 12 byte header.

  		If the user has asked for the full list, then we
  		use the address descriptor index field in the 12
  		byte CDB to step through the list in 64K chunks.
  		64K is small enough to work with most any ancient
  		or modern SCSI controller.

  		Add support for printing the new long block defect
  		format, as well as the extended physical sector and
  		bytes from index formats.  I don't have any drives
  		that support the new formats.

  		Add a hexadecimal output format that can be turned
  		on with -X.

  		Add a quiet mode (-q) that can be turned on with
  		the summary mode (-s) to just print out a number.

  		Revamp the error detection and recovery code for
  		the defects command to work with HGST drives.

  		Call the new scsi_read_defects() CDB building
  		function instead of rolling the CDB ourselves.

  		Pay attention to the residual from the defect list
  		request when printing it out, so we don't run off
  		the end of the list.

  		Use the new scsi_nv library routines to convert
  		from strings to numbers and back.

  camcontrol.8:	Document the new defect formats (longblock, extbfi,
  		extphys) and command line options (-q, -s, -S and
  		-X) for the defects subcommand.

  		Explain a little more about what drives generally
  		do and don't support.

Sponsored by:	Spectra Logic
2015-02-03 22:18:48 +00:00
ken
100a976c46 MFC 276831:
r276831 | ken | 2015-01-08 09:27:56 -0700 (Thu, 08 Jan 2015) | 30 lines

  Fix a bug in the CAM SCSI probe code that caused changes in inquiry
  data to go undetected.

  The probe code does an MD5 checksum of the inquiry data (and page
  0x80 serial number if available) before doing a reprobe of an
  existing device, and then compares a checksum after the probe to
  see whether the device has changed.

  This check was broken in January, 2000 by change 56146 when the extended
  inquiry probe code was added.

  In the extended inquiry probe case, it was calculating the checksum
  a second time.  The second time it included the updated inquiry
  data from the short inquiry probe (first 36 bytes).  So it wouldn't
  catch cases where the vendor, product, revision, etc. changed.

  This change will have the effect that when a device's inquiry data is
  updated and a rescan is issued, it will disappear and then reappear.
  This is the appropriate action, because if the inquiry data or serial
  number changes, it is either a different device or the device
  configuration may have changed significantly.  (e.g. with updated
  firmware.)

  scsi_xpt.c:	Don't calculate the initial MD5 checksum on
  		standard inquiry data and the page 0x80 serial
  		number if we have already calculated it.

Sponsored by:	Spectra Logic
2015-02-03 21:54:59 +00:00
hiren
38ccc08c23 MFC r277202
ntpd tries to bind to IPv6 interfaces in 'tentative' state and fails as IPv6 is
actually disabled. Fix it by making ntpd ignore such interfaces.
2015-02-03 20:08:05 +00:00
emaste
64562d8152 Define SHT_GNU_LIBLIST and R_MIPS_64
MFC of r260793
2015-02-03 15:35:58 +00:00