diff options
author | Dennis Dalessandro <[email protected]> | 2014-05-02 11:40:17 -0400 |
---|---|---|
committer | Roland Dreier <[email protected]> | 2014-05-27 13:21:04 -0700 |
commit | 7e6d3e5c70f13874fb06e6b67696ed90ce79bd48 (patch) | |
tree | e5f6f57a020473ff4ad1d9e003216b804e218add | |
parent | 911eccd284d13d78c92ec4f1f1092c03457d732a (diff) |
IB/ipath: Translate legacy diagpkt into newer extended diagpkt
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.
Cc: <[email protected]>
Reported-by: Rickard Strandqvist <[email protected]>
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_diag.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_diag.c b/drivers/infiniband/hw/ipath/ipath_diag.c index e2f9a51f4a38..45802e97332e 100644 --- a/drivers/infiniband/hw/ipath/ipath_diag.c +++ b/drivers/infiniband/hw/ipath/ipath_diag.c @@ -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; |