net/enic: enable RQ first and then post Rx buffers
authorHyong Youb Kim <hyonkim@cisco.com>
Thu, 3 May 2018 19:37:08 +0000 (12:37 -0700)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 14 May 2018 21:31:50 +0000 (22:31 +0100)
commita74629cfa3a1d5cfa2c4e59366f3de343b8f9dd6
treece0416f8735f57108b69fb2a75c55d160097226f
parent12ecb2f63b1288df2857567896ccb7a4dc3aeab2
net/enic: enable RQ first and then post Rx buffers

Future VIC adapters may require that the driver enable RQ before
posting new buffers to the NIC. So split enic_alloc_rx_queue_mbufs()
into two functions, one that allocates buffers and fills RQ and the
other that posts them (i.e. PIO write to a doorbell). And, call the
post function only after enabling RQ.

Currently released models are not affected by this change, as they
work fine whether the driver posts buffers before or after enabling RQ.

Signed-off-by: Hyong Youb Kim <hyonkim@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Reviewed-by: Aaron Conole <aconole@redhat.com>
drivers/net/enic/base/vnic_rq.h
drivers/net/enic/enic_main.c