Commit Graph

180070 Commits

Author SHA1 Message Date
Jim Harris
021ee26911 Fix typo (devicde -> device). 2013-04-03 20:52:17 +00:00
John Baldwin
e5fb562225 Check for SS_NBIO in the socket state field rather than socket buffer
flags.

Submitted by:	Vijay Singh
MFC after:	1 week
2013-04-03 20:31:10 +00:00
Edward Tomasz Napierala
b93f389f48 Fix locking problem in ctl_maintenance_in() - one cannot use M_WAITOK or call
ctl_done() with mutex held.

Reviewed by:	ken
Sponsored by:	FreeBSD Foundation
2013-04-03 20:26:52 +00:00
Kirk McKusick
cd861931e6 The code in clear_remove() and clear_inodedeps() skips one entry
in the pagedep and inodedep hash tables. An entry in the table is
skipped because 'pagedep_hash' and 'inodedep_hash' hold the size
of the hash tables - 1.

The chance that this would have any operational failure is extremely
unlikely. These funtions only need to find a single entry and are
only called when there are too many entries. The chance that they
would fail because all the entries are on the single skipped hash
chain are remote.

Submitted by: Pedro Martelletto
Reviewed by:  kib
MFC after:    2 weeks
2013-04-03 19:26:32 +00:00
Brooks Davis
c183a03b17 IFP4 change 222074.
Introduce an explicit close of the output descriptor so that work done
on close is accounted for in the summary output triggered at exit
(implicit close()s occur after atexit() hooks).

This is useful because some devices such as cfi(4) may perform
signficant work after a close occurs (e.g. erasing and rewriting a
block of flash).
2013-04-03 19:19:45 +00:00
Alexander Motin
6b28fe64d3 Since ATA_CAM mode has no implemented support for serializing access to the
different ATA channels, required for acard and pc98 ATA controllers, block
access to second channels of both, hoping that one working channel is better
then none.  I have an idea how that support could be implemented, but I have
no hardware to work on that.

MFC after:	1 week
2013-04-03 18:30:09 +00:00
Simon J. Gerraty
93556e96ec Tell bmake to use the FreeBSD preferred makefile preference list.
PR:		177593
Reviewed by:	obrien
2013-04-03 16:20:21 +00:00
Alexander Motin
aac18bac02 Add some more ATA_CAM ifdefs.
Submitted by:	marius (partially)
MFC after:	1 week
2013-04-03 14:10:37 +00:00
Alexander Motin
d6794b7067 Add xpt_release_ccb()'s missed at r248872. That made shutdown -p stuck
on controller with small number of queue slots and several disks connected.
2013-04-03 11:30:18 +00:00
Andriy Gapon
9ff9b984c9 spa_open_common: fix argument to zvol_create_minors
Prior to r248571 spa_open was always called with a bare pool name,
but now it is called with a dataset name instead (spa_lookup handles
that).
So, when a ZFS root is mounted spa_open is called with a name of a root
dataset, which can very well be different from the pool name.
But zvol_create_minors should be called with the pool name, because it
performs a recursive traversal of all datasets under the name to find
all those that are volumes.

MFC after:	7 days
2013-04-03 11:06:26 +00:00
Hans Petter Selasky
15d4edd3d4 Add missing ifdef's for reduced feature compilations. 2013-04-03 10:31:13 +00:00
Martin Matuska
03863a70e1 Fix possible pool hold leak in dmu_send_impl()
Problem reported to vendor:
  https://www.illumos.org/issues/3645

Reported by:	Andriy Gapon <avg@FreeBSD.org>
MFC after:	15 days
2013-04-03 09:52:30 +00:00
Jean-Sébastien Pédron
c1ebf400c3 drm and i915: Left-shift iic_msg.slave at creation time
This is required because, in the radeon driver, we can't left-shift in a
central place, like it was done in the i915 driver.

Reviewed by:	kib@, kan@, avg@
Tested by:	kib@, avg@
2013-04-03 08:27:35 +00:00
Hans Petter Selasky
11a1335af9 Add new USB ID.
MFC after:	1 week
Submitted by:	Bruce Simpson <bms@fastmail.net>
2013-04-03 06:45:21 +00:00
Alan Cox
96f1a84272 Replace the remaining uses of vm_radix_node_page() by vm_radix_isleaf() and
vm_radix_topage().  This transformation eliminates some unnecessary
conditional branches from the inner loops of vm_radix_insert(),
vm_radix_lookup{,_ge,_le}(), and vm_radix_remove().

Simplify the control flow of vm_radix_lookup_{ge,le}().

Reviewed by:	attilio (an earlier version)
Tested by:	pho
Sponsored by:	EMC / Isilon Storage Division
2013-04-03 06:37:25 +00:00
Kevin Lo
287cd4a257 Comment out the VIMAGE since we need to build both LINTS to
get good coverage.

Pointed out by:	jhb
2013-04-03 01:27:15 +00:00
Xin LI
12a6865090 Replace access to /dev/random with the kernel pseudo-random number
source sysctl(KERN_ARND) and remove the fallback code.

Obtained from:	OpenBSD
Reviewed by:	secteam
MFC after:	1 month
2013-04-02 23:41:20 +00:00
Jilles Tjoelker
c6a453a430 sh: Write as much into the heredoc pipe as possible, to avoid forking.
Use non-blocking I/O to write as much as the pipe will accept (often 64K,
but it can be as little as 4K), avoiding the need for the ugly PIPESIZE
constant. If PIPESIZE was set too high, a deadlock would occur.
2013-04-02 21:34:38 +00:00
Simon J. Gerraty
1748de26cb Update to bmake-20130330 2013-04-02 21:31:11 +00:00
Konstantin Belousov
1ef76554fb Do not declare that preloaded md(4) supports unmapped bio requests, it
does not.

Reported by:	<mh@kernel32.de>
Sponsored by:	The FreeBSD Foundation
2013-04-02 19:39:31 +00:00
Kenneth D. Merry
3e49efa8b3 Fix sending virtual scatter/gather lists from the CTL CAM frontend
peripheral.

Sponsored by:	Spectra Logic
2013-04-02 17:29:17 +00:00
Edward Tomasz Napierala
9eef3375ce Don't directly dereference userland pointer; instead use kernel pointer
copied in from userspace.  This fixes instant panic when creating CTL LUN
on sparc64.  Not a security problem, since the API is root-only.

Reviewed by:	ken
Sponsored by:	FreeBSD Foundation
2013-04-02 16:50:50 +00:00
Kenneth D. Merry
a358cf3aec Add support for XPT_CONT_TARGET_IO CCBs in _bus_dmamap_load_ccb().
Declare CCB types in their respective switch blocks.

Sponsored by:	Spectra Logic
2013-04-02 16:49:49 +00:00
Gleb Smirnoff
b77ea89ea5 - Remove extra $FreeBSD$
- Touch options headers to make module buildable.

Reviewed by:	trasz
2013-04-02 13:52:09 +00:00
Eitan Adler
0b94c3f711 Remove obsolete references to sysinstall.
This change is not intended for MFC.

PR:		docs/177570
Submitted by:	Garrett Cooper <yaneurabeya@gmail.com> (partial)
Approved by:	bcr (mentor)
2013-04-02 12:40:01 +00:00
Edward Tomasz Napierala
d732e85ce2 Fix comment formatting. 2013-04-02 12:22:44 +00:00
Dag-Erling Smørgrav
fa67e83c67 Merge upstream patch to silence spurious "no such identity file" warnings. 2013-04-02 11:44:55 +00:00
Dag-Erling Smørgrav
5992891888 Silence printf format warnings. 2013-04-02 11:42:39 +00:00
Edward Tomasz Napierala
26d664f914 Remove unused code.
Reviewed by:	ken
2013-04-02 09:45:34 +00:00
Edward Tomasz Napierala
a1593396d3 Fix dates in manual pages modified in 249009. 2013-04-02 09:44:59 +00:00
Edward Tomasz Napierala
325621458d Make it possible to build CTL as a module.
Reviewed by:	ken
Sponsored by:	FreeBSD Foundation
2013-04-02 09:42:42 +00:00
Edward Tomasz Napierala
9e0d30e20d Fix panic in the error path caused by recursive acquisition of XPT topology
lock.

Reviewed by:	ken
2013-04-02 09:38:04 +00:00
Dag-Erling Smørgrav
3355dd89e5 Pull in a patchset from upstream to silence spurious "no such identity
file" warnings.
2013-04-02 08:41:38 +00:00
Martin Matuska
41451f4a0e Do not check against uninitialized rc and comment out vendor code
MFC after:	16 days
2013-04-02 08:15:39 +00:00
Adrian Chadd
c23a9d98bf Mark a couple of places where I think the dmamap isn't being unmapped
before the TX path is being aborted.

Right now it's in the TDMA code and I can live with that; but it really
should get fixed.

I'll do a more thorough audit of this code soon.
2013-04-02 06:25:10 +00:00
Adrian Chadd
a91ab3c099 Some TX dmamap cleanups.
* Don't use BUS_DMA_ALLOCNOW for descriptor DMA maps; we never use
  bounce buffers for the descriptors themselves.

* Add some XXX's to mark where the ath_buf has its mbuf ripped from
  underneath it without actually cleaning up the dmamap.  I haven't
  audited those particular code paths to see if the DMA map is guaranteed
  to be setup there; I'll do that later.

* Print out a warning if the descdma tidyup code is given some descriptors
  w/ maps to free.  Ideally the owner will free the mbufs and unmap
  the descriptors before freeing the descriptor/ath_buf pairs, but
  right now that's not guaranteed to be done.

Reviewed by:	scottl (BUS_DMA_ALLOCNOW tag)
2013-04-02 06:24:22 +00:00
Adrian Chadd
18303fd833 Add a missing unmap; if we're freeing this mbuf then we must
really both sync/unmap the dmamap before freeing it.
2013-04-02 06:21:37 +00:00
Kevin Lo
0990ef0a61 Add VIMAGE to NOTES.
Reviewed by:	zec
2013-04-02 05:57:36 +00:00
Matthew D Fleming
b3e6bbc676 Regen.
MFC after:	1 week
2013-04-02 05:30:52 +00:00
Matthew D Fleming
e324bf91e8 Fix return type of extattr_set_* and fix rmextattr(8) utility.
extattr_set_{fd,file,link} is logically a write(2)-like operation and
should return ssize_t, just like extattr_get_*.  Also, the user-space
utility was using an int for the return value of extattr_get_* and
extattr_list_*, both of which return an ssize_t.

MFC after:	1 week
2013-04-02 05:30:41 +00:00
Pyun YongHyeon
bd9c196a87 Fix a typo.
Reported by:	David Imhoff via brad@OpenBSD
Tested by:	hrs
Reviewed by:	davidch
2013-04-02 00:57:54 +00:00
Steven Hartland
b3cc74dc3b Added ATA Pass-Through support to CAM
sys/cam/scsi/scsi_all.c:
        - Added scsi_ata_pass_16 method
          Which use ATA Pass-Through to send commands to the attached disk.

sys/cam/scsi/scsi_all.h:
        - Added defines for all missing ATA Pass-Through commands values.

        - Added scsi_ata_pass_16 method.

        - Fixed a comment typo while I'm here

Reviewed by:	mav
Approved by:	pjd (mentor)
MFC after:	2 weeks
2013-04-02 00:11:35 +00:00
Dimitry Andric
51ff6adc94 Follow up to r247960 and rr247960 by also amending ctfmerge. For the
only other case where STT_FILE symbols are used, in symit_next() in
cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the
symbol, instead of the full pathname.

Reported by:	avg
Tested by:	avg, jimharris
MFC after:	1 week
2013-04-01 21:16:32 +00:00
Simon J. Gerraty
3784f43e18 Import bmake-20130330 2013-04-01 21:12:55 +00:00
Adrian Chadd
3f3a5dbd2c Ensure that we only call the busdma unmap/flush routines once, when
the buffer is being freed.

* When buffers are cloned, the original mapping isn't copied but it
  wasn't freeing the mapping until later.  To be safe, free the
  mapping when the buffer is cloned.

* ath_freebuf() now no longer calls the busdma sync/unmap routines.

* ath_tx_freebuf() now calls sync/unmap.

* Call sync first, before calling unmap.

Tested:

* AR5416, STA mode
2013-04-01 20:57:13 +00:00
Jilles Tjoelker
70d41b5846 wordexp(): Remove wrong IFS usage.
Words in shell script are separated by spaces or tabs independent of the
value of IFS. The value of IFS is only relevant for the result of
substitutions. Therefore, there should be a space between 'wordexp' and the
words to be expanded, not an IFS character.

Paranoia might dictate that the shell ignore IFS from the environment (even
though our sh currently uses it), so do not depend on it in the new test
case.
2013-04-01 20:50:07 +00:00
Adrian Chadd
587feafb5a Remove an un-needed comment. 2013-04-01 20:44:21 +00:00
Adrian Chadd
09067b6e9a Use ATH_MAX_SCATTER rather than ATH_TXDESC.
ATH_MAX_SCATTER is used to size the ath_buf DMA segment array.
We thus should use it when checking sizes of things.
2013-04-01 20:12:21 +00:00
Adrian Chadd
80b87f1814 Only unmap the RX mbuf DMA map if there's a buffer here.
The normal RX path (ath_rx_pkt()) will sync and unmap the
buffer before passing it up the stack.  We only need to do this
if we're flushing the FIFO during reset/shutdown.
2013-04-01 20:11:19 +00:00
Pedro F. Giffuni
9f4c7ba460 Dtrace: enablings on defunct providers prevent providers from unregistering
Merge change from illumos:

1368 enablings on defunct providers prevent providers from unregistering

We try to address some underlying differences between the Solaris
and FreeBSD implementations: dtrace_attach() / dtrace_detach() are
currently unimplemented in FreeBSD but the new code from illumos
makes use of taskq so some adaptations were made to dtrace_open()
and dtrace_close() to handle them appropriately.

Illumos Revision:	r13430:8e6add739e38

Reference:
https://www.illumos.org/issues/1368

Reviewed by:	gnn
Tested by:	Fabian Keil
Obtained from:	Illumos
MFC after:	3 weeks
2013-04-01 19:13:46 +00:00