From: Alexander Graf <agraf@suse.de>
To: "J. German Rivera" <German.Rivera@freescale.com>,
gregkh@linuxfoundation.org, arnd@arndb.de,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Cc: stuart.yoder@freescale.com, Kim.Phillips@freescale.com,
scottwood@freescale.com, bhamciu1@freescale.com,
R89243@freescale.com, bhupesh.sharma@freescale.com,
nir.erez@freescale.com, richard.schmitt@freescale.com
Subject: Re: [PATCH 6/6] staging: fsl-mc: Changed version matching rules for MC object drivers
Date: Thu, 09 Apr 2015 01:11:04 +0200 [thread overview]
Message-ID: <5525B588.3020407@suse.de> (raw)
In-Reply-To: <1427490069-3142-7-git-send-email-German.Rivera@freescale.com>
On 03/27/2015 10:01 PM, J. German Rivera wrote:
> Before this change, we were requiring a complete version match (major and
> minor version numbers) between MC objects and corresponding drivers, to
> allow MC objects to be bound to their drivers. We realized that a mismatch
> in minor version numbers should be tolerated, as long as the major version
> numbers match. This allows the driver to decide what to do in the minor
> version mismatch case. For example, a driver may decide to run with
> downgraded functionality if the MC firmware object has older minor version
> number than the driver. Also, a driver with older minor version than the
> MC firmware object may decide to run even though it cannot use newer
> functionality of the MC object.
>
> As part of this change, the dpmng Flib version was also updated
> to match the latest MC firmware version.
>
> Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
I think this is a step into the right direction, but you really don't
want to match only when the minor equals. Usually you'd like something like
if (cur_minor > max_minor) {
dev_warn("Unknown version %d.%d of fsl-mc detected. Please update
your kernel if you encounter problems.")
}
but always assume that cur_minor < max_minor works. In cases where the
protocol did change between minors, add code to support the older minors
as well.
Alex
next prev parent reply other threads:[~2015-04-08 23:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-27 21:01 [PATCH 0/6] staging: fsl-mc: cleanup and minor corrections J. German Rivera
2015-03-27 21:01 ` [PATCH 1/6] staging: fsl-mc: Name MC object devices using decimal numbers J. German Rivera
2015-03-27 21:01 ` [PATCH 2/6] staging: fsl-mc: Removed reordering of MC objects during bus scan J. German Rivera
2015-03-27 21:01 ` [PATCH 3/6] staging: fsl-mc: Bind/unbind driver when MC object is plugged/unplugged J. German Rivera
2015-03-27 21:01 ` [PATCH 4/6] staging: fsl-mc: Fix crash in fsl_mc_device_remove() J. German Rivera
2015-03-27 21:01 ` [PATCH 5/6] staging: fsl-mc: Refactored fsl_mc_object_allocator driver init/exit J. German Rivera
2015-03-27 21:01 ` [PATCH 6/6] staging: fsl-mc: Changed version matching rules for MC object drivers J. German Rivera
2015-04-08 23:11 ` Alexander Graf [this message]
2015-04-08 23:11 ` [PATCH 0/6] staging: fsl-mc: cleanup and minor corrections Alexander Graf
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=5525B588.3020407@suse.de \
--to=agraf@suse.de \
--cc=German.Rivera@freescale.com \
--cc=Kim.Phillips@freescale.com \
--cc=R89243@freescale.com \
--cc=arnd@arndb.de \
--cc=bhamciu1@freescale.com \
--cc=bhupesh.sharma@freescale.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nir.erez@freescale.com \
--cc=richard.schmitt@freescale.com \
--cc=scottwood@freescale.com \
--cc=stuart.yoder@freescale.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.