2011-04-05 17:09:16

by Allyn, Mark A

[permalink] [raw]
Subject: [PATCH 1/1] staging: sep: remove dependency on memrar driver

Signed-off-by: Mark Allyn <[email protected]>
---
drivers/staging/sep/sep_driver.c | 59 +------------------------------------
1 files changed, 2 insertions(+), 57 deletions(-)

diff --git a/drivers/staging/sep/sep_driver.c b/drivers/staging/sep/sep_driver.c
index 71a5fbc..ad29cd5 100644
--- a/drivers/staging/sep/sep_driver.c
+++ b/drivers/staging/sep/sep_driver.c
@@ -55,8 +55,6 @@
#include <linux/jiffies.h>
#include <linux/rar_register.h>

-#include "../memrar/memrar.h"
-
#include "sep_driver_hw_defs.h"
#include "sep_driver_config.h"
#include "sep_driver_api.h"
@@ -1097,6 +1095,8 @@ 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",
@@ -2359,58 +2359,6 @@ static int sep_free_dcb_handler(struct sep_device *sep)
}

/**
- * sep_rar_prepare_output_msg_handler - prepare an output message
- * @sep: pointer to struct sep_device
- * @arg: pointer to user parameters
- *
- * This function will retrieve the RAR buffer physical addresses, type
- * & size corresponding to the RAR handles provided in the buffers vector.
- */
-static int sep_rar_prepare_output_msg_handler(struct sep_device *sep,
- unsigned long arg)
-{
- int error = 0;
- /* Command args */
- struct rar_hndl_to_bus_struct command_args;
- struct RAR_buffer rar_buf;
- /* Bus address */
- dma_addr_t rar_bus = 0;
- /* Holds the RAR address in the system memory offset */
- u32 *rar_addr;
-
- /* Copy the data */
- if (copy_from_user(&command_args, (void __user *)arg,
- sizeof(command_args))) {
- error = -EFAULT;
- goto end_function;
- }
-
- /* Call to translation function only if user handle is not NULL */
- if (command_args.rar_handle) {
- memset(&rar_buf, 0, sizeof(rar_buf));
- rar_buf.info.handle = (u32)command_args.rar_handle;
-
- if (rar_handle_to_bus(&rar_buf, 1) != 1) {
- error = -EFAULT;
- goto end_function;
- }
- rar_bus = rar_buf.bus_address;
- }
- dev_dbg(&sep->pdev->dev, "rar msg; rar_addr_bus = %x\n", (u32)rar_bus);
-
- /* Set value in the SYSTEM MEMORY offset */
- rar_addr = (u32 *)(sep->shared_addr +
- SEP_DRIVER_SYSTEM_RAR_MEMORY_OFFSET_IN_BYTES);
-
- /* Copy the physical address to the System Area for the SEP */
- rar_addr[0] = SEP_RAR_VAL_TOKEN;
- rar_addr[1] = rar_bus;
-
-end_function:
- return error;
-}
-
-/**
* sep_ioctl - ioctl api
* @filp: pointer to struct file
* @cmd: command
@@ -2456,9 +2404,6 @@ static long sep_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
case SEP_IOCENDTRANSACTION:
error = sep_end_transaction_handler(sep);
break;
- case SEP_IOCRARPREPAREMESSAGE:
- error = sep_rar_prepare_output_msg_handler(sep, arg);
- break;
case SEP_IOCPREPAREDCB:
error = sep_prepare_dcb_handler(sep, arg);
break;
--
1.7.0.4


2011-04-05 17:20:34

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 1/1] staging: sep: remove dependency on memrar driver

On Tue, Apr 05, 2011 at 10:09:53AM -0700, Mark Allyn wrote:
> Signed-off-by: Mark Allyn <[email protected]>
> ---
> drivers/staging/sep/sep_driver.c | 59 +------------------------------------

Alan already sent me this patch, and it's in the staging-next tree,
right? Or is this a new one that I need to do on top of the current
tree as I missed something?

thanks,

greg k-h

2011-04-05 17:46:30

by Allyn, Mark A

[permalink] [raw]
Subject: RE: [PATCH 1/1] staging: sep: remove dependency on memrar driver

-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Tuesday, April 05, 2011 10:22 AM
To: Allyn, Mark A
Cc: [email protected]; [email protected]; Epshteyn, Eugene
Subject: Re: [PATCH 1/1] staging: sep: remove dependency on memrar driver

On Tue, Apr 05, 2011 at 10:09:53AM -0700, Mark Allyn wrote:
> Signed-off-by: Mark Allyn <[email protected]>
> ---
> drivers/staging/sep/sep_driver.c | 59 +------------------------------------

Alan already sent me this patch, and it's in the staging-next tree,
right? Or is this a new one that I need to do on top of the current
tree as I missed something?

thanks,

greg k-h

==============

Greg:

I pulled next-20110405, along with 2.6.39-rc1 from kernel.org at about 9 AM
on Tuesday, April 05, 2011.

I did not see it in that staging next. When will I see what Alan did on kernel.org?

Mark

2011-04-05 18:10:23

by Greg KH

[permalink] [raw]
Subject: Re: [PATCH 1/1] staging: sep: remove dependency on memrar driver

On Tue, Apr 05, 2011 at 11:46:00AM -0600, Allyn, Mark A wrote:
> -----Original Message-----
> From: Greg KH [mailto:[email protected]]
> Sent: Tuesday, April 05, 2011 10:22 AM
> To: Allyn, Mark A
> Cc: [email protected]; [email protected]; Epshteyn, Eugene
> Subject: Re: [PATCH 1/1] staging: sep: remove dependency on memrar driver
>
> On Tue, Apr 05, 2011 at 10:09:53AM -0700, Mark Allyn wrote:
> > Signed-off-by: Mark Allyn <[email protected]>
> > ---
> > drivers/staging/sep/sep_driver.c | 59 +------------------------------------
>
> Alan already sent me this patch, and it's in the staging-next tree,
> right? Or is this a new one that I need to do on top of the current
> tree as I missed something?
>
> thanks,
>
> greg k-h
>
> ==============
>
> Greg:
>
> I pulled next-20110405, along with 2.6.39-rc1 from kernel.org at about 9 AM
> on Tuesday, April 05, 2011.
>
> I did not see it in that staging next. When will I see what Alan did on kernel.org?

Wait until the next linux-next release, I pushed out my tree late last
night.

thanks,

greg k-h