mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
IB/ipath: Fix spi_pioindex value
ipath_piobufbase was a single value offset, but is multiple values on newer chips, so use only the 32 bits for the 2K buffers (4K buffers are currently used only by the driver). Signed-off-by: Dave Olson <dave.olson@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
6114d4cd31
commit
1bf7724e09
1 changed files with 7 additions and 2 deletions
|
@ -223,8 +223,13 @@ static int ipath_get_base_info(struct file *fp,
|
|||
(unsigned long long) kinfo->spi_subport_rcvhdr_base);
|
||||
}
|
||||
|
||||
kinfo->spi_pioindex = (kinfo->spi_piobufbase - dd->ipath_piobufbase) /
|
||||
dd->ipath_palign;
|
||||
/*
|
||||
* All user buffers are 2KB buffers. If we ever support
|
||||
* giving 4KB buffers to user processes, this will need some
|
||||
* work.
|
||||
*/
|
||||
kinfo->spi_pioindex = (kinfo->spi_piobufbase -
|
||||
(dd->ipath_piobufbase & 0xffffffff)) / dd->ipath_palign;
|
||||
kinfo->spi_pioalign = dd->ipath_palign;
|
||||
|
||||
kinfo->spi_qpair = IPATH_KD_QP;
|
||||
|
|
Loading…
Reference in a new issue