summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r323474, r323553, r323691ian2017-09-229-21/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | r323474: Add a default implementation that returns ENODEV for start, repeat_start, stop, read, and write methods. Some controllers don't implement these individual operations and have only a transfer method. In that case, we should return an indication that the device is present but doesn't support the method, as opposed to the kobj default error ENXIO which makes it look like the whole device is missing. Userland tools such as i2c(8) can use the differing return values to switch between the two different i2c IO mechanisms. r323553: Defer attaching and probing iicbus and its children until interrupts are available, in i2c controller drivers that require interrupts for transfers. This is the result of auditing all 22 existing drivers that attach iicbus. These drivers were the only ones remaining that require interrupts and were not using config_intrhook to defer attachment. That has led, over the years, to various i2c slave device drivers needing to use config_intrhook themselves rather than performing bus transactions in their probe() and attach() methods, just in case they were attached too early. r323691: Give icee(4) a detach() method so it can be used as a module. Add a module makefile for it.
* MFC r323465:ian2017-09-221-11/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Make i2c -s (device scan) work on hardware that supports only full xfers. The existing scan code is based on sending an i2c START condition and if there is no error it assumes there is a device at that i2c address. Some i2c controllers don't support sending individual start/stop signals on the bus, they can only perform complete data transfers with start/stop handled in the silicon. This adds a fallback mechanism that attempts to read a single byte from each i2c address. It's less reliable than looking for an an ACK repsonse to a start, because some devices will NAK an attempt to read that isn't preceeded by a write of a register address. Writing to devices to probe them is too dangerous to even consider. The user is told that a less-reliable scan is being done, so even if the read-scan comes up empty too, it's still a vast improvement over the old situation where it would just claim there were no devices on the bus even though the devices were there and working fine. If the i2c controller responds with a proper ENODEV (device doesn't support operation) or an almost-proper EOPNOTSUPP, the START/STOP scan is switched to a read-scan right away. Most controllers respond with ENXIO or EIO if they don't support START/STOP, so no quick-out is available. For those, if a scan of all 127 addresses and come up empty, the scan is re-done using the read method. Reported by: Maxim Filimonov <che@bein.link>
* MFC r323642:ian2017-09-226-6/+6
| | | | | | | | Add a missing header file to SRCS to fix out-of-kernel builds. PR: 222354 Submitted by: eugen@ Pointy hat: ian@
* MFC r323924:gjb2017-09-221-10/+0
| | | | | | | | | Revert r323812 from release/tools/arm.subr, which has broken the build on arm/armv6 images. Pointyhat: gjb (myself) MFC note: releng/10.4 has broken because of this Sponsored by: The FreeBSD Foundation
* MFC r323326:kib2017-09-221-5/+21
| | | | | Use IOAPIC PCI rid as the interrupt TLP source id for DMAR interrupt remapping.
* MFC r323325, r323450:kib2017-09-222-1/+96
| | | | | If IOAPIC has PCI binding, match the PCI device against MADT enumerated IOAPIC.
* MFC r323616:kib2017-09-221-1/+6
| | | | Batch freeing of the pages in vm_object_page_remove().
* MFC r323611: fastmatch.h: remove duplicate #definesemaste2017-09-221-13/+0
|
* MFC 323630: Avoid reusing the wrong buffer for a DDP AIO request.jhb2017-09-212-1/+4
| | | | | | | | | | | | | | | | | To optimize the case of ping-ponging between two buffers, the DDP code caches the last two buffers used keeping the pages wired and page pods stored in the NIC's RAM. If a new aio_read() request uses one of the same buffers, then the work of holding pages, etc. can be avoided. However, the starting virtual address of an aio buffer was not saved, only the page count, length, and initial page offset. Thus, an aio_read() request could match a different buffer in the address space. (Earlier during development vm_fault_hold_quick_pages() was always called and the vm_page_t values were compared, but that was eventually removed without being adequately replaced.) Fix by storing the starting virtual address and comparing that (along with other fields) to determine if a buffer can be reused. Sponsored by: Chelsio Communications
* MFC 323025: Read max_stack_flags from correct object.jhb2017-09-211-1/+1
| | | | | | 'obj' is not initialized here. Sponsored by: DARPA / AFRL
* MFC r323439:markj2017-09-211-2/+7
| | | | Provide an error message if KTR symbols in a vmcore cannot be resolved.
* MFC r323587: octeon sdk: initialize variable to quiet Clang warningemaste2017-09-211-1/+1
| | | | | | Clang complains "variable 'dummy' is uninitialized when used here". Sponsored by: The FreeBSD Foundation
* MFC r323597:kib2017-09-212-6/+16
| | | | Handle freeaddrinfo(NULL).
* MFC r322800:andrew2017-09-211-4/+0
| | | | | | | Remove an unneeded call to pmap_invalidate_all. This was never called as the anyvalid variable is never set. Sponsored by: DARPA, AFRL
* MFC r322797:andrew2017-09-211-4/+1
| | | | | | | Fix a bug in pmap_protect where we invalidate the wrong page. With this we can now remove an unneeded call to invalidate all entries. Sponsored by: DARPA, AFRL
* MFC r323575: Add second entry to LUT on a link side in B2B mode.mav2017-09-211-4/+3
| | | | | Each of two entries on a virtual side should have its counterpart on a peer's link side.
* MFC r323715:cy2017-09-211-1/+1
| | | | Don't use an apostrophe in a possesive pronoun.
* MFC r323539: qlnx: exclude if WITHOUT_SOURCELESS_UCODE setemaste2017-09-201-1/+1
| | | | | | PR: 222277 Submitted by: Fabian Keil Obtained from: ElectroBSD
* MFC 322915: Extend the workaround for LLVM bug 11663 to MIPS N32.jhb2017-09-201-2/+3
| | | | | | This fixes infinite recursion in /sbin/init for MIPS N32. Sponsored by: DARPA / AFRL
* MFC 322270: Fix a NULL pointer dereference in mly_user_command().jhb2017-09-201-7/+4
| | | | | | | | | | | | If mly_user_command fails to allocate a command slot it jumps to an 'out' label used for error handling. The error handling code checks for a data buffer in 'mc->mc_data' to free before checking if 'mc' is NULL. Fix by just returning directly if we fail to allocate a command and only using the 'out' label for subsequent errors when there is actual cleanup to perform. PR: 217747 Reported by: PVS-Studio
* MFC: r309284-r309294 (kadesai)jkim2017-09-204-202/+670
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r309294 This patch upgrades driver version to 06.712.04.00-fbsd r309293 This patch will add code to refire IOCTL commands after OCR. r309292 This patch will unblock SYNCHRONIZE_CACHE command to firmware, i.e. don't block the SYNCHRONIZE_CACHE command at driver instead of passing it to firmware for all Gen3 controllers. r309291 Wait for AEN task to be completed(if in queue) before resetting the controller and return without processing event in AEN thread, if controller reset is in progress. r309290 This patch will add task management support in driver. Below is high level description: If a SCSI IO times out, then before initiating OCR, now the driver will try to send a target reset to the particular target for which the IO is timed out. If that also fails, then the driver will initiate OCR. r309289 Process outstanding reply descriptors from all the reply descriptor post queues before initiating OCR. r309288 Clean up reference to AEN command if abort AEN is succesful as the command is aborted. Did the same by setting sc->aen_cmd = NULL when aborting AEN is successful. r309287 Update controller properties(read OCR capability bit) when MR_EVT_CTRL_PROP_CHANGED recieved. r309286 Add sanity check in IO and IOCTL path not to process command further if controller is in HW_CRITICAL_ERROR. r309285 Use a variable to indicate Gen3 controllers and remove all PCI ids based checks used for gen3 controllers. r309284 High level description of new solution - Free MFI and MPT command from same context. Free both the command either from process (from where mfi-mpt pass-through was called) or from ISR context. Do not split freeing of MFI and MPT, because it creates the race condition which will do MFI/MPT list.
* MFC r323557:gjb2017-09-201-2/+2
| | | | | | Remove an unneeded sentence stop. Sponsored by: The FreeBSD Foundation
* MFC r323812:gjb2017-09-202-0/+19
| | | | | | | | | | Bootstrap etcupdate(8) and mergemaster(8) databases when creating virtual machine images and embedded images, similar to what is done when extracting base.txz to the target root filesystem in a new installation. Approved by: re (marius, insta-MFC) Sponsored by: The FreeBSD Foundation
* MFC: 323253, 323499gnn2017-09-203-3/+302
| | | | | | Add D definitions for the named values in socket.h (gnn@) Fix DTrace test tst_inet_ntop_d: remove definitions are already in libdtrace (lwhsu@)
* MFC r322530 and r323220:hselasky2017-09-202-1/+3
| | | | | | | | Add new USB quirk(s). PR: 221328 PR: 221775 Sponsored by: Mellanox Technologies
* MFC r323562:kib2017-09-201-1/+1
| | | | | Remove inline specifier from vm_page_free_wakeup(), do not micro-manage compiler.
* MFC r323561:kib2017-09-201-12/+47
| | | | | Do not relock free queue mutex for each page, free whole terminating object' page queue under the single mutex lock.
* MFC r322571 (by br):kib2017-09-202-36/+51
| | | | Add OBJ_PG_DTOR flag to VM object.
* MFC r321330 (by br):kib2017-09-201-3/+3
| | | | Style.
* MFC r323559:kib2017-09-202-39/+81
| | | | Split vm_page_free_toq().
* MFC r323558:kib2017-09-202-1/+9
| | | | Use existing tag name for the vm_object' memq.
* MFC r323230:kib2017-09-204-193/+627
| | | | Skylake server core PMC support for hwpmc(4).
* MFC r323229:kib2017-09-201-5/+6
| | | | Minor style changes to make forthcoming code stand out less.
* MFC r323540: jedec_ts: add many more devices from various vendorsavg2017-09-201-30/+124
| | | | | | | The new IDs are taken from the hardware to which I have access and from open datasheets. Also, the hardware probing is moved to the device probe method.
* MFC: 323068jpaetzel2017-09-196-0/+6
| | | | | | Allow kldload tcpmd5 PR: 220170
* MFC r323482: zfs_ctldir: remove obsolete / bogus ARGSUSED lint directivesavg2017-09-191-6/+0
| | | | None of the tagged functions had unused parameters.
* MFC r323435: MFV r323111: 8569 problem with inline functions in abd.havg2017-09-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@37e84ab74e939caf52150fc3352081786ecc0c29 https://github.com/illumos/illumos-gate/commit/37e84ab74e939caf52150fc3352081786ecc0c29 https://www.illumos.org/issues/8569 C [C99] has peculiar rules for inline functions that are different from the C++ rules. Unlike C++ where inline is "fire and forget", in C a programmer must pay attention to the function's storage class / visibility. The main problem is with the case where a compiler decides to not inline a call to the function declared as inline. Some relevant links: - http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15831.html - http://www.drdobbs.com/the-new-c-inline-functions/184401540 The summary is that either the inline functions should be declared 'static inline' or one of the compilation units (.c files) must provide a callable externally visible function definition. In the former case, the compiler would automatically create a local non-inlined function instance in every compilation unit where it's needed. In the latter case the single external definition is used to satisfy any non-inlined calls in all compilation units. As things stand right now, we can get an undefined reference error under certain combinations of compilers and compiler options. For example, this is what I get on FreeBSD when compiling with clang 4.0.0 and -O1: In function `abd_free': /usr/src/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/abd.c:385: undefined reference to `abd_is_linear' Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Andriy Gapon <avg@FreeBSD.org>
* MFC r322241: MFV r322240: 8491 uberblock on-disk padding to reserve space ↵avg2017-09-191-0/+7
| | | | | | | | | | | | | | | | | | | | | | for smoothly merging zpool checkpoint & MMP in ZFS illumos/illumos-gate@79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://github.com/illumos/illumos-gate/commit/79c2b812ee2010ebf20fdd92dc5f06b59000a94c https://www.illumos.org/issues/8491 The zpool checkpoint feature in DxOS added a new field in the uberblock. The Multi-Modifier Protection Pull Request from ZoL adds two new fields in the uberblock (Reference: https://github.com/zfsonlinux/zfs/pull/6279). As these two changes come from two different sources and once upstreamed and deployed will introduce an incompatibility with each other we want to upstream a change that will reserve the padding for both of them so integration goes smoothly and everyone gets both features. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Olaf Faaland <faaland1@llnl.gov> Approved by: Gordon Ross <gwr@nexenta.com> Author: Serapheim Dimitropoulos <serapheim@delphix.com>
* MFC r322230: MFV r322229: 7600 zfs rollback should pass target snapshot to ↵avg2017-09-196-13/+71
| | | | | | | | | | | | | | | | | | | kernel illumos/illumos-gate@77b171372ed21642e04c873ef1e87fe2365520df https://github.com/illumos/illumos-gate/commit/77b171372ed21642e04c873ef1e87fe2365520df https://www.illumos.org/issues/7600 At present, the kernel side code seems to blindly rollback to whatever happens to be the latest snapshot at the time when the rollback task is processed. The expected target's name should be passed to the kernel driver and the sync task should validate that the target exists and that it is the latest snapshot indeed. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Andriy Gapon <avg@FreeBSD.org>
* MFC r322228: MFV r322227: 8377 Panic in bookmark deletionavg2017-09-191-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@42418f9e73f0d007aa87675ecc206c26fc8e073e https://github.com/illumos/illumos-gate/commit/42418f9e73f0d007aa87675ecc206c26fc8e073e https://www.illumos.org/issues/8377 The problem is that when dsl_bookmark_destroy_check() is executed from open context (the pre-check), it fills in dbda_success based on the existence of the bookmark. But the bookmark (or containing filesystem as in this case) can be destroyed before we get to syncing context. When we re-run dsl_bookmark_destroy_check() in syncing context, it will not add the deleted bookmark to dbda_success, intending for dsl_bookmark_destroy_sync() to not process it. But because the bookmark is still in dbda_success from the open-context call, we do try to destroy it. The fix is that dsl_bookmark_destroy_check() should not modify dbda_success when called from open context. Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r322222: MFV r322221: 7910 l2arc_write_buffers() may write beyond target_szavg2017-09-191-29/+29
| | | | | | | | | | | | | | | | | | | | | FreeBD note: the essence of this change was committed to FreeBSD in r314274. This commit catches up with differences between what was committed to FreeBSD and what was committed to OpenZFS, mainly more logical variable names. illumos/illumos-gate@16a7e5ac116c85d965007a5f201104b564e82210 https://github.com/illumos/illumos-gate/commit/16a7e5ac116c85d965007a5f201104b564e82210 https://www.illumos.org/issues/7910 It seems that the change in issue #6950 resurrected the problem that was earlier fixed by the change in issue #5219. Please also see the following FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216178 Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Andriy Gapon <avg@FreeBSD.org>
* MFC r322234: zfs: no need for __DECONST after abd constification in r322233avg2017-09-191-1/+1
| | | | Note that vdev_label_write_pad2() is FreeBSD specific.
* MFC r322239: MFV r322238: 7915 checks in l2arc_evict could use some cleaning upavg2017-09-191-15/+9
| | | | | | | | | | | | | | | | | | | | | | | | | illumos/illumos-gate@267ae6c3a88d2fc39276af66caafa978b0935b82 https://github.com/illumos/illumos-gate/commit/267ae6c3a88d2fc39276af66caafa978b0935b82 https://www.illumos.org/issues/7915 l2arc_evict() is strictly serialized with respect to l2arc_write_buffers() and l2arc_write_done(). Normally, l2arc_evict() and l2arc_write_buffers() are called from the same thread, so they can not be concurrent. Also, l2arc_write_buffers() uses zio_wait() on the parent zio of all cache zio-s. That ensures that l2arc_write_done() is completed before l2arc_write_buffers() returns. Finally, if a cache device is removed, then l2arc_evict() is called under SCL_ALL in the exclusive mode. That ensures that it can not be concurrent with the normal L2ARC accesses to the device (including writing and evicting buffers). Given the above, some checks and actions in l2arc_evict() do not make sense. For instance, it must never encounter the write head header let alone remove it from the buffer list. Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Approved by: Matthew Ahrens <mahrens@delphix.com> Author: Andriy Gapon <avg@FreeBSD.org>
* MFC r322218: MFV r322217: 8418 zfs_prop_get_table() call in ↵avg2017-09-191-1/+0
| | | | | | | | | | | | | | | | zfs_validate_name() is a no-op illumos/illumos-gate@e09ba01dcda5e24964b8632718777b39166d86e4 https://github.com/illumos/illumos-gate/commit/e09ba01dcda5e24964b8632718777b39166d86e4 https://www.illumos.org/issues/8418 The following line in zfs_validate_name() is just a no-op and it should be removed: 108 (void) zfs_prop_get_table(); Reviewed by: Vitaliy Gusev <gusev.vitaliy@icloud.com> Approved by: Matthew Ahrens <mahrens@delphix.com> Author: Marcel Telka <marcel@telka.sk>
* MFC r322237: MFV r322236: 8126 ztest assertion failed in dbuf_dirty due to ↵avg2017-09-191-5/+10
| | | | | | | | | | | | | | | | | | dn_nlevels changing illumos/illumos-gate@dcb6872c565819ac88acbc2ece999ef241c8b982 https://github.com/illumos/illumos-gate/commit/dcb6872c565819ac88acbc2ece999ef241c8b982 https://www.illumos.org/issues/8126 The sync thread is concurrently modifying dn_phys->dn_nlevels while dbuf_dirty() is trying to assert something about it, without holding the necessary lock. We need to move this assertion further down in the function, after we have acquired the dn_struct_rwlock. Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com> Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r322233: MFV r322232: 8426 mark immutable buffer arguments as such in abd.havg2017-09-191-2/+2
| | | | | | | | | | | | | | | illumos/illumos-gate@9b195260e22529ac0e2580faaf89402420589c1c https://github.com/illumos/illumos-gate/commit/9b195260e22529ac0e2580faaf89402420589c1c https://www.illumos.org/issues/8426 abd_copy_from_buf and abd_cmp_buf do not modify their void *buf arguments, so qualify them with const. abd_copy_from_buf_off and abd_cmp_buf_off already had that type for the corresponding arguments. Reviewed by: Matt Ahrens <mahrens@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Andriy Gapon <avg@FreeBSD.org>
* MFC r322226: MFV r322223: 8378 crash due to bp in-memory modification of ↵avg2017-09-194-34/+49
| | | | | | | | | | | | | | | | | | | | | | | | | nopwrite block illumos/illumos-gate@b7edcb940884114e61382937505433c4c38c0278 https://github.com/illumos/illumos-gate/commit/b7edcb940884114e61382937505433c4c38c0278 https://www.illumos.org/issues/8378 The problem is that zfs_get_data() supplies a stale zgd_bp to dmu_sync(), which we then nopwrite against. zfs_get_data() doesn't hold any DMU-related locks, so after it copies db_blkptr to zgd_bp, dbuf_write_ready() could change db_blkptr, and dbuf_write_done() could remove the dirty record. dmu_sync() then sees the stale BP and that the dbuf it not dirty, so it is eligible for nop-writing. The fix is for dmu_sync() to copy db_blkptr to zgd_bp after acquiring the db_mtx. We could still see a stale db_blkptr, but if it is stale then the dirty record will still exist and thus we won't attempt to nopwrite. Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Matthew Ahrens <mahrens@delphix.com>
* MFC r321471: spa_import_rootpool should be able to handle an imported root poolavg2017-09-191-0/+10
| | | | | | | That is required to support reboot -r with a new root filesystem being on an already imported pool. PR: 210721
* MFC r320151: remove bogus declaration of malloc from tcp_wrappersavg2017-09-191-4/+0
| | | | | | The declaration was already inactive when INET6 was enabled and it causes a build error in the other case because of a conflict with the correct definition in stdlib.h.
* MFC r320266: jedec_ts: add support for devices manufactured by IDTavg2017-09-191-0/+7
| | | | | Full manufacturer name is Integrated Device Technology, Inc. Supported devices include TSE2002B3C and TS3000B3A.
OpenPOWER on IntegriCloud