Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2019 02:44:38 +0000 (UTC)
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r346426 - head/sys/powerpc/powernv
Message-ID:  <201904200244.x3K2icC1029473@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhibbits
Date: Sat Apr 20 02:44:38 2019
New Revision: 346426
URL: https://svnweb.freebsd.org/changeset/base/346426

Log:
  powerpc64/powernv: Relax flash block write requirements
  
  Since writes don't necessarily need to be on erase-block boundaries, we can
  relax the block size and alignments down to sector size.  If it needs to be
  erased, opalflash_erase() will check proper alignment and size.

Modified:
  head/sys/powerpc/powernv/opal_flash.c

Modified: head/sys/powerpc/powernv/opal_flash.c
==============================================================================
--- head/sys/powerpc/powernv/opal_flash.c	Sat Apr 20 00:04:31 2019	(r346425)
+++ head/sys/powerpc/powernv/opal_flash.c	Sat Apr 20 02:44:38 2019	(r346426)
@@ -239,8 +239,8 @@ opalflash_write(struct opalflash_softc *sc, off_t off,
 	int rv, size, token;
 
 	/* Ensure we write aligned to a full block size. */
-	if (off % sc->sc_disk->d_stripesize != 0 ||
-	    count % sc->sc_disk->d_stripesize != 0)
+	if (off % sc->sc_disk->d_sectorsize != 0 ||
+	    count % sc->sc_disk->d_sectorsize != 0)
 		return (EIO);
 
 	if (sc->sc_erase) {



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