!85 FreeBSD升级到v13.2.0

Merge pull request !85 from zhangyao/master
This commit is contained in:
openharmony_ci
2023-12-08 09:09:57 +00:00
committed by Gitee
13 changed files with 778 additions and 361 deletions
-81
View File
@@ -1,81 +0,0 @@
This is the top level of the FreeBSD source directory. This file
was last revised on:
$FreeBSD$
FreeBSD is an operating system used to power modern servers,
desktops, and embedded platforms. A large community has
continually developed it for more than thirty years. Its
advanced networking, security, and storage features have
made FreeBSD the platform of choice for many of the
busiest web sites and most pervasive embedded networking
and storage devices.
For copyright information, please see the file COPYRIGHT in this
directory. Additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information.
The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree. See build(7), config(8),
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html, and
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
for more information, including setting make(1) variables.
Source Roadmap:
---------------
bin System/user commands.
cddl Various commands and libraries under the Common Development
and Distribution License.
contrib Packages contributed by 3rd parties.
crypto Cryptography stuff (see crypto/README).
etc Template files for /etc.
gnu Commands and libraries under the GNU General Public License
(GPL) or Lesser General Public License (LGPL). Please see
gnu/COPYING* for more information.
include System include files.
kerberos5 Kerberos5 (Heimdal) package.
lib System libraries.
libexec System daemons.
release Release building Makefile & associated tools.
rescue Build system for statically linked /rescue utilities.
sbin System commands.
secure Cryptographic libraries and commands.
share Shared resources.
stand Boot loader sources.
sys Kernel sources.
sys/<arch>/conf Kernel configuration files. GENERIC is the configuration
used in release builds. NOTES contains documentation of
all possible entries.
tests Regression tests which can be run by Kyua. See tests/README
for additional information.
tools Utilities for regression testing and miscellaneous tasks.
usr.bin User commands.
usr.sbin System administration commands.
For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/current-stable.html
+1 -1
View File
@@ -3,7 +3,7 @@
"Name" : "FreeBSD",
"License" : "BSD 2-Clause License",
"License File" : "COPYRIGHT",
"Version Number" : "13.1",
"Version Number" : "13.2",
"Owner" : "tonghaoyang1@huawei.com",
"Upstream URL" : "http://www.freebsd.org/",
"Description" : "FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms."
+45
View File
@@ -0,0 +1,45 @@
FreeBSD Source:
---------------
This is the top level of the FreeBSD source directory.
FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.
A large community has continually developed it for more than thirty years.
Its advanced networking, security, and storage features have made FreeBSD the platform of choice for many of the busiest web sites and most pervasive embedded networking and storage devices.
For copyright information, please see [the file COPYRIGHT](COPYRIGHT) in this directory.
Additional copyright information also exists for some sources in this tree - please see the specific source directories for more information.
The Makefile in this directory supports a number of targets for building components (or all) of the FreeBSD source tree.
See build(7), config(8), [FreeBSD handbook on building userland](https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld), and [Handbook for kernels](https://docs.freebsd.org/en/books/handbook/kernelconfig/) for more information, including setting make(1) variables.
For information on the CPU architectures and platforms supported by FreeBSD, see the [FreeBSD
website's Platforms page](https://www.freebsd.org/platforms/).
Source Roadmap:
---------------
| Directory | Description |
| --------- | ----------- |
| bin | System/user commands. |
| cddl | Various commands and libraries under the Common Development and Distribution License. |
| contrib | Packages contributed by 3rd parties. |
| crypto | Cryptography stuff (see [crypto/README](crypto/README)). |
| etc | Template files for /etc. |
| gnu | Commands and libraries under the GNU General Public License (GPL) or Lesser General Public License (LGPL). Please see gnu/COPYING* for more information. |
| include | System include files. |
| kerberos5 | Kerberos5 (Heimdal) package. |
| lib | System libraries. |
| libexec | System daemons. |
| release | Release building Makefile & associated tools. |
| rescue | Build system for statically linked /rescue utilities. |
| sbin | System commands. |
| secure | Cryptographic libraries and commands. |
| share | Shared resources. |
| stand | Boot loader sources. |
| sys | Kernel sources (see [sys/README.md](sys/README.md)). |
| targets | Support for experimental `DIRDEPS_BUILD` |
| tests | Regression tests which can be run by Kyua. See [tests/README](tests/README) for additional information. |
| tools | Utilities for regression testing and miscellaneous tasks. |
| usr.bin | User commands. |
| usr.sbin | System administration commands. |
For information on synchronizing your source tree with one or more of the FreeBSD Project's development branches, please see [FreeBSD Handbook](https://docs.freebsd.org/en/books/handbook/cutting-edge/#current-stable).
+403
View File
@@ -0,0 +1,403 @@
Release notes for FreeBSD 13.0.
This file describes new user-visible features, changes and updates relevant to
users of binary FreeBSD releases. Each entry should describe the change in no
more than several sentences and should reference manual pages where an
interested user can find more information. Entries should wrap after 80
columns. Each entry should begin with one or more commit IDs on one line,
specified as a comma separated list and/or range, followed by a colon and a
newline. Entries should be separated by a newline.
Changes to this file should not be MFCed.
68e86d5265bc,e58dfd0de589,59f5a5cb724e,6e272a78de36,4c4a4fd4a649,ba2ae2cca63a:
sendmail has been updated to the latest upstream version (8.17.1).
225443828ec6..c44d097dcf92:
bhyve now supports more than 16 vCPUs in a guest. By default
bhyve permits each guest to create the same number of vCPUs as
the count of physical CPUs on the host. This limit can be
adjusted via the loader tunable hw.vmm.maxcpu.
1462dc95f796:
Kernel TLS offload now supports receive-side offload of TLS 1.3.
3ee882bf21af:
Change handling of the lowest address on an IPv4 (sub)net so that
packets are not sent as a broadcast unless this has been set as the
broadcast address. This makes the lowest address usable for a host.
The old behavior can be restored with the net.inet.ip.broadcast_lowest
sysctl. For more information, see
https://datatracker.ietf.org/doc/draft-schoen-intarea-lowest-address/.
33ff39796ffe,8719e8a951b7:
A new rc(8) service script zfskeys allows for automatic decryption
of ZFS datasets encrypted with ZFS native encryption during boot.
See the rc.conf(5) manual page for more information.
b7a2cf0d9102 - eae02d959363:
Upgrade bhyve's emulation to version 1.4 of the NVMe specification
0a6760a1de32, 3f3676a71266, 580c04df4db6:
Add WiFi 6 support.
various:
Add support for the HiFive Unmatched RISC-V board.
9fb6e613373c:
Add a sysctl called vfs.nfsd.srvmaxio that can be used to
increase the NFS server's maximum I/O size from 128Kbytes
to any power of 2 up to 1Mbyte. It can only be set when
the nfsd threads are not running and will normally require
an increase in kern.ipc.maxsockbuf to at least the value
recommended by the console log message generated when
setting vfs.nfsd.srvmaxio is first attempted.
9ec7dbf46b0a:
Add a new NFSv4.1/4.2 mount option "nconnect" that can
be used to specify the number of TCP connections that
will be used for the mount, up to a maximum of 16.
The first (default) TCP connection will be used for
all RPCs that consist of small RPC messages.
The RPCs that can consist of large RPC messages
(Read/Readdir/ReaddirPlus/Write) will be sent on the
additional TCP connections in a round robin fashion.
If either the NFS client or NFS server have multiple
network interfaces aggregated together or a network
interface that uses multiple queues, this can increase
NFS performance for the mount.
various:
One True Awk has been updated to the latest from upstream
(20210215). All the FreeBSD patches, but one, have now been
either up streamed or discarded. Notable changes include:
o Locale is no longer used for ranges
o Various bugs fixed
o Better compatibility with gawk and mawk
The one FreeBSD change, likely to be removed in FreeBSD 14, is that
we still allow hex numbers, prefixed with 0x, to be parsed and
interpreted as hex numbers while all other awks (including one
true awk now) interpret them as 0 in line with awk's historic
behavior.
8a04edfdcbd2:
Change the default minor version used for an NFSv4 mount
to the highest minor version supported by the NFSv4 server.
This default can be overridden by using the "minorversion"
mount option.
2c76eebca71b, 59f6f5e23c1a:
Add two daemons rpc.tlsclntd(8) and rpc.tlsservd(8) that provide
support for NFS-over-TLS as described in the Internet Draft titled
"Towards Remote Procedure Call Encryption By Default".
These daemons are only built when WITH_OPENSSL_KTLS is specified
and are only tested on amd64 at this time.
They use KTLS to encrypt/decrypt all NFS RPC message traffic, plus
optional verification of machine identity via X.509 certificates.
f76393a6305b6:
Add AES-GCM support to armv8crypto(4) providing accelerated
support for KTLS, IPsec, and other crypto API consumers.
074a91f746bd:
The aesni(4) and armv8crypto(4) devices are now included in
GENERIC on amd64, i386, and arm64.
2e1c94aa1fd5:
Add support for enforcing W^X mapping policy for user
processes. The policy is not enforced by default but can be
enabled by setting the kern.elf32.allow_wx and
kern.elf64.allow_wx sysctls to 0. Individual binaries can be
exempted from the policy by elfctl(1) via the wxneeded
feature.
4979620ece98:
Add AES-XTS support to armv8crypto(4) providing accelerated
software support for the default GELI cipher on arm64 systems.
022ca2fc7fe0:
Add aio_writev(2) and aio_readv(2), vectored analogues of aio_write(2)
and aio_read(2).
92bbfe1f0d1f:
The fusefs(5) protocol has been updated to 7.28. Support for
FUSE_COPY_FILE_RANGE and FUSE_LSEEK is added.
r368667:
GDB 6.1.1 was removed. Users of crashinfo(8) should install the
gdb package or devel/gdb port.
r368559:
The hme(4) driver was removed.
r367660:
Fixes the case where gssd will not startup because /usr is a separate
local file system that is not yet mounted. It does not fix the case
where /usr is a separately mounted remote file system (such as NFS).
This latter case can be fixed by adding mountcritremote to the
REQUIRED line. Unfortunately doing so implies that all Kerberized
NFS mounts in /etc/fstab will need the "late" mount option.
This was not done, since the requirement for "late" would introduce
a POLA violation.
r367423:
This commit added a new startup scripts variable called
nfsv4_server_only which uses the -R option on mountd added by r367026.
When nfsv4_server_only is set to "YES" in /etc/rc.conf, the NFS server
only handles NFSv4 and does not register with rpcbind. As such, rpcbind
does not need to be running. Useful for sites which consider rpcbind a
security issue.
r366267:
Kernel option ACPI_DMAR was renamed to IOMMU. amd64's IOMMU subsystem
was split out from amd64 DMAR support and is now generic, i.e., it can
be used by all architectures.
r364896:
A series of commits ending with r364896 added NFS over TLS
to the kernel. This is believed to be compatible with
the Internet Draft titled "Towards Remote Procedure Call Encryption
By Default" (expected to soon become an RFC).
The mount_nfs(8) and exports(5) man pages describe the mount and
export option(s) related to NFS over TLS.
For NFS over TLS to work, the rpctlscd(8) { client } or rpctlssd(8)
{ server } must be running on a kernel built with "options KERN_TLS"
on an architecture where PMAP_HAS_DMAP != 0.
r364725:
Changes to one obscure devd event generated on resume need to
be documented. The old form will still be generated in 13, but not
in 14.
r363679:
Applications using regex(3), e.g. sed/grep, will no longer accept
redundant escapes for most ordinary characters.
r363253:
SCTP support has been removed from GENERIC kernel configurations.
The SCTP stack is now built as sctp.ko and can be dynamically loaded.
r363233:
Merge sendmail 8.16.1: See contrib/sendmail/RELEASE_NOTES for details.
r363180:
The safexcel(4) crypto offload driver has been added.
r363084:
nc(1) now implements SCTP mode, enabled by specifying the --sctp option.
r362681:
A new implementation of bc and dc has been imported. It offers
better standards compliance, performance, localization and comes
with extensive test cases that are optionally installed.
Use WITHOUT_GH_BC=yes to build and install the world with the
previous version instead of the new one, if required.
r362158, r362163:
struct export_args has changed so that the "user" specified for
the -maproot and -mapall exports(5) options may be in more than
16 groups.
r361884:
sed(1) has learned about hex escapes (e.g. \x27) and will now do the
right thing with them, removing the need for printf magic or obnoxious
escaping in many scenarios.
r361238, r361798, r361799:
ZFS will now unconditionally reject read(2) of a directory with EISDIR.
Additionally, read(2) of a directory is now rejected with EISDIR by
default and may be re-enabled for non-ZFS filesystems that allow it with
the sysctl(8) MIB 'security.bsd.allow_read_dir'.
Aliases for grep to default to '-d skip' may be desired if commonly
non-recursively grepping a list that includes directories and the
possibility of EISDIR errors in stderr is not tolerable. Example
aliases, commented out, have been installed in /root/.cshrc and
/root/.shrc.
r361066:
Add exec.prepare and exec.release hooks for jail(8) and jail.conf(5).
exec.prepare runs before mounts, so can be used to populate new jails.
exec.release runs after unmounts, so can be used to remove ephemeral
jails.
r360920,r360923,r360924,r360927,r360928,r360931,r360933,r360936:
Remove support for ARC4, Blowfish, Cast, DES, Triple DES, MD5,
MD5-KPDK, MD5-HMAC, SHA1-KPDK, and Skipjack algorithms from
the kernel open cryptographic framework (OCF).
r360562:
Remove support for ARC4, Blowfish, Cast, DES, Triple DES,
MD5-HMAC, and Skipjack algorithms from /dev/crypto.
r360557:
Remove support for DES, Triple DES, Blowfish, Cast, and
Camellia ciphers from IPsec(4). Remove support for MD5-HMAC,
Keyed MD5, Keyed SHA1, and RIPEMD160-HMAC from IPsec(4).
r359945:
Remove support for Triple DES, Blowfish, and MD5 HMAC from
geli(4).
r359786-r359787:
Remove support for DES, Triple DES, and RC4 from in-kernel GSS
authentication.
r357627:
remove elf2aout.
r357560-r357565:
init(8), service(8), and cron(8) will now adopt user/class environment
variables (excluding PATH, by default, which will be overwritten) by
default. Notably, environment variables for all cron jobs and rc
services can now be set via login.conf(5).
r357455:
sparc64 has been removed from FreeBSD.
r355677:
Adds support for NFSv4.2 (RFC-7862) and Extended Attributes
(RFC-8276) to the NFS client and server.
NFSv4.2 is comprised of several optional features that can be supported
in addition to NFSv4.1. This patch adds the following optional features:
- posix_fadvise(POSIX_FADV_WILLNEED/POSIX_FADV_DONTNEED)
- posix_fallocate()
- intra server file range copying via the copy_file_range(2) syscall
--> Avoiding data tranfer over the wire to/from the NFS client.
- lseek(SEEK_DATA/SEEK_HOLE)
- Extended attribute syscalls for "user" namespace attributes as defined
by RFC-8276.
For the client, NFSv4.2 is only used if the mount command line option
minorversion=2 is specified.
For the server, two new sysctls called vfs.nfsd.server_min_minorversion4
and vfs.nfsd.server_max_minorversion4 have been added that allow
sysadmins to limit the minor versions of NFSv4 supported by the nfsd
server.
Setting vfs.nfsd.server_max_minorversion4 to 0 or 1 will disable NFSv4.2
on the server.
r356263:
armv5 support has been removed from FreeBSD.
r354517:
iwm(4) now supports most Intel 9260, 9460 and 9560 Wi-Fi devices.
r354269:
sqlite3 is updated to sqlite3-3.30.1.
r352668:
cron(8) now supports the -n (suppress mail on succesful run) and -q
(suppress logging of command execution) options in the crontab format.
See the crontab(5) manpage for details.
r352304:
ntpd is no longer by default locked in memory. rlimit memlock 32
or rlimit memlock 0 can be used to restore this behaviour.
r351863:
rc.subr(8) now honors ${name}_env in all rc(8) scripts. Previously,
environment variables set by a user via ${name}_env were ignored
if the service defined a custom *_cmd variable to control the behavior
of the run_rc_command function, e.g., start_cmd, instead of relying on
the variables like command and command_args,
r351770,r352920,r352922,r352923:
dd(1) now supports conv=fsync, conv=fdatasync, oflag=fsync, oflag=sync,
and iflag=fullblock flags, compatible with illumos and GNU.
r351522:
Add kernel-side support for in-kernel Transport Layer Security
(KTLS). KTLS permits using sendfile(2) over sockets using
TLS.
r351397:
WPA is updated from 2.8 to 2.9.
r351361:
Add probes for lockmgr(9) to the lockstat DTrace provider, add
corresponding lockstat(1) events, and document the new probes in
dtrace_lockstat.4.
r351356:
Intel RST is a new 'feature' that remaps NVMe devices from
their normal location to part of the AHCI bar space. This
will eliminate the need to set the BIOS SATA setting from RST
to AHCI causing the nvme drive to be erased before FreeBSD
will see the nvme drive. FreeBSD will now be able to see the
nvme drive now in the default config.
r351201, r351372:
Add a vop_stdioctl() call, so that file systems that do not support
holes will have a trivial implementation of lseek(SEEK_DATA/SEEK_HOLE).
The algorithm appears to be compatible with the POSIX draft and
the implementation in Linux for the case of a file system that
does not support holes. Prior to this patch, lseek(2) would reply
-1 with errno set to ENOTTY for SEEK_DATA/SEEK_HOLE on files in
file systems that do not support holes.
r351372 maps ENOTTY to EINVAL for lseek(SEEK_DATA/SEEK_HOLE) for
any other cases, such as a ENOTTY return from vn_bmap_seekhole().
r350665:
The fuse driver has been renamed to fusefs(5) and been substantially
rewritten. The new driver includes many bug fixes and performance
enhancements, as well as the following user-visible features:
* Optional kernel-side permissions checks (-o default_permissions)
* mknod(2), socket(2), and pipe(2) support
* server side locking with fcntl(2)
* FUSE operations are now interruptible when mounted with -o intr
* server side handling of UTIME_NOW during utimensat(2)
* mount options may be updated with "mount -u"
* fusefs file system may now be exported over NFS
* RLIMIT_FSIZE support
* support for fuse file systems using protocols as old as 7.4
FUSE file system developers should also take note of the following new
features:
* The protocol level has been raised from 7.8 to 7.23
* kqueue support on /dev/fuse
* server-initiated cache invalidation via FUSE_NOTIFY_REPLY
r350471:
gnop(8) can now configure a delay to be applied to read and write
request delays. See the -d, -q and -x parameters.
r350315, r350316:
Adds a Linux compatible copy_file_range(2) syscall.
r350307:
libcap_random(3) has been removed. Applications can use native
APIs to get random data in capability mode.
r349529,r349530:
Add support for using unmapped mbufs with sendfile(2).
r349352:
nand(4) and related components have been removed.
r349349:
The UEFI loader now supports HTTP boot.
r349335:
bhyve(8) now implements a High Definition Audio (HDA) driver, allowing
guests to play to and record audio data from the host.
r349286:
swapon(8) can now erase a swap device immediately before enabling it,
similar to newfs(8)'s -E option. This behaviour can be specified by
adding -E to swapon(8)'s command-line parameters, or by adding the
"trimonce" option to a swap device's /etc/fstab entry.
r347908-r347923:
The following network drivers have been removed: bm(4), cs(4), de(4),
ed(4), ep(4), ex(4), fe(4), pcn(4), sf(4), sn(4), tl(4), tx(4), txp(4),
vx(4), wb(4), xe(4).
r347532:
Wired page accounting has been split into kernel wirings and user
wirings (e.g., by mlock(2)). Kernel wirings no long count towards
the global limit, which is renamed to vm.max_user_wired. bhyve -S
allocates user-wired memory and is now subject to that limit.
$FreeBSD$
+12 -3
View File
@@ -12,8 +12,17 @@ Items affecting the ports and packages system can be found in
/usr/ports/UPDATING. Please read that file before updating system packages
and/or ports.
20220516:
13.1-RELEASE.
20230411:
13.2-RELEASE.
20220701:
LinuxKPI pm.h changes require an update to the latest drm-kmod version
before re-compiling to avoid errors.
20220327:
Bump __FreeBSD_verion to 1301501 after merging LinuxKPI and
net80211 changes in order to help out-of-tree consumers to deal
accordingly.
20220123:
For 64-bit architectures the base system is now built with Position
@@ -556,7 +565,7 @@ and/or ports.
initial condition, if desired.
kern.random.initial_seeding.arc4random_bypassed_before_seeding:
Similar to the above, but for for arc4random(9) initial seeding.
Similar to the above, but for arc4random(9) initial seeding.
kern.random.initial_seeding.disable_bypass_warnings: tunable; set
non-zero to disable warnings in dmesg when the same conditions are
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
/*-
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
* Copyright (c) 2013-2017 Mellanox Technologies, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* $FreeBSD$
*/
#ifndef __LINUX_COMPAT_H__
#define __LINUX_COMPAT_H__
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
/*-
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
* Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* $FreeBSD$
*/
#ifndef __LINUX_MODULEPARAM_H__
#define __LINUX_MODULEPARAM_H__
@@ -1,32 +1,31 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
/*-
* Copyright (c) 2020 The FreeBSD Foundation
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* This software was developed by Emmanuel Vadot under sponsorship
* from the FreeBSD Foundation.
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* $FreeBSD$
*/
#ifndef __LINUX_PAGEMAP_H__
#define __LINUX_PAGEMAP_H__
+21 -27
View File
@@ -1,32 +1,26 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
/*-
* Copyright (c) 2017 Mark Johnston <markj@FreeBSD.org>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "linux/hrtimer.h"
@@ -1,32 +1,32 @@
/*
* Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
* Copyright (c) 2020, Huawei Device Co., Ltd. All rights reserved.
/*-
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
* Copyright (c) 2013-2015 Mellanox Technologies, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice unmodified, this list of conditions, and the following
* disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used
* to endorse or promote products derived from this software without specific prior written
* permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* $FreeBSD$
*/
#include "linux/interrupt.h"
+163 -129
View File
@@ -38,170 +38,204 @@
* Registers common to all PHYs.
*/
#define MII_NPHY 32 /* max # of PHYs per MII */
#define MII_NPHY 32 /* max # of PHYs per MII */
/*
* MII commands, used if a device must drive the MII lines
* manually.
*/
#define MII_COMMAND_START 0x01
#define MII_COMMAND_READ 0x02
#define MII_COMMAND_WRITE 0x01
#define MII_COMMAND_ACK 0x02
#define MII_COMMAND_START 0x01
#define MII_COMMAND_READ 0x02
#define MII_COMMAND_WRITE 0x01
#define MII_COMMAND_ACK 0x02
#define MII_BMCR 0x00 /* Basic mode control register (rw) */
#define BMCR_RESET 0x8000 /* reset */
#define BMCR_LOOP 0x4000 /* loopback */
#define BMCR_SPEED0 0x2000 /* speed selection (LSB) */
#define BMCR_AUTOEN 0x1000 /* autonegotiation enable */
#define BMCR_PDOWN 0x0800 /* power down */
#define BMCR_ISO 0x0400 /* isolate */
#define BMCR_STARTNEG 0x0200 /* restart autonegotiation */
#define BMCR_FDX 0x0100 /* Set duplex mode */
#define BMCR_CTEST 0x0080 /* collision test */
#define BMCR_SPEED1 0x0040 /* speed selection (MSB) */
#define MII_BMCR 0x00 /* Basic mode control register (rw) */
#define BMCR_RESET 0x8000 /* reset */
#define BMCR_LOOP 0x4000 /* loopback */
#define BMCR_SPEED0 0x2000 /* speed selection (LSB) */
#define BMCR_AUTOEN 0x1000 /* autonegotiation enable */
#define BMCR_PDOWN 0x0800 /* power down */
#define BMCR_ISO 0x0400 /* isolate */
#define BMCR_STARTNEG 0x0200 /* restart autonegotiation */
#define BMCR_FDX 0x0100 /* Set duplex mode */
#define BMCR_CTEST 0x0080 /* collision test */
#define BMCR_SPEED1 0x0040 /* speed selection (MSB) */
#define BMCR_S10 0x0000 /* 10 Mb/s */
#define BMCR_S100 BMCR_SPEED0 /* 100 Mb/s */
#define BMCR_S1000 BMCR_SPEED1 /* 1000 Mb/s */
#define BMCR_S10 0x0000 /* 10 Mb/s */
#define BMCR_S100 BMCR_SPEED0 /* 100 Mb/s */
#define BMCR_S1000 BMCR_SPEED1 /* 1000 Mb/s */
#define BMCR_SPEED(x) ((x) & (BMCR_SPEED0|BMCR_SPEED1))
#define BMCR_SPEED(x) ((x) & (BMCR_SPEED0|BMCR_SPEED1))
#define MII_BMSR 0x01 /* Basic mode status register (ro) */
#define BMSR_100T4 0x8000 /* 100 base T4 capable */
#define BMSR_100TXFDX 0x4000 /* 100 base Tx full duplex capable */
#define BMSR_100TXHDX 0x2000 /* 100 base Tx half duplex capable */
#define BMSR_10TFDX 0x1000 /* 10 base T full duplex capable */
#define BMSR_10THDX 0x0800 /* 10 base T half duplex capable */
#define BMSR_100T2FDX 0x0400 /* 100 base T2 full duplex capable */
#define BMSR_100T2HDX 0x0200 /* 100 base T2 half duplex capable */
#define BMSR_EXTSTAT 0x0100 /* Extended status in register 15 */
#define BMSR_MFPS 0x0040 /* MII Frame Preamble Suppression */
#define BMSR_ACOMP 0x0020 /* Autonegotiation complete */
#define BMSR_RFAULT 0x0010 /* Link partner fault */
#define BMSR_ANEG 0x0008 /* Autonegotiation capable */
#define BMSR_LINK 0x0004 /* Link status */
#define BMSR_JABBER 0x0002 /* Jabber detected */
#define BMSR_EXTCAP 0x0001 /* Extended capability */
#define MII_BMSR 0x01 /* Basic mode status register (ro) */
#define BMSR_100T4 0x8000 /* 100 base T4 capable */
#define BMSR_100TXFDX 0x4000 /* 100 base Tx full duplex capable */
#define BMSR_100TXHDX 0x2000 /* 100 base Tx half duplex capable */
#define BMSR_10TFDX 0x1000 /* 10 base T full duplex capable */
#define BMSR_10THDX 0x0800 /* 10 base T half duplex capable */
#define BMSR_100T2FDX 0x0400 /* 100 base T2 full duplex capable */
#define BMSR_100T2HDX 0x0200 /* 100 base T2 half duplex capable */
#define BMSR_EXTSTAT 0x0100 /* Extended status in register 15 */
#define BMSR_MFPS 0x0040 /* MII Frame Preamble Suppression */
#define BMSR_ACOMP 0x0020 /* Autonegotiation complete */
#define BMSR_RFAULT 0x0010 /* Link partner fault */
#define BMSR_ANEG 0x0008 /* Autonegotiation capable */
#define BMSR_LINK 0x0004 /* Link status */
#define BMSR_JABBER 0x0002 /* Jabber detected */
#define BMSR_EXTCAP 0x0001 /* Extended capability */
#define BMSR_DEFCAPMASK 0xffffffff
#define BMSR_DEFCAPMASK 0xffffffff
/*
* Note that the EXTSTAT bit indicates that there is extended status
* info available in register 15, but 802.3 section 22.2.4.3 also
* states that that all 1000 Mb/s capable PHYs will set this bit to 1.
* states that all 1000 Mb/s capable PHYs will set this bit to 1.
*/
#define BMSR_MEDIAMASK (BMSR_100T4|BMSR_100TXFDX|BMSR_100TXHDX| \
BMSR_10TFDX|BMSR_10THDX|BMSR_100T2FDX|BMSR_100T2HDX)
#define BMSR_MEDIAMASK (BMSR_100T4|BMSR_100TXFDX|BMSR_100TXHDX| \
BMSR_10TFDX|BMSR_10THDX|BMSR_100T2FDX|BMSR_100T2HDX)
/*
* Convert BMSR media capabilities to ANAR bits for autonegotiation.
* Note the shift chopps off the BMSR_ANEG bit.
*/
#define BMSR_MEDIA_TO_ANAR(x) (((x) & BMSR_MEDIAMASK) >> 6)
#define BMSR_MEDIA_TO_ANAR(x) (((x) & BMSR_MEDIAMASK) >> 6)
#define MII_PHYIDR1 0x02 /* ID register 1 (ro) */
#define MII_PHYIDR1 0x02 /* ID register 1 (ro) */
#define MII_PHYIDR2 0x03 /* ID register 2 (ro) */
#define IDR2_OUILSB 0xfc00 /* OUI LSB */
#define IDR2_MODEL 0x03f0 /* vendor model */
#define IDR2_REV 0x000f /* vendor revision */
#define MII_PHYIDR2 0x03 /* ID register 2 (ro) */
#define IDR2_OUILSB 0xfc00 /* OUI LSB */
#define IDR2_MODEL 0x03f0 /* vendor model */
#define IDR2_REV 0x000f /* vendor revision */
#define MII_ANAR 0x04 /* Autonegotiation advertisement (rw) */
#define MII_ANAR 0x04 /* Autonegotiation advertisement (rw) */
/* section 28.2.4.1 and 37.2.6.1 */
#define ANAR_NP 0x8000 /* Next page (ro) */
#define ANAR_ACK 0x4000 /* link partner abilities acknowledged (ro) */
#define ANAR_RF 0x2000 /* remote fault (ro) */
/* Annex 28B.2 */
#define ANAR_FC 0x0400 /* local device supports PAUSE */
#define ANAR_T4 0x0200 /* local device supports 100bT4 */
#define ANAR_TX_FD 0x0100 /* local device supports 100bTx FD */
#define ANAR_TX 0x0080 /* local device supports 100bTx */
#define ANAR_10_FD 0x0040 /* local device supports 10bT FD */
#define ANAR_10 0x0020 /* local device supports 10bT */
#define ANAR_CSMA 0x0001 /* protocol selector CSMA/CD */
#define ANAR_PAUSE_NONE (0 << 10)
#define ANAR_PAUSE_SYM (1 << 10)
#define ANAR_PAUSE_ASYM (2 << 10)
#define ANAR_PAUSE_TOWARDS (3 << 10)
/* section 28.2.4.1 and 37.2.6.1 */
#define ANAR_NP 0x8000 /* Next page (ro) */
#define ANAR_ACK 0x4000 /* link partner abilities acknowledged (ro) */
#define ANAR_RF 0x2000 /* remote fault (ro) */
#define ANAR_FC 0x0400 /* local device supports PAUSE */
#define ANAR_T4 0x0200 /* local device supports 100bT4 */
#define ANAR_TX_FD 0x0100 /* local device supports 100bTx FD */
#define ANAR_TX 0x0080 /* local device supports 100bTx */
#define ANAR_10_FD 0x0040 /* local device supports 10bT FD */
#define ANAR_10 0x0020 /* local device supports 10bT */
#define ANAR_CSMA 0x0001 /* protocol selector CSMA/CD */
#define ANAR_PAUSE_NONE (0 << 10)
#define ANAR_PAUSE_SYM (1 << 10)
#define ANAR_PAUSE_ASYM (2 << 10)
#define ANAR_PAUSE_TOWARDS (3 << 10)
/* Annex 28D */
#define ANAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */
#define ANAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */
#define ANAR_X_PAUSE_NONE (0 << 7)
#define ANAR_X_PAUSE_SYM (1 << 7)
#define ANAR_X_PAUSE_ASYM (2 << 7)
#define ANAR_X_PAUSE_TOWARDS (3 << 7)
#define ANAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */
#define ANAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */
#define ANAR_X_PAUSE_NONE (0 << 7)
#define ANAR_X_PAUSE_SYM (1 << 7)
#define ANAR_X_PAUSE_ASYM (2 << 7)
#define ANAR_X_PAUSE_TOWARDS (3 << 7)
#define MII_ANLPAR 0x05 /* Autonegotiation lnk partner abilities (rw) */
/* section 28.2.4.1 and 37.2.6.1 */
#define ANLPAR_NP 0x8000 /* Next page (ro) */
#define ANLPAR_ACK 0x4000 /* link partner accepted ACK (ro) */
#define ANLPAR_RF 0x2000 /* remote fault (ro) */
#define ANLPAR_FC 0x0400 /* link partner supports PAUSE */
#define ANLPAR_T4 0x0200 /* link partner supports 100bT4 */
#define ANLPAR_TX_FD 0x0100 /* link partner supports 100bTx FD */
#define ANLPAR_TX 0x0080 /* link partner supports 100bTx */
#define ANLPAR_10_FD 0x0040 /* link partner supports 10bT FD */
#define ANLPAR_10 0x0020 /* link partner supports 10bT */
#define ANLPAR_CSMA 0x0001 /* protocol selector CSMA/CD */
#define ANLPAR_PAUSE_MASK (3 << 10)
#define ANLPAR_PAUSE_NONE (0 << 10)
#define ANLPAR_PAUSE_SYM (1 << 10)
#define ANLPAR_PAUSE_ASYM (2 << 10)
#define ANLPAR_PAUSE_TOWARDS (3 << 10)
#define MII_ANLPAR 0x05 /* Autonegotiation lnk partner abilities (rw) */
#define ANLPAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */
#define ANLPAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */
#define ANLPAR_X_PAUSE_MASK (3 << 7)
#define ANLPAR_X_PAUSE_NONE (0 << 7)
#define ANLPAR_X_PAUSE_SYM (1 << 7)
#define ANLPAR_X_PAUSE_ASYM (2 << 7)
#define ANLPAR_X_PAUSE_TOWARDS (3 << 7)
/* section 28.2.4.1 and 37.2.6.1 */
#define ANLPAR_NP 0x8000 /* Next page (ro) */
#define ANLPAR_ACK 0x4000 /* link partner accepted ACK (ro) */
#define ANLPAR_RF 0x2000 /* remote fault (ro) */
#define ANLPAR_FC 0x0400 /* link partner supports PAUSE */
#define ANLPAR_T4 0x0200 /* link partner supports 100bT4 */
#define ANLPAR_TX_FD 0x0100 /* link partner supports 100bTx FD */
#define ANLPAR_TX 0x0080 /* link partner supports 100bTx */
#define ANLPAR_10_FD 0x0040 /* link partner supports 10bT FD */
#define ANLPAR_10 0x0020 /* link partner supports 10bT */
#define ANLPAR_CSMA 0x0001 /* protocol selector CSMA/CD */
#define ANLPAR_PAUSE_MASK (3 << 10)
#define ANLPAR_PAUSE_NONE (0 << 10)
#define ANLPAR_PAUSE_SYM (1 << 10)
#define ANLPAR_PAUSE_ASYM (2 << 10)
#define ANLPAR_PAUSE_TOWARDS (3 << 10)
#define MII_ANER 0x06 /* Autonegotiation expansion (ro) */
/* section 28.2.4.1 and 37.2.6.1 */
#define ANER_MLF 0x0010 /* multiple link detection fault */
#define ANER_LPNP 0x0008 /* link parter next page-able */
#define ANER_NP 0x0004 /* next page-able */
#define ANER_PAGE_RX 0x0002 /* Page received */
#define ANER_LPAN 0x0001 /* link parter autoneg-able */
#define ANLPAR_X_FD 0x0020 /* local device supports 1000BASE-X FD */
#define ANLPAR_X_HD 0x0040 /* local device supports 1000BASE-X HD */
#define ANLPAR_X_PAUSE_MASK (3 << 7)
#define ANLPAR_X_PAUSE_NONE (0 << 7)
#define ANLPAR_X_PAUSE_SYM (1 << 7)
#define ANLPAR_X_PAUSE_ASYM (2 << 7)
#define ANLPAR_X_PAUSE_TOWARDS (3 << 7)
#define MII_ANNP 0x07 /* Autonegotiation next page */
/* section 28.2.4.1 and 37.2.6.1 */
#define MII_ANER 0x06 /* Autonegotiation expansion (ro) */
#define MII_ANLPRNP 0x08 /* Autonegotiation link partner rx next page */
/* section 32.5.1 and 37.2.6.1 */
/* section 28.2.4.1 and 37.2.6.1 */
#define ANER_MLF 0x0010 /* multiple link detection fault */
#define ANER_LPNP 0x0008 /* link parter next page-able */
#define ANER_NP 0x0004 /* next page-able */
#define ANER_PAGE_RX 0x0002 /* Page received */
#define ANER_LPAN 0x0001 /* link parter autoneg-able */
/* This is also the 1000baseT control register */
#define MII_100T2CR 0x09 /* 100base-T2 control register */
#define GTCR_TEST_MASK 0xe000 /* see 802.3ab ss. 40.6.1.1.2 */
#define GTCR_MAN_MS 0x1000 /* enable manual master/slave control */
#define GTCR_ADV_MS 0x0800 /* 1 = adv. master, 0 = adv. slave */
#define GTCR_PORT_TYPE 0x0400 /* 1 = DCE, 0 = DTE (NIC) */
#define GTCR_ADV_1000TFDX 0x0200 /* adv. 1000baseT FDX */
#define GTCR_ADV_1000THDX 0x0100 /* adv. 1000baseT HDX */
#define MII_ANNP 0x07 /* Autonegotiation next page */
/* section 28.2.4.1 and 37.2.6.1 */
#define MII_ANLPRNP 0x08 /* Autonegotiation link partner rx next page */
/* section 32.5.1 and 37.2.6.1 */
/* This is also the 1000baseT control register */
#define MII_100T2CR 0x09 /* 100base-T2 control register */
#define GTCR_TEST_MASK 0xe000 /* see 802.3ab ss. 40.6.1.1.2 */
#define GTCR_MAN_MS 0x1000 /* enable manual master/slave control */
#define GTCR_ADV_MS 0x0800 /* 1 = adv. master, 0 = adv. slave */
#define GTCR_PORT_TYPE 0x0400 /* 1 = DCE, 0 = DTE (NIC) */
#define GTCR_ADV_1000TFDX 0x0200 /* adv. 1000baseT FDX */
#define GTCR_ADV_1000THDX 0x0100 /* adv. 1000baseT HDX */
/* This is also the 1000baseT status register */
#define MII_100T2SR 0x0a /* 100base-T2 status register */
#define GTSR_MAN_MS_FLT 0x8000 /* master/slave config fault */
#define GTSR_MS_RES 0x4000 /* result: 1 = master, 0 = slave */
#define GTSR_LRS 0x2000 /* local rx status, 1 = ok */
#define GTSR_RRS 0x1000 /* remove rx status, 1 = ok */
/* This is also the 1000baseT status register */
#define MII_100T2SR 0x0a /* 100base-T2 status register */
#define GTSR_MAN_MS_FLT 0x8000 /* master/slave config fault */
#define GTSR_MS_RES 0x4000 /* result: 1 = master, 0 = slave */
#define GTSR_LRS 0x2000 /* local rx status, 1 = ok */
#define GTSR_RRS 0x1000 /* remote rx status, 1 = ok */
#define GTSR_LP_1000TFDX 0x0800 /* link partner 1000baseT FDX capable */
#define GTSR_LP_1000THDX 0x0400 /* link partner 1000baseT HDX capable */
#define GTSR_LP_ASM_DIR 0x0200 /* link partner asym. pause dir. capable */
#define GTSR_IDLE_ERR 0x00ff /* IDLE error count */
#define GTSR_LP_ASM_DIR 0x0200 /* link partner asym. pause dir. capable */
#define GTSR_IDLE_ERR 0x00ff /* IDLE error count */
#define MII_EXTSR 0x0f /* Extended status register */
#define EXTSR_1000XFDX 0x8000 /* 1000X full-duplex capable */
#define EXTSR_1000XHDX 0x4000 /* 1000X half-duplex capable */
#define EXTSR_1000TFDX 0x2000 /* 1000T full-duplex capable */
#define EXTSR_1000THDX 0x1000 /* 1000T half-duplex capable */
#define MII_PSECR 0x0b /* PSE control register */
#define PSECR_PACTLMASK 0x000c /* pair control mask */
#define PSECR_PSEENMASK 0x0003 /* PSE enable mask */
#define PSECR_PINOUTB 0x0008 /* PSE pinout Alternative B */
#define PSECR_PINOUTA 0x0004 /* PSE pinout Alternative A */
#define PSECR_FOPOWTST 0x0002 /* Force Power Test Mode */
#define PSECR_PSEEN 0x0001 /* PSE Enabled */
#define PSECR_PSEDIS 0x0000 /* PSE Disabled */
#define EXTSR_MEDIAMASK (EXTSR_1000XFDX|EXTSR_1000XHDX| \
EXTSR_1000TFDX|EXTSR_1000THDX)
#define MII_PSESR 0x0c /* PSE status register */
#define PSESR_PWRDENIED 0x1000 /* Power Denied */
#define PSESR_VALSIG 0x0800 /* Valid PD signature detected */
#define PSESR_INVALSIG 0x0400 /* Invalid PD signature detected */
#define PSESR_SHORTCIRC 0x0200 /* Short circuit condition detected */
#define PSESR_OVERLOAD 0x0100 /* Overload condition detected */
#define PSESR_MPSABSENT 0x0080 /* MPS absent condition detected */
#define PSESR_PDCLMASK 0x0070 /* PD Class mask */
#define PSESR_STATMASK 0x000e /* PSE Status mask */
#define PSESR_PAIRCTABL 0x0001 /* PAIR Control Ability */
#define PSESR_PDCL_4 (4 << 4) /* Class 4 */
#define PSESR_PDCL_3 (3 << 4) /* Class 3 */
#define PSESR_PDCL_2 (2 << 4) /* Class 2 */
#define PSESR_PDCL_1 (1 << 4) /* Class 1 */
#define PSESR_PDCL_0 (0 << 4) /* Class 0 */
#define MII_MMDACR 0x0d /* MMD access control register */
#define MMDACR_FUNCMASK 0xc000 /* function */
#define MMDACR_DADDRMASK 0x001f /* device address */
#define MMDACR_FN_ADDRESS (0 << 14) /* address */
#define MMDACR_FN_DATANPI (1 << 14) /* data, no post increment */
#define MMDACR_FN_DATAPIRW (2 << 14) /* data, post increment on r/w */
#define MMDACR_FN_DATAPIW (3 << 14) /* data, post increment on wr only */
#define MII_MMDAADR 0x0e /* MMD access address data register */
#define MII_EXTSR 0x0f /* Extended status register */
#define EXTSR_1000XFDX 0x8000 /* 1000X full-duplex capable */
#define EXTSR_1000XHDX 0x4000 /* 1000X half-duplex capable */
#define EXTSR_1000TFDX 0x2000 /* 1000T full-duplex capable */
#define EXTSR_1000THDX 0x1000 /* 1000T half-duplex capable */
#define EXTSR_MEDIAMASK (EXTSR_1000XFDX|EXTSR_1000XHDX| \
EXTSR_1000TFDX|EXTSR_1000THDX)
#endif /* _DEV_MII_MII_H_ */
+21 -17
View File
@@ -44,17 +44,18 @@ enum {
UQ_AU_INP_ASYNC, /* input is async despite claim of adaptive */
UQ_AU_NO_FRAC, /* don't adjust for fractional samples */
UQ_AU_NO_XU, /* audio device has broken extension unit */
UQ_BAD_ADC, /* bad audio spec version number */
UQ_BAD_ADC, /* bad audio spec version number */
UQ_BAD_AUDIO, /* device claims audio class, but isn't */
UQ_BROKEN_BIDIR, /* printer has broken bidir mode */
UQ_BUS_POWERED, /* device is bus powered, despite claim */
UQ_HID_IGNORE, /* device should be ignored by hid class */
UQ_KBD_IGNORE, /* device should be ignored by kbd class */
UQ_KBD_BOOTPROTO, /* device should set the boot protocol */
UQ_UMS_IGNORE, /* device should be ignored by ums class */
UQ_UMS_IGNORE, /* device should be ignored by ums class */
UQ_MS_BAD_CLASS, /* doesn't identify properly */
UQ_MS_LEADING_BYTE, /* mouse sends an unknown leading byte */
UQ_MS_REVZ, /* mouse has Z-axis reversed */
UQ_MS_REVZ, /* mouse has Z-axis reversed */
UQ_MS_VENDOR_BTN, /* mouse has buttons in vendor usage page */
UQ_NO_STRINGS, /* string descriptors are broken */
UQ_POWER_CLAIM, /* hub lies about power status */
UQ_SPUR_BUT_UP, /* spurious mouse button up events */
@@ -65,6 +66,7 @@ enum {
UQ_CFG_INDEX_4, /* select configuration index 4 by default */
UQ_CFG_INDEX_0, /* select configuration index 0 by default */
UQ_ASSUME_CM_OVER_DATA, /* assume cm over data feature */
UQ_IGNORE_CDC_CM, /* ignore cm descriptor */
/*
* USB Mass Storage Quirks. See "storage/umass.c" for a
@@ -74,12 +76,12 @@ enum {
UQ_MSC_NO_RS_CLEAR_UA, /* does not reset Unit Att. */
UQ_MSC_NO_START_STOP, /* does not support start/stop */
UQ_MSC_NO_GETMAXLUN, /* does not support get max LUN */
UQ_MSC_NO_INQUIRY, /* fake generic inq response */
UQ_MSC_NO_INQUIRY, /* fake generic inq response */
UQ_MSC_NO_INQUIRY_EVPD, /* does not support inq EVPD */
UQ_MSC_NO_PREVENT_ALLOW, /* does not support medium removal */
UQ_MSC_NO_SYNC_CACHE, /* does not support sync cache */
UQ_MSC_NO_PREVENT_ALLOW, /* does not support medium removal */
UQ_MSC_NO_SYNC_CACHE, /* does not support sync cache */
UQ_MSC_SHUTTLE_INIT, /* requires Shuttle init sequence */
UQ_MSC_ALT_IFACE_1, /* switch to alternate interface 1 */
UQ_MSC_ALT_IFACE_1, /* switch to alternate interface 1 */
UQ_MSC_FLOPPY_SPEED, /* does floppy speeds (20kb/s) */
UQ_MSC_IGNORE_RESIDUE, /* gets residue wrong */
UQ_MSC_WRONG_CSWSIG, /* uses wrong CSW signature */
@@ -93,6 +95,7 @@ enum {
UQ_MSC_FORCE_PROTO_ATAPI, /* force ATAPI command protocol */
UQ_MSC_FORCE_PROTO_UFI, /* force UFI command protocol */
UQ_MSC_FORCE_PROTO_RBC, /* force RBC command protocol */
UQ_MSC_IGNORE, /* device should be ignored by umass */
/* Ejection of mass storage (driver disk) */
UQ_MSC_EJECT_HUAWEI, /* ejects after Huawei USB command */
@@ -101,19 +104,20 @@ enum {
UQ_MSC_EJECT_REZERO, /* ejects after SCSI rezero command */
UQ_MSC_EJECT_ZTESTOR, /* ejects after ZTE SCSI command */
UQ_MSC_EJECT_CMOTECH, /* ejects after C-motech SCSI cmd */
UQ_MSC_EJECT_WAIT, /* wait for the device to eject */
UQ_MSC_EJECT_SAEL_M460, /* ejects after Sael USB commands */
UQ_MSC_EJECT_WAIT, /* wait for the device to eject */
UQ_MSC_EJECT_SAEL_M460, /* ejects after Sael USB commands */
UQ_MSC_EJECT_HUAWEISCSI, /* ejects after Huawei SCSI command */
UQ_MSC_EJECT_HUAWEISCSI2,
UQ_MSC_EJECT_HUAWEISCSI3,
UQ_MSC_EJECT_TCT, /* ejects after TCT SCSI command */
UQ_MSC_EJECT_HUAWEISCSI2, /* ejects after Huawei SCSI 2 command */
UQ_MSC_EJECT_HUAWEISCSI3, /* ejects after Huawei SCSI 3 command */
UQ_MSC_EJECT_HUAWEISCSI4, /* ejects after Huawei SCSI 4 command */
UQ_MSC_EJECT_TCT, /* ejects after TCT SCSI command */
UQ_BAD_MIDI, /* device claims MIDI class, but isn't */
UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */
UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */
UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */
UQ_BAD_MIDI, /* device claims MIDI class, but isn't */
UQ_AU_VENDOR_CLASS, /* audio device uses vendor and not audio class */
UQ_SINGLE_CMD_MIDI, /* at most one command per USB packet */
UQ_MSC_DYMO_EJECT, /* ejects Dymo MSC device */
UQ_AU_SET_SPDIF_CM6206, /* enable S/PDIF audio output */
UQ_WMT_IGNORE, /* device should be ignored by wmt driver */
UQ_WMT_IGNORE, /* device should be ignored by wmt driver */
USB_QUIRK_MAX
};
+10
View File
@@ -281,6 +281,16 @@ tr_setup:
*/
if (usb_no_cs_fail)
goto tr_transferred;
/*
* Some non-compliant USB devices do not implement the
* clear endpoint halt feature. Silently ignore such
* devices, when they at least respond correctly
* passing up a valid STALL PID packet.
*/
if (error == USB_ERR_STALLED)
goto tr_transferred;
if (udev->clear_stall_errors == USB_CS_RESET_LIMIT)
goto tr_setup;