marius [Tue, 18 Jun 2013 15:06:02 +0000 (15:06 +0000)]
MFC: r247264
Turn off fast posting for the ISP2100- I'd forgotten that it actually
might have been enabled for them- now that we use all 32 bits of handle.
Fast Posting doesn't pass the full 32 bits.
marius [Tue, 18 Jun 2013 14:35:09 +0000 (14:35 +0000)]
MFC: r247165
Fix command timeout caused by data underrun during fetching ATAPI sense
data, introduced by r246713 (MFC'ed to stable/9 in r251874). There are two
places where ata_request is filled in ATA_CAM: ata_cam_begin_transaction()
and ata_cam_request_sense(). In the first case DMA should be done for
addresses from the CCB. In second case, DMA should be done to the different
address, the address of the sense buffer inside the CCB structure itself.
marius [Tue, 18 Jun 2013 14:20:14 +0000 (14:20 +0000)]
MFC: r248804
deferal -> deferral
MFC: r248891
Pass correct parameter to CTR5() in bus_dmamap_load_uio.
MFC: r248892
Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.
MFC: r248893
Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.
MFC: r248896
Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.
MFC: r249025
Add support for XPT_CONT_TARGET_IO CCBs in _bus_dmamap_load_ccb().
Declare CCB types in their respective switch blocks.
MFC: r249538
Some compilers issue a warning when wider integer is casted to narrow
pointer. Supposedly shut down the warning by casting through
uintptr_t.
MFC: r251221
Move an assertion to the right spot; only bus_dmamap_load_mbuf(9)
requires a pkthdr being present but that's not the case for either
_bus_dmamap_load_mbuf_sg() or bus_dmamap_load_mbuf_sg(9).
mav [Tue, 18 Jun 2013 13:38:10 +0000 (13:38 +0000)]
MFC r248583 (by kib):
Fix twa(4) after the r246713. The driver copies data around to
satisfy some alignment restrictions. Do not set TW_OSLI_REQ_FLAGS_CCB
flag for mapped data, pass the csio->data_ptr in the req->data.
Do not put the ccb pointer into req->data ever, ccb is stored in
req->orig_req already.
mav [Tue, 18 Jun 2013 09:47:56 +0000 (09:47 +0000)]
MFC r251616:
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error. GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.
mav [Tue, 18 Jun 2013 09:39:52 +0000 (09:39 +0000)]
MFC r248722:
geom_slice.c and its consumers like GEOM_LABEL are not touching the data
unless hotspots are used. Pass G_PF_ACCEPT_UNMAPPED flag through except
such rare cases (obsolete GEOM_SUNLABEL and GEOM_BSD).
mav [Tue, 18 Jun 2013 09:31:06 +0000 (09:31 +0000)]
MFC r248696:
Make GEOM MULTIPATH to report unmapped bio support if underling path report
it. GEOM MULTIPATH itself never touches the data and so transparent.
mav [Tue, 18 Jun 2013 09:26:01 +0000 (09:26 +0000)]
MFC r248295 (by pjd):
We don't need buffer to handle BIO_DELETE, so don't check buffer size for it.
This fixes handling BIO_DELETE larger than MAXPHYS.
mav [Tue, 18 Jun 2013 09:21:21 +0000 (09:21 +0000)]
MFC r248068 (by sbruno):
Add legacy support to geom raid to create a /dev/arX device for support
of upgrading older machines using ataraid(4) to newer releases.
This optional parameter is controlled via kern.geom.raid.legacy_aliases
and will create a /dev/ar0 device that will point at /dev/raid/r0 for
example.
Tested on Dell SC 1425 DDF-1 format software raid controllers installing from
stable/7 and upgrading to stable/9 without having to adjust /etc/fstab
des [Tue, 18 Jun 2013 07:04:19 +0000 (07:04 +0000)]
Fix a bug that allowed a tracing process (e.g. gdb) to write
to a memory-mapped file in the traced process's address space
even if neither the traced process nor the tracing process had
write access to that file.
Security: CVE-2013-2171
Security: FreeBSD-SA-13:06.mmap
Approved by: so
scottl [Tue, 18 Jun 2013 05:21:40 +0000 (05:21 +0000)]
Merge the second part of the unmapped I/O changes. This enables the
infrastructure in the block layer and UFS filesystem as well as a few
drivers. The list of MFC revisions is long, so I won't quote changelogs.
scottl [Tue, 18 Jun 2013 00:36:53 +0000 (00:36 +0000)]
Big MFC of the physbio changes necessary for unmapped I/O. These changes
have been in production at Netflix for several months with significant
success.
MFC r246713:
Reform the busdma API so that new types may be added without modifying
every architecture's busdma_machdep.c. It is done by unifying the
bus_dmamap_load_buffer() routines so that they may be called from MI
code. The MD busdma is then given a chance to do any final processing
in the complete() callback.
MFC r249538:
Some compilers issue a warning when wider integer is casted to narrow
pointer. Supposedly shut down the warning by casting through
uintptr_t.
MFC r251479:
Simplify the checking of flags for cam_periph_mapmem(). This gets rid of
a lot of code redundancy and grossness at very minor expense.
MFC r251837:
MFC r251842:
Add infrastructure for doing compatibility shims, as has been sorely
needed for the last 10 years. Far too much of the internal API is
exposed, and every small adjustment causes applications to stop working.
To kick this off, bump the API version to 0x17 as should have been done
with r246713, but add shims to compensate. Thanks to the shims, there
should be no visible change in application behavior.
scottl [Mon, 17 Jun 2013 23:21:18 +0000 (23:21 +0000)]
MFC r244575:
The manpage states that bus_dmamap_create(9) returns ENOMEM if it can't
allocate a map or mapping resources. That seems to imply that any memory
allocations it does must use M_NOWAIT and check for NULL.
MFC 246158:
Use pmap_kextract() instead of inlining the page table walk.
Remove the comment referencing non-existing code.
Submitted by: kib, cognet
Approved by: marius
Obtained from: Netflix
scottl [Mon, 17 Jun 2013 20:40:16 +0000 (20:40 +0000)]
MFC r240177:
Dynamically allocate the S/G lists passed to callback routines rather than
allocating them on the stack of various bus_dmamap_load*() functions. The
S/G lists are stored in the DMA tags. This matches the implementation on
all other platforms.
Submitted by: jhb
Approved by: marius, adrian
Obtained from: Netflix
brooks [Mon, 17 Jun 2013 19:54:47 +0000 (19:54 +0000)]
MFC r251689
Be more agressive about bootstrapping ctfmerge and ctfconvert so
builds from existing releases have a chance of working properly when
WITH_CLANG_IS_CC is enabled.
gnn [Mon, 17 Jun 2013 15:42:21 +0000 (15:42 +0000)]
MFC: 248848
Commit a patch that fixes a problem in the #pragma statement when searching
for and loading dependent modules. This addresses a bug seen with
io.d where it was being doubly included.
mav [Mon, 17 Jun 2013 14:55:02 +0000 (14:55 +0000)]
MFC r251661:
Replicate r242422 from ata(4) to mvs(4):
Only four specific ATA PIO commands transfer several sectors per DRQ block
(interrupt). All other ATA PIO commands transfer one sector or 512 bytes
at one time. Hardcode these exceptions in mvs(4).
This fixes timeout of READ LOG EXT command used by `smartctl -x /dev/adaX`.
Also it fixes timeout of DOWNLOAD_MICROCODE on `camcontrol fwdownload`.
mav [Mon, 17 Jun 2013 14:52:39 +0000 (14:52 +0000)]
MFC r251654, r251664:
Make CAM return and GEOM DISK pass through new GEOM::lunid attribute.
SPC-4 specification states that serial number may be property of device,
but not a specific logical unit. People reported about FC storages using
serial number in that way, making it unusable for purposes of LUN multipath
detection. SPC-4 states that designators associated with logical unit from
the VPD page 83h "Device Identification" should be used for that purpose.
Report first of them in the new attribute in such preference order: NAA,
EUI-64, T10 and SCSI name string.
While there, make GEOM DISK properly report GEOM::ident in XML output also
using d_getattr() method, if available. This fixes serial numbers reporting
for SCSI disks in `geom disk list` output and confxml.
mav [Mon, 17 Jun 2013 14:21:31 +0000 (14:21 +0000)]
MFC r249205:
Replicate r245306 from SCSI to ATA. The problem didn't appear so far,
covered by multilevel freeze mechanism, but it is better to be safe.
kib [Mon, 17 Jun 2013 06:21:42 +0000 (06:21 +0000)]
MFC r251322:
Instead of yielding, pause for 1 tick when donating the current thread
time to the owner of the vnode lock while iterating over the free vnode
list.
yongari [Mon, 17 Jun 2013 04:40:27 +0000 (04:40 +0000)]
MFC r251600:
Avoid unnecessary controller reinitialization by checking driver
running state. fxp(4) requires controller reinitialization for the
following cases.
o RX lockup condition on i82557
o promiscuous mode change
o multicast filter change
o WOL configuration
o TSO/VLAN hardware tagging/checksum offloading configuration
o MAC reprogramming after speed/duplex/flow-control resolution
o Any events that result in MAC reprogramming(link UP/DOWN,
remote link partner's restart of auto-negotiation etc)
o Microcode loading/unloading
Apart from above cases which come from hardware limitation, upper
stack also blindly reinitializes controller whenever an IP address
is assigned. After r194573, fxp(4) no longer needs to reinitialize
the controller to program multicast filter after upping the
interface. So keeping track of driver running state should remove
all unnecessary controller reinitializations.
This change will also address endless controller reinitialization
triggered by dhclient(8).
hrs [Sun, 16 Jun 2013 18:27:53 +0000 (18:27 +0000)]
MFC r245177,r245346,r246283,r251650:
- Set WITHOUT_SVN=yes for textproc/docproj.
- Add CHECKSUM.* support in Makefile.
- Use ln -fs to create a symlink.
- Remove pkgadd for docports.
- Use WITHOUT_JADETEX=yes instead of WITH_JADETEX=no.
- Add {WORLD,KERNEL}_FLAGS to [BTWK]MAKE.
- Use makefs(8) and gpart(8) for sparc64 ISO image.
- Add publisher option to makefs(8).
- Add missing copyright notice.
- ISO 9660 specification allows only "d-characters" and "a-characters"
in the Volume Descriptor (section 7.4). In short, uppercase
alphanumeric + some symbols only. While the makefs utility automatically
converts the characters, $LABEL should be consistent in the scripts.
These fix a specification violation in 9.X iso9660 images, and cdrtools
dependency and endianness issue for sparc64 release media. The label is
now in uppercase letters only in all platforms.
hrs [Sun, 16 Jun 2013 07:18:07 +0000 (07:18 +0000)]
MFC r251580:
- Add file system type number (vfc_typenum) in the list. This is useful
for debugging when changing vfs.typenumhash configuration.
- Refactor fmt_flags().
pfg [Sun, 16 Jun 2013 00:59:24 +0000 (00:59 +0000)]
MFC r251677:
Relax some unnecessary unsigned type changes in ext2fs.
While the changes in r245820 are in line with the ext2 spec,
the code derived from UFS can use negative values so it is
better to relax some types to keep them as they were, and
somewhat more similar to UFS. While here clean some casts.
jhb [Fri, 14 Jun 2013 21:56:10 +0000 (21:56 +0000)]
MFC 250220:
Fix FIONREAD on regular files. The computed result was being ignored and
it was being passed down to VOP_IOCTL() where it promptly resulted in
ENOTTY due to a missing else for the past 8 years. While here, use a
shared vnode lock while fetching the current file's size.
ghelmer [Fri, 14 Jun 2013 18:56:37 +0000 (18:56 +0000)]
MFC r244090, r250945
Changes to resolve races in bpfread() and catchpacket() that, at worst,
cause kernel panics.
Add a flag to the bpf descriptor to indicate whether the hold buffer
is in use. In bpfread(), set the "hold buffer in use" flag before
dropping the descriptor lock during the call to bpf_uiomove().
Everywhere else the hold buffer is used or changed, wait while
the hold buffer is in use by bpfread(). Add a KASSERT in bpfread()
after re-acquiring the descriptor lock to assist uncovering any
additional hold buffer races.
While waiting for the bpf hold buffer to become idle, check
the return value from mtx_sleep() and exit bpfread() on
errors such as EINTR.
jhb [Fri, 14 Jun 2013 18:30:43 +0000 (18:30 +0000)]
MFC 249767:
- Some BIOSes use an Extended IRQ resource descriptor in _PRS for a link
that uses non-ISA IRQs but use a plain IRQ resource in _CRS. However,
a non-ISA IRQ can't fit into a plain IRQ resource. If we encounter a
link like this, build the resource buffer from _PRS instead of _CRS.
- Set the correct size of the end tag in a resource buffer.
pfg [Fri, 14 Jun 2013 02:51:03 +0000 (02:51 +0000)]
MFC r251561:
libstand: Reset the seek pointer in ext2fs as done in UFS.
Reset the seek pointer to 0 when a file is successfully opened,
since otherwise the initial seek offset will contain the directory
offset of the filesystem block that contained its directory entry.
This bug was mostly harmless because typically the directory is
less than one filesystem block in size so the offset would be zero.
It did however generally break loading a kernel from the (large)
kernel compile directory.
Also reset the seek pointer when a new inode is opened in read_inode(),
though this is not actually necessary now because all callers set
it afterwards.
PR: 177328
Submitted by: Eric van Gyzen
Reviewed by: iedowse
hrs [Fri, 14 Jun 2013 02:21:32 +0000 (02:21 +0000)]
MFC 228990,243232,243233:
Overhaul of route6d(8):
- Use queue(3) for linked-list.
- Use a consistent naming scheme for struct members.
- Use ANSI C style function declaration.
- Add check of RTM_VERSION mismatch.
- Increase the number of retry for NET_RT_DUMP from 5 to 15.
- Use 2001:db8:: as an example instead of deprecated 3ffe:: address block.
- Add check for connected routes.
- Add support of RTM_IFANNOUNCE for dyanmically-added/removed interfaces.
- Add support of *, ?, and [ in the interface list.
- Add -P number to specify route flag which will never expire.
- Add -Q number to specify route flag which route6d will add to routes via RIP.
- Add -p pidfile to specify the process ID file.
jhb [Thu, 13 Jun 2013 20:29:06 +0000 (20:29 +0000)]
MFC 249315:
Proxy allocation requests for the PCI ROM BAR from child devices similar
to how the VGA bus driver currently proxies allocation requests for other
PCI BARs.
emaste [Thu, 13 Jun 2013 14:38:29 +0000 (14:38 +0000)]
MFC r244224, r248753
Minor refactoring prior to .symbols file changes
- Combine .if x and .if !x using .else
- Separate out beforelinking dependency
- Add comments to clarify .if nesting
Always define and use PROGNAME
This avoids having separate cases in the install rule for PROGNAME set
and not set. This is a minor cleanup in advance of further support for
standalone debug files.
rmacklem [Wed, 12 Jun 2013 23:13:42 +0000 (23:13 +0000)]
MFC: r251089
Add a patch analygous to r248567, r248581, r251079 to the
old NFS client to avoid the panic reported in the PR by
doing the vnode_pager_setsize() call after unlocking the mutex.
asomers [Wed, 12 Jun 2013 22:19:49 +0000 (22:19 +0000)]
MFC r251396
sys/dev/mps/mps.c
sys/dev/mps/mps_user.c
Fix uninitialized memory reference in mps_read_config_page. It was
referencing a field (params->hdr.Ext.ExtPageType) that would only be
set when reading an Extended config page. The symptom was that
MPSIO_READ_CFG_PAGE ioctls would randomly fail with
MPI2_IOCSTATUS_CONFIG_INVALID_PAGE errors. The solution is to
determine whether an extended or an ordinary config page is requested
by looking at the PageType field, which should be available regardless.
Similarly, mps_user_read_extcfg_header and mps_user_read_extcfg_page,
which call mps_read_config_page, had to be fixed to always set the
PageType field. They were implicitly assuming that
mps_read_config_page always operated on Extended pages.
asomers [Wed, 12 Jun 2013 21:41:09 +0000 (21:41 +0000)]
MFC r250662
sbin/camcontrol/camcontrol.c
If an expander returns 0x00 (no device attached) in the ATTACHED DEVICE
field of the SMP DISCOVER response, ignore the value of ATTACHED SAS
ADDRESS, because it is invalid. Some expanders zero out the address
when the attached device is removed, but others do not. Section
9.4.3.10 of the SAS Protocol Layer 2 revision 04b does not require them
to do so.
asomers [Wed, 12 Jun 2013 19:04:08 +0000 (19:04 +0000)]
MFC r250617
etc/rc.d/syslogd
Add netif as a requirement of syslogd to get lo0 up. Currently, this
doesn't affect the rc order, because mountcritremote already depends on
netif.
gjb [Wed, 12 Jun 2013 13:17:43 +0000 (13:17 +0000)]
MFC r240403 (obrien):
Not all Pmake derivatives silently handle empty shell output, so ensure
there is something for make(1) to consume. Bmake gives output such as:
"warning: Couldn't read shell's output for "/bin/sh -c true"
dim [Wed, 12 Jun 2013 07:04:27 +0000 (07:04 +0000)]
MFC r251431:
Pull in r183297 from upstream llvm trunk:
PR15662: Optimized debug info produces out of order function
parameters
When a function is inlined we lazily construct the variables
representing the function's parameters. After that, we add any
remaining unused parameters.
If the function doesn't use all the parameters, or uses them out of
order, then the DWARF would produce them in that order, producing a
parameter order that doesn't match the source.
This fix causes us to always keep the arg variables at the start of
the variable list & in the original order from the source.
Revamp the old NFS server's File Handle Affinity (FHA) code so that
it will work with either the old or new server.
The FHA code keeps a cache of currently active file handles for
NFSv2 and v3 requests, so that read and write requests for the same
file are directed to the same group of threads (reads) or thread
(writes). It does not currently work for NFSv4 requests. They are
more complex, and will take more work to support.
This improves read-ahead performance, especially with ZFS, if the
FHA tuning parameters are configured appropriately. Without the
FHA code, concurrent reads that are part of a sequential read from
a file will be directed to separate NFS threads. This has the
effect of confusing the ZFS zfetch (prefetch) code and makes
sequential reads significantly slower with clients like Linux that
do a lot of prefetching.
The FHA code has also been updated to direct write requests to nearby
file offsets to the same thread in the same way it batches reads,
and the FHA code will now also send writes to multiple threads when
needed.
This improves sequential write performance in ZFS, because writes
to a file are now more ordered. Since NFS writes (generally
less than 64K) are smaller than the typical ZFS record size
(usually 128K), out of order NFS writes to the same block can
trigger a read in ZFS. Sending them down the same thread increases
the odds of their being in order.
In order for multiple write threads per file in the FHA code to be
useful, writes in the NFS server have been changed to use a LK_SHARED
vnode lock, and upgrade that to LK_EXCLUSIVE if the filesystem
doesn't allow multiple writers to a file at once. ZFS is currently
the only filesystem that allows multiple writers to a file, because
it has internal file range locking. This change does not affect the
NFSv4 code.
This improves random write performance to a single file in ZFS, since
we can now have multiple writers inside ZFS at one time.
I have changed the default tuning parameters to a 22 bit (4MB)
window size (from 256K) and unlimited commands per thread as a
result of my benchmarking with ZFS.
The FHA code has been updated to allow configuring the tuning
parameters from loader tunable variables in addition to sysctl
variables. The read offset window calculation has been slightly
modified as well. Instead of having separate bins, each file
handle has a rolling window of bin_shift size. This minimizes
glitches in throughput when shifting from one bin to another.
sys/conf/files:
Add nfs_fha_new.c and nfs_fha_old.c. Compile nfs_fha.c
when either the old or the new NFS server is built.
sys/fs/nfs/nfsport.h,
sys/fs/nfs/nfs_commonport.c:
Bring in changes from Rick Macklem to newnfs_realign that
allow it to operate in blocking (M_WAITOK) or non-blocking
(M_NOWAIT) mode.
sys/fs/nfs/nfs_commonsubs.c,
sys/fs/nfs/nfs_var.h:
Bring in a change from Rick Macklem to allow telling
nfsm_dissect() whether or not to wait for mallocs.
sys/fs/nfs/nfsm_subs.h:
Bring in changes from Rick Macklem to create a new
nfsm_dissect_nonblock() inline function and
NFSM_DISSECT_NONBLOCK() macro.
sys/fs/nfs/nfs_commonkrpc.c,
sys/fs/nfsclient/nfs_clkrpc.c:
Add the malloc wait flag to a newnfs_realign() call.
sys/fs/nfsserver/nfs_nfsdkrpc.c:
Setup the new NFS server's RPC thread pool so that it will
call the FHA code.
Add the malloc flag argument to newnfs_realign().
Unstaticize newnfs_nfsv3_procid[] so that we can use it in
the FHA code.
sys/fs/nfsserver/nfs_nfsdsocket.c:
In nfsrvd_dorpc(), add NFSPROC_WRITE to the list of RPC types
that use the LK_SHARED lock type.
sys/fs/nfsserver/nfs_nfsdport.c:
In nfsd_fhtovp(), if we're starting a write, check to see
whether the underlying filesystem supports shared writes.
If not, upgrade the lock type from LK_SHARED to LK_EXCLUSIVE.
sys/nfsserver/nfs_fha.c:
Remove all code that is specific to the NFS server
implementation. Anything that is server-specific is now
accessed through a callback supplied by that server's FHA
shim in the new softc.
There are now separate sysctls and tunables for the FHA
implementations for the old and new NFS servers. The new
NFS server has its tunables under vfs.nfsd.fha, the old
NFS server's tunables are under vfs.nfsrv.fha as before.
In fha_extract_info(), use callouts for all server-specific
code. Getting file handles and offsets is now done in the
individual server's shim module.
In fha_hash_entry_choose_thread(), change the way we decide
whether two reads are in proximity to each other.
Previously, the calculation was a simple shift operation to
see whether the offsets were in the same power of 2 bucket.
The issue was that there would be a bucket (and therefore
thread) transition, even if the reads were in close
proximity. When there is a thread transition, reads wind
up going somewhat out of order, and ZFS gets confused.
The new calculation simply tries to see whether the offsets
are within 1 << bin_shift of each other. If they are, the
reads will be sent to the same thread.
The effect of this change is that for sequential reads, if
the client doesn't exceed the max_reqs_per_nfsd parameter
and the bin_shift is set to a reasonable value (22, or
4MB works well in my tests), the reads in any sequential
stream will largely be confined to a single thread.
Change fha_assign() so that it takes a softc argument. It
is now called from the individual server's shim code, which
will pass in the softc.
Change fhe_stats_sysctl() so that it takes a softc
parameter. It is now called from the individual server's
shim code. Add the current offset to the list of things
printed out about each active thread.
Change the num_reads and num_writes counters in the
fha_hash_entry structure to 32-bit values, and rename them
num_rw and num_exclusive, respectively, to reflect their
changed usage.
Add an enable sysctl and tunable that allows the user to
disable the FHA code (when vfs.XXX.fha.enable = 0). This
is useful for before/after performance comparisons.
nfs_fha.h:
Move most structure definitions out of nfs_fha.c and into
the header file, so that the individual server shims can
see them.
Change the default bin_shift to 22 (4MB) instead of 18
(256K). Allow unlimited commands per thread.
sys/nfsserver/nfs_fha_old.c,
sys/nfsserver/nfs_fha_old.h,
sys/fs/nfsserver/nfs_fha_new.c,
sys/fs/nfsserver/nfs_fha_new.h:
Add shims for the old and new NFS servers to interface with
the FHA code, and callbacks for the
The shims contain all of the code and definitions that are
specific to the NFS servers.
They setup the server-specific callbacks and set the server
name for the sysctl and loader tunable variables.
sys/nfsserver/nfs_srvkrpc.c:
Configure the RPC code to call fhaold_assign() instead of
fha_assign().
sys/modules/nfsd/Makefile:
Add nfs_fha.c and nfs_fha_new.c.
markj [Sun, 9 Jun 2013 17:47:01 +0000 (17:47 +0000)]
MFC r247221:
Merge part of r1712 from elftoolchain, making it possible to resize ELF
sections and indirectly change the layout of an ELF file when
ELF_F_LAYOUT is not set.
marius [Sun, 9 Jun 2013 13:58:37 +0000 (13:58 +0000)]
MFC: r251159
- Checking for spurious interrupts is only necessary when using INTx.
Actually, this may be further optimized for controller variants
supporting one-shot MSIs but I'm lacking the necessary hardware for
testing.
- Add some missing synchronization of the statistics and status DMA
maps.
marius [Sun, 9 Jun 2013 13:50:14 +0000 (13:50 +0000)]
MFC: r251146 (partial)
- Do not supply arguments as pointers to bce_get_{pg,rx}_buf() that are not
altered or actually needed there any longer.
- Honor errors passed to the DMA mapping callbacks.
- In bce_get_rx_buf(), do not reserve stack space for more DMA segments
than actually necessary.
- In bce_rx_intr(), remove a pointless check for an empty mbuf pointer
which can only happen in case of a severe programming error. Moreover,
recovering from that situation would require way more actions with header
splitting enabled (which it is by default).
- Fix VLAN tagging in the RX path; do not attach the VLAN tag twice if the
firmware has been told to keep it. [1]
marius [Sun, 9 Jun 2013 13:17:52 +0000 (13:17 +0000)]
MFC: r251394
CAM_DEV_QFREEZE handling should only be done on request submission but
neither on completion nor by SIM drivers in the first place. This issue
has been revealed by r249466.
marius [Sun, 9 Jun 2013 12:55:44 +0000 (12:55 +0000)]
MFC: r251142
- As a follow-up to r247565 (MFC'ed to stable/9 in r248036), make firmware
images that do not require patching at runtime actually const.
- Remove pointless softc members by employing the corresponding constants
directly.
- Remove pointless returns.
- Remove unnecessary inclusion of opt_device_polling.h.
- Replace an outdated and now bogus comment in bce_tick() with the
appropriate one.
marius [Sun, 9 Jun 2013 12:51:42 +0000 (12:51 +0000)]
MFC: r251133
- Merge from r249476: Ensure that PCI bus BUS_GET_DMA_TAG() method sees
the actual PCI device which makes the request for DMA tag, instead of
some descendant of the PCI device, by creating a pass-through trampoline.
- Sprinkle const on tables.
- Use NULL instead of 0 for pointers.
- Take advantage of nitems().
markj [Sat, 8 Jun 2013 15:45:01 +0000 (15:45 +0000)]
MFC r235647 for newsyslog (by gleb):
Hide DIR definition by making it an opaque struct typedef.
Introduce dirfd() libc exported symbol replacing macro with same name,
preserve _dirfd() macro for internal use.
Replace dirp->dd_fd with dirfd() call. Avoid using dirfd as variable
name to prevent shadowing global symbol.
MFC r250545:
Some filesystems (NFS in particular) do not fill out the d_type field when
returning directory entries through readdir(3). In this case we need to
obtain the file type ourselves; otherwise newsyslog -t will not be able to
find archived log files and will fail to both delete old log files and to
do interval-based rotations properly.
MFC r251240:
We want to stat the archived log file rather than the logfile itself.