2017-08-09 21:16:24

by Tony Lindgren

[permalink] [raw]
Subject: Re: [v6] wlcore: add missing nvs file name info for wilink8

* Reizer, Eyal <[email protected]> [170809 10:40]:
> Hi Tony,
>
> Sorry for top posting (mobile...)
> I have verified with system design and the data sheet that every wilink 6/7 chip has a mac address in fuse so probably the board you have (pretty old, right?) has this mac address in fuse. Maybe it was from very early batches? Anyway I see no reason to change it.
> Anyway the calibrator can be used to store a different one into the nvs file that will overide it.

Well clearly at least this one does not have any valid hardware
mac address, the hardware mac address is broken with all zeroes.

It seems that you can easily add a check for empty mac address, no?
And you already showed a version that falls back to a random mac
address.

The fact that is old does not change a thing, we still need to
support it no matter what the data sheet and your system design
says. A fix that breaks other things is not really a fix :)

> I have verified using a couple of com6 modules with an am335x-evm and they had mac addresses read ok.

Sounds like there are multiple variants of the wl12xx
available then.

Regards,

Tony


2017-08-10 07:46:25

by Kalle Valo

[permalink] [raw]
Subject: Re: [v6] wlcore: add missing nvs file name info for wilink8

"Reizer, Eyal" <[email protected]> writes:

>> The fact that is old does not change a thing, we still need to
>> support it no matter what the data sheet and your system design
>> says. A fix that breaks other things is not really a fix :)
>>
>
> Sure, just want to make sure we are not trying to add work around just for
> A couple of faulty devices.
>
>> > I have verified using a couple of com6 modules with an am335x-evm and
>> they had mac addresses read ok.
>>
>> Sounds like there are multiple variants of the wl12xx
>> available then.
>>
> I am trying to find out internally if there is a possibility that there were devices
> Produced in the past where the internal fuses were not programmed with a valid
> Address before being assembled into the modules.

Just a general remark, based on my past experience, you can't really
know what hardware is out there, no matter how someone in the company
claims otherwise. Uncalibrated devices, prototypes and calibration data
broken are all possible and better be preparared for that in the driver.

It's a good idea at least to detect and print a proper error message if
the calibration data is broken. But if the data on the device only
consists of MAC address and nothing else, then I guess using a random
address is fine.

--
Kalle Valo

2017-08-10 06:36:50

by Reizer, Eyal

[permalink] [raw]
Subject: RE: [v6] wlcore: add missing nvs file name info for wilink8

> >
> > Sorry for top posting (mobile...)
> > I have verified with system design and the data sheet that every wilink=
6/7
> chip has a mac address in fuse so probably the board you have (pretty old=
,
> right?) has this mac address in fuse. Maybe it was from very early batche=
s?
> Anyway I see no reason to change it.
> > Anyway the calibrator can be used to store a different one into the nvs=
file
> that will overide it.
>=20
> Well clearly at least this one does not have any valid hardware
> mac address, the hardware mac address is broken with all zeroes.
>=20

Looks like it is not really all zeros but rather 00:00:00:00:00:01.=20
I wonder if it is just a one board issue or not...

> It seems that you can easily add a check for empty mac address, no?
> And you already showed a version that falls back to a random mac
> address.
>=20

Of course I can add a check for this but need to make sure it=20
is not just one private case.
Do you happen to have another omap3-evm and can check if this is a typical =
case
For the wilink modules that were assembled on this EVM?
I have not seen another module here that showed this issue and want to make=
=20
Sure it is really a common issue before adding additional checks to the ker=
nel.

> The fact that is old does not change a thing, we still need to
> support it no matter what the data sheet and your system design
> says. A fix that breaks other things is not really a fix :)
>=20

Sure, just want to make sure we are not trying to add work around just for
A couple of faulty devices.

> > I have verified using a couple of com6 modules with an am335x-evm and
> they had mac addresses read ok.
>=20
> Sounds like there are multiple variants of the wl12xx
> available then.
>=20
I am trying to find out internally if there is a possibility that there wer=
e devices
Produced in the past where the internal fuses were not programmed with a va=
lid=20
Address before being assembled into the modules.

Best Regards,
Eyal

2017-08-10 07:56:58

by Reizer, Eyal

[permalink] [raw]
Subject: RE: [v6] wlcore: add missing nvs file name info for wilink8

PiANCj4gT24gVGh1LCBBdWcgMTAsIDIwMTcgYXQgNDozNSBQTSwgUmVpemVyLCBFeWFsIDxleWFs
ckB0aS5jb20+IHdyb3RlOg0KPiA+PiA+DQo+ID4+ID4gU29ycnkgZm9yIHRvcCBwb3N0aW5nICht
b2JpbGUuLi4pDQo+ID4+ID4gSSBoYXZlIHZlcmlmaWVkIHdpdGggc3lzdGVtIGRlc2lnbiBhbmQg
dGhlIGRhdGEgc2hlZXQgdGhhdCBldmVyeSB3aWxpbmsNCj4gNi83DQo+ID4+IGNoaXAgaGFzIGEg
bWFjIGFkZHJlc3MgaW4gZnVzZS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ject: RE: [v6] wlcore: add missing nvs file name info for wilink8

>=20
> >> The fact that is old does not change a thing, we still need to
> >> support it no matter what the data sheet and your system design
> >> says. A fix that breaks other things is not really a fix :)
> >>
> >
> > Sure, just want to make sure we are not trying to add work around just =
for
> > A couple of faulty devices.
> >
> >> > I have verified using a couple of com6 modules with an am335x-evm an=
d
> >> they had mac addresses read ok.
> >>
> >> Sounds like there are multiple variants of the wl12xx
> >> available then.
> >>
> > I am trying to find out internally if there is a possibility that there=
were
> devices
> > Produced in the past where the internal fuses were not programmed with
> a valid
> > Address before being assembled into the modules.
>=20
> Just a general remark, based on my past experience, you can't really
> know what hardware is out there, no matter how someone in the company
> claims otherwise. Uncalibrated devices, prototypes and calibration data
> broken are all possible and better be preparared for that in the driver.
>=20
> It's a good idea at least to detect and print a proper error message if
> the calibration data is broken. But if the data on the device only
> consists of MAC address and nothing else, then I guess using a random
> address is fine.
>=20

Understood. I will handle the zero mac address case and use random mac inst=
aed.
Just trying to find out how common it is as it seems strange devices like t=
hat found their way to boards that we shipped to customers.

Best Regards,
Eyal

2017-08-10 07:52:25

by Julian Calaby

[permalink] [raw]
Subject: Re: [v6] wlcore: add missing nvs file name info for wilink8

Hi Eyal,

On Thu, Aug 10, 2017 at 4:35 PM, Reizer, Eyal <[email protected]> wrote:
>> >
>> > Sorry for top posting (mobile...)
>> > I have verified with system design and the data sheet that every wilink 6/7
>> chip has a mac address in fuse so probably the board you have (pretty old,
>> right?) has this mac address in fuse. Maybe it was from very early batches?
>> Anyway I see no reason to change it.
>> > Anyway the calibrator can be used to store a different one into the nvs file
>> that will overide it.
>>
>> Well clearly at least this one does not have any valid hardware
>> mac address, the hardware mac address is broken with all zeroes.
>>
>
> Looks like it is not really all zeros but rather 00:00:00:00:00:01.
> I wonder if it is just a one board issue or not...

It's 00:00:00:00:00:01 because your code adds 1 to it.

Thanks,

--
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/