From: Or Gerlitz <ogerlitz-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Jack Morgenstein
<jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Erez Shitrit <erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>,
Yevgeny Petrilin
<yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org>
Subject: Re: [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem
Date: Thu, 27 Sep 2012 09:57:40 +0200 [thread overview]
Message-ID: <506406F4.9030408@mellanox.com> (raw)
In-Reply-To: <CAG4TOxPBOMQW1XeB-CNjq+RHix3Rk-ZqfB_6d5YscMQKDOumtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 27/09/2012 08:46, Roland Dreier wrote:
> On Wed, Sep 26, 2012 at 2:51 PM, Or Gerlitz <or.gerlitz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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
next prev parent reply other threads:[~2012-09-27 7:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-26 4:42 [PATCH] mlx4_core: Fix crash on uninitialized priv->cmd.slave_sem Roland Dreier
[not found] ` <1348634552-21047-1-git-send-email-roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2012-09-26 4:46 ` Roland Dreier
[not found] ` <CAL1RGDUm4Zxnoby5O2RkoahbPUtYBL5UPxAFiwDnNNv4pdy7vA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-26 17:01 ` Roland Dreier
2012-09-26 21:51 ` Or Gerlitz
[not found] ` <CAJZOPZKoMorYPBqUPbmUcsw1GcXOYo8oE-u2gA6HB6sb3eo1iw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 6:46 ` Roland Dreier
[not found] ` <CAG4TOxPBOMQW1XeB-CNjq+RHix3Rk-ZqfB_6d5YscMQKDOumtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 7:57 ` Or Gerlitz [this message]
[not found] ` <CAG4TOxPCVuyEUMO01PCUyav+18vMDqN85iSAKc3NWnS3L4PnyQ@mail.gmail.com>
[not found] ` <CAG4TOxPCVuyEUMO01PCUyav+18vMDqN85iSAKc3NWnS3L4PnyQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 8:22 ` Or Gerlitz
2012-09-27 12:35 ` Or Gerlitz
2012-10-02 8:51 ` Jack Morgenstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=506406F4.9030408@mellanox.com \
--to=ogerlitz-vpraknaxozvwk0htik3j/w@public.gmane.org \
--cc=erezsh-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
--cc=jackm-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=yevgenyp-VPRAkNaXOzVS1MOuV/RT9w@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.