* RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
@ 2017-11-22 0:52 Xu (Shanghai) Wang
0 siblings, 0 replies; 6+ messages in thread
From: Xu (Shanghai) Wang @ 2017-11-22 0:52 UTC (permalink / raw)
To: Xinming Hu, Ulf Hansson
Cc: Nishant Sarmukadam, Wei-Ning Huang, linux-mmc@vger.kernel.org,
Cathy Luo, Zhiyuan Yang, Tim Song, James Cao, Ganapathi Bhat,
Bob Tan
++
Thanks,
Xu
-----Original Message-----
From: Xinming Hu
Sent: 2017年11月21日 19:59
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Nishant Sarmukadam <nishants@marvell.com>; Wei-Ning Huang <wnhuang@chromium.org>; linux-mmc@vger.kernel.org; Cathy Luo <cluo@marvell.com>; Zhiyuan Yang <yangzy@marvell.com>; Tim Song <songtao@marvell.com>; Xu (Shanghai) Wang <xwang4@marvell.com>; James Cao <jcao@marvell.com>; Ganapathi Bhat <gbhat@marvell.com>
Subject: RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
Hi Ulf,
Would you mind re-posting a re-based series instead? In that way you hopefully get some more people's attention as well.
>>> Sure. Could you please point the latest mmc git code base ? I guess
>>> it is
https://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git/
But looks quite old.
Regards,
Simon
________________________________________
From: Ulf Hansson <ulf.hansson@linaro.org>
Sent: Tuesday, November 21, 2017 19:44
To: Xinming Hu
Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc@vger.kernel.org; Cathy Luo; Zhiyuan Yang; Tim Song; Xu (Shanghai) Wang; James Cao; Ganapathi Bhat
Subject: [EXT] Re: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
External Email
----------------------------------------------------------------------
On 16 November 2017 at 14:57, Xinming Hu <huxm@marvell.com> wrote:
> Hi Ulf,
>
> Could you please let us know if you have any further review comments on this patch series.
Seems like this fallen through the cracks.
Would you mind re-posting a re-based series instead? In that way you hopefully get some more people's attention as well.
Kind regards
Uffe
>
> Regards,
> Simon
>
>> -----Original Message-----
>> From: Amitkumar Karwar
>> Sent: 2016年8月9日 18:16
>> To: Ulf Hansson <ulf.hansson@linaro.org>
>> Cc: Nishant Sarmukadam <nishants@marvell.com>; Wei-Ning Huang
>> <wnhuang@chromium.org>; linux-mmc@vger.kernel.org; Cathy Luo
>> <cluo@marvell.com>; Xinming Hu <huxm@marvell.com>
>> Subject: RE: [PATCH v4 1/2] mmc: API for accessing host supported
>> maximum segment count and size
>>
>> Hi Ulf,
>>
>> > From: Amitkumar Karwar [mailto:akarwar@marvell.com]
>> > Sent: Thursday, June 16, 2016 2:53 PM
>> > To: linux-wireless@vger.kernel.org
>> > Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc@vger.kernel.org;
>> > Cathy Luo; Xinming Hu; Amitkumar Karwar
>> > Subject: [PATCH v4 1/2] mmc: API for accessing host supported
>> > maximum segment count and size
>> >
>> > From: Xinming Hu <huxm@marvell.com>
>> >
>> > sdio device drivers need be able to get the host supported max_segs
>> > and max_seg_size, so that they know the buffer size to allocate
>> > while utilizing the scatter/gather DMA buffer list.
>> >
>> > This patch provides API for this purpose.
>> >
>> > Signed-off-by: Xinming Hu <huxm@marvell.com>
>> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
>> > ---
>> > v2: v2 was submitted with minor improvement like replacing BUG_ON()
>> > with
>> > WARN_ON()
>> > v3: Addressed below review comments from Ulf Hansson
>> > a) In v3, patch has been split into two separate patches.
>> > b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
>> > c) Replaced WARN_ON() with proper error code when
>> > sg_ptr->length is invalid
>> > d) Instead of duplicating the code in mmc_io_rw_extended(),
>> > extra bool parameter
>> > has been added to this function and used it in new APIs for SG.
>> > v4: Removed WARN_ON() calls in newly added APIs. It's gets called
>> > in probe handler.
>> > Caller already takes care of it(Shawn Lin).
>> > ---
>> > drivers/mmc/core/sdio_io.c | 21
>> > +++++++++++++++++++++
>> > .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
>> > include/linux/mmc/sdio_func.h | 3 +++
>> > 3 files changed, 27 insertions(+), 3 deletions(-)
>> >
>>
>> Please let me know if you have any further review comments for this
>> patch series.
>>
>> Regards,
>> Amitkumar
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
@ 2016-06-16 9:23 Amitkumar Karwar
2016-08-09 10:16 ` Amitkumar Karwar
[not found] ` <1466069006-10757-1-git-send-email-akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
0 siblings, 2 replies; 6+ messages in thread
From: Amitkumar Karwar @ 2016-06-16 9:23 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
Cc: Nishant Sarmukadam, Wei-Ning Huang,
linux-mmc-u79uwXL29TY76Z2rM5mHXA, Cathy Luo, Xinming Hu,
Amitkumar Karwar
From: Xinming Hu <huxm-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
sdio device drivers need be able to get the host supported max_segs
and max_seg_size, so that they know the buffer size to allocate while
utilizing the scatter/gather DMA buffer list.
This patch provides API for this purpose.
Signed-off-by: Xinming Hu <huxm-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
Signed-off-by: Amitkumar Karwar <akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
---
v2: v2 was submitted with minor improvement like replacing BUG_ON() with WARN_ON()
v3: Addressed below review comments from Ulf Hansson
a) In v3, patch has been split into two separate patches.
b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
c) Replaced WARN_ON() with proper error code when sg_ptr->length is invalid
d) Instead of duplicating the code in mmc_io_rw_extended(), extra bool parameter
has been added to this function and used it in new APIs for SG.
v4: Removed WARN_ON() calls in newly added APIs. It's gets called in probe handler.
Caller already takes care of it(Shawn Lin).
---
drivers/mmc/core/sdio_io.c | 21 +++++++++++++++++++++
.../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
include/linux/mmc/sdio_func.h | 3 +++
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
index 78cb4d5..b1ecacc 100644
--- a/drivers/mmc/core/sdio_io.c
+++ b/drivers/mmc/core/sdio_io.c
@@ -720,3 +720,24 @@ int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags)
return 0;
}
EXPORT_SYMBOL_GPL(sdio_set_host_pm_flags);
+
+/**
+ * sdio_get_host_max_seg_size - get host maximum segment size
+ * @func: SDIO function attached to host
+ */
+unsigned int sdio_get_host_max_seg_size(struct sdio_func *func)
+{
+ return func->card->host->max_seg_size;
+}
+EXPORT_SYMBOL_GPL(sdio_get_host_max_seg_size);
+
+/**
+ * sdio_get_host_max_seg_count - get host maximum segment count
+ * @func: SDIO function attached to host
+ */
+unsigned short sdio_get_host_max_seg_count(struct sdio_func *func)
+{
+ return func->card->host->max_segs;
+}
+EXPORT_SYMBOL_GPL(sdio_get_host_max_seg_count);
+
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
index c4b89d2..ba579f4 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
@@ -896,9 +896,9 @@ void brcmf_sdiod_sgtable_alloc(struct brcmf_sdio_dev *sdiodev)
max_blocks = min_t(uint, host->max_blk_count, 511u);
sdiodev->max_request_size = min_t(uint, host->max_req_size,
max_blocks * func->cur_blksize);
- sdiodev->max_segment_count = min_t(uint, host->max_segs,
- SG_MAX_SINGLE_ALLOC);
- sdiodev->max_segment_size = host->max_seg_size;
+ sdiodev->max_segment_count = min_t(uint, SG_MAX_SINGLE_ALLOC,
+ sdio_get_host_max_seg_count(func));
+ sdiodev->max_segment_size = sdio_get_host_max_seg_size(func);
if (!sdiodev->sg_support)
return;
diff --git a/include/linux/mmc/sdio_func.h b/include/linux/mmc/sdio_func.h
index aab032a..b2b91df 100644
--- a/include/linux/mmc/sdio_func.h
+++ b/include/linux/mmc/sdio_func.h
@@ -159,4 +159,7 @@ extern void sdio_f0_writeb(struct sdio_func *func, unsigned char b,
extern mmc_pm_flag_t sdio_get_host_pm_caps(struct sdio_func *func);
extern int sdio_set_host_pm_flags(struct sdio_func *func, mmc_pm_flag_t flags);
+unsigned short sdio_get_host_max_seg_count(struct sdio_func *func);
+unsigned int sdio_get_host_max_seg_size(struct sdio_func *func);
+
#endif /* LINUX_MMC_SDIO_FUNC_H */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 6+ messages in thread* RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
2016-06-16 9:23 Amitkumar Karwar
@ 2016-08-09 10:16 ` Amitkumar Karwar
2017-11-16 13:57 ` Xinming Hu
[not found] ` <1466069006-10757-1-git-send-email-akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
1 sibling, 1 reply; 6+ messages in thread
From: Amitkumar Karwar @ 2016-08-09 10:16 UTC (permalink / raw)
To: Ulf Hansson
Cc: Nishant Sarmukadam, Wei-Ning Huang, linux-mmc@vger.kernel.org,
Cathy Luo, Xinming Hu
Hi Ulf,
> From: Amitkumar Karwar [mailto:akarwar@marvell.com]
> Sent: Thursday, June 16, 2016 2:53 PM
> To: linux-wireless@vger.kernel.org
> Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc@vger.kernel.org; Cathy
> Luo; Xinming Hu; Amitkumar Karwar
> Subject: [PATCH v4 1/2] mmc: API for accessing host supported maximum
> segment count and size
>
> From: Xinming Hu <huxm@marvell.com>
>
> sdio device drivers need be able to get the host supported max_segs and
> max_seg_size, so that they know the buffer size to allocate while
> utilizing the scatter/gather DMA buffer list.
>
> This patch provides API for this purpose.
>
> Signed-off-by: Xinming Hu <huxm@marvell.com>
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> ---
> v2: v2 was submitted with minor improvement like replacing BUG_ON() with
> WARN_ON()
> v3: Addressed below review comments from Ulf Hansson
> a) In v3, patch has been split into two separate patches.
> b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
> c) Replaced WARN_ON() with proper error code when sg_ptr->length is
> invalid
> d) Instead of duplicating the code in mmc_io_rw_extended(), extra
> bool parameter
> has been added to this function and used it in new APIs for SG.
> v4: Removed WARN_ON() calls in newly added APIs. It's gets called in
> probe handler.
> Caller already takes care of it(Shawn Lin).
> ---
> drivers/mmc/core/sdio_io.c | 21
> +++++++++++++++++++++
> .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
> include/linux/mmc/sdio_func.h | 3 +++
> 3 files changed, 27 insertions(+), 3 deletions(-)
>
Please let me know if you have any further review comments for this patch series.
Regards,
Amitkumar
^ permalink raw reply [flat|nested] 6+ messages in thread* RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
2016-08-09 10:16 ` Amitkumar Karwar
@ 2017-11-16 13:57 ` Xinming Hu
2017-11-21 11:44 ` Ulf Hansson
0 siblings, 1 reply; 6+ messages in thread
From: Xinming Hu @ 2017-11-16 13:57 UTC (permalink / raw)
To: Ulf Hansson
Cc: Nishant Sarmukadam, Wei-Ning Huang, linux-mmc@vger.kernel.org,
Cathy Luo, Zhiyuan Yang, Tim Song, Xu (Shanghai) Wang, James Cao,
Ganapathi Bhat
Hi Ulf,
Could you please let us know if you have any further review comments on this patch series.
Regards,
Simon
> -----Original Message-----
> From: Amitkumar Karwar
> Sent: 2016年8月9日 18:16
> To: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Nishant Sarmukadam <nishants@marvell.com>; Wei-Ning Huang
> <wnhuang@chromium.org>; linux-mmc@vger.kernel.org; Cathy Luo
> <cluo@marvell.com>; Xinming Hu <huxm@marvell.com>
> Subject: RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum
> segment count and size
>
> Hi Ulf,
>
> > From: Amitkumar Karwar [mailto:akarwar@marvell.com]
> > Sent: Thursday, June 16, 2016 2:53 PM
> > To: linux-wireless@vger.kernel.org
> > Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc@vger.kernel.org;
> > Cathy Luo; Xinming Hu; Amitkumar Karwar
> > Subject: [PATCH v4 1/2] mmc: API for accessing host supported maximum
> > segment count and size
> >
> > From: Xinming Hu <huxm@marvell.com>
> >
> > sdio device drivers need be able to get the host supported max_segs
> > and max_seg_size, so that they know the buffer size to allocate while
> > utilizing the scatter/gather DMA buffer list.
> >
> > This patch provides API for this purpose.
> >
> > Signed-off-by: Xinming Hu <huxm@marvell.com>
> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> > ---
> > v2: v2 was submitted with minor improvement like replacing BUG_ON()
> > with
> > WARN_ON()
> > v3: Addressed below review comments from Ulf Hansson
> > a) In v3, patch has been split into two separate patches.
> > b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
> > c) Replaced WARN_ON() with proper error code when sg_ptr->length
> > is invalid
> > d) Instead of duplicating the code in mmc_io_rw_extended(), extra
> > bool parameter
> > has been added to this function and used it in new APIs for SG.
> > v4: Removed WARN_ON() calls in newly added APIs. It's gets called in
> > probe handler.
> > Caller already takes care of it(Shawn Lin).
> > ---
> > drivers/mmc/core/sdio_io.c | 21
> > +++++++++++++++++++++
> > .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
> > include/linux/mmc/sdio_func.h | 3 +++
> > 3 files changed, 27 insertions(+), 3 deletions(-)
> >
>
> Please let me know if you have any further review comments for this patch
> series.
>
> Regards,
> Amitkumar
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
2017-11-16 13:57 ` Xinming Hu
@ 2017-11-21 11:44 ` Ulf Hansson
0 siblings, 0 replies; 6+ messages in thread
From: Ulf Hansson @ 2017-11-21 11:44 UTC (permalink / raw)
To: Xinming Hu
Cc: Nishant Sarmukadam, Wei-Ning Huang, linux-mmc@vger.kernel.org,
Cathy Luo, Zhiyuan Yang, Tim Song, Xu (Shanghai) Wang, James Cao,
Ganapathi Bhat
On 16 November 2017 at 14:57, Xinming Hu <huxm@marvell.com> wrote:
> Hi Ulf,
>
> Could you please let us know if you have any further review comments on this patch series.
Seems like this fallen through the cracks.
Would you mind re-posting a re-based series instead? In that way you
hopefully get some more people's attention as well.
Kind regards
Uffe
>
> Regards,
> Simon
>
>> -----Original Message-----
>> From: Amitkumar Karwar
>> Sent: 2016年8月9日 18:16
>> To: Ulf Hansson <ulf.hansson@linaro.org>
>> Cc: Nishant Sarmukadam <nishants@marvell.com>; Wei-Ning Huang
>> <wnhuang@chromium.org>; linux-mmc@vger.kernel.org; Cathy Luo
>> <cluo@marvell.com>; Xinming Hu <huxm@marvell.com>
>> Subject: RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum
>> segment count and size
>>
>> Hi Ulf,
>>
>> > From: Amitkumar Karwar [mailto:akarwar@marvell.com]
>> > Sent: Thursday, June 16, 2016 2:53 PM
>> > To: linux-wireless@vger.kernel.org
>> > Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc@vger.kernel.org;
>> > Cathy Luo; Xinming Hu; Amitkumar Karwar
>> > Subject: [PATCH v4 1/2] mmc: API for accessing host supported maximum
>> > segment count and size
>> >
>> > From: Xinming Hu <huxm@marvell.com>
>> >
>> > sdio device drivers need be able to get the host supported max_segs
>> > and max_seg_size, so that they know the buffer size to allocate while
>> > utilizing the scatter/gather DMA buffer list.
>> >
>> > This patch provides API for this purpose.
>> >
>> > Signed-off-by: Xinming Hu <huxm@marvell.com>
>> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
>> > ---
>> > v2: v2 was submitted with minor improvement like replacing BUG_ON()
>> > with
>> > WARN_ON()
>> > v3: Addressed below review comments from Ulf Hansson
>> > a) In v3, patch has been split into two separate patches.
>> > b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
>> > c) Replaced WARN_ON() with proper error code when sg_ptr->length
>> > is invalid
>> > d) Instead of duplicating the code in mmc_io_rw_extended(), extra
>> > bool parameter
>> > has been added to this function and used it in new APIs for SG.
>> > v4: Removed WARN_ON() calls in newly added APIs. It's gets called in
>> > probe handler.
>> > Caller already takes care of it(Shawn Lin).
>> > ---
>> > drivers/mmc/core/sdio_io.c | 21
>> > +++++++++++++++++++++
>> > .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
>> > include/linux/mmc/sdio_func.h | 3 +++
>> > 3 files changed, 27 insertions(+), 3 deletions(-)
>> >
>>
>> Please let me know if you have any further review comments for this patch
>> series.
>>
>> Regards,
>> Amitkumar
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <1466069006-10757-1-git-send-email-akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>]
* RE: [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size
[not found] ` <1466069006-10757-1-git-send-email-akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
@ 2016-12-22 9:09 ` Amitkumar Karwar
0 siblings, 0 replies; 6+ messages in thread
From: Amitkumar Karwar @ 2016-12-22 9:09 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ulf Hansson
Cc: Nishant Sarmukadam, Wei-Ning Huang,
linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Cathy Luo,
Xinming Hu
Hi Ulf,
> From: Amitkumar Karwar [mailto:akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org]
> Sent: Thursday, June 16, 2016 2:53 PM
> To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> Cc: Nishant Sarmukadam; Wei-Ning Huang; linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org;
> Cathy Luo; Xinming Hu; Amitkumar Karwar
> Subject: [PATCH v4 1/2] mmc: API for accessing host supported maximum
> segment count and size
>
> From: Xinming Hu <huxm-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
>
> sdio device drivers need be able to get the host supported max_segs and
> max_seg_size, so that they know the buffer size to allocate while
> utilizing the scatter/gather DMA buffer list.
>
> This patch provides API for this purpose.
>
> Signed-off-by: Xinming Hu <huxm-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> Signed-off-by: Amitkumar Karwar <akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
> ---
> v2: v2 was submitted with minor improvement like replacing BUG_ON()
> with WARN_ON()
> v3: Addressed below review comments from Ulf Hansson
> a) In v3, patch has been split into two separate patches.
> b) Patch 1/2 introduces an API to fetch max_seg_size and max_segs
> c) Replaced WARN_ON() with proper error code when sg_ptr->length is
> invalid
> d) Instead of duplicating the code in mmc_io_rw_extended(), extra
> bool parameter
> has been added to this function and used it in new APIs for SG.
> v4: Removed WARN_ON() calls in newly added APIs. It's gets called in
> probe handler.
> Caller already takes care of it(Shawn Lin).
> ---
> drivers/mmc/core/sdio_io.c | 21
> +++++++++++++++++++++
> .../wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c | 6 +++---
> include/linux/mmc/sdio_func.h | 3 +++
> 3 files changed, 27 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/sdio_io.c b/drivers/mmc/core/sdio_io.c
> index 78cb4d5..b1ecacc 100644
> --- a/drivers/mmc/core/sdio_io.c
> +++ b/drivers/mmc/core/sdio_io.c
> @@ -720,3 +720,24 @@ int sdio_set_host_pm_flags(struct sdio_func *func,
> mmc_pm_flag_t flags)
> return 0;
> }
> EXPORT_SYMBOL_GPL(sdio_set_host_pm_flags);
> +
> +/**
> + * sdio_get_host_max_seg_size - get host maximum segment size
> + * @func: SDIO function attached to host
> + */
> +unsigned int sdio_get_host_max_seg_size(struct sdio_func *func) {
> + return func->card->host->max_seg_size; }
> +EXPORT_SYMBOL_GPL(sdio_get_host_max_seg_size);
> +
> +/**
> + * sdio_get_host_max_seg_count - get host maximum segment count
> + * @func: SDIO function attached to host
> + */
> +unsigned short sdio_get_host_max_seg_count(struct sdio_func *func) {
> + return func->card->host->max_segs;
> +}
> +EXPORT_SYMBOL_GPL(sdio_get_host_max_seg_count);
> +
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
> b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
> index c4b89d2..ba579f4 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcmsdh.c
> @@ -896,9 +896,9 @@ void brcmf_sdiod_sgtable_alloc(struct
> brcmf_sdio_dev *sdiodev)
> max_blocks = min_t(uint, host->max_blk_count, 511u);
> sdiodev->max_request_size = min_t(uint, host->max_req_size,
> max_blocks * func->cur_blksize);
> - sdiodev->max_segment_count = min_t(uint, host->max_segs,
> - SG_MAX_SINGLE_ALLOC);
> - sdiodev->max_segment_size = host->max_seg_size;
> + sdiodev->max_segment_count = min_t(uint, SG_MAX_SINGLE_ALLOC,
> + sdio_get_host_max_seg_count(func));
> + sdiodev->max_segment_size = sdio_get_host_max_seg_size(func);
>
> if (!sdiodev->sg_support)
> return;
> diff --git a/include/linux/mmc/sdio_func.h
> b/include/linux/mmc/sdio_func.h index aab032a..b2b91df 100644
> --- a/include/linux/mmc/sdio_func.h
> +++ b/include/linux/mmc/sdio_func.h
> @@ -159,4 +159,7 @@ extern void sdio_f0_writeb(struct sdio_func *func,
> unsigned char b, extern mmc_pm_flag_t sdio_get_host_pm_caps(struct
> sdio_func *func); extern int sdio_set_host_pm_flags(struct sdio_func
> *func, mmc_pm_flag_t flags);
>
> +unsigned short sdio_get_host_max_seg_count(struct sdio_func *func);
> +unsigned int sdio_get_host_max_seg_size(struct sdio_func *func);
> +
> #endif /* LINUX_MMC_SDIO_FUNC_H */
This has been pending for a while.
Any further review comments on this v4 patch series?
Regards,
Amitkumar Karwar
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-22 0:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-22 0:52 [PATCH v4 1/2] mmc: API for accessing host supported maximum segment count and size Xu (Shanghai) Wang
-- strict thread matches above, loose matches on Subject: below --
2016-06-16 9:23 Amitkumar Karwar
2016-08-09 10:16 ` Amitkumar Karwar
2017-11-16 13:57 ` Xinming Hu
2017-11-21 11:44 ` Ulf Hansson
[not found] ` <1466069006-10757-1-git-send-email-akarwar-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2016-12-22 9:09 ` Amitkumar Karwar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox