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.
This commit is contained in:
parent
b4372164ed
commit
93096fecb6
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user