From: Hyong Youb Kim Date: Wed, 4 Apr 2018 23:54:50 +0000 (-0700) Subject: net/enic: do not flush descriptor cache when opening vNIC X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=fe26a3bb33062799774b0de2f9e13147faf72405;p=dpdk.git net/enic: do not flush descriptor cache when opening vNIC The firmware on new hardware models flushes the global descriptor cache by default. Use CMD_OPENF_IG_DESCCACHE to avoid cache flushing. This flag has no effect on older models. Suggested-by: Govindarajulu Varadarajan Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- diff --git a/drivers/net/enic/base/vnic_devcmd.h b/drivers/net/enic/base/vnic_devcmd.h index 6b95bc488b..a63624559a 100644 --- a/drivers/net/enic/base/vnic_devcmd.h +++ b/drivers/net/enic/base/vnic_devcmd.h @@ -600,6 +600,7 @@ enum filter_cap_mode { /* flags for CMD_OPEN */ #define CMD_OPENF_OPROM 0x1 /* open coming from option rom */ +#define CMD_OPENF_IG_DESCCACHE 0x2 /* Do not flush IG DESC cache */ /* flags for CMD_INIT */ #define CMD_INITF_DEFAULT_MAC 0x1 /* init with default mac addr */ diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c index 94e8e68452..aaada8864b 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -982,9 +982,10 @@ static int enic_dev_wait(struct vnic_dev *vdev, static int enic_dev_open(struct enic *enic) { int err; + int flags = CMD_OPENF_IG_DESCCACHE; err = enic_dev_wait(enic->vdev, vnic_dev_open, - vnic_dev_open_done, 0); + vnic_dev_open_done, flags); if (err) dev_err(enic_get_dev(enic), "vNIC device open failed, err %d\n", err);