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) { _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"