-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mi: allow non-4-byte-aligned responses
We currently assume that a MI response will be a multiple of four bytes in length. However, this may not be the case: for example, a Read MI Data (Controller List) with an even number of controllers, and with an unpadded response, may only be aligned on a two-byte boundary. The NVMe-MI spec states, for the MIC field: This field is byte aligned. So, relax the requirement for alignment on the response sizes, and the expected response size values. We only do this for the mi commands; the Admin commands still require an aligned value for DLEN. In doing so, drop the explicit alignment tests, and add a couple that check that the Controller List example above will work. Signed-off-by: Jeremy Kerr <[email protected]> Reported-by: Klaus Jensen <[email protected]>
- Loading branch information
Showing
2 changed files
with
85 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters