All of lore.kernel.org
 help / color / mirror / Atom feed
From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 2/3] nvme: Add a quirk mechanism that uses identify_ctrl
Date: Wed, 18 Jan 2017 10:56:47 -0500	[thread overview]
Message-ID: <20170118155647.GE8989@localhost.localdomain> (raw)
In-Reply-To: <66c502d8607570266163224149b1e7f613c65a45.1484703713.git.luto@kernel.org>

On Tue, Jan 17, 2017@05:54:19PM -0800, Andy Lutomirski wrote:
> @@ -1351,6 +1394,15 @@ int nvme_init_identify(struct nvme_ctrl *ctrl)
>  		return -EIO;
>  	}
>  
> +	if (!ctrl->identified) {

Part of the quirk is matching firmware revision. That potentially changes
after a reset, but you only check the quirks the first time we initialise
the controller. It's a little awkward to unmask the quirk out when it
previously set for this, though, so maybe it's just as well to have the
user reboot after a firmware upgrade fixes a quirk.

Otherwise, looks good to me.

> +		int i;
> +
> +		for (i = 0; i < ARRAY_SIZE(core_quirks); i++) {
> +			if (quirk_matches(id, &core_quirks[i]))
> +				ctrl->quirks |= core_quirks[i].quirks;
> +		}
> +	}

  reply	other threads:[~2017-01-18 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18  1:54 [PATCH 0/3] nvme: APST support Andy Lutomirski
2017-01-18  1:54 ` [PATCH 1/3] nvme: Enable autonomous power state transitions Andy Lutomirski
2017-01-18  1:54 ` [PATCH 2/3] nvme: Add a quirk mechanism that uses identify_ctrl Andy Lutomirski
2017-01-18 15:56   ` Keith Busch [this message]
2017-01-19  3:07     ` Andy Lutomirski
2017-01-18  1:54 ` [PATCH 3/3] nvme: Add a quirk to disable APST on a buggy Samsung device Andy Lutomirski
2017-01-18  7:06 ` [PATCH 0/3] nvme: APST support Jens Axboe

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=20170118155647.GE8989@localhost.localdomain \
    --to=keith.busch@intel.com \
    /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.