netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe
@ 2017-06-20 21:21 Nathan Fontenot
  2017-06-21 19:39 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Fontenot @ 2017-06-20 21:21 UTC (permalink / raw)
  To: netdev; +Cc: jallen, tlfalcon

Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec)

The update to ibmvnic_init to allow an EAGAIN return code broke
the calling of ibmvnic_init from ibmvnic_probe. The code now
will return from this point in the probe routine if anything
other than EAGAIN is returned. The check should be to see if rc
is non-zero and not equal to EAGAIN.

Without this fix, the vNIC driver can return 0 (success) from
its probe routine due to ibmvnic_init returning zero, but before
completing the probe process and registering with the netdev layer.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
---
 drivers/net/ethernet/ibm/ibmvnic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 722daf5..4e17217 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -3737,7 +3737,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)
 
 	do {
 		rc = ibmvnic_init(adapter);
-		if (rc != EAGAIN) {
+		if (rc && rc != EAGAIN) {
 			free_netdev(netdev);
 			return rc;
 		}

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe
  2017-06-20 21:21 [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe Nathan Fontenot
@ 2017-06-21 19:39 ` David Miller
  2017-06-21 19:48   ` Nathan Fontenot
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2017-06-21 19:39 UTC (permalink / raw)
  To: nfont; +Cc: netdev, jallen, tlfalcon

From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date: Tue, 20 Jun 2017 17:21:54 -0400

> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec)

I'm incredibly curious where you got the idea to put the Fixes: tag
at the beginning of the commit message.

Have you seen anyone else submitting patches on netdev do this?

It helps to operate by example, and look at how other people do
things.

The correct location for the Fixes: tag is at the beginning of the
singoffs and acks at the end of the commit message.

There shall be no empty lines between the Fixes: tag and those
signoffs and acks.

Thank you.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe
  2017-06-21 19:39 ` David Miller
@ 2017-06-21 19:48   ` Nathan Fontenot
  2017-06-21 19:52     ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Nathan Fontenot @ 2017-06-21 19:48 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, jallen, tlfalcon

On 06/21/2017 02:39 PM, David Miller wrote:
> From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
> Date: Tue, 20 Jun 2017 17:21:54 -0400
> 
>> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec)
> 
> I'm incredibly curious where you got the idea to put the Fixes: tag
> at the beginning of the commit message.

I have no excuse. As you mentioned I should have looked at what others
had done when using the Fixes.

Would you like me to re-send with the Fixes tag corrected?

-Nathan

> 
> Have you seen anyone else submitting patches on netdev do this?
> 
> It helps to operate by example, and look at how other people do
> things.
> 
> The correct location for the Fixes: tag is at the beginning of the
> singoffs and acks at the end of the commit message.
> 
> There shall be no empty lines between the Fixes: tag and those
> signoffs and acks.
> 
> Thank you.
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe
  2017-06-21 19:48   ` Nathan Fontenot
@ 2017-06-21 19:52     ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-06-21 19:52 UTC (permalink / raw)
  To: nfont; +Cc: netdev, jallen, tlfalcon

From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Date: Wed, 21 Jun 2017 14:48:06 -0500

> On 06/21/2017 02:39 PM, David Miller wrote:
>> From: Nathan Fontenot <nfont@linux.vnet.ibm.com>
>> Date: Tue, 20 Jun 2017 17:21:54 -0400
>> 
>>> Fixes: 6a2fb0e99f9c (ibmvnic: driver initialization for kdump/kexec)
>> 
>> I'm incredibly curious where you got the idea to put the Fixes: tag
>> at the beginning of the commit message.
> 
> I have no excuse. As you mentioned I should have looked at what others
> had done when using the Fixes.
> 
> Would you like me to re-send with the Fixes tag corrected?

Yes, please.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-21 19:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-20 21:21 [PATCH net-next] ibmvnic: Correct return code checking for ibmvnic_init during probe Nathan Fontenot
2017-06-21 19:39 ` David Miller
2017-06-21 19:48   ` Nathan Fontenot
2017-06-21 19:52     ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).