From mboxrd@z Thu Jan 1 00:00:00 1970 From: Or Gerlitz Subject: Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem Date: Thu, 27 Sep 2012 09:57:40 +0200 Message-ID: <506406F4.9030408@mellanox.com> References: <1348634552-21047-1-git-send-email-roland@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Roland Dreier Cc: Jack Morgenstein , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Erez Shitrit , Yevgeny Petrilin List-Id: linux-rdma@vger.kernel.org On 27/09/2012 08:46, Roland Dreier wrote: > On Wed, Sep 26, 2012 at 2:51 PM, Or Gerlitz wrote: >> What exactly did you mean by saying "for unlucky configurations" >> above? what value did you use for mlx4_core's port_array_type module >> param? > I didn't set the parameter at all. What I meant by "unlucky configs" was > all the conditions in the following code in mlx4_dev_cap(): > > /* > * Link sensing is allowed on the port if 3 conditions are true: > * 1. Both protocols are supported on the port. > * 2. Different types are supported on the port > * 3. FW declared that it supports link sensing > */ > mlx4_priv(dev)->sense.sense_allowed[i] = > ((dev->caps.supported_type[i] == MLX4_PORT_TYPE_AUTO) && > (dev->caps.flags & MLX4_DEV_CAP_FLAG_DPDP) && > (dev->caps.flags & MLX4_DEV_CAP_FLAG_SENSE_SUPPORT)); > > /* > * If "default_sense" bit is set, we move the port to "AUTO" mode > * and perform sense_port FW command to try and set the correct > * port type from beginning > */ > if (mlx4_priv(dev)->sense.sense_allowed[i] && dev->caps.default_sense[i]) { > enum mlx4_port_type sensed_port = MLX4_PORT_TYPE_NONE; > dev->caps.possible_type[i] = MLX4_PORT_TYPE_AUTO; > mlx4_SENSE_PORT(dev, i, &sensed_port); > if (sensed_port != MLX4_PORT_TYPE_NONE) > dev->caps.port_type[i] = sensed_port; > } else { > > I'm beginning to think it might be that I had nothing hooked up > to my adapter initially, which seems to lead to the fatal SENSE_PORT > call here. I notice that once I bring up the link, the stream of failing > SENSE_PORT calls (which don't ever work in SR-IOV mode AFAICT) stops as well. > > Roland, As I wrote you, the team was off over the last two days (*) and we will do some more detailed checks to understand what is missing in the code, on the architecture level auto-sensing for link type isn't supported in the current code also for the PPF in SRIOV mode, so at first sight, the above code snippest seems to miss checking if we're on "native" or mfunc mode before allowing itself to go into auto-sense mode, but again, let us look there deeper. What do you mean by "I had nothing hooked up to my adapter initially"? Or. (*) BTW - unluckily we're on a HHS {High Holiday Season} now, in conjunction with the coming opening of the 3.7 merge window on the weekend, which means that many people are mostly off next week as well, Jack will be around from Tuesday. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html