Skip to content

Commit 7c82a7b

Browse files
Igal Libermandavem330
authored andcommitted
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>
1 parent 387178e commit 7c82a7b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/net/ethernet/freescale/fman/fman_dtsec.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -932,15 +932,14 @@ int dtsec_set_tx_pause_frames(struct fman_mac *dtsec,
932932
if (!is_init_done(dtsec->dtsec_drv_param))
933933
return -EINVAL;
934934

935-
/* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */
936-
if (dtsec->fm_rev_info.major == 2)
937-
if (pause_time <= 320) {
935+
if (pause_time) {
936+
/* FM_BAD_TX_TS_IN_B_2_B_ERRATA_DTSEC_A003 Errata workaround */
937+
if (dtsec->fm_rev_info.major == 2 && pause_time <= 320) {
938938
pr_warn("pause-time: %d illegal.Should be > 320\n",
939939
pause_time);
940940
return -EINVAL;
941941
}
942942

943-
if (pause_time) {
944943
ptv = ioread32be(&regs->ptv);
945944
ptv &= PTV_PTE_MASK;
946945
ptv |= pause_time & PTV_PT_MASK;

0 commit comments

Comments
 (0)