Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-10-02 Thread Jack Morgenstein
Acked-by: Jack Morgenstein Thanks, Roland! Good catches and good fixes! Regarding the mutex replacing the semaphore, at one time we toyed with the idea of multiple comm channel commands "in the air", but we did not pursue the idea. I agree with changing slave_sem to a mutex. If we do decide at

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-27 Thread Or Gerlitz
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

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-27 Thread Or Gerlitz
On 27/09/2012 10:17, Roland Dreier wrote: I think I had it cabled up directly to another HCA, and that HCA was in a system that was either off or at least didn't have the driver loaded. So the port was in the physically DOWN state... However, I just tried it and even with that other HCA enabled

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-27 Thread Or Gerlitz
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

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-26 Thread Roland Dreier
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

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-26 Thread Or Gerlitz
On Wed, Sep 26, 2012 at 6:42 AM, Roland Dreier wrote: > From: Roland Dreier > > On an SR-IOV master device, __mlx4_init_one() calls mlx4_init_hca() > before mlx4_multi_func_init(). However, for unlucky configurations, > mlx4_init_hca() might call mlx4_SENSE_PORT() (via mlx4_dev_cap()), and > tha

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-26 Thread Roland Dreier
On Tue, Sep 25, 2012 at 9:46 PM, Roland Dreier wrote: > By the way, I still get a steady stream of > > mlx4_core :05:00.0: Unknown command:0x4d accepted from slave:0 > mlx4_core :05:00.0: Sense command failed for port: 1 > > once I load the driver... it seems SENSE_PORT is a wrapped comman

Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-25 Thread Roland Dreier
By the way, I still get a steady stream of mlx4_core :05:00.0: Unknown command:0x4d accepted from slave:0 mlx4_core :05:00.0: Sense command failed for port: 1 once I load the driver... it seems SENSE_PORT is a wrapped command but there's no entry in cmd_info[] for it? - R. -- To unsubsc

[PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem

2012-09-25 Thread Roland Dreier
From: Roland Dreier On an SR-IOV master device, __mlx4_init_one() calls mlx4_init_hca() before mlx4_multi_func_init(). However, for unlucky configurations, mlx4_init_hca() might call mlx4_SENSE_PORT() (via mlx4_dev_cap()), and that calls mlx4_cmd_imm() with MLX4_CMD_WRAPPED set. However, on a m