Wed Feb 6 07:20:13 2019 UTC ()
 I21[01]'s RAL size is not 15 but 16(== 82575's value). Same as other OSes.


(msaitoh)
diff -r1.623 -r1.624 src/sys/dev/pci/if_wm.c

cvs diff -r1.623 -r1.624 src/sys/dev/pci/if_wm.c (expand / switch to unified diff)

--- src/sys/dev/pci/if_wm.c 2019/01/31 15:30:23 1.623
+++ src/sys/dev/pci/if_wm.c 2019/02/06 07:20:13 1.624
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $ */ 1/* $NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. 4 * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -73,27 +73,27 @@ @@ -73,27 +73,27 @@
73 * TODO (in order of importance): 73 * TODO (in order of importance):
74 * 74 *
75 * - Check XXX'ed comments 75 * - Check XXX'ed comments
76 * - TX Multi queue improvement (refine queue selection logic) 76 * - TX Multi queue improvement (refine queue selection logic)
77 * - Split header buffer for newer descriptors 77 * - Split header buffer for newer descriptors
78 * - EEE (Energy Efficiency Ethernet) 78 * - EEE (Energy Efficiency Ethernet)
79 * - Virtual Function 79 * - Virtual Function
80 * - Set LED correctly (based on contents in EEPROM) 80 * - Set LED correctly (based on contents in EEPROM)
81 * - Rework how parameters are loaded from the EEPROM. 81 * - Rework how parameters are loaded from the EEPROM.
82 * - Image Unique ID 82 * - Image Unique ID
83 */ 83 */
84 84
85#include <sys/cdefs.h> 85#include <sys/cdefs.h>
86__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.623 2019/01/31 15:30:23 msaitoh Exp $"); 86__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.624 2019/02/06 07:20:13 msaitoh Exp $");
87 87
88#ifdef _KERNEL_OPT 88#ifdef _KERNEL_OPT
89#include "opt_net_mpsafe.h" 89#include "opt_net_mpsafe.h"
90#include "opt_if_wm.h" 90#include "opt_if_wm.h"
91#endif 91#endif
92 92
93#include <sys/param.h> 93#include <sys/param.h>
94#include <sys/systm.h> 94#include <sys/systm.h>
95#include <sys/callout.h> 95#include <sys/callout.h>
96#include <sys/mbuf.h> 96#include <sys/mbuf.h>
97#include <sys/malloc.h> 97#include <sys/malloc.h>
98#include <sys/kmem.h> 98#include <sys/kmem.h>
99#include <sys/kernel.h> 99#include <sys/kernel.h>
@@ -3631,26 +3631,28 @@ wm_rar_count(struct wm_softc *sc) @@ -3631,26 +3631,28 @@ wm_rar_count(struct wm_softc *sc)
3631 case WM_T_ICH10: 3631 case WM_T_ICH10:
3632 case WM_T_PCH: 3632 case WM_T_PCH:
3633 size = WM_RAL_TABSIZE_ICH8; 3633 size = WM_RAL_TABSIZE_ICH8;
3634 break; 3634 break;
3635 case WM_T_PCH2: 3635 case WM_T_PCH2:
3636 size = WM_RAL_TABSIZE_PCH2; 3636 size = WM_RAL_TABSIZE_PCH2;
3637 break; 3637 break;
3638 case WM_T_PCH_LPT: 3638 case WM_T_PCH_LPT:
3639 case WM_T_PCH_SPT: 3639 case WM_T_PCH_SPT:
3640 case WM_T_PCH_CNP: 3640 case WM_T_PCH_CNP:
3641 size = WM_RAL_TABSIZE_PCH_LPT; 3641 size = WM_RAL_TABSIZE_PCH_LPT;
3642 break; 3642 break;
3643 case WM_T_82575: 3643 case WM_T_82575:
 3644 case WM_T_I210:
 3645 case WM_T_I211:
3644 size = WM_RAL_TABSIZE_82575; 3646 size = WM_RAL_TABSIZE_82575;
3645 break; 3647 break;
3646 case WM_T_82576: 3648 case WM_T_82576:
3647 case WM_T_82580: 3649 case WM_T_82580:
3648 size = WM_RAL_TABSIZE_82576; 3650 size = WM_RAL_TABSIZE_82576;
3649 break; 3651 break;
3650 case WM_T_I350: 3652 case WM_T_I350:
3651 case WM_T_I354: 3653 case WM_T_I354:
3652 size = WM_RAL_TABSIZE_I350; 3654 size = WM_RAL_TABSIZE_I350;
3653 break; 3655 break;
3654 default: 3656 default:
3655 size = WM_RAL_TABSIZE;  3657 size = WM_RAL_TABSIZE;
3656 } 3658 }