* [PATCH 1/1] staging: sep: resolve issue with false zero length of page
@ 2011-04-11 0:03 Mark Allyn
0 siblings, 0 replies; only message in thread
From: Mark Allyn @ 2011-04-11 0:03 UTC (permalink / raw)
To: linux-kernel, greg, mark.a.allyn, alan
Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
---
drivers/staging/sep/sep_driver.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 890eede..52342c1 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -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 */
--
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-11 0:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-11 0:03 [PATCH 1/1] staging: sep: resolve issue with false zero length of page Mark Allyn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.