Skip to content

Commit

Permalink
staging: sep: resolve issue with false zero length of page
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Mark Allyn authored and Greg Kroah-Hartman committed Apr 26, 2011
1 parent 95cd17c commit c09c9ae
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/staging/sep/sep_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,13 +1095,16 @@ static int sep_lock_user_pages(struct sep_device *sep,
if (num_pages > 1) {
lli_array[num_pages - 1].block_size =
(app_virt_addr + data_size) & (~PAGE_MASK);
if (lli_array[num_pages - 1].block_size == 0)
lli_array[num_pages - 1].block_size = PAGE_SIZE;

dev_warn(&sep->pdev->dev,
"lli_array[%x].bus_address is %08lx, lli_array[%x].block_size is %x\n",
"lli_array[%x].bus_address is "
"%08lx, lli_array[%x].block_size is %x\n",
num_pages - 1,
(unsigned long)lli_array[count].bus_address,
(unsigned long)lli_array[num_pages -1].bus_address,
num_pages - 1,
lli_array[count].block_size);
lli_array[num_pages -1].block_size);
}

/* Set output params according to the in_out flag */
Expand Down

0 comments on commit c09c9ae

Please sign in to comment.