ibmvnic: send_login should check for crq errors
authorDany Madden <drt@linux.ibm.com>
Thu, 26 Nov 2020 00:04:30 +0000 (18:04 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Dec 2020 09:58:27 +0000 (10:58 +0100)
commit0d111ed75df2dc5fdc3ff78876655473013f5f73
tree4bd2289da1a4a7cde8b1712b417d9355e4ca6778
parent9b76cafbf27a5024f160367fa4492846336906ed
ibmvnic: send_login should check for crq errors

[ Upstream commit c98d9cc4170da7e16a1012563d0f9fbe1c7cfe27 ]

send_login() does not check for the result of ibmvnic_send_crq() of the
login request. This results in the driver needlessly retrying the login
10 times even when CRQ is no longer active. Check the return code and
give up in case of errors in sending the CRQ.

The only time we want to retry is if we get a PARITALSUCCESS response
from the partner.

Fixes: 032c5e82847a2 ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Dany Madden <drt@linux.ibm.com>
Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/ibm/ibmvnic.c