hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/drivers/net/ethernet/via/via-velocity.h
....@@ -1,16 +1,7 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
34 * All rights reserved.
4
- *
5
- * This software may be redistributed and/or modified under
6
- * the terms of the GNU General Public License as published by the Free
7
- * Software Foundation; either version 2 of the License, or
8
- * any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful, but
11
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
- * for more details.
145 *
156 * File: via-velocity.h
167 *
....@@ -1295,50 +1286,6 @@
12951286 velocity_mii_read((p),MII_PHYSID1,((u16 *) &id)+1);\
12961287 (id);})
12971288
1298
-/*
1299
- * Inline debug routine
1300
- */
1301
-
1302
-
1303
-enum velocity_msg_level {
1304
- MSG_LEVEL_ERR = 0, //Errors that will cause abnormal operation.
1305
- MSG_LEVEL_NOTICE = 1, //Some errors need users to be notified.
1306
- MSG_LEVEL_INFO = 2, //Normal message.
1307
- MSG_LEVEL_VERBOSE = 3, //Will report all trival errors.
1308
- MSG_LEVEL_DEBUG = 4 //Only for debug purpose.
1309
-};
1310
-
1311
-#ifdef VELOCITY_DEBUG
1312
-#define ASSERT(x) { \
1313
- if (!(x)) { \
1314
- printk(KERN_ERR "assertion %s failed: file %s line %d\n", #x,\
1315
- __func__, __LINE__);\
1316
- BUG(); \
1317
- }\
1318
-}
1319
-#define VELOCITY_DBG(p,args...) printk(p, ##args)
1320
-#else
1321
-#define ASSERT(x)
1322
-#define VELOCITY_DBG(x)
1323
-#endif
1324
-
1325
-#define VELOCITY_PRT(l, p, args...) do {if (l<=msglevel) printk( p ,##args);} while (0)
1326
-
1327
-#define VELOCITY_PRT_CAMMASK(p,t) {\
1328
- int i;\
1329
- if ((t)==VELOCITY_MULTICAST_CAM) {\
1330
- for (i=0;i<(MCAM_SIZE/8);i++)\
1331
- printk("%02X",(p)->mCAMmask[i]);\
1332
- }\
1333
- else {\
1334
- for (i=0;i<(VCAM_SIZE/8);i++)\
1335
- printk("%02X",(p)->vCAMmask[i]);\
1336
- }\
1337
- printk("\n");\
1338
-}
1339
-
1340
-
1341
-
13421289 #define VELOCITY_WOL_MAGIC 0x00000000UL
13431290 #define VELOCITY_WOL_PHY 0x00000001UL
13441291 #define VELOCITY_WOL_ARP 0x00000002UL
....@@ -1492,6 +1439,7 @@
14921439 struct velocity_context context;
14931440
14941441 u32 ticks;
1442
+ u32 ethtool_ops_nesting;
14951443
14961444 u8 rev_id;
14971445
....@@ -1518,7 +1466,7 @@
15181466 rcu_read_lock();
15191467 in_dev = __in_dev_get_rcu(vptr->netdev);
15201468 if (in_dev != NULL) {
1521
- ifa = (struct in_ifaddr *) in_dev->ifa_list;
1469
+ ifa = rcu_dereference(in_dev->ifa_list);
15221470 if (ifa != NULL) {
15231471 memcpy(vptr->ip_addr, &ifa->ifa_address, 4);
15241472 res = 0;