Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 2019 23:35:15 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354502 - head/sys/dev/iwm
Message-ID:  <201911072335.xA7NZF05073785@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Thu Nov  7 23:35:15 2019
New Revision: 354502
URL: https://svnweb.freebsd.org/changeset/base/354502

Log:
  iwm: Use the same delays as iwlwifi when resetting the device.
  
  This is required for initialization to succeed for newer device
  families.
  
  MFC after:	2 weeks
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/dev/iwm/if_iwm.c
  head/sys/dev/iwm/if_iwm_pcie_trans.c

Modified: head/sys/dev/iwm/if_iwm.c
==============================================================================
--- head/sys/dev/iwm/if_iwm.c	Thu Nov  7 23:35:01 2019	(r354501)
+++ head/sys/dev/iwm/if_iwm.c	Thu Nov  7 23:35:15 2019	(r354502)
@@ -1315,12 +1315,14 @@ iwm_stop_device(struct iwm_softc *sc)
 	/* Stop the device, and put it in low power state */
 	iwm_apm_stop(sc);
 
-	/* Upon stop, the APM issues an interrupt if HW RF kill is set.
-	 * Clean again the interrupt here
+	/* stop and reset the on-board processor */
+	IWM_SETBITS(sc, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_SW_RESET);
+	DELAY(5000);
+
+	/*
+	 * Upon stop, the APM issues an interrupt if HW RF kill is set.
 	 */
 	iwm_disable_interrupts(sc);
-	/* stop and reset the on-board processor */
-	IWM_WRITE(sc, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_SW_RESET);
 
 	/*
 	 * Even if we stop the HW, we still want the RF kill

Modified: head/sys/dev/iwm/if_iwm_pcie_trans.c
==============================================================================
--- head/sys/dev/iwm/if_iwm_pcie_trans.c	Thu Nov  7 23:35:01 2019	(r354501)
+++ head/sys/dev/iwm/if_iwm_pcie_trans.c	Thu Nov  7 23:35:15 2019	(r354502)
@@ -611,7 +611,7 @@ iwm_start_hw(struct iwm_softc *sc)
 
 	/* Reset the entire device */
 	IWM_WRITE(sc, IWM_CSR_RESET, IWM_CSR_RESET_REG_FLAG_SW_RESET);
-	DELAY(10);
+	DELAY(5000);
 
 	if ((error = iwm_apm_init(sc)) != 0)
 		return error;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911072335.xA7NZF05073785>