Skip to content

Commit

Permalink
IB/ipath: Translate legacy diagpkt into newer extended diagpkt
Browse files Browse the repository at this point in the history
commit 7e6d3e5 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 <[email protected]>
Reviewed-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Dennis Dalessandro <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Jiri Slaby <[email protected]>
  • Loading branch information
Dennis Dalessandro authored and Jiri Slaby committed Jul 17, 2014
1 parent 8bd7f7d commit aef0a96
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/infiniband/hw/ipath/ipath_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit aef0a96

Please sign in to comment.