summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* MFC r302459: Allow AHCI controller to support up to 32 arbitrary devices.mav2016-08-182-58/+89
| | | | | | | | While old syntax is still supported, new syntax looks like this: -s 3,ahci,hd:/dev/zvol/XXX,hd:/dev/zvol/YYY,cd:/storage/ZZZ.iso Sponsored by: iXsystems, Inc.
* MFC r300296: Pass proper for 23xx arguments to isp_endcmd().mav2016-08-181-1/+1
|
* MFC r300293:mav2016-08-183-6/+49
| | | | | | | | Pass task management response information from CTL through CAM to isp(4), utilizing previously unused arg field of struct ccb_notify_acknowledge. This makes new QUERY TASK, QUERY TASK SET and QUERY ASYNC EVENT requests really functional for CAM target mode drivers.
* MFC r300222: Fix delaying requests to unknown virtual ports 2s after init.mav2016-08-182-1/+6
| | | | | | | | | This code was originally implemented 7 years ago, but never really worked due to trivial error. I think this functionality may be not required. Initiators supporting optional periodic command status checks detected those terminated commands and retried them 3 seconds later. But thinking about less featured initiators and the fact that it is our race makes virtual ports "unknown" it may be good to have this feature.
* MFC r302947: In AHCI_IRQ_MODE_AFTER mode do not clear interrupts below.mav2016-08-181-0/+1
| | | | | | This is probably a NOP change since IS register is not activery used for interrupts below the shared, but it looked odd to clear interrupts we did not handle.
* MFC r302946:mav2016-08-181-1/+2
| | | | | Do not consider the last interrupt shared if there are enough interrupts for all channels.
* MFC r303561: Wrap previous MSIX workaround into #ifndef EARLY_AP_STARTUP.mav2016-08-181-0/+4
| | | | With EARLY_AP_STARTUP we can successfully negotiate MSIX earlier.
* MFC r303554: Block MSIX negotiation until SMP started and IRQ reshuffled.mav2016-08-181-0/+15
|
* MFC r303553: Make MAC address generation more random.mav2016-08-181-2/+1
| | | | 'ticks' approach does not work at boot time.
* MFC r303514: Fix NTBT_QP_LINKS negotiation.mav2016-08-181-29/+18
| | | | | | | | I believe it never worked correctly for more the one queue even in Linux. This fixes case when one of consumer drivers is not loaded on one side, but its queues still announced as ready if something else brought link up. While there, remove some pointless NULL checks.
* MFC r303510: Clear scratchpad after MSIX negotiation to not leak garbage.mav2016-08-181-0/+1
|
* MFC r303494: Once more refactor KPI between ntb_transport(4) and if_ntb(4).mav2016-08-185-95/+154
| | | | | | New design allows to attach multiple consumers to ntb_transport(4) instance. Previous design obtained from Linux theoretically allowed that, but was not practically usable (Linux also has only one consumer driver now).
* MFC r303429, r303437, r303551:mav2016-08-186-751/+1168
| | | | | | | | | | | | | Once more refactor KPI between NTB hardware and consumers. New design allows hardware resources to be split between several consumers. For example, one BAR can be dedicated for remote memory access, while other resources can be used for packet transport for virtual Ethernet interface. And even without resource split, this code allows to specify which consumer driver should attach the hardware. From some points this makes the code even closer to Linux one, even though Linux does not provide the described flexibility.
* MFC r302520: Replace NTB man page with more detailed and up to date.mav2016-08-184-3/+268
| | | | Sponsored by: iXsystems, Inc.
* MFC r303266: Postpone ntb_get_msix_info() till we need to negotiate MSIX.mav2016-08-181-2/+1
| | | | | | | | Calling it earlier increases the window when MSIX info may change. This change does not solve the problem completely, but seems logical. Complete solution should probably include link reset in case of MSIX remap to trigger new negotiation, but we have no way to get notified about that now.
* MFC r302622 (by sephe): ntb: Fix LINTmav2016-08-182-3/+1
|
* MFC r302531: Revert odd change, setting limit registers before base.mav2016-08-181-12/+8
| | | | | | | | | | I don't know what errata is mentioned there, I was unable to find it, but setting limit before the base simply does not work at all. According to specification attempt to set limit out of the present window range resets it to zero, effectively disabling it. And that is what I see in practice. Fixing this properly disables access for remote side to our memory until respective xlat is negotiated and set. As I see, Linux does the same.
* MFC r302530: Fix wrong copy/paste in r302510.mav2016-08-181-1/+1
|
* MFC r302529: Remove callout_reset(link_work) from ntb_transport_attach().mav2016-08-181-1/+0
| | | | | | At that point link is quite likely not established yet, so messing with scratch registers is premature there. Original commit message mentioned code diff reduction from Linux, but this line is not present in Linux now.
* MFC r302510:mav2016-08-181-29/+10
| | | | | | Simplify MSIX MW BAR xlat setup, and don't forget to unlock its limit. The last fixes SB01BASE_LOCKUP workaround after driver reload.
* MFC r302508: Disable SB01BASE_LOCKUP workaround when split BARs disabled.mav2016-08-181-1/+11
| | | | | | | For some reason hack with sending MSI-X interrupts by writing to remote LAPIC memory works only for 32-bit BARs, that are available only if split BARs mode is enabled in BIOS. If it is not, complain loudly and fall back to less efficient workaround.
* Direct commit to stable/10 to fix build without newer interface KPIs.mav2016-08-181-48/+48
|
* MFC r302499: Improve checksum "offload" support.mav2016-08-181-4/+50
| | | | | | | | | | For compatibility reasons make driver not report any checksum offload by default, since there is indeed none. But if administrator knows that interface is used only for local traffic, he can enable fake checksum offload manually on both sides to save some CPU cycles, since the data are already protected by CRC32 of PCIe link. Sponsored by: iXsystems, Inc.
* MFC r302496: Rewrite if_ntb to use modern interface KPIs and features.mav2016-08-181-90/+249
| | | | | | It includes: link state, if_transmit, buf_ring, multiple queues, bpf, etc. Sponsored by: iXsystems, Inc.
* MFC r302495: Improve memory allocation errors handling on receive.mav2016-08-182-1/+8
|
* MFC r302494: Synchronize MTU code with Linux.mav2016-08-182-7/+4
| | | | It is mandatory for transport compatibility.
* MFC r302493: Reimplement doorbell register emulation for NTB_SB01BASE_LOCKUP.mav2016-08-182-61/+50
| | | | | | | This allows at least first three doorbells to work very close to normal hardware, properly signaling events to upper layers without spurious or lost events. Doorbells above the first three may still report spurious events due to lack of reliable information, but they are rarely used.
* MFC r302492: Bring some more order into link and qp state handling.mav2016-08-181-9/+4
| | | | | Do not touch scratchpad registers until link is reported up. Mask and do not handle doorbell events until respective qp is up.
* MFC r302491: Switch ctx_lock from mutex to rmlock.mav2016-08-181-17/+15
| | | | | | | It is odd idea to serialize different MSI-X vectors. Use of rmlocks here allows them to execute in parallel, but still protects ctx. If upper layers require any additional serialization -- they can do it by themselves.
* MFC r302490: Create separate RX taskqueue for each qp.mav2016-08-181-27/+20
|
* MFC r302489: Remove rx_completion_task taskqueue.mav2016-08-181-8/+4
| | | | It is not needed after RX lock removed in previous commit.
* MFC r302488: Remove unneeded RX lock, and make TX lock per-qp.mav2016-08-181-11/+7
|
* MFC r302487: Reduce code divergence from Linux, preparing for DMA support.mav2016-08-181-59/+73
|
* MFC r302486: Fix operation with multiple qps.mav2016-08-181-5/+5
|
* MFC r302484: NewBus'ify NTB subsystem.mav2016-08-1815-2005/+2498
| | | | | | | | | This follows NTB subsystem modularization in Linux, tuning it to FreeBSD native NewBus interfaces. This change allows to support different types of hardware with different drivers, support multiple NTB instances in a system, ntb_transport module use for needs other then if_ntb, etc. Sponsored by: iXsystems, Inc.
* MFC r302483: Remove some dead code found by Clang static analyzer.mav2016-08-181-18/+4
|
* MFC r302482: Fix NTB_SDOORBELL_LOCKUP workaround.mav2016-08-181-2/+6
| | | | | | Since SBARxSZ register can be write-once, it can be unusable for disabling the SBAR. For such case also set SBARxBASE to zero to not intersect with config BAR.
* MFC r302014: Fix if_ntb interface setup to include IFF_MULTICAST.mav2016-08-181-1/+1
| | | | This allows IPv6 link local addresses (and other IPv6 functionality) to work.
* MFC r304149sbruno2016-08-186-12/+41
| | | | | | e1000: Add support for Kaby Lake IDs Fixup some errors when transitioning to/from low power states.
* MFC r289932, r289940:kp2016-08-171-2/+3
| | | | | | | | | | | | | | PF_ANEQ() macro will in most situations returns TRUE comparing two identical IPv4 packets (when it should return FALSE). It happens because PF_ANEQ() doesn't stop if first 32 bits of IPv4 packets are equal and starts to check next 3*32 bits (like for IPv6 packet). Those bits containt some garbage and in result PF_ANEQ() wrongly returns TRUE. Fix: Check if packet is of AF_INET type and if it is then compare only first 32 bits of data. PR: 204005 Submitted by: Miłosz Kaniewski
* MFC r302497:kp2016-08-171-4/+12
| | | | | | | | | | | | pf: Map hook returns onto the correct error values pf returns PF_PASS, PF_DROP, ... in the netpfil hooks, but the hook callers expect to get E<foo> error codes. Map the returns values. A pass is 0 (everything is OK), anything else means pf ate the packet, so return EACCES, which tells the stack not to emit an ICMP error message. PR: 207598
* MFC r303663:kp2016-08-171-3/+3
| | | | | | | | | pfctl: Allow TOS bits to be cleared TOS value 0 is valid, so use 256 as an invalid value rather than zero. This allows users to enforce TOS == 0 with pf. Reported by: Radek Krejča <radek.krejca@starnet.cz>
* MFC r303916:kib2016-08-171-4/+7
| | | | Convert another tmpfs assert into runtime check.
* MFC r303914:kib2016-08-171-4/+7
| | | | Re-schedule signals after kthread exits.
* MFC r303913:kib2016-08-172-4/+4
| | | | | Unconditionally perform checks that FPU region was entered, when #NM exception is caught in kernel mode.
* MFstable/11 r304208:ngie2016-08-162-3/+3
| | | | | | | | | | MFC r303830: Remove vestigal references to __alpha__ Replace alpha reference in getconf(1) with amd64 [*] PR: 211300 [*]
* MFC r302943,r302944,r303004,r303010,r303011,r303013,r303014,r303074,ache2016-08-162-213/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r303088,r303142,r303208,r303210,r303530,r303536,r303564,r303565, r303706 In short: 1) All situations with glob(3) error return codes are well defined by POSIX, so rewrite old sporadic errors processing to match those definitions. Including subcases: Both C99 and POSIX directly prohibits any standard function to set errno to 0. Breaking this rule in 2001 NetBSD hack was imported which attempts to workaround very limited glob(3) return codes amount. Use POSIX-compatible workaround now with E2BIG which can't comes from other functions used instead of prohibited 0. Process errors happpens in (*readdirfunc)() too, as POSIX requires. Per POSIX GLOB_NOCHECK should return original pattern, unmodified, if no matches found. But our code strips all '\' returning it. Rewrite the code to allow to return original pattern. GLOB_ERR and gl_errfunc are supposed to work only for real directories per POSIX, so don't act on missing or plain files for ENOENT or ENOTDIR (as TODO in the code suggested). Remove the hack in the manpage describing how to skip ENOENT and ENOTDIR in gl_errfunc, it is unneeded now. Per POSIX GLOB_ERR must be considered even if gl_errfunc is not set, old code skips it in that case. 2) For near MAXPATHLEN long pathes old glob(3) code can operate on truncated results, prevent it in several places. 3) Results was not sorted according to collate as POSIX requires. 4) globtilde() forget to convert expanded user home dir from multibyte to wide chars. Moreover, those chars are addded as not protected, so can be treated as special chars. 5) Backward hack for EILSEQ in g_Ctoc() was not implemented, so all pathes with illegal byte sequences are skipped as result, implement it now. 6) GLOB_BRACE was somehow broken. First it repeatedly calls glob0() in globexp1() recursive calls, but glob0() was not supposed to be called repeatedly in the original code. It finalize results by possible adding original pattern for no match case, may return GLOB_NOMATCH error and by sorting all things. Original pattern adding or GLOB_NOMATCH error can happens each time glob0() called repeatedly, and sorting happens for one item only, all things are never sorted. Second, f.e. "a{a" pattern does not match "a{a" file but match "a" file instead. Third, some errors (f.e. for limits or overflow) can be ignored by GLOB_BRACE code because it forces return (0). Add non-finalizing flag to glob0() and make globexp0() wrapper around recursively called globexp1() to finalize things like glob0() does. Reorganize braces code to work correctly. 7) Don't allow MB_CUR_MAX * strlen overallocation hits GLOB_LIMIT_STRING (ARG_MAX) limit, use final string length, not malloced space for it.
* MFC r303423:kib2016-08-156-22/+73
| | | | Force SIGSTOP to be the first signal reported after the attach.
* MFC 302900,302902,302921,303461,304009:jhb2016-08-1513-82/+471
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a mask of optional ptrace() events. 302900: Add a test for user signal delivery. This test verifies we get the correct ptrace event details when a signal is posted to a traced process from userland. 302902: Add a mask of optional ptrace() events. ptrace() now stores a mask of optional events in p_ptevents. Currently this mask is a single integer, but it can be expanded into an array of integers in the future. Two new ptrace requests can be used to manipulate the event mask: PT_GET_EVENT_MASK fetches the current event mask and PT_SET_EVENT_MASK sets the current event mask. The current set of events include: - PTRACE_EXEC: trace calls to execve(). - PTRACE_SCE: trace system call entries. - PTRACE_SCX: trace syscam call exits. - PTRACE_FORK: trace forks and auto-attach to new child processes. - PTRACE_LWP: trace LWP events. The S_PT_SCX and S_PT_SCE events in the procfs p_stops flags have been replaced by PTRACE_SCE and PTRACE_SCX. PTRACE_FORK replaces P_FOLLOW_FORK and PTRACE_LWP replaces P2_LWP_EVENTS. The PT_FOLLOW_FORK and PT_LWP_EVENTS ptrace requests remain for compatibility but now simply toggle corresponding flags in the event mask. While here, document that PT_SYSCALL, PT_TO_SCE, and PT_TO_SCX both modify the event mask and continue the traced process. 302921: Rename PTRACE_SYSCALL to LINUX_PTRACE_SYSCALL. 303461: Note that not all optional ptrace events use SIGTRAP. New child processes attached due to PTRACE_FORK use SIGSTOP instead of SIGTRAP. All other ptrace events use SIGTRAP. 304009: Remove description of P_FOLLOWFORK as this flag was removed.
* MFC r303934,r303937,r303942:bdrewery2016-08-151-0/+2
| | | | | | | | | r303934: Support rmdir(2). r303937: Use proper argument length for rmdir(2) for r303934. r303942: Fix sorting in r303934.
OpenPOWER on IntegriCloud