When calculating NUMDL and NUMDU we assume that the controller is only
able to handle dword aligment (see Figure 117: SGL Data Block
descriptor).
Hence we just need to allocate a buffer which is a multiple of 4.
[dwagner: added commit message]
Signed-off-by: Daniel Wagner <dwagner@suse.de>
cfg.log_id = (cfg.aen >> 16) & 0xff;
}
- if (!cfg.log_len) {
- fprintf(stderr, "non-zero log-len is required param\n");
+ if (!cfg.log_len || cfg.log_len & 0x3) {
+ fprintf(stderr, "non-zero or non-dw alignment log-len is required param\n");
err = -EINVAL;
goto close_dev;
}