mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
IB/ipath: Translate legacy diagpkt into newer extended diagpkt
commit 7e6d3e5c70 upstream.
This patch addresses an issue where the legacy diagpacket is sent in
from the user, but the driver operates on only the extended
diagpkt. This patch specifically initializes the extended diagpkt
based on the legacy packet.
Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
383be78f7c
commit
a533eba668
@@ -346,6 +346,10 @@ static ssize_t ipath_diagpkt_write(struct file *fp,
|
||||
ret = -EFAULT;
|
||||
goto bail;
|
||||
}
|
||||
dp.len = odp.len;
|
||||
dp.unit = odp.unit;
|
||||
dp.data = odp.data;
|
||||
dp.pbc_wd = 0;
|
||||
} else {
|
||||
ret = -EINVAL;
|
||||
goto bail;
|
||||
|
||||
Reference in New Issue
Block a user