svn commit: r342534 - head/sys/dev/mpr

Kashyap D Desai kadesai at FreeBSD.org
Wed Dec 26 10:42:46 UTC 2018


Author: kadesai
Date: Wed Dec 26 10:42:45 2018
New Revision: 342534
URL: https://svnweb.freebsd.org/changeset/base/342534

Log:
  On Aero/Sea A0 cards retry MPT Fusion registers reads for max three times
  
  Due to HW Errta on Aero/Sea A0 chipset on secure boot mode & on heavy IO load,
  sometimes read operation on MPT Fusion registers will give zero value,
  So, as a workaround driver will retry the MPT Fusion register
  read operation for max three times upon reading zero value form these
  registers.
  
  Submitted by: Sreekanth Reddy <sreekanth.reddy at broadcom.com>
  Reviewed by:  Kashyap Desai <Kashyap.Desai at broadcom.com>
  Approved by:  ken
  MFC after:  3 days
  Sponsored by:   Broadcom Inc

Modified:
  head/sys/dev/mpr/mprvar.h

Modified: head/sys/dev/mpr/mprvar.h
==============================================================================
--- head/sys/dev/mpr/mprvar.h	Wed Dec 26 10:41:53 2018	(r342533)
+++ head/sys/dev/mpr/mprvar.h	Wed Dec 26 10:42:45 2018	(r342534)
@@ -530,7 +530,14 @@ struct scsi_read_capacity_eedp
 static __inline uint32_t
 mpr_regread(struct mpr_softc *sc, uint32_t offset)
 {
-	return (bus_space_read_4(sc->mpr_btag, sc->mpr_bhandle, offset));
+	uint32_t ret_val, i = 0;
+	do {
+		ret_val =
+		    bus_space_read_4(sc->mpr_btag, sc->mpr_bhandle, offset);
+	} while((sc->mpr_flags & MPR_FLAGS_SEA_IOC) &&
+	    (ret_val == 0) && (++i < 3));
+
+	return ret_val;
 }
 
 static __inline void


More information about the svn-src-all mailing list