Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ixgbe: do not clear FCoE DDP error status for received ABTS

The ddp->err is initialized to be 1 to make sure outstanding DDP context is
guaranteed to be invalidated when HW is not auto-invalidating it. However,
in case of receiving ABTS response for a DDPed I/O, the ddp->err was cleared,
bypassing the invalidating of the DDP context from upper protocol stack when
ixgbe_fcoe_ddp_put() is called. This bug is fixed here by updating the error
only when FCP_RSP is received.

Signed-off-by: Yi Zou <yi.zou@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

authored by

Yi Zou and committed by
Jeff Kirsher
7aba7b07 b32c8dcc

+2 -2
+2 -2
drivers/net/ixgbe/ixgbe_fcoe.c
··· 416 416 if (!ddp->udl) 417 417 goto ddp_out; 418 418 419 - ddp->err = (fcerr | fceofe); 420 - if (ddp->err) 419 + if (fcerr | fceofe) 421 420 goto ddp_out; 422 421 423 422 fcstat = (sterr & IXGBE_RXDADV_STAT_FCSTAT); ··· 427 428 if (fcstat == IXGBE_RXDADV_STAT_FCSTAT_FCPRSP) { 428 429 pci_unmap_sg(adapter->pdev, ddp->sgl, 429 430 ddp->sgc, DMA_FROM_DEVICE); 431 + ddp->err = (fcerr | fceofe); 430 432 ddp->sgl = NULL; 431 433 ddp->sgc = 0; 432 434 }