aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | Allow consumer to customize physical pager.Konstantin Belousov2020-09-094-10/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for user-supplied callbacks into phys pager operations, providing custom getpages(), haspage(), and populate() methods implementations. Pager stores user data ptr/val in the object to provide context. Add phys_pager_allocate() helper that takes user ops table as one of the arguments. Current code for these methods is moved to the 'default' ops table, assigned automatically when vm_pager_alloc() is used. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365488
* | [PowerPC64] Fix xive order calculation in qemu TCGBrandon Bergren2020-09-081-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | When emulating a single thread system for testing reasons, mp_maxid can be 0. This trips up our math for calculating the order. Account for this to fix xive attachment when emulating a single-thread core on qemu powernv (a configuration that doesn't exist in the real world.) Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365487
* | Add kern_mmap_racct_check(), a helper to verify limits in vm_mmap*().Konstantin Belousov2020-09-082-29/+41
| | | | | | | | | | | | | | | | | | | | | | Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365486
* | Convert allocations of the phys pager to vm_pager_allocate().Konstantin Belousov2020-09-084-11/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Future changes would require additional initialization of OBJT_PHYS objects, and vm_object_allocate() is not suitable for it. Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365485
* | Add interruptible variant of vm_wait(9), vm_wait_intr(9).Konstantin Belousov2020-09-086-24/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | Also add msleep flags argument to vm_wait_doms(9). Reviewed by: markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D24652 Notes: svn path=/head/; revision=365484
* | Fix 64-bit build of libofw.Brandon Bergren2020-09-081-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust a couple of printf() lines that deal with dumping out addresses to cast to uintmax_t. This allows building a 64-bit libofw for use in things like a future Petitboot loader for PowerPC64, and other FDT platforms that require a 64-bit loader binary and want to use forth. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365483
* | [PowerPC64] Hide dssall instruction from llvm assemblerBrandon Bergren2020-09-082-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When doing a build for a modern CPUTYPE, llvm will throw errors if obsolete instructions are used, even if they will never run due to runtime checks. Hiding the dssall instruction from the assembler fixes kernel build when overriding CPUTYPE, without having any effect on the generated binary. This has been in my local tree for over a year and is well tested across a variety of machines. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365481
* | [PowerPC] Add root_pic assertion.Brandon Bergren2020-09-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | When enabling an interrupt, assert that we do in fact have a root PIC. This would have saved me some debugging effort. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365479
* | Don't return errors from the cryptodev_process() method.John Baldwin2020-09-083-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cryptodev_process() method should either return 0 if it has completed a request, or ERESTART to defer the request until later. If a request encounters an error, the error should be reported via crp_etype before completing the request via crypto_done(). Fix a few more drivers noticed by asomers@ similar to the fix in r365389. This is an old bug, but went unnoticed since crypto requests did not start failing as a normal part of operation until digest verification was introduced which can fail requests with EBADMSG. PR: 247986 Reported by: asomers Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D26361 Notes: svn path=/head/; revision=365478
* | geom_part: extend kern.geom.part.check_integrity to work on GPTEugene Grosbein2020-09-082-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are multiple USB/SATA bridges on the market that unconditionally cut some LBAs off connected media. This could be a problem for pre-partitioned drives so GEOM complains and does not create devices in /dev for slices/partitions preventing access to existing data. We have kern.geom.part.check_integrity that allows us to correct partitioning if changed from default 1 to 0 but it works for MBR only. If backup copy of GPT is unavailable due to decreases number of LBAs, kernel still does not give access to partitions and prints to dmesg: GEOM: md0: corrupt or invalid GPT detected. GEOM: md0: GPT rejected -- may not be recoverable. This change makes it work for GPT too, so it created partitions in /dev and prints to dmesg this instead: GEOM: md0: the secondary GPT table is corrupt or invalid. GEOM: md0: using the primary only -- recovery suggested. Then "gpart recover" re-created backup copy of GPT and allows further manipulations with partitions. This change is no-op for default configuration having kern.geom.part.check_integrity=1 Reported by: Alex Korchmar MFC after: 3 days. Notes: svn path=/head/; revision=365477
* | Fix panic with net.fibs tunable set in loader.conf.Alexander V. Chernikov2020-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | Fix by removing forgotten CTLFLAG_RWTUN flag from the sysctl, loader variable will be read later in vnet_rtables_init(). Reported by: mav Notes: svn path=/head/; revision=365475
* | ZFS: remove some extra definesMatt Macy2020-09-081-11/+2
| | | | | | | | | | | | | | | | | | | | When merging a number of defines that are needed in the standalone build made it in to the module makefile. Reported by: markj@ Notes: svn path=/head/; revision=365466
* | fd: fix fhold on an uninitialized var in fdcopy_remappedMateusz Guzik2020-09-081-1/+1
| | | | | | | | | | | | | | Reported by: gcc9 Notes: svn path=/head/; revision=365464
* | cache: drop write-only tvp_seqc varsMateusz Guzik2020-09-081-4/+2
| | | | | | | | Notes: svn path=/head/; revision=365463
* | vfs: drop a write-only var in vfs_periodic_msync_inactiveMateusz Guzik2020-09-081-3/+0
| | | | | | | | Notes: svn path=/head/; revision=365462
* | arm64: check for CRC32 support via HWCAPMitchell Horne2020-09-081-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Doing it this way eliminates the assumption about homogeneous support for the feature, since HWCAP values are only set if support is present on all CPUs. Reviewed by: tuexen, markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26032 Notes: svn path=/head/; revision=365461
* | arm64: export new HWCAP featuresMitchell Horne2020-09-083-8/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose some of the new HWCAP features added in r65304. This includes the addition of elf_hwcap2 into the sysvec, and a separate function to parse for those features. This only exposes features which require no further configuration, e.g. indicating the presence of certain instructions. Larger features (SVE) will not be advertised until we actually support them. The exact list of features/extensions this patch exposes is: - ARMv8.0-DGH - ARMv8.0-SB - ARMv8.2-BF16 - ARMv8.2-DCCVADP - ARMv8.2-I8MM - ARMv8.4-LRCPC - ARMv8.5-CondM - ARMv8.5-FRINT - ARMv8.5-RNG - PSTATE.SSBS While here, annotate elf_hwcap and elf_hwcap2 as __read_frequently, and move the declarations to the machine/md_var.h header. Submitted by: mikael@ (D22314 portion) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26031 Differential Revision: https://reviews.freebsd.org/D22314 Notes: svn path=/head/; revision=365460
* | arm64: fix incorrect HWCAP definitionsMitchell Horne2020-09-082-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD exports CPU features as bits in the AT_HWCAP and AT_HWCAP2 vectors via elf_aux_info(3). This interface is similar to getauxval(3) on Linux, and for simplicity to consumers we try to maintain an identical set of feature flags on arm64. The first batch of AT_HWCAP flags were added in r350166, corresponding to definitions that already existed in Linux. Unfortunately, one flag was missed, and a portion of the values are shifted one bit to the right as a result. Add the missing definition for HWCAP_ASIMDHP, and adjust the affected values to match their Linux counterparts. Although this is an ABI-breaking change, there is no plan to provide compat code for old binaries. An audit of our ports tree and other software via Debian code search indicates that there are not yet any consumers of this interface for FreeBSD/arm64. Bump __FreeBSD_version to be on the safe side, in case compat code needs to be added in the future. Reviewed by: emaste, manu MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D26329 Notes: svn path=/head/; revision=365459
* | sort(1): Remove duplicate option checkGordon Bergling2020-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | Reviewed by: lwhsu, emaste Approved by: emaste Obtained from: DragonFlyBSD MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D23892 Notes: svn path=/head/; revision=365458
* | net: mitigate vnet / epair cleanup racesKristof Provost2020-09-082-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a race where dying vnets move their interfaces back to their original vnet, and if_epair cleanup (where deleting one interface also deletes the other end of the epair). This is commonly triggered by the pf tests, but also by cleanup of vnet jails. As we've not yet been able to fix the root cause of the issue work around the panic by not dereferencing a NULL softc in epair_qflush() and by not re-attaching DYING interfaces. This isn't a full fix, but makes a very common panic far less likely. PR: 244703, 238870 Reviewed by: lutz_donnerhacke.de MFC after: 4 days Differential Revision: https://reviews.freebsd.org/D26324 Notes: svn path=/head/; revision=365457
* | RISC-V: enable MK_FORMAT_EXTENSIONSMitchell Horne2020-09-081-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This option was marked as broken because our riscv64-xtoolchain-gcc package lacked support. Since we are moving away from xtoolchain gcc in favor of freebsd-gcc9, there should be no issue in enabling this option by default. Notably, this enables -Wformat errors. Reviewed by: kp, jhb Differential Revision: https://reviews.freebsd.org/D26320 Notes: svn path=/head/; revision=365456
* | RISC-V: fix some mismatched format specifiersMitchell Horne2020-09-086-12/+12
| | | | | | | | | | | | | | | | | | | | RISC-V is currently built with -Wno-format, which is how these went undetected. Address them now before re-enabling those warnings. Differential Revision: https://reviews.freebsd.org/D26319 Notes: svn path=/head/; revision=365455
* | Move gpio and hwpmc to the correct place in files.arm64Andrew Turner2020-09-081-5/+5
| | | | | | | | | | | | | | Sponsored by: Innovate UK Notes: svn path=/head/; revision=365451
* | Add a GPIO driver for the Arm pl061 controllerAndrew Turner2020-09-086-0/+843
| | | | | | | | | | | | | | | | | | | | | | | | | | A PL061 is a simple 8 pin GPIO controller. This GPIO device is used to signal an internal request for shutdown on some virtual machines including Arm-based Amazon EC2 instances. Submitted by: Ali Saidi <alisaidi_amazon.com> (previouss version) Reviewed by: Ali Saidi, manu Differential Revision: https://reviews.freebsd.org/D24065 Notes: svn path=/head/; revision=365450
* | Add a few features to rcorder:Andrey V. Elsukov2020-09-082-27/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Enhance dependency loop logging: print full chain instead of the last link competing the loop; o Add -g option to generate dependency graph suitable for GraphViz visualization, loops and other graph generation issues are highlighted automatically; o Add -p option that enables grouping items that can be processed in parallel. Submitted by: Boris Lytochkin <lytboris at gmail> Reviewed by: melifaro MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25389 Notes: svn path=/head/; revision=365449
* | mmc_da: universally use uint8_t for the partition indexAndriy Gapon2020-09-081-3/+5
| | | | | | | | | | | | | | | | | | | | Also, assert in sdda_init_switch_part() that the index is within the defined range. MFC after: 1 week Notes: svn path=/head/; revision=365447
* | mmc_da: fix a typo and a too long lineAndriy Gapon2020-09-081-1/+2
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=365446
* | mmc_da: make sure that part_index is not used uninitialized in sddastartAndriy Gapon2020-09-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fix to r334065. Without this change I once got stuck I/O with endless partition switching: (sdda0:aw_mmc_sim2:0:0:0): sddastart (sdda0:aw_mmc_sim2:0:0:0): Partition 0 -> -525703168 (sdda0:aw_mmc_sim2:0:0:0): xpt_action: func 0x91d XPT_MMC_IO (sdda0:aw_mmc_sim2:0:0:0): xpt_done: func= 0x91d XPT_MMC_IO status 0x1 (sdda0:aw_mmc_sim2:0:0:0): sddadone (sdda0:aw_mmc_sim2:0:0:0): Card status: 00000000 (sdda0:aw_mmc_sim2:0:0:0): Current state: 4 (sdda0:aw_mmc_sim2:0:0:0): Compteting partition switch to 0 Note that -525703168 (an int) is 0xe0aa6800 in binary representation. The partition indexes are actually stored as uint8_t, so that value was converted / truncated to zero. MFC after: 1 week Notes: svn path=/head/; revision=365445
* | Add support to BELKIN B2B128 USB3 Ethernet Adapter to axge(4)Li-Wen Hsu2020-09-082-0/+2
| | | | | | | | | | | | | | | | | | Github PR: https://github.com/freebsd/freebsd/pull/439 Submitted by: https://github.com/jdpc86 MFC after: 2 weeks Notes: svn path=/head/; revision=365444
* | [PowerPC] Implement VDSO timebase access on powerpc*Brandon Bergren2020-09-0811-13/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement the remaining pieces needed to allow userland timestamp reading. Rewritten based on an intial essay into the problem by Justin Hibbits. (Copyright changed to my own on his request.) Tested on ppc64 (POWER9 Talos II), powerpcspe (e500v2 RB800), and powerpc (g4 PowerBook). Reviewed by: jhibbits (in irc) Sponsored by: Tag1 Consulting, Inc. Differential Revision: https://reviews.freebsd.org/D26347 Notes: svn path=/head/; revision=365442
* | [PowerPC] Work around -O miscompile on powerpc 32 bit.Brandon Bergren2020-09-081-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Work around llvm 11 miscompile in 32 bit powerpc that appears to cause ifuncs to branch to the wrong address by forcing -O2. This worked in previous versions because -O was mapped to -O2 previously (but is now -O1.) While here, remove the old temporary workaround from r224882 that does the opposite thing for powerpc non-DEBUG kernels, bringing it in line with other platforms that compile at -O2. This fixes kernel boot on powerpc and powerpcspe after the llvm11 transition. Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365441
* | src.conf.5: regen after r365439, WITH_/WITHOUT_CLEAN optionEd Maste2020-09-081-2/+3
| | | | | | | | Notes: svn path=/head/; revision=365440
* | Add WITH_/WITHOUT_CLEAN option to replace NO_CLEANEd Maste2020-09-084-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows use of the standard src.conf configuration for controlling whether the tree is cleaned before build or not. The default is still to clean. Setting either NOCLEAN or NO_CLEAN will mention the new src.conf option. NOCLEAN remains a .warning, while for now NO_CLEAN is .info. Reviewed by: bdrewery (earlier version) MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D22762 Notes: svn path=/head/; revision=365439
* | retire an old NO_CLEAN dependency cleanup hackEd Maste2020-09-081-2/+0
| | | | | | | | | | | | | | | | | | | | We have some hacks to remove stale dependency files for NO_CLEAN builds that are missed by make's dependency handling. These are intended to upport ongoing NO_CLEAN builds, and are no longer needed after a sufficient amount of time elapses. Notes: svn path=/head/; revision=365438
* | vm_object_split(): Handle orig_object type changes.Mark Johnston2020-09-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | orig_object->type can change from OBJT_DEFAULT to OBJT_SWAP while vm_object_split() is sleeping. In this case some pages in new_object may be left unbusied, but vm_object_split() attempts to unbusy all of them. Track the beginning of the busied range. Add an assertion to verify that pages are not re-added to the source object while sleeping. Reported by: Olympios Petrakis <olympios.petrakis@netapp.com> Reviewed by: alc, kib Tested by: pho MFC after: 1 week Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D26223 Notes: svn path=/head/; revision=365437
* | imgact_elf.c: unify check for phdr fitting into the first page.Konstantin Belousov2020-09-071-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | Similar to the userspace rtld check. Reviewed by: dim, emaste (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26339 Notes: svn path=/head/; revision=365433
* | rtld: pass argc/argv/env to dso inits.Konstantin Belousov2020-09-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is consistent with how array inits are called, and also makes us more compatible with glibc environment. Requested by: Alex S <iwtcex@gmail.com> PR: 249162 Reviewed by: dim, emaste Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D26351 Notes: svn path=/head/; revision=365432
* | [PowerPC] Initialize ELFv1 as a secondary sysvec to ELFv2.Brandon Bergren2020-09-071-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to enable VDSO timekeeping, it is necessary that there be exactly one primary FreeBSD sysvec for each of the host and (optionally) compat32. So, switch ELFv1 to being a secondary sysvec of ELFv2, so it does not get double-allocated in the shared page. Since secondary sysvecs use the same sigcode allocation as the primary, define both to use the main sigcode64, and adjust the sv_sigcode_base on ELFv2 after initialization to point to the correct offset. This has the desirable side effect of avoiding having a separate copy of the signal trampoline in the shared page. Our sigcode64 was already written to take advantage of trampoline sharing, it was just not being allocated that way until now. Submitted by: jhibbits Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365431
* | Merge commit 47b0262d3 from llvm git (by me):Dimitry Andric2020-09-071-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Add <stdarg.h> include to kmp_os.h, to get the va_list type, required after cde8f4c164a2. Sort system includes, while here. The original merged commit works fine by itself on head, but fails to compile on stable branches because stdarg.h is not implicitly pulled in. MFC after: immediately, to fix failing builds on stable/{11,12} Notes: svn path=/head/; revision=365429
* | Fix vdso compat32 timekeeping on !=x86.Brandon Bergren2020-09-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since x86 is the only 32-bit arch that has a 32-bit time_t, adjust the private bintime32 struct in vdso to only use a 32 bit sec on amd64. This matches the existing behavior in the compat code. Noticed while implementing vdso timekeeping on powerpc. This should also theoretically fix vdso timekeeping for arm binaries on aarch64. See tools attached to https://reviews.freebsd.org/D26347 for testing. Reviewed by: kib (in irc) Sponsored by: Tag1 Consulting, Inc. Notes: svn path=/head/; revision=365428
* | Call atf_skip function in cleanup procedure as it also triggers zfs.ko loadingLi-Wen Hsu2020-09-071-0/+5
| | | | | | | | | | | | | | | | PR: 249055 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365424
* | ntp: whitespace and typo fix in conf fileEd Maste2020-09-071-2/+2
| | | | | | | | | | | | | | | | | | PR: 248942 Submitted by: Jose Luis Duran (whitespace), igor (typo) MFC after: 1 week Notes: svn path=/head/; revision=365422
* | WiFi: fix ieee80211_media_change() callersBjoern A. Zeeb2020-09-078-88/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In r178354 with the introduction of multi-bss ("vap") support factoring out started and with r193340 ieee80211_media_change() no longer returned ENETRESET but only 0 or error. As ieee80211(9) tells the ieee80211_media_change() function should not be called directly but is registered with ieee80211_vap_attach() instead. Some drivers have not been fully converted. After fixing the return checking some of these functions were simply wrappers between ieee80211_vap_attach() and ieee80211_media_change(), so remove the extra function, where possible as well. PR: 248955 Submitted by: Tong Zhang (ztong0001 gmail.com) (original) MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=365419
* | nsswitch.conf.5: style fixesAlan Somers2020-09-071-21/+10
| | | | | | | | | | | | | | | | | | | | | | | | Fix some whitespace, and remove the .Tn macro Reported by: mandoc, igor Reviewed by: bcr (manpages) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D26345 Notes: svn path=/head/; revision=365415
* | Consistently use the same gateway when adding/deleting interface routes.Alexander V. Chernikov2020-09-071-20/+11
| | | | | | | | | | | | | | | | | | | | Use the same link-level gateway when adding or deleting interface routes. This helps nexthop checking in the upcoming multipath changes. Differential Revision: https://reviews.freebsd.org/D26317 Notes: svn path=/head/; revision=365404
* | Slightly improve usb(4)Li-Wen Hsu2020-09-071-26/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | - Mention USB 3.0 - Update links - Fix `mandoc -T lint` warnings Reviewed by: bcr, hselasky MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D26349 Notes: svn path=/head/; revision=365403
* | musb/allwinner: add support for configuring phy as well as device modeAndriy Gapon2020-09-071-3/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least on Orange Pi PC Plus even the host mode does not work without enabling the phy and setting it to the host mode. The driver will now parse dr_mode property and will try to configure itself and the phy accordingly. OTG mode is not supported yet, so it is treated as the device / peripheral mode. The phy is enabled -- powered on -- only for the host mode. The device mode requires support from a phy driver, e.g., aw_usbphy on Allwinner platform. aw_usbphy does not support the device mode, so it cannnot work yet. MFC after: 6 weeks Notes: svn path=/head/; revision=365402
* | musb/allwinner: add H3 supportAndriy Gapon2020-09-071-3/+21
| | | | | | | | | | | | | | MFC after: 6 weeks Notes: svn path=/head/; revision=365401
* | musb/allwinner: apply register filter in awusbdrd_bs_r_2() as wellAndriy Gapon2020-09-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, I get this panic: panic: awusbdrd_reg: Invalid register 0x342 It looks that musb code both writes and reads at least MUSB2_REG_TXDBDIS. MFC after: 5 weeks X-MFC after: r365399 Notes: svn path=/head/; revision=365400
* | fixup r365398: add a missed file with all the new Allwinner musb_otg codeAndriy Gapon2020-09-071-0/+543
| | | | | | | | | | | | | | | | | | Obtained from: andrew MFC after: 5 weeks X-MFC with: r365398 Notes: svn path=/head/; revision=365399