Skip to content

Commit

Permalink
IB/ipath: Make send buffers available for kernel if not allocated to …
Browse files Browse the repository at this point in the history
…user

A fixed partitioning of send buffers is determined at driver load time
for user processes and kernel use.  Since send buffers are a scarce
resource, it makes sense to allow the kernel to use the buffers if they
are not in use by a user process.

Also, eliminate code duplication for ipath_force_pio_avail_update().

Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Ralph Campbell authored and Roland Dreier committed Apr 17, 2008
1 parent 4330e4d commit c4b4d16
Show file tree
Hide file tree
Showing 8 changed files with 225 additions and 145 deletions.
6 changes: 3 additions & 3 deletions drivers/infiniband/hw/ipath/ipath_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ static ssize_t ipath_diagpkt_write(struct file *fp,
goto bail;
}

piobuf = ipath_getpiobuf(dd, &pbufn);
plen >>= 2; /* in dwords */

piobuf = ipath_getpiobuf(dd, plen, &pbufn);
if (!piobuf) {
ipath_cdbg(VERBOSE, "No PIO buffers avail unit for %u\n",
dd->ipath_unit);
Expand All @@ -449,8 +451,6 @@ static ssize_t ipath_diagpkt_write(struct file *fp,
/* disarm it just to be extra sure */
ipath_disarm_piobufs(dd, pbufn, 1);

plen >>= 2; /* in dwords */

if (ipath_debug & __IPATH_PKTDBG)
ipath_cdbg(VERBOSE, "unit %u 0x%x+1w pio%d\n",
dd->ipath_unit, plen - 1, pbufn);
Expand Down
Loading

0 comments on commit c4b4d16

Please sign in to comment.