Commit ac13d6d8 authored by Rick Farrington's avatar Rick Farrington Committed by David S. Miller

liquidio: fix hang when re-binding VF host drv after running DPDK VF driver

When configuring SLI_PKTn_OUTPUT_CONTROL, VF driver was assuming that IPTR
mode was disabled by reset, which was not true.  Since DPDK driver had
set IPTR mode previously, the VF driver (which uses buf-ptr-only mode) was
not properly handling DROQ packets (i.e. it saw zero-length packets).

This represented an invalid hardware configuration which the driver could
not handle.
Signed-off-by: default avatarRick Farrington <ricardo.farrington@cavium.com>
Signed-off-by: default avatarFelix Manlunas <felix.manlunas@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7e2bc7fb
......@@ -493,6 +493,9 @@ static void cn23xx_pf_setup_global_output_regs(struct octeon_device *oct)
for (q_no = srn; q_no < ern; q_no++) {
reg_val = octeon_read_csr(oct, CN23XX_SLI_OQ_PKT_CONTROL(q_no));
/* clear IPTR */
reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
/* set DPTR */
reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
......
......@@ -165,6 +165,9 @@ static void cn23xx_vf_setup_global_output_regs(struct octeon_device *oct)
reg_val =
octeon_read_csr(oct, CN23XX_VF_SLI_OQ_PKT_CONTROL(q_no));
/* clear IPTR */
reg_val &= ~CN23XX_PKT_OUTPUT_CTL_IPTR;
/* set DPTR */
reg_val |= CN23XX_PKT_OUTPUT_CTL_DPTR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment