diff mbox series

[v3,2/4] bus: mhi: core: Move MHI_MAX_MTU to external header file

Message ID 1591899224-3403-3-git-send-email-hemantk@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series user space client interface driver | expand

Commit Message

Hemant Kumar June 11, 2020, 6:13 p.m. UTC
Currently this macro is defined in internal MHI header as
a TRE length mask. Moving it to external header allows MHI
client drivers to set this upper bound for the transmit
buffer size.

Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
---
 include/linux/mhi.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

Manivannan Sadhasivam June 19, 2020, 5:33 a.m. UTC | #1
On Thu, Jun 11, 2020 at 11:13:42AM -0700, Hemant Kumar wrote:
> Currently this macro is defined in internal MHI header as
> a TRE length mask. Moving it to external header allows MHI
> client drivers to set this upper bound for the transmit
> buffer size.
> 

So we have 2 definitions for MHI_MAX_MTU now? Why can't you remove the one
available internally?

Thanks,
Mani

> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
> ---
>  include/linux/mhi.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/mhi.h b/include/linux/mhi.h
> index a39b77d..ce43f74 100644
> --- a/include/linux/mhi.h
> +++ b/include/linux/mhi.h
> @@ -16,6 +16,9 @@
>  #include <linux/wait.h>
>  #include <linux/workqueue.h>
>  
> +/* MHI client drivers to set this upper bound for tx buffer */
> +#define MHI_MAX_MTU 0xffff
> +
>  #define MHI_VOTE_BUS BIT(0) /* do not disable the mhi bus */
>  #define MHI_VOTE_DEVICE BIT(1) /* prevent mhi device from entering lpm */
>  
> -- 
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
Hemant Kumar June 25, 2020, 12:03 a.m. UTC | #2
Hi Mani

On 6/18/20 10:33 PM, Manivannan Sadhasivam wrote:
> On Thu, Jun 11, 2020 at 11:13:42AM -0700, Hemant Kumar wrote:
>> Currently this macro is defined in internal MHI header as
>> a TRE length mask. Moving it to external header allows MHI
>> client drivers to set this upper bound for the transmit
>> buffer size.
>>
> 
> So we have 2 definitions for MHI_MAX_MTU now? Why can't you remove the one
> available internally?
Good catch, let me fix that in next patch series.
> 
> Thanks,
> Mani
> 
>> Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
>> ---
>>   include/linux/mhi.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/include/linux/mhi.h b/include/linux/mhi.h
>> index a39b77d..ce43f74 100644
>> --- a/include/linux/mhi.h
>> +++ b/include/linux/mhi.h
>> @@ -16,6 +16,9 @@
>>   #include <linux/wait.h>
>>   #include <linux/workqueue.h>
>>   
>> +/* MHI client drivers to set this upper bound for tx buffer */
>> +#define MHI_MAX_MTU 0xffff
>> +
>>   #define MHI_VOTE_BUS BIT(0) /* do not disable the mhi bus */
>>   #define MHI_VOTE_DEVICE BIT(1) /* prevent mhi device from entering lpm */
>>   
>> -- 
>> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
>> a Linux Foundation Collaborative Project
>>
diff mbox series

Patch

diff --git a/include/linux/mhi.h b/include/linux/mhi.h
index a39b77d..ce43f74 100644
--- a/include/linux/mhi.h
+++ b/include/linux/mhi.h
@@ -16,6 +16,9 @@ 
 #include <linux/wait.h>
 #include <linux/workqueue.h>
 
+/* MHI client drivers to set this upper bound for tx buffer */
+#define MHI_MAX_MTU 0xffff
+
 #define MHI_VOTE_BUS BIT(0) /* do not disable the mhi bus */
 #define MHI_VOTE_DEVICE BIT(1) /* prevent mhi device from entering lpm */