NetBSD Problem Report #52773

From clare@csel.org  Wed Nov 29 12:33:34 2017
Return-Path: <clare@csel.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 02E7A7A19F
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 Nov 2017 12:33:33 +0000 (UTC)
Message-Id: <20171129123329.656B63F83C@inner.csel.org>
Date: Wed, 29 Nov 2017 21:33:29 +0900 (JST)
From: Shinichi Doyashiki <clare@csel.org>
Reply-To: <clare@csel.org>
To: gnats-bugs@NetBSD.org
Subject: the wm driver should handle i82583V as jumbo frame capable device
X-Send-Pr-Version: 3.95

>Number:         52773
>Category:       kern
>Synopsis:       the wm driver should handle i82583V as jumbo frame capable device
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 29 12:35:00 +0000 2017
>Closed-Date:    Fri Oct 11 03:32:32 +0000 2019
>Last-Modified:  Fri Oct 11 03:32:32 +0000 2019
>Originator:     Shinichi Doyashiki
>Release:        NetBSD 8.99.7
>Organization:
	at home
>Environment:
System: NetBSD router.csel.org 8.99.7 NetBSD 8.99.7 (XCYMINIPC) #1: Wed Nov 29 20:46:07 JST 2017  clare@inner.csel.org:/export/stage/hack/sys/arch/amd64/compile/XCYMINIPC amd64
Architecture: x86_64
Machine: amd64
>Description:
	the wm driver should handle i82583V as jumbo frame capable device.

	the Intel's updated revision history of datasheet says i82583V
	supports jumbo frames, but the datasheet itself have no about
	definition and handling of jumbo frames.

	https://www.intel.co.jp/content/dam/doc/datasheet/82583v-gbe-controller-datasheet.pdf
	https://ark.intel.com/products/41676/Intel-82583V-Gigabit-Ethernet-Controller

>How-To-Repeat:
	try real hardware.
>Fix:
Index: if_wm.c
===================================================================
RCS file: /export/cvsroot/netbsd/src/sys/dev/pci/if_wm.c,v
retrieving revision 1.544
diff -u -r1.544 if_wm.c
--- if_wm.c	22 Nov 2017 02:36:52 -0000	1.544
+++ if_wm.c	29 Nov 2017 11:44:47 -0000
@@ -2673,6 +2679,7 @@
 	case WM_T_82575:
 	case WM_T_82576:
 	case WM_T_82580:
+	case WM_T_82583: /* see revision history of the datasheet */
 	case WM_T_I350:
 	case WM_T_I354: /* XXXX ok? */
 	case WM_T_I210:
@@ -2692,7 +2699,6 @@
 		break;
 	case WM_T_82542_2_0:
 	case WM_T_82542_2_1:
-	case WM_T_82583:
 	case WM_T_ICH8:
 		/* No support for jumbo frame */
 		break;

>Release-Note:

>Audit-Trail:
From: "SAITOH Masanobu" <msaitoh@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52773 CVS commit: src/sys/dev/pci
Date: Thu, 30 Nov 2017 09:24:19 +0000

 Module Name:	src
 Committed By:	msaitoh
 Date:		Thu Nov 30 09:24:18 UTC 2017

 Modified Files:
 	src/sys/dev/pci: if_wm.c

 Log Message:
 - 82583 supports jumbo frame. Fixes PR#52773 reported by Shinichi Doyashiki.
 - Cleanup comment.


 To generate a diff of this commit:
 cvs rdiff -u -r1.545 -r1.546 src/sys/dev/pci/if_wm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Soren Jacobsen" <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52773 CVS commit: [netbsd-8] src/sys/dev/pci
Date: Sun, 10 Dec 2017 09:48:05 +0000

 Module Name:	src
 Committed By:	snj
 Date:		Sun Dec 10 09:48:04 UTC 2017

 Modified Files:
 	src/sys/dev/pci [netbsd-8]: if_wm.c

 Log Message:
 Pull up following revision(s) (requested by msaitoh in ticket #424):
 	sys/dev/pci/if_wm.c: 1.545-1.546
   Don't allocate MSI-X interrupt on 82583. 82583 chip has a MSI-X capability in
 the PCI configuration space but it doesn't support it. At least the document
 doesn't say anything about MSI-X. Fixes PR#52767 reported by
 Shinichi Doyashiki.
 --
 - 82583 supports jumbo frame. Fixes PR#52773 reported by Shinichi Doyashiki.
 - Cleanup comment.


 To generate a diff of this commit:
 cvs rdiff -u -r1.508.4.7 -r1.508.4.8 src/sys/dev/pci/if_wm.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52773 CVS commit: [netbsd-7] src
Date: Sat, 11 Aug 2018 13:34:21 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Sat Aug 11 13:34:21 UTC 2018

 Modified Files:
 	src/share/man/man4 [netbsd-7]: wm.4
 	src/sys/dev/mii [netbsd-7]: ihphyreg.h inbmphyreg.h
 	src/sys/dev/pci [netbsd-7]: if_wm.c if_wmreg.h if_wmvar.h pcidevs
 	    pcireg.h

 Log Message:
 Pull up the following, requested by msaitoh in ticket #1628:

 share/man/man4/wm.4				1.40 via patch
 sys/dev/mii/ihphyreg.h				1.2
 sys/dev/mii/inbmphyreg.h			1.10
 sys/dev/pci/if_wm.c				1.504, 1.506, 1.510-1.535, 1.539-1.540, 1.546, 1.548, 1.551-1.552, 1.558, 1.565-1.573, 1.575, 1.579, 1.582, 1.584 via patch
 sys/dev/pci/if_wmreg.h				1.99-1.103, 1.106-1.107 via patch
 sys/dev/pci/if_wmvar.h				1.34-1.39 via patch
 sys/dev/pci/pcidevs				1.1327 via patch
 sys/dev/pci/pcidevs.h				regen
 sys/dev/pci/pcidevs_data.h			regen
 sys/dev/pci/pcireg.h				patch

 	Sync wm(4) up to 2018/08/08 except MSI/MSI-X and NET_MPSAFE:
 	- remove extra "+"
 	- Fix a bug that non-GMII devices don't send a routing message when
 	  the link status is changed.
 	- Set WMREG_KABGTXD not in wm_init_locked() but in wm_reset(). Same as
 	  other OSes.
 	- If a interrupt is a spurious interrupt, don't print debug message.
 	- Don't print the Image Unique ID if an NVM is iNVM (i210 and I211).
 	- Print sc_flags with snprintb().
 	- Fix a bug that a RAL was written at incorrect address when the index
 	  number is more than 16 on 82544 and newer.
 	- The layout of RAL on PCH* are different from others. Fix it.
 	- Flush every MTA write. Same as Linux.
 	- Move the location of calling wm_set_filter. Same as some other OSes.
 	- Add CSR_WRITE_FLUSH() after writing WMREG_CTRL in
 	  wm_gmii_mediachange().
 	- Add missing "else" in wm_nvm_release().
 	- Make new wm_phy_post_reset() and use this function at all location
 	  after resetting phy.
 	- Move the location of calling wm_get_hw_control. Same as Linux.
 	- Add I219 specific wokaround for legacy interrupt. From OpenBSD.
 	- Move the location of calling wm_lplu_d0_disable().
 	- Fix latency calculation in wm_platform_pm_pch_lpt().
 	- Set OBFF water mark and enable OBFF on PCH_LPT and newer.
 	- Disable D0 LPLU on 8257[12356], 82580, I350 and I21[01], too.	Before
 	  this commit, above devices and non-PCIe devices accessed wrong
 	  register.
 	- Use device_printf() instead of aprint_error_dev() for PHY read/write
 	  functions because those are used not only in device attach.
 	- Fix a bug that wm_gmii_i82544_{read,write}reg() didn't take care of
 	  page select. PHY access from igphy() automatically did it, but
 	  accessing from wm(4) for wrokaround didn't work correctly. This
 	  change affects 8254[17], 8257[12] ICH8, ICH9 and ICH10.
 	- Call wm_kmrn_lock_loss_workaround_ich8lan() before any PHY access in
 	  wm_linkintr_gmii().
 	- Register access in wm_kmrn_lock_loss_workaround_ich8lan() now works
 	  correctly. Enable this function.
 	- Configure the LCD with the extended configuration region in NVM if
 	  it's required.
 	- If TX is not required to flush, RX is also not required to flush
 	  in wm_flush_desc_rings(). Same as other OSes.
 	- Remove wrong semaphore access in wm_nvm_{read,write}_{ich8,spt} to
 	  prevent hangup. A semaphore is get/put in wm_nvm_{read,write}.
 	- Move some initialization stuff in wm_attach() before wm_reset(). Some
 	  flags and callback function are required to set correctly before
 	  wm_reset() because wm_reset() and some helper functions refer them.
 	- Add wm_write_smbus_addr() to set SMBus address by software.
 	- Modify wm_gmii_hv_{read,write}reg_locked() to make them access
 	  HV_SMB_ADDR correctly.
 	- Use new nvm.{acquire,release}() for semaphore.
 	- Our MII readreg/writereg API has not way to detect an error.
 	  kmrn_{read,write}reg() are not used for MII API, so it's not required
 	  for these functions to use the same API. So,
 	  - Change return value as error code.
 	  - Change register value from int to uint16_t.
 	  - read: pass pointer for uint16_t as an argument.
 	  - Check return value on caller side.
 	- Check whether it's required to use MDIC workaround for 80003 or not
 	  in wm_reset(). If the workaround isn't required, don't use the
 	  workaround code in wm_gmii_i80003_{read,write}reg.
 	- Add WM_F_WA_I210_CLSEM flag for a workaround. FreeBSD/Linux drivers
 	  say "In rare circumstances, the SW semaphore may already be held
 	  unintentionally on I21[01]". PXE boot is one of the case.
 	- Qemu's e1000e emulation (82574L)'s SPI has only 64 words. I've never
 	  seen on real 82574 hardware with such small SPI ROM. Check
 	  sc->sc_nvm_wordsize before accessing higher address words to prevent
 	  timeout.
 	- Check some wm_nvm_read()'s return vale.
 	- Print NVM offset and word count when EERD polling failed.
 	- On I219, drop TARC0 bit 28 for DMA hang workaround (from Linux).
 	- 82583 supports jumbo frame. Fixes PR#52773 reported by
 	  Shinichi Doyashiki.
 	- Fix typo in comment. Reported by Shinichi Doyashiki in PR#52885.
 	- Add ASPM workaround for 8257[1234] and 82583 to prevent device
 	  timeout or hangup. Fixes PR#52818 reported by Shinichi Doyashiki.
 	- CID-1427779: Fix uninitialized variables.
 	- Fix a bug that wm_pll_workaround_i210() is not called when
 	  a) Chip is I211 or b) Chip is I210 and it uses iNVM (not FLASH).
 	- Do wm_reset_mdicnfg_82580() on 82580 only.
 	- Fix FLASH access on PCH_SPT and newer. Their FLASH access should be
 	  done by 32bit. Especially for ICH_FLASH_HSFCTL register, it's located
 	  at 0x0006, so it must be accessed via ICH_FLASH_HSFSTS(0x0004) and
 	  use shift or mask.
 	- Make wm_nvm_valid_bank_detect_ich8lan() the same as other OSes.
 	- If the extended configuration size in the EXTCNFSIZE register is 0,
 	  don't continue in wm_init_lcd_from_nvm().
 	- Add PCH_CNP support (I219 with Intel 300 series chipset).
 	- Enable I219 support.
 	- I354 uses an external PHY, so don't use wm_set_eee_i350().
 	- Fix a bug that the link can't detect in link interrupt function for
 	  non-SERDES fiber.
 	- Fix a bug that 82542 misunderstand fiber's signal detection.
 	- Add debug printf()s.
 	- Update comment.
 	- Rename functions and variables.
 	- Add diagnostic code.
 	- Sort registers.
 	- Lowercase hexadecimal values.
 	- KNF.


 To generate a diff of this commit:
 cvs rdiff -u -r1.30.2.1 -r1.30.2.2 src/share/man/man4/wm.4
 cvs rdiff -u -r1.1 -r1.1.38.1 src/sys/dev/mii/ihphyreg.h
 cvs rdiff -u -r1.3.30.1 -r1.3.30.2 src/sys/dev/mii/inbmphyreg.h
 cvs rdiff -u -r1.289.2.14 -r1.289.2.15 src/sys/dev/pci/if_wm.c
 cvs rdiff -u -r1.60.2.8 -r1.60.2.9 src/sys/dev/pci/if_wmreg.h
 cvs rdiff -u -r1.19.2.6 -r1.19.2.7 src/sys/dev/pci/if_wmvar.h
 cvs rdiff -u -r1.1199.2.11 -r1.1199.2.12 src/sys/dev/pci/pcidevs
 cvs rdiff -u -r1.95.2.3 -r1.95.2.4 src/sys/dev/pci/pcireg.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: msaitoh@NetBSD.org
State-Changed-When: Fri, 11 Oct 2019 03:32:32 +0000
State-Changed-Why:
Fixed and pulled up. Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.