003 File Manager
Current Path:
/usr/src/sys/dev/axgbe
usr
/
src
/
sys
/
dev
/
axgbe
/
📁
..
📄
if_axgbe.c
(16.34 KB)
📄
if_axgbe_pci.c
(79.21 KB)
📄
xgbe-common.h
(59.35 KB)
📄
xgbe-dcb.c
(9.68 KB)
📄
xgbe-desc.c
(8.17 KB)
📄
xgbe-dev.c
(76.7 KB)
📄
xgbe-drv.c
(13.67 KB)
📄
xgbe-i2c.c
(15.47 KB)
📄
xgbe-mdio.c
(41.64 KB)
📄
xgbe-phy-v1.c
(21.06 KB)
📄
xgbe-phy-v2.c
(98.71 KB)
📄
xgbe-ptp.c
(9.9 KB)
📄
xgbe-sysctl.c
(44.14 KB)
📄
xgbe-txrx.c
(24.13 KB)
📄
xgbe.h
(39.2 KB)
📄
xgbe_osdep.c
(1.91 KB)
📄
xgbe_osdep.h
(8.59 KB)
Editing: xgbe_osdep.c
/*- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2020 Advanced Micro Devices, Inc. * * 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. * * 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. * * Contact Information : * Rajesh Kumar <rajesh1.kumar@amd.com> * */ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); #include "xgbe.h" #include "xgbe_osdep.h" /* Bit Reversal - http://aggregate.org/MAGIC/#Bit%20Reversal */ uint32_t bitrev32(uint32_t x) { x = (((x & 0xaaaaaaaa) >> 1) | ((x & 0x55555555) << 1)); x = (((x & 0xcccccccc) >> 2) | ((x & 0x33333333) << 2)); x = (((x & 0xf0f0f0f0) >> 4) | ((x & 0x0f0f0f0f) << 4)); x = (((x & 0xff00ff00) >> 8) | ((x & 0x00ff00ff) << 8)); return ((x >> 16) | (x << 16)); }
Upload File
Create Folder