|
@@ -384,11 +384,14 @@ hash_final:
|
|
|
writesl(ss->base + SS_RXFIFO, op->buf, nwait);
|
|
|
op->byte_count += 4 * nwait;
|
|
|
}
|
|
|
+
|
|
|
nbw = op->len - 4 * nwait;
|
|
|
- wb = *(u32 *)(op->buf + nwait * 4);
|
|
|
- wb &= (0xFFFFFFFF >> (4 - nbw) * 8);
|
|
|
+ if (nbw) {
|
|
|
+ wb = *(u32 *)(op->buf + nwait * 4);
|
|
|
+ wb &= GENMASK((nbw * 8) - 1, 0);
|
|
|
|
|
|
- op->byte_count += nbw;
|
|
|
+ op->byte_count += nbw;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/* write the remaining bytes of the nbw buffer */
|