* [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.
@ 2013-08-28 5:40 Sonic Zhang
2013-08-28 9:17 ` Giuseppe CAVALLARO
2013-08-28 9:17 ` Giuseppe CAVALLARO
0 siblings, 2 replies; 4+ messages in thread
From: Sonic Zhang @ 2013-08-28 5:40 UTC (permalink / raw)
To: Giuseppe Cavallaro, netdev; +Cc: adi-buildroot-devel, Sonic Zhang
From: Sonic Zhang <sonic.zhang@analog.com>
Some synopsys ip implementation doesn't support DMA store and forward mode,
such as BF60x. So, set force_thresh_dma_mode to use DMA thresholds only.
Update document and devicetree as well.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
---
Documentation/devicetree/bindings/net/stmmac.txt | 2 ++
Documentation/networking/stmmac.txt | 3 +++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++-
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
include/linux/stmmac.h | 1 +
5 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
index 261c563..56fbcb5 100644
--- a/Documentation/devicetree/bindings/net/stmmac.txt
+++ b/Documentation/devicetree/bindings/net/stmmac.txt
@@ -22,6 +22,8 @@ Required properties:
- snps,pbl Programmable Burst Length
- snps,fixed-burst Program the DMA to use the fixed burst mode
- snps,mixed-burst Program the DMA to use the mixed burst mode
+- snps,force_thresh_dma_mode Force DMA to use the Shreshold mode other than
+ the Store and Forward mode.
Optional properties:
- mac-address: 6 bytes, mac address
diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
index 654d2e5..457b8bb 100644
--- a/Documentation/networking/stmmac.txt
+++ b/Documentation/networking/stmmac.txt
@@ -123,6 +123,7 @@ struct plat_stmmacenet_data {
int bugged_jumbo;
int pmt;
int force_sf_dma_mode;
+ int force_thresh_dma_mode;
int riwt_off;
void (*fix_mac_speed)(void *priv, unsigned int speed);
void (*bus_setup)(void __iomem *ioaddr);
@@ -159,6 +160,8 @@ Where:
o pmt: core has the embedded power module (optional).
o force_sf_dma_mode: force DMA to use the Store and Forward mode
instead of the Threshold.
+ o force_thresh_dma_mode: force DMA to use the Shreshold mode other than
+ the Store and Forward mode.
o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode.
o fix_mac_speed: this callback is used for modifying some syscfg registers
(on ST SoCs) according to the link speed negotiated by the
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index be40691..8d4ccd3 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -1224,7 +1224,9 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
*/
static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
{
- if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
+ if (priv->plat->force_thresh_dma_mode)
+ priv->hw->dma->dma_mode(priv->ioaddr, tc, tc);
+ else if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
/*
* In case of GMAC, SF mode can be enabled
* to perform the TX COE in HW. This depends on:
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
index da8be6e..865c944 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
@@ -79,6 +79,9 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl);
dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst");
dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
+ plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
+ if (plat->force_thresh_dma_mode)
+ plat->force_sf_dma_mode = 0;
return 0;
}
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index 9e495d31..bb5deb0 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -108,6 +108,7 @@ struct plat_stmmacenet_data {
int bugged_jumbo;
int pmt;
int force_sf_dma_mode;
+ int force_thresh_dma_mode;
int riwt_off;
void (*fix_mac_speed)(void *priv, unsigned int speed);
void (*bus_setup)(void __iomem *ioaddr);
--
1.8.2.3
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.
2013-08-28 5:40 [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set Sonic Zhang
@ 2013-08-28 9:17 ` Giuseppe CAVALLARO
2013-08-28 9:17 ` Giuseppe CAVALLARO
1 sibling, 0 replies; 4+ messages in thread
From: Giuseppe CAVALLARO @ 2013-08-28 9:17 UTC (permalink / raw)
To: Sonic Zhang; +Cc: netdev, adi-buildroot-devel, Sonic Zhang
hello some comments below
On 8/28/2013 7:40 AM, Sonic Zhang wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> Some synopsys ip implementation doesn't support DMA store and forward mode,
> such as BF60x. So, set force_thresh_dma_mode to use DMA thresholds only.
> Update document and devicetree as well.
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
> Documentation/devicetree/bindings/net/stmmac.txt | 2 ++
> Documentation/networking/stmmac.txt | 3 +++
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++-
> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
> include/linux/stmmac.h | 1 +
> 5 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
> index 261c563..56fbcb5 100644
> --- a/Documentation/devicetree/bindings/net/stmmac.txt
> +++ b/Documentation/devicetree/bindings/net/stmmac.txt
> @@ -22,6 +22,8 @@ Required properties:
> - snps,pbl Programmable Burst Length
> - snps,fixed-burst Program the DMA to use the fixed burst mode
> - snps,mixed-burst Program the DMA to use the mixed burst mode
> +- snps,force_thresh_dma_mode Force DMA to use the Shreshold mode other than
^^^^^^^^^ typo
> + the Store and Forward mode.
if we use this approach you should document that the
force_thresh_dma_mode and force_sf_dma_mode will force the mode for both
tx and rx.
I am wondering now what happens if these are passed together from the
platform? is your code covering this scenario?
we could have a unique force_dma_mode that can be:
rx_force_threshold
tx_force_threshold
rx_force_sf
tx_force_sf
( these can be defined in the stmmac.h platform header )
but this an impact on all the platforms that already use the
force_sf_dma_mode as we said
In this case you should fix this and maybe the patch should be for
net-next (add it in the subject next time).
>
> Optional properties:
> - mac-address: 6 bytes, mac address
> diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
> index 654d2e5..457b8bb 100644
> --- a/Documentation/networking/stmmac.txt
> +++ b/Documentation/networking/stmmac.txt
> @@ -123,6 +123,7 @@ struct plat_stmmacenet_data {
> int bugged_jumbo;
> int pmt;
> int force_sf_dma_mode;
> + int force_thresh_dma_mode;
> int riwt_off;
> void (*fix_mac_speed)(void *priv, unsigned int speed);
> void (*bus_setup)(void __iomem *ioaddr);
> @@ -159,6 +160,8 @@ Where:
> o pmt: core has the embedded power module (optional).
> o force_sf_dma_mode: force DMA to use the Store and Forward mode
> instead of the Threshold.
> + o force_thresh_dma_mode: force DMA to use the Shreshold mode other than
> + the Store and Forward mode.
> o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode.
> o fix_mac_speed: this callback is used for modifying some syscfg registers
> (on ST SoCs) according to the link speed negotiated by the
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index be40691..8d4ccd3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1224,7 +1224,9 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
> */
> static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
> {
> - if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
> + if (priv->plat->force_thresh_dma_mode)
> + priv->hw->dma->dma_mode(priv->ioaddr, tc, tc);
> + else if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
> /*
> * In case of GMAC, SF mode can be enabled
> * to perform the TX COE in HW. This depends on:
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index da8be6e..865c944 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -79,6 +79,9 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
> of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl);
> dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst");
> dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
> + plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
> + if (plat->force_thresh_dma_mode)
> + plat->force_sf_dma_mode = 0;
>
> return 0;
> }
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 9e495d31..bb5deb0 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -108,6 +108,7 @@ struct plat_stmmacenet_data {
> int bugged_jumbo;
> int pmt;
> int force_sf_dma_mode;
> + int force_thresh_dma_mode;
> int riwt_off;
> void (*fix_mac_speed)(void *priv, unsigned int speed);
> void (*bus_setup)(void __iomem *ioaddr);
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.
2013-08-28 5:40 [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set Sonic Zhang
2013-08-28 9:17 ` Giuseppe CAVALLARO
@ 2013-08-28 9:17 ` Giuseppe CAVALLARO
2013-08-28 10:25 ` Sonic Zhang
1 sibling, 1 reply; 4+ messages in thread
From: Giuseppe CAVALLARO @ 2013-08-28 9:17 UTC (permalink / raw)
To: Sonic Zhang; +Cc: netdev, adi-buildroot-devel, Sonic Zhang
hello some comments below
On 8/28/2013 7:40 AM, Sonic Zhang wrote:
> From: Sonic Zhang <sonic.zhang@analog.com>
>
> Some synopsys ip implementation doesn't support DMA store and forward mode,
> such as BF60x. So, set force_thresh_dma_mode to use DMA thresholds only.
> Update document and devicetree as well.
>
> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
> ---
> Documentation/devicetree/bindings/net/stmmac.txt | 2 ++
> Documentation/networking/stmmac.txt | 3 +++
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++-
> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
> include/linux/stmmac.h | 1 +
> 5 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
> index 261c563..56fbcb5 100644
> --- a/Documentation/devicetree/bindings/net/stmmac.txt
> +++ b/Documentation/devicetree/bindings/net/stmmac.txt
> @@ -22,6 +22,8 @@ Required properties:
> - snps,pbl Programmable Burst Length
> - snps,fixed-burst Program the DMA to use the fixed burst mode
> - snps,mixed-burst Program the DMA to use the mixed burst mode
> +- snps,force_thresh_dma_mode Force DMA to use the Shreshold mode other than
^^^^^^^^^ typo
> + the Store and Forward mode.
if we use this approach you should document that the
force_thresh_dma_mode and force_sf_dma_mode will force the mode for both
tx and rx.
I am wondering now what happens if these are passed together from the
platform? is your code covering this scenario?
we could have a unique force_dma_mode that can be:
rx_force_threshold
tx_force_threshold
rx_force_sf
tx_force_sf
( these can be defined in the stmmac.h platform header )
but this an impact on all the platforms that already use the
force_sf_dma_mode as we said
In this case you should fix this and maybe the patch should be for
net-next (add it in the subject next time).
peppe
>
> Optional properties:
> - mac-address: 6 bytes, mac address
> diff --git a/Documentation/networking/stmmac.txt b/Documentation/networking/stmmac.txt
> index 654d2e5..457b8bb 100644
> --- a/Documentation/networking/stmmac.txt
> +++ b/Documentation/networking/stmmac.txt
> @@ -123,6 +123,7 @@ struct plat_stmmacenet_data {
> int bugged_jumbo;
> int pmt;
> int force_sf_dma_mode;
> + int force_thresh_dma_mode;
> int riwt_off;
> void (*fix_mac_speed)(void *priv, unsigned int speed);
> void (*bus_setup)(void __iomem *ioaddr);
> @@ -159,6 +160,8 @@ Where:
> o pmt: core has the embedded power module (optional).
> o force_sf_dma_mode: force DMA to use the Store and Forward mode
> instead of the Threshold.
> + o force_thresh_dma_mode: force DMA to use the Shreshold mode other than
> + the Store and Forward mode.
> o riwt_off: force to disable the RX watchdog feature and switch to NAPI mode.
> o fix_mac_speed: this callback is used for modifying some syscfg registers
> (on ST SoCs) according to the link speed negotiated by the
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index be40691..8d4ccd3 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1224,7 +1224,9 @@ static void free_dma_desc_resources(struct stmmac_priv *priv)
> */
> static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
> {
> - if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
> + if (priv->plat->force_thresh_dma_mode)
> + priv->hw->dma->dma_mode(priv->ioaddr, tc, tc);
> + else if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
> /*
> * In case of GMAC, SF mode can be enabled
> * to perform the TX COE in HW. This depends on:
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> index da8be6e..865c944 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
> @@ -79,6 +79,9 @@ static int stmmac_probe_config_dt(struct platform_device *pdev,
> of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl);
> dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst");
> dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
> + plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
> + if (plat->force_thresh_dma_mode)
> + plat->force_sf_dma_mode = 0;
>
> return 0;
> }
> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
> index 9e495d31..bb5deb0 100644
> --- a/include/linux/stmmac.h
> +++ b/include/linux/stmmac.h
> @@ -108,6 +108,7 @@ struct plat_stmmacenet_data {
> int bugged_jumbo;
> int pmt;
> int force_sf_dma_mode;
> + int force_thresh_dma_mode;
> int riwt_off;
> void (*fix_mac_speed)(void *priv, unsigned int speed);
> void (*bus_setup)(void __iomem *ioaddr);
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set.
2013-08-28 9:17 ` Giuseppe CAVALLARO
@ 2013-08-28 10:25 ` Sonic Zhang
0 siblings, 0 replies; 4+ messages in thread
From: Sonic Zhang @ 2013-08-28 10:25 UTC (permalink / raw)
To: Giuseppe CAVALLARO; +Cc: netdev, adi-buildroot-devel, Sonic Zhang
Hi Peppe,
On Wed, Aug 28, 2013 at 5:17 PM, Giuseppe CAVALLARO
<peppe.cavallaro@st.com> wrote:
> hello some comments below
>
> On 8/28/2013 7:40 AM, Sonic Zhang wrote:
>>
>> From: Sonic Zhang <sonic.zhang@analog.com>
>>
>> Some synopsys ip implementation doesn't support DMA store and forward
>> mode,
>> such as BF60x. So, set force_thresh_dma_mode to use DMA thresholds only.
>> Update document and devicetree as well.
>>
>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>> ---
>> Documentation/devicetree/bindings/net/stmmac.txt | 2 ++
>> Documentation/networking/stmmac.txt | 3 +++
>> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 +++-
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 3 +++
>> include/linux/stmmac.h | 1 +
>> 5 files changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt
>> b/Documentation/devicetree/bindings/net/stmmac.txt
>> index 261c563..56fbcb5 100644
>> --- a/Documentation/devicetree/bindings/net/stmmac.txt
>> +++ b/Documentation/devicetree/bindings/net/stmmac.txt
>> @@ -22,6 +22,8 @@ Required properties:
>> - snps,pbl Programmable Burst Length
>> - snps,fixed-burst Program the DMA to use the fixed burst mode
>> - snps,mixed-burst Program the DMA to use the mixed burst mode
>> +- snps,force_thresh_dma_mode Force DMA to use the Shreshold mode other
>> than
>
>
> ^^^^^^^^^ typo
>
>
>
>> + the Store and Forward mode.
>
>
> if we use this approach you should document that the force_thresh_dma_mode
> and force_sf_dma_mode will force the mode for both tx and rx.
OK
>
> I am wondering now what happens if these are passed together from the
> platform? is your code covering this scenario?
Yes, in case both are set, I unset flag force_sf_dma_mode. So, only
force_thresh_dma_mode takes effect.
>
> we could have a unique force_dma_mode that can be:
>
> rx_force_threshold
> tx_force_threshold
> rx_force_sf
> tx_force_sf
> ( these can be defined in the stmmac.h platform header )
>
> but this an impact on all the platforms that already use the
> force_sf_dma_mode as we said
So, I prefer current 2-flag solution.
>
> In this case you should fix this and maybe the patch should be for net-next
> (add it in the subject next time).
I will add "for net-next" to the subject.
>
> peppe
>
>
>>
>> Optional properties:
>> - mac-address: 6 bytes, mac address
>> diff --git a/Documentation/networking/stmmac.txt
>> b/Documentation/networking/stmmac.txt
>> index 654d2e5..457b8bb 100644
>> --- a/Documentation/networking/stmmac.txt
>> +++ b/Documentation/networking/stmmac.txt
>> @@ -123,6 +123,7 @@ struct plat_stmmacenet_data {
>> int bugged_jumbo;
>> int pmt;
>> int force_sf_dma_mode;
>> + int force_thresh_dma_mode;
>> int riwt_off;
>> void (*fix_mac_speed)(void *priv, unsigned int speed);
>> void (*bus_setup)(void __iomem *ioaddr);
>> @@ -159,6 +160,8 @@ Where:
>> o pmt: core has the embedded power module (optional).
>> o force_sf_dma_mode: force DMA to use the Store and Forward mode
>> instead of the Threshold.
>> + o force_thresh_dma_mode: force DMA to use the Shreshold mode other than
>> + the Store and Forward mode.
>> o riwt_off: force to disable the RX watchdog feature and switch to NAPI
>> mode.
>> o fix_mac_speed: this callback is used for modifying some syscfg
>> registers
>> (on ST SoCs) according to the link speed negotiated by
>> the
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index be40691..8d4ccd3 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -1224,7 +1224,9 @@ static void free_dma_desc_resources(struct
>> stmmac_priv *priv)
>> */
>> static void stmmac_dma_operation_mode(struct stmmac_priv *priv)
>> {
>> - if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
>> + if (priv->plat->force_thresh_dma_mode)
>> + priv->hw->dma->dma_mode(priv->ioaddr, tc, tc);
>> + else if (priv->plat->force_sf_dma_mode || priv->plat->tx_coe) {
>> /*
>> * In case of GMAC, SF mode can be enabled
>> * to perform the TX COE in HW. This depends on:
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> index da8be6e..865c944 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
>> @@ -79,6 +79,9 @@ static int stmmac_probe_config_dt(struct platform_device
>> *pdev,
>> of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl);
>> dma_cfg->fixed_burst = of_property_read_bool(np,
>> "snps,fixed-burst");
>> dma_cfg->mixed_burst = of_property_read_bool(np,
>> "snps,mixed-burst");
>> + plat->force_thresh_dma_mode = of_property_read_bool(np,
>> "snps,force_thresh_dma_mode");
>> + if (plat->force_thresh_dma_mode)
>> + plat->force_sf_dma_mode = 0;
>>
>> return 0;
>> }
>> diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
>> index 9e495d31..bb5deb0 100644
>> --- a/include/linux/stmmac.h
>> +++ b/include/linux/stmmac.h
>> @@ -108,6 +108,7 @@ struct plat_stmmacenet_data {
>> int bugged_jumbo;
>> int pmt;
>> int force_sf_dma_mode;
>> + int force_thresh_dma_mode;
>> int riwt_off;
>> void (*fix_mac_speed)(void *priv, unsigned int speed);
>> void (*bus_setup)(void __iomem *ioaddr);
>>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-28 10:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 5:40 [PATCH v3] driver:net:stmmac: Disable DMA store and forward mode if platform data force_thresh_dma_mode is set Sonic Zhang
2013-08-28 9:17 ` Giuseppe CAVALLARO
2013-08-28 9:17 ` Giuseppe CAVALLARO
2013-08-28 10:25 ` Sonic Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).