diff mbox

mwifiex: PCIe8997 chip specific handling

Message ID 1469788731-5361-1-git-send-email-akarwar@marvell.com (mailing list archive)
State Accepted
Commit 75696fe704774039e0e2ca65be24d79739ed206d
Delegated to: Kalle Valo
Headers show

Commit Message

Amitkumar Karwar July 29, 2016, 10:38 a.m. UTC
The patch corrects the revision id register and uses it along with
magic value and chip version registers to download appropriate firmware
image.

PCIe8997 Z chipset variant code has been removed, as it won't be used in
production.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
---
 drivers/net/wireless/marvell/mwifiex/pcie.c | 35 ++++++++++-------------------
 drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++-------
 2 files changed, 18 insertions(+), 31 deletions(-)

Comments

Brian Norris Aug. 9, 2016, 6:44 p.m. UTC | #1
Hi,

On Fri, Jul 29, 2016 at 04:08:51PM +0530, Amitkumar Karwar wrote:
> The patch corrects the revision id register and uses it along with
> magic value and chip version registers to download appropriate firmware
> image.
> 
> PCIe8997 Z chipset variant code has been removed, as it won't be used in
> production.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> ---
>  drivers/net/wireless/marvell/mwifiex/pcie.c | 35 ++++++++++-------------------
>  drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++-------
>  2 files changed, 18 insertions(+), 31 deletions(-)

[...]

> diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h b/drivers/net/wireless/marvell/mwifiex/pcie.h
> index f6992f0..46f99ca 100644
> --- a/drivers/net/wireless/marvell/mwifiex/pcie.h
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
> @@ -32,12 +32,9 @@
>  #define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"
>  #define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"
>  #define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"
> -#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"
> -#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"
> -#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"
> -#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"
> -#define PCIEUSB8997_FW_NAME_V2 "mrvl/pcieusb8997_combo_v2.bin"
> -#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan.bin"
> +#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin"
> +#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin"
> +#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan_v4.bin"

Why do version bumps require firmware renames? Is this just to make sure
you don't load the new firmware on old chip revs that you don't plan to
support for production (i.e., only early revs like the _Z you're
dropping)? This doesn't seems like a good long-term solution, at least
once you start getting this silicon out in the wild. At some point, I'd
expect to see a stable file name.

Brian

>  
>  #define PCIE_VENDOR_ID_MARVELL              (0x11ab)
>  #define PCIE_VENDOR_ID_V2_MARVELL           (0x1b4b)
> @@ -47,9 +44,10 @@
>  
>  #define PCIE8897_A0	0x1100
>  #define PCIE8897_B0	0x1200
> -#define PCIE8997_Z	0x0
> -#define PCIE8997_V2	0x471
> +#define PCIE8997_A0	0x10
> +#define PCIE8997_A1	0x11
>  #define CHIP_VER_PCIEUART	0x3
> +#define CHIP_MAGIC_VALUE	0x24
>  
>  /* Constants for Buffer Descriptor (BD) rings */
>  #define MWIFIEX_MAX_TXRX_BD			0x20
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Amitkumar Karwar Aug. 10, 2016, 7:07 a.m. UTC | #2
Hi Brian,

> From: Brian Norris [mailto:briannorris@chromium.org]
> Sent: Wednesday, August 10, 2016 12:14 AM
> To: Amitkumar Karwar
> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
> linux-kernel@vger.kernel.org
> Subject: Re: mwifiex: PCIe8997 chip specific handling
> 
> Hi,
> 
> On Fri, Jul 29, 2016 at 04:08:51PM +0530, Amitkumar Karwar wrote:
> > The patch corrects the revision id register and uses it along with
> > magic value and chip version registers to download appropriate
> > firmware image.
> >
> > PCIe8997 Z chipset variant code has been removed, as it won't be used
> > in production.
> >
> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> > ---
> >  drivers/net/wireless/marvell/mwifiex/pcie.c | 35
> > ++++++++++-------------------
> > drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++-------
> >  2 files changed, 18 insertions(+), 31 deletions(-)
> 
> [...]
> 
> > diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h
> > b/drivers/net/wireless/marvell/mwifiex/pcie.h
> > index f6992f0..46f99ca 100644
> > --- a/drivers/net/wireless/marvell/mwifiex/pcie.h
> > +++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
> > @@ -32,12 +32,9 @@
> >  #define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"
> >  #define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"
> >  #define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"
> > -#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"
> > -#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"
> > -#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"
> > -#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"
> > -#define PCIEUSB8997_FW_NAME_V2 "mrvl/pcieusb8997_combo_v2.bin"
> > -#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan.bin"
> > +#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin"
> > +#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin"
> > +#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan_v4.bin"
> 
> Why do version bumps require firmware renames? Is this just to make sure
> you don't load the new firmware on old chip revs that you don't plan to
> support for production (i.e., only early revs like the _Z you're
> dropping)? This doesn't seems like a good long-term solution, at least
> once you start getting this silicon out in the wild. At some point, I'd
> expect to see a stable file name.
> 
> Brian
> 

We haven't yet submitted any firmware image upstream for 8997 chipset.
pcieuart8997_combo_v4.bin/pcieusb8997_combo_v4.bin would be our firmware candidate for upstream submission. The filename would remain same hereafter.

pcie*8997_combo_v2.bin had support only for A0 chipset
pcie*8997_combo_v3.bin was our internal development version which had support for A1 chipset
pcie*8997_combo_v4.bin has support for both A0 and A1 chipsets and this is the version that shall be released to customers/upstream from now on.

Regards,
Amitkumar Karwar
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Steve deRosier Aug. 10, 2016, 9:08 p.m. UTC | #3
Hi,

On Wed, Aug 10, 2016 at 12:07 AM, Amitkumar Karwar <akarwar@marvell.com> wrote:
> Hi Brian,
>
>> From: Brian Norris [mailto:briannorris@chromium.org]
>> Sent: Wednesday, August 10, 2016 12:14 AM
>> To: Amitkumar Karwar
>> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
>> linux-kernel@vger.kernel.org
>> Subject: Re: mwifiex: PCIe8997 chip specific handling
>>
>> Hi,
>>
>> On Fri, Jul 29, 2016 at 04:08:51PM +0530, Amitkumar Karwar wrote:
>> > The patch corrects the revision id register and uses it along with
>> > magic value and chip version registers to download appropriate
>> > firmware image.
>> >
>> > PCIe8997 Z chipset variant code has been removed, as it won't be used
>> > in production.
>> >
>> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
>> > ---
>> >  drivers/net/wireless/marvell/mwifiex/pcie.c | 35
>> > ++++++++++-------------------
>> > drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++-------
>> >  2 files changed, 18 insertions(+), 31 deletions(-)
>>
>> [...]
>>
>> > diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h
>> > b/drivers/net/wireless/marvell/mwifiex/pcie.h
>> > index f6992f0..46f99ca 100644
>> > --- a/drivers/net/wireless/marvell/mwifiex/pcie.h
>> > +++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
>> > @@ -32,12 +32,9 @@
>> >  #define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"
>> >  #define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"
>> >  #define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"
>> > -#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"
>> > -#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"
>> > -#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"
>> > -#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"
>> > -#define PCIEUSB8997_FW_NAME_V2 "mrvl/pcieusb8997_combo_v2.bin"
>> > -#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan.bin"
>> > +#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin"
>> > +#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin"
>> > +#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan_v4.bin"
>>
>> Why do version bumps require firmware renames? Is this just to make sure
>> you don't load the new firmware on old chip revs that you don't plan to
>> support for production (i.e., only early revs like the _Z you're
>> dropping)? This doesn't seems like a good long-term solution, at least
>> once you start getting this silicon out in the wild. At some point, I'd
>> expect to see a stable file name.
>>
>> Brian
>>
>
> We haven't yet submitted any firmware image upstream for 8997 chipset.
> pcieuart8997_combo_v4.bin/pcieusb8997_combo_v4.bin would be our firmware candidate for upstream submission. The filename would remain same hereafter.
>
> pcie*8997_combo_v2.bin had support only for A0 chipset
> pcie*8997_combo_v3.bin was our internal development version which had support for A1 chipset
> pcie*8997_combo_v4.bin has support for both A0 and A1 chipsets and this is the version that shall be released to customers/upstream from now on.
>

Seems to me then it should just be named pcie*8997_wlan.bin.  A
version number shouldn't be part of the file name in this case. Having
to update the driver for a firmware name change is silly. Most
wireless drivers have different names for different hardware/chip revs
and/or an incompatible API change.  Most distributions would typically
only carry a single instance of the firmware for a particular chip.
Speaking for the ones I work with, I usually keep the original
filename intact (with a version number) and make a symlink to it with
the name the driver expects.  eg:

fw-4.bin -> fw_v3.4.0.94.bin
fw_v3.2.0.144.bin
fw_v3.4.0.94.bin

That way I can keep track of the version in my filesystem, but I'm not
hacking the driver every couple of weeks.  And we do issue new
firmware every few weeks. I can't imagine asking our customers to keep
updating the driver for each firmware enhancement.

IMHO changing the driver to rename the firmwares on new versions seems
both inconvenient to people using it, and extra non-useful commit
noise.

- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Amitkumar Karwar Aug. 11, 2016, 10:41 a.m. UTC | #4
SGkgU3RldmUsDQoNCj4gRnJvbTogU3RldmUgZGVSb3NpZXIgW21haWx0bzpkZXJvc2llckBnbWFp
bC5jb21dDQo+IFNlbnQ6IFRodXJzZGF5LCBBdWd1c3QgMTEsIDIwMTYgMjozOSBBTQ0KPiBUbzog
QW1pdGt1bWFyIEthcndhcg0KPiBDYzogQnJpYW4gTm9ycmlzOyBsaW51eC13aXJlbGVzc0B2Z2Vy
Lmtlcm5lbC5vcmc7IENhdGh5IEx1bzsgTmlzaGFudA0KPiBTYXJtdWthZGFtOyBsaW51eC1rZXJu
ZWxAdmdlci5rZXJuZWwub3JnOyBXZWktTmluZyBIdWFuZw0KPiBTdWJqZWN0OiBSZTogbXdpZmll
eDogUENJZTg5OTcgY2hpcCBzcGVjaWZpY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mwjIGxzDQpwY2llODg5N191YXBzdGEu
YmluICBzZDg2ODhfaGVscGVyLmJpbiAgc2Q4Nzk3X3VhcHN0YS5iaW4gIHNkODg5N191YXBzdGEu
YmluICAgdXNiODc5N191YXBzdGEuYmluDQpzZDg2ODguYmluICAgICAgICAgICBzZDg3ODdfdWFw
c3RhLmJpbiAgc2Q4ODg3X3VhcHN0YS5iaW4gIHVzYjg3NjZfdWFwc3RhLmJpbiAgdXNiODg5N191
YXBzdGEuYmluDQotLS0tLS0tLS0NCg0KSXTigJlzIGp1c3QgdGhhdCBmb3Igb3VyIG5ldyBjaGlw
c2V0IDg5OTcgZm9yIHdoaWNoIHdlIGhhdmVuJ3QgeWV0IHN1Ym1pdHRlZCB0aGUgZmlybXdhcmUg
aW1hZ2UgdXBzdHJlYW0sIHdlIHdhbnQgdG8gZmluYWxpemUgdGhlIG5hbWUgYXMgcGNpZSo4OTk3
X2NvbWJvX3Y0LmJpbg0KDQpSZWdhcmRzLA0KQW1pdGt1bWFyIEthcndhcg0K
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Amitkumar Karwar Sept. 7, 2016, 10:13 a.m. UTC | #5
Hi Kalle,

> From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-

> owner@vger.kernel.org] On Behalf Of Amitkumar Karwar

> Sent: Thursday, August 11, 2016 4:11 PM

> To: Steve deRosier

> Cc: Brian Norris; linux-wireless@vger.kernel.org; Cathy Luo; Nishant

> Sarmukadam; linux-kernel@vger.kernel.org; Wei-Ning Huang

> Subject: RE: mwifiex: PCIe8997 chip specific handling

> 

> Hi Steve,

> 

> > From: Steve deRosier [mailto:derosier@gmail.com]

> > Sent: Thursday, August 11, 2016 2:39 AM

> > To: Amitkumar Karwar

> > Cc: Brian Norris; linux-wireless@vger.kernel.org; Cathy Luo; Nishant

> > Sarmukadam; linux-kernel@vger.kernel.org; Wei-Ning Huang

> > Subject: Re: mwifiex: PCIe8997 chip specific handling

> >

> > Hi,

> >

> > On Wed, Aug 10, 2016 at 12:07 AM, Amitkumar Karwar

> > <akarwar@marvell.com>

> > wrote:

> > > Hi Brian,

> > >

> > >> From: Brian Norris [mailto:briannorris@chromium.org]

> > >> Sent: Wednesday, August 10, 2016 12:14 AM

> > >> To: Amitkumar Karwar

> > >> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;

> > >> linux-kernel@vger.kernel.org

> > >> Subject: Re: mwifiex: PCIe8997 chip specific handling

> > >>

> > >> Hi,

> > >>

> > >> On Fri, Jul 29, 2016 at 04:08:51PM +0530, Amitkumar Karwar wrote:

> > >> > The patch corrects the revision id register and uses it along

> > >> > with magic value and chip version registers to download

> > >> > appropriate firmware image.

> > >> >

> > >> > PCIe8997 Z chipset variant code has been removed, as it won't be

> > >> > used in production.

> > >> >

> > >> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

> > >> > ---

> > >> >  drivers/net/wireless/marvell/mwifiex/pcie.c | 35

> > >> > ++++++++++-------------------

> > >> > drivers/net/wireless/marvell/mwifiex/pcie.h | 14 +++++-------

> > >> >  2 files changed, 18 insertions(+), 31 deletions(-)

> > >>

> > >> [...]

> > >>

> > >> > diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h

> > >> > b/drivers/net/wireless/marvell/mwifiex/pcie.h

> > >> > index f6992f0..46f99ca 100644

> > >> > --- a/drivers/net/wireless/marvell/mwifiex/pcie.h

> > >> > +++ b/drivers/net/wireless/marvell/mwifiex/pcie.h

> > >> > @@ -32,12 +32,9 @@

> > >> >  #define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"

> > >> >  #define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"

> > >> >  #define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"

> > >> > -#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"

> > >> > -#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"

> > >> > -#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"

> > >> > -#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"

> > >> > -#define PCIEUSB8997_FW_NAME_V2 "mrvl/pcieusb8997_combo_v2.bin"

> > >> > -#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan.bin"

> > >> > +#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin"

> > >> > +#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin"

> > >> > +#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan_v4.bin"

> > >>

> > >> Why do version bumps require firmware renames? Is this just to make

> > >> sure you don't load the new firmware on old chip revs that you

> > >> don't plan to support for production (i.e., only early revs like

> > >> the _Z you're dropping)? This doesn't seems like a good long-term

> > >> solution, at least once you start getting this silicon out in the

> > >> wild. At some point, I'd expect to see a stable file name.

> > >>

> > >> Brian

> > >>

> > >

> > > We haven't yet submitted any firmware image upstream for 8997

> chipset.

> > > pcieuart8997_combo_v4.bin/pcieusb8997_combo_v4.bin would be our

> > firmware candidate for upstream submission. The filename would remain

> > same hereafter.

> > >

> > > pcie*8997_combo_v2.bin had support only for A0 chipset

> > > pcie*8997_combo_v3.bin was our internal development version which

> > > had support for A1 chipset pcie*8997_combo_v4.bin has support for

> > > both A0

> > and A1 chipsets and this is the version that shall be released to

> > customers/upstream from now on.

> > >

> >

> > Seems to me then it should just be named pcie*8997_wlan.bin.  A

> > version number shouldn't be part of the file name in this case. Having

> > to update the driver for a firmware name change is silly. Most

> > wireless drivers have different names for different hardware/chip revs

> > and/or an incompatible API change.  Most distributions would typically

> > only carry a single instance of the firmware for a particular chip.

> > Speaking for the ones I work with, I usually keep the original

> > filename intact (with a version number) and make a symlink to it with

> > the name the driver expects.  eg:

> >

> > fw-4.bin -> fw_v3.4.0.94.bin

> > fw_v3.2.0.144.bin

> > fw_v3.4.0.94.bin

> >

> > That way I can keep track of the version in my filesystem, but I'm not

> > hacking the driver every couple of weeks.  And we do issue new

> > firmware every few weeks. I can't imagine asking our customers to keep

> > updating the driver for each firmware enhancement.

> >

> > IMHO changing the driver to rename the firmwares on new versions seems

> > both inconvenient to people using it, and extra non-useful commit

> noise.

> >

> 

> Thanks. I agree with you. We have also maintained single instance/name

> for all our chipsets for last few years. We do release new firmware

> periodically for these chipsets, but firmware name always remains the

> same.

> 

> --------

> root@pe-lt949:/linux-firmware/mrvl# ls

> pcie8897_uapsta.bin  sd8688_helper.bin  sd8797_uapsta.bin

> sd8897_uapsta.bin   usb8797_uapsta.bin

> sd8688.bin           sd8787_uapsta.bin  sd8887_uapsta.bin

> usb8766_uapsta.bin  usb8897_uapsta.bin

> ---------

> 

> It’s just that for our new chipset 8997 for which we haven't yet

> submitted the firmware image upstream, we want to finalize the name as

> pcie*8997_combo_v4.bin

> 


Could you please accept this patch?
I wanted to submit our first firmware for 8997 chipset.

Regards,
Amitkumar
Kalle Valo Sept. 9, 2016, 9:14 a.m. UTC | #6
Amitkumar Karwar <akarwar@marvell.com> wrote:
> The patch corrects the revision id register and uses it along with
> magic value and chip version registers to download appropriate firmware
> image.
> 
> PCIe8997 Z chipset variant code has been removed, as it won't be used in
> production.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

Does apply, please rebase:

Applying: mwifiex: PCIe8997 chip specific handling
fatal: sha1 information is lacking or useless (drivers/net/wireless/marvell/mwifiex/pcie.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 mwifiex: PCIe8997 chip specific handling
Amitkumar Karwar Sept. 9, 2016, 10:28 a.m. UTC | #7
Hi Kalle,

> -----Original Message-----

> From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-

> owner@vger.kernel.org] On Behalf Of Kalle Valo

> Sent: Friday, September 09, 2016 2:45 PM

> To: Amitkumar Karwar

> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;

> Amitkumar Karwar

> Subject: Re: mwifiex: PCIe8997 chip specific handling

> 

> Amitkumar Karwar <akarwar@marvell.com> wrote:

> > The patch corrects the revision id register and uses it along with

> > magic value and chip version registers to download appropriate

> > firmware image.

> >

> > PCIe8997 Z chipset variant code has been removed, as it won't be used

> > in production.

> >

> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

> 

> Does apply, please rebase:

> 

> Applying: mwifiex: PCIe8997 chip specific handling

> fatal: sha1 information is lacking or useless

> (drivers/net/wireless/marvell/mwifiex/pcie.c).

> Repository lacks necessary blobs to fall back on 3-way merge.

> Cannot fall back to three-way merge.

> Patch failed at 0001 mwifiex: PCIe8997 chip specific handling

> 


The patch now smoothly applies to top of the tree. It had a dependency with "mwifiex: add PCIe function level reset support" which is merged.
Let me know if there is still a problem.

Regards,
Amitkumar
Kalle Valo Sept. 9, 2016, 11:26 a.m. UTC | #8
Amitkumar Karwar <akarwar@marvell.com> wrote:
> The patch corrects the revision id register and uses it along with
> magic value and chip version registers to download appropriate firmware
> image.
> 
> PCIe8997 Z chipset variant code has been removed, as it won't be used in
> production.
> 
> Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>

Thanks, 1 patch applied to wireless-drivers-next.git:

75696fe70477 mwifiex: PCIe8997 chip specific handling
Kalle Valo Sept. 9, 2016, 11:27 a.m. UTC | #9
Amitkumar Karwar <akarwar@marvell.com> writes:

> Hi Kalle,
>
>> -----Original Message-----
>> From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-
>> owner@vger.kernel.org] On Behalf Of Kalle Valo
>> Sent: Friday, September 09, 2016 2:45 PM
>> To: Amitkumar Karwar
>> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
>> Amitkumar Karwar
>> Subject: Re: mwifiex: PCIe8997 chip specific handling
>> 
>> Amitkumar Karwar <akarwar@marvell.com> wrote:
>> > The patch corrects the revision id register and uses it along with
>> > magic value and chip version registers to download appropriate
>> > firmware image.
>> >
>> > PCIe8997 Z chipset variant code has been removed, as it won't be used
>> > in production.
>> >
>> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
>> 
>> Does apply, please rebase:
>> 
>> Applying: mwifiex: PCIe8997 chip specific handling
>> fatal: sha1 information is lacking or useless
>> (drivers/net/wireless/marvell/mwifiex/pcie.c).
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0001 mwifiex: PCIe8997 chip specific handling
>> 
>
> The patch now smoothly applies to top of the tree. It had a dependency
> with "mwifiex: add PCIe function level reset support" which is merged.
> Let me know if there is still a problem.

Ok, I applied it now. But if there's a dependency to another patch
please document it after the "---" line, a lot easier that way.
Amitkumar Karwar Sept. 9, 2016, 12:46 p.m. UTC | #10
> From: Kalle Valo [mailto:kvalo@codeaurora.org]
> Sent: Friday, September 09, 2016 4:58 PM
> To: Amitkumar Karwar
> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam
> Subject: Re: mwifiex: PCIe8997 chip specific handling
> 
> Amitkumar Karwar <akarwar@marvell.com> writes:
> 
> > Hi Kalle,
> >
> >> -----Original Message-----
> >> From: linux-wireless-owner@vger.kernel.org [mailto:linux-wireless-
> >> owner@vger.kernel.org] On Behalf Of Kalle Valo
> >> Sent: Friday, September 09, 2016 2:45 PM
> >> To: Amitkumar Karwar
> >> Cc: linux-wireless@vger.kernel.org; Cathy Luo; Nishant Sarmukadam;
> >> Amitkumar Karwar
> >> Subject: Re: mwifiex: PCIe8997 chip specific handling
> >>
> >> Amitkumar Karwar <akarwar@marvell.com> wrote:
> >> > The patch corrects the revision id register and uses it along with
> >> > magic value and chip version registers to download appropriate
> >> > firmware image.
> >> >
> >> > PCIe8997 Z chipset variant code has been removed, as it won't be
> >> > used in production.
> >> >
> >> > Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
> >>
> >> Does apply, please rebase:
> >>
> >> Applying: mwifiex: PCIe8997 chip specific handling
> >> fatal: sha1 information is lacking or useless
> >> (drivers/net/wireless/marvell/mwifiex/pcie.c).
> >> Repository lacks necessary blobs to fall back on 3-way merge.
> >> Cannot fall back to three-way merge.
> >> Patch failed at 0001 mwifiex: PCIe8997 chip specific handling
> >>
> >
> > The patch now smoothly applies to top of the tree. It had a dependency
> > with "mwifiex: add PCIe function level reset support" which is merged.
> > Let me know if there is still a problem.
> 
> Ok, I applied it now. But if there's a dependency to another patch
> please document it after the "---" line, a lot easier that way.
> 

Thanks. Sure. I will use "---" and take care of this for future patches.

Regards,
Amitkumar
diff mbox

Patch

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 81bceef..9aec9a9 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -2910,7 +2910,7 @@  static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter)
 static void mwifiex_pcie_get_fw_name(struct mwifiex_adapter *adapter)
 {
 	int revision_id = 0;
-	int version;
+	int version, magic;
 	struct pcie_service_card *card = adapter->card;
 
 	switch (card->dev->device) {
@@ -2935,30 +2935,19 @@  static void mwifiex_pcie_get_fw_name(struct mwifiex_adapter *adapter)
 		}
 		break;
 	case PCIE_DEVICE_ID_MARVELL_88W8997:
-		mwifiex_read_reg(adapter, 0x0c48, &revision_id);
+		mwifiex_read_reg(adapter, 0x8, &revision_id);
 		mwifiex_read_reg(adapter, 0x0cd0, &version);
+		mwifiex_read_reg(adapter, 0x0cd4, &magic);
+		revision_id &= 0xff;
 		version &= 0x7;
-		switch (revision_id) {
-		case PCIE8997_V2:
-			if (version == CHIP_VER_PCIEUART)
-				strcpy(adapter->fw_name,
-				       PCIEUART8997_FW_NAME_V2);
-			else
-				strcpy(adapter->fw_name,
-				       PCIEUSB8997_FW_NAME_V2);
-			break;
-		case PCIE8997_Z:
-			if (version == CHIP_VER_PCIEUART)
-				strcpy(adapter->fw_name,
-				       PCIEUART8997_FW_NAME_Z);
-			else
-				strcpy(adapter->fw_name,
-				       PCIEUSB8997_FW_NAME_Z);
-			break;
-		default:
-			strcpy(adapter->fw_name, PCIE8997_DEFAULT_FW_NAME);
-			break;
-		}
+		magic &= 0xff;
+		if (revision_id == PCIE8997_A1 &&
+		    magic == CHIP_MAGIC_VALUE &&
+		    version == CHIP_VER_PCIEUART)
+			strcpy(adapter->fw_name, PCIEUART8997_FW_NAME_V4);
+		else
+			strcpy(adapter->fw_name, PCIEUSB8997_FW_NAME_V4);
+		break;
 	default:
 		break;
 	}
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.h b/drivers/net/wireless/marvell/mwifiex/pcie.h
index f6992f0..46f99ca 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.h
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.h
@@ -32,12 +32,9 @@ 
 #define PCIE8897_DEFAULT_FW_NAME "mrvl/pcie8897_uapsta.bin"
 #define PCIE8897_A0_FW_NAME "mrvl/pcie8897_uapsta_a0.bin"
 #define PCIE8897_B0_FW_NAME "mrvl/pcie8897_uapsta.bin"
-#define PCIE8997_DEFAULT_FW_NAME "mrvl/pcieusb8997_combo_v2.bin"
-#define PCIEUART8997_FW_NAME_Z "mrvl/pcieuart8997_combo.bin"
-#define PCIEUART8997_FW_NAME_V2 "mrvl/pcieuart8997_combo_v2.bin"
-#define PCIEUSB8997_FW_NAME_Z "mrvl/pcieusb8997_combo.bin"
-#define PCIEUSB8997_FW_NAME_V2 "mrvl/pcieusb8997_combo_v2.bin"
-#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan.bin"
+#define PCIEUART8997_FW_NAME_V4 "mrvl/pcieuart8997_combo_v4.bin"
+#define PCIEUSB8997_FW_NAME_V4 "mrvl/pcieusb8997_combo_v4.bin"
+#define PCIE8997_DEFAULT_WIFIFW_NAME "mrvl/pcie8997_wlan_v4.bin"
 
 #define PCIE_VENDOR_ID_MARVELL              (0x11ab)
 #define PCIE_VENDOR_ID_V2_MARVELL           (0x1b4b)
@@ -47,9 +44,10 @@ 
 
 #define PCIE8897_A0	0x1100
 #define PCIE8897_B0	0x1200
-#define PCIE8997_Z	0x0
-#define PCIE8997_V2	0x471
+#define PCIE8997_A0	0x10
+#define PCIE8997_A1	0x11
 #define CHIP_VER_PCIEUART	0x3
+#define CHIP_MAGIC_VALUE	0x24
 
 /* Constants for Buffer Descriptor (BD) rings */
 #define MWIFIEX_MAX_TXRX_BD			0x20