<br><font size=2 face="sans-serif">Roland,</font>
<br>
<br><font size=2 face="sans-serif">This is a small fix for ipoib_dev_init()
to return the right value. ipoib_ib_dev_init() could return -ENODEV. Attachment
is the patch file.</font>
<br>
<br><font size=2 face="sans-serif">Signed-off-by: Shirley Ma <xma@us.ibm.com></font>
<br>
<div>
<br><font size=2 face="sans-serif">diff -urN infiniband/ulp/ipoib/ipoib_main.c
infiniband-return/ulp/ipoib/ipoib_main.c<br>
--- infiniband/ulp/ipoib/ipoib_main.c 2006-03-26
11:57:15.750051312 -0800<br>
+++ infiniband-return/ulp/ipoib/ipoib_main.c 2006-03-26
12:26:14.548713736 -0800<br>
@@ -840,6 +840,7 @@<br>
int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)<br>
{<br>
struct ipoib_dev_priv *priv = netdev_priv(dev);<br>
+ int ret;<br>
<br>
/* Allocate RX/TX "rings"
to hold queued skbs */<br>
<br>
@@ -848,6 +849,7 @@<br>
if (!priv->rx_ring) {<br>
printk(KERN_WARNING
"%s: failed to allocate RX ring (%d entries)\n",<br>
ca->name, IPOIB_RX_RING_SIZE);<br>
+ ret
= -ENOMEM;<br>
goto
out;<br>
}<br>
<br>
@@ -856,24 +858,23 @@<br>
if (!priv->tx_ring) {<br>
printk(KERN_WARNING
"%s: failed to allocate TX ring (%d entries)\n",<br>
ca->name, IPOIB_TX_RING_SIZE);<br>
+ ret
= -ENOMEM;<br>
goto
out_rx_ring_cleanup;<br>
}<br>
<br>
/* priv->tx_head & tx_tail
are already 0 */<br>
<br>
- if (ipoib_ib_dev_init(dev, ca, port))<br>
- goto
out_tx_ring_cleanup;<br>
-<br>
- return 0;<br>
+ ret = ipoib_ib_dev_init(dev, ca, port);</font>
<br><font size=2 face="sans-serif">+ if
(!ret)<br>
+ goto
out;<br>
<br>
-out_tx_ring_cleanup:<br>
kfree(priv->tx_ring);<br>
<br>
out_rx_ring_cleanup:<br>
kfree(priv->rx_ring);<br>
<br>
out:<br>
- return -ENOMEM;<br>
+ return ret;<br>
}<br>
<br>
void ipoib_dev_cleanup(struct net_device *dev)</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Thanks<br>
Shirley Ma<br>
IBM Linux Technology Center<br>
15300 SW Koll Parkway<br>
Beaverton, OR 97006-6063<br>
Phone(Fax): (503) 578-7638<br>
<br>
</font></div>