<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<DIV><SPAN class=539280513-17112009><FONT color=#0000ff size=2
face=Arial>Applied on 2577.</FONT></SPAN></DIV>
<DIV><SPAN class=539280513-17112009><FONT color=#0000ff size=2
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=539280513-17112009><FONT color=#0000ff size=2
face=Arial>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=539280513-17112009><FONT color=#0000ff size=2
face=Arial>Tzachi</FONT></SPAN></DIV><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px"
dir=ltr>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> Tzachi Dar <BR><B>Sent:</B> Sunday,
November 15, 2009 8:04 PM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Cc:</B> Windows Design<BR><B>Subject:</B>
[bus] Fix bug when board contains only one port only<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT size=2 face=Arial><SPAN class=608230318-15112009>signed off by:
urih</SPAN></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Index:
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/fw.c<BR>===================================================================<BR>---
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/fw.c (revision 4839)<BR>+++
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/fw.c (revision 4840)<BR>@@
-657,12 +657,12 @@<BR> int err =
0;<BR> <BR> <BR>- for (i = 1; i
<= MLX4_MAX_PORTS; ++i)<BR>+ for (i = 1; i <=
dev->caps.num_ports; ++i)<BR>
{<BR>
dev->caps.port_state[i] = MLX4_PORT_ENABLED;<BR>
}<BR> <BR>- for (i = 1; i <=
MLX4_MAX_PORTS; ++i)<BR>+ for (i = 1; i <=
dev->caps.num_ports; ++i)<BR>
{<BR> err =
query_port_state(dev, i);<BR>
if (err)<BR>Index:
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/main.c<BR>===================================================================<BR>---
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/main.c (revision 4839)<BR>+++
Q:/projinf3/trunk/hw/mlx4/kernel/bus/net/main.c (revision 4840)<BR>@@
-136,7 +136,7 @@<BR> int i;<BR> int count =
0;<BR> <BR>- for (i = 0; i < MLX4_MAX_PORTS; i++) {<BR>+ for
(i = 0; i < dev->caps.num_ports; i++) {<BR> if
(dev->caps.port_type[i+1] == MLX4_PORT_TYPE_IB)
{<BR> count++;<BR> }<BR>Index:
Q:/projinf3/trunk/hw/mlx4/kernel/bus/drv/drv.c<BR>===================================================================<BR>---
Q:/projinf3/trunk/hw/mlx4/kernel/bus/drv/drv.c (revision 4839)<BR>+++
Q:/projinf3/trunk/hw/mlx4/kernel/bus/drv/drv.c (revision 4840)<BR>@@
-235,7 +235,7 @@<BR> number_of_ib_ports =
mlx4_count_ib_ports(mdev);<BR> ASSERT(number_of_ib_ports >=0
&& number_of_ib_ports <=2);<BR> <BR>- for (i = 1; i <=
MLX4_MAX_PORTS; i++) {<BR>+ for (i = 1; i <= mdev->caps.num_ports;
i++) {<BR> if
(mlx4_is_enabled_port(mdev, i))
{<BR>
if(mlx4_is_eth_port(mdev, i))
{<BR>
status = __create_child(Device, ETH_HARDWARE_IDS, ETH_HARDWARE_DESCRIPTION,
i);<BR></DIV></FONT>
<DIV><FONT size=2 face=Arial></FONT> </DIV></BLOCKQUOTE></BODY></HTML>