• Sukadev Bhattiprolu's avatar
    ibmvnic: init init_done_rc earlier · ae16bf15
    Sukadev Bhattiprolu authored
    We currently initialize the ->init_done completion/return code fields
    before issuing a CRQ_INIT command. But if we get a transport event soon
    after registering the CRQ the taskslet may already have recorded the
    completion and error code. If we initialize here, we might overwrite/
    lose that and end up issuing the CRQ_INIT only to timeout later.
    
    If that timeout happens during probe, we will leave the adapter in the
    DOWN state rather than retrying to register/init the CRQ.
    
    Initialize the completion before registering the CRQ so we don't lose
    the notification.
    
    Fixes: 032c5e82 ("Driver for IBM System i/p VNIC protocol")
    Signed-off-by: default avatarSukadev Bhattiprolu <sukadev@linux.ibm.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ae16bf15
ibmvnic.c 165 KB