forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-05 071106ecf68c401173c58808b1cf5f68cc50d390
kernel/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_param.c
....@@ -1,20 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 1999 - 2010 Intel Corporation.
34 * Copyright (C) 2010 OKI SEMICONDUCTOR Co., LTD.
45 *
56 * This code was derived from the Intel e1000e Linux driver.
6
- *
7
- * This program is free software; you can redistribute it and/or modify
8
- * it under the terms of the GNU General Public License as published by
9
- * the Free Software Foundation; version 2 of the License.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
187 */
198
209 #include "pch_gbe.h"
....@@ -24,7 +13,7 @@
2413 #define OPTION_DISABLED 0
2514 #define OPTION_ENABLED 1
2615
27
-/**
16
+/*
2817 * TxDescriptors - Transmit Descriptor Count
2918 * @Valid Range: PCH_GBE_MIN_TXD - PCH_GBE_MAX_TXD
3019 * @Default Value: PCH_GBE_DEFAULT_TXD
....@@ -33,7 +22,7 @@
3322 module_param(TxDescriptors, int, 0);
3423 MODULE_PARM_DESC(TxDescriptors, "Number of transmit descriptors");
3524
36
-/**
25
+/*
3726 * RxDescriptors -Receive Descriptor Count
3827 * @Valid Range: PCH_GBE_MIN_RXD - PCH_GBE_MAX_RXD
3928 * @Default Value: PCH_GBE_DEFAULT_RXD
....@@ -42,7 +31,7 @@
4231 module_param(RxDescriptors, int, 0);
4332 MODULE_PARM_DESC(RxDescriptors, "Number of receive descriptors");
4433
45
-/**
34
+/*
4635 * Speed - User Specified Speed Override
4736 * @Valid Range: 0, 10, 100, 1000
4837 * - 0: auto-negotiate at all supported speeds
....@@ -55,7 +44,7 @@
5544 module_param(Speed, int, 0);
5645 MODULE_PARM_DESC(Speed, "Speed setting");
5746
58
-/**
47
+/*
5948 * Duplex - User Specified Duplex Override
6049 * @Valid Range: 0-2
6150 * - 0: auto-negotiate for duplex
....@@ -70,7 +59,7 @@
7059 #define HALF_DUPLEX 1
7160 #define FULL_DUPLEX 2
7261
73
-/**
62
+/*
7463 * AutoNeg - Auto-negotiation Advertisement Override
7564 * @Valid Range: 0x01-0x0F, 0x20-0x2F
7665 *
....@@ -96,7 +85,7 @@
9685 #define PHY_ADVERTISE_1000_FULL 0x0020
9786 #define PCH_AUTONEG_ADVERTISE_DEFAULT 0x2F
9887
99
-/**
88
+/*
10089 * FlowControl - User Specified Flow Control Override
10190 * @Valid Range: 0-3
10291 * - 0: No Flow Control
....@@ -135,7 +124,7 @@
135124
136125 #define PCH_GBE_DEFAULT_TX_CSUM true /* trueorfalse */
137126
138
-/**
127
+/*
139128 * pch_gbe_option - Force the MAC's flow control settings
140129 * @hw: Pointer to the HW structure
141130 * Returns:
....@@ -421,7 +410,7 @@
421410 case SPEED_1000 + HALF_DUPLEX:
422411 netdev_dbg(adapter->netdev,
423412 "Half Duplex is not supported at 1000 Mbps\n");
424
- /* fall through */
413
+ fallthrough;
425414 case SPEED_1000 + FULL_DUPLEX:
426415 full_duplex_only:
427416 netdev_dbg(adapter->netdev,