diff options
author | Igal Liberman <igal.liberman@freescale.com> | 2016-03-13 21:14:43 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-03-14 15:03:10 -0400 |
commit | 7c82a7b998c6c6a2cb8a42aeb1d5d3450e51afb3 (patch) | |
tree | f24156182aa40fa3943ae5c3f9baafc5047c9319 /drivers/net/ethernet/freescale/fman/fman_dtsec.c | |
parent | 387178ec26332e2a35529a716ff3e83a3a457fca (diff) | |
download | linux-7c82a7b998c6c6a2cb8a42aeb1d5d3450e51afb3.tar.bz2 |
fsl/fman: fix dtsec_set_tx_pause_frames
Fix a bug introduced in e06a03b (fsl/fman: fix the pause_time test)
When pause_time is set to '0' - pause frames are disabled and
there's no need to apply dTSEC-A003 Errata workaround.
Signed-off-by: Igal Liberman <igal.liberman@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale/fman/fman_dtsec.c')
-rw-r--r-- | drivers/net/ethernet/freescale/fman/fman_dtsec.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/fman/fman_dtsec.c b/drivers/net/ethernet/freescale/fman/fman_dtsec.c index 7c92eb854925..c88918c4c5f3 100644 --- a/drivers/net/ethernet/freescale/fman/fman_dtsec.c +++ b/drivers/net/ethernet/freescale/fman/fman_dtsec.c @@ -932,15 +932,14 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec, if (!is_init_done(dtsec->dtsec_drv_param)) return -EINVAL; - /* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */ - if (dtsec->fm_rev_info.major == 2) - if (pause_time <= 320) { + if (pause_time) { + /* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */ + if (dtsec->fm_rev_info.major == 2 && pause_time <= 320) { pr_warn("pause-time: %d illegal.Should be > 320\n", pause_time); return -EINVAL; } - if (pause_time) { ptv = ioread32be(®s->ptv); ptv &= PTV_PTE_MASK; ptv |= pause_time & PTV_PT_MASK; |