All of lore.kernel.org
 help / color / mirror / Atom feed
* (no subject)
@ 2017-02-10  7:41 ` Marty Plummer
  0 siblings, 0 replies; 10+ messages in thread
From: Marty Plummer @ 2017-02-10  7:41 UTC (permalink / raw)
  To: netdev; +Cc: yisen.zhuang, salil.mehta, linux-kernel

Greetings.

I think I may have found a bug with the hix5hd2_gmac driver; unless I'm
missing something, it appears that somehow the net_device struct is not
being initialized properly in the hix5hd2_dev_probe function.

Having set up my devicetree properly (I hope, still new to this), I first
recieved an error when inserting the module:
"(unnamed net_device) (uninitialized): No irq resource"
while I very clearly have the interrupts property defined within this node.

Removing the phy-handle node for testing purposes, I get a similar message:
"(unnamed net_device) (uninitialized): not find phy-handle"

So, it seams to my (admittedly inexperienced) mind that the ndev pointer is
not being initialized properly, or that the error checking at line 1111
is not functioning properly either, for it to have gotten so far along
into the function, only to fail at the attempt to access the ndev pointer.

If you require more information from me, please let me know.

Marty

^ permalink raw reply	[flat|nested] 10+ messages in thread

* (unknown)
@ 2017-02-10  7:41 ` Marty Plummer
  0 siblings, 0 replies; 10+ messages in thread
From: Marty Plummer @ 2017-02-10  7:41 UTC (permalink / raw)
  To: netdev; +Cc: yisen.zhuang, salil.mehta, linux-kernel

Greetings.

I think I may have found a bug with the hix5hd2_gmac driver; unless I'm
missing something, it appears that somehow the net_device struct is not
being initialized properly in the hix5hd2_dev_probe function.

Having set up my devicetree properly (I hope, still new to this), I first
recieved an error when inserting the module:
"(unnamed net_device) (uninitialized): No irq resource"
while I very clearly have the interrupts property defined within this node.

Removing the phy-handle node for testing purposes, I get a similar message:
"(unnamed net_device) (uninitialized): not find phy-handle"

So, it seams to my (admittedly inexperienced) mind that the ndev pointer is
not being initialized properly, or that the error checking at line 1111
is not functioning properly either, for it to have gotten so far along
into the function, only to fail at the attempt to access the ndev pointer.

If you require more information from me, please let me know.

Marty

^ permalink raw reply	[flat|nested] 10+ messages in thread

* net: hix5hd2_gmac uninitialized net_device
  2017-02-10  7:41 ` (unknown) Marty Plummer
  (?)
@ 2017-02-10  7:45 ` Marty Plummer
  2017-02-10 10:21   ` Dongpo Li
  -1 siblings, 1 reply; 10+ messages in thread
From: Marty Plummer @ 2017-02-10  7:45 UTC (permalink / raw)
  To: netdev; +Cc: yisen.zhuang, salil.mehta

On Fri, Feb 10, 2017 at 01:41:18AM -0600, Marty Plummer wrote:
> Greetings.
> 
> I think I may have found a bug with the hix5hd2_gmac driver; unless I'm
> missing something, it appears that somehow the net_device struct is not
> being initialized properly in the hix5hd2_dev_probe function.
> 
> Having set up my devicetree properly (I hope, still new to this), I first
> recieved an error when inserting the module:
> "(unnamed net_device) (uninitialized): No irq resource"
> while I very clearly have the interrupts property defined within this node.
> 
> Removing the phy-handle node for testing purposes, I get a similar message:
> "(unnamed net_device) (uninitialized): not find phy-handle"
> 
> So, it seams to my (admittedly inexperienced) mind that the ndev pointer is
> not being initialized properly, or that the error checking at line 1111
> is not functioning properly either, for it to have gotten so far along
> into the function, only to fail at the attempt to access the ndev pointer.
> 
> If you require more information from me, please let me know.
> 
> Marty

Sorry, forgot the subject. Still getting the hang of mutt.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-10  7:45 ` net: hix5hd2_gmac uninitialized net_device Marty Plummer
@ 2017-02-10 10:21   ` Dongpo Li
  2017-02-11  0:51     ` Marty Plummer
  0 siblings, 1 reply; 10+ messages in thread
From: Dongpo Li @ 2017-02-10 10:21 UTC (permalink / raw)
  To: Marty Plummer, netdev; +Cc: yisen.zhuang, salil.mehta



On 2017/2/10 15:45, Marty Plummer wrote:
> On Fri, Feb 10, 2017 at 01:41:18AM -0600, Marty Plummer wrote:
>> Greetings.
>>
>> I think I may have found a bug with the hix5hd2_gmac driver; unless I'm
>> missing something, it appears that somehow the net_device struct is not
>> being initialized properly in the hix5hd2_dev_probe function.
>>
>> Having set up my devicetree properly (I hope, still new to this), I first
>> recieved an error when inserting the module:
>> "(unnamed net_device) (uninitialized): No irq resource"
>> while I very clearly have the interrupts property defined within this node.
>>
I think the error "No irq resource" happened for some other reason, has no relation with
the info "(unnamed net_device) (uninitialized):".
You can add more debug info to find bug.

>> Removing the phy-handle node for testing purposes, I get a similar message:
>> "(unnamed net_device) (uninitialized): not find phy-handle"
>>
>> So, it seams to my (admittedly inexperienced) mind that the ndev pointer is
>> not being initialized properly, or that the error checking at line 1111
>> is not functioning properly either, for it to have gotten so far along
>> into the function, only to fail at the attempt to access the ndev pointer.
>>
Yes, I agree with you that the ndev has not been initialized completely,
because the function "register_netdev" has not been called yet.
It's better to use the "dev_err" to replace the "netdev_err".

>> If you require more information from me, please let me know.
>>
>> Marty
> 
> Sorry, forgot the subject. Still getting the hang of mutt.
> 
> 

    Regards,
    Dongpo

.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-10 10:21   ` Dongpo Li
@ 2017-02-11  0:51     ` Marty Plummer
  2017-02-13  1:25       ` Dongpo Li
  0 siblings, 1 reply; 10+ messages in thread
From: Marty Plummer @ 2017-02-11  0:51 UTC (permalink / raw)
  To: Dongpo Li; +Cc: netdev, yisen.zhuang, salil.mehta

On Fri, Feb 10, 2017 at 06:21:35PM +0800, Dongpo Li wrote:
> I think the error "No irq resource" happened for some other reason, has no relation with
> the info "(unnamed net_device) (uninitialized):".
> You can add more debug info to find bug.
Do you have any particular suggestions as to what to check out, or is
this just a general 'debug more' instruction?
> Yes, I agree with you that the ndev has not been initialized completely,
> because the function "register_netdev" has not been called yet.
> It's better to use the "dev_err" to replace the "netdev_err".
>
Ah, I see. So, prior to line 1266's call to register_netdev, it will
always be uninitialized and unnamed, regardless of what is or isn't
right elsewhere. Good to know. So, I could replace these netdev_err
with dev_err for now, up until that point, so I can get a bit more info,
yes?
> 
>     Regards,
>     Dongpo
>

	Regards,
	Marty

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-11  0:51     ` Marty Plummer
@ 2017-02-13  1:25       ` Dongpo Li
  2017-02-14 23:59         ` Marty Plummer
  0 siblings, 1 reply; 10+ messages in thread
From: Dongpo Li @ 2017-02-13  1:25 UTC (permalink / raw)
  To: Marty Plummer; +Cc: netdev, yisen.zhuang, salil.mehta



On 2017/2/11 8:51, Marty Plummer wrote:
> On Fri, Feb 10, 2017 at 06:21:35PM +0800, Dongpo Li wrote:
>> I think the error "No irq resource" happened for some other reason, has no relation with
>> the info "(unnamed net_device) (uninitialized):".
>> You can add more debug info to find bug.
> Do you have any particular suggestions as to what to check out, or is
> this just a general 'debug more' instruction?
I haven't encountered such a problem. So it needs you to debug what happens.

>> Yes, I agree with you that the ndev has not been initialized completely,
>> because the function "register_netdev" has not been called yet.
>> It's better to use the "dev_err" to replace the "netdev_err".
>>
> Ah, I see. So, prior to line 1266's call to register_netdev, it will
> always be uninitialized and unnamed, regardless of what is or isn't
> right elsewhere. Good to know. So, I could replace these netdev_err
> with dev_err for now, up until that point, so I can get a bit more info,
> yes?
Yes.


    Regards,
    Dongpo

.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-13  1:25       ` Dongpo Li
@ 2017-02-14 23:59         ` Marty Plummer
  2017-02-15  6:18           ` Dongpo Li
  0 siblings, 1 reply; 10+ messages in thread
From: Marty Plummer @ 2017-02-14 23:59 UTC (permalink / raw)
  To: Dongpo Li; +Cc: netdev, yisen.zhuang, salil.mehta

On Mon, Feb 13, 2017 at 09:25:38AM +0800, Dongpo Li wrote:
> 
> 
> On 2017/2/11 8:51, Marty Plummer wrote:
> > On Fri, Feb 10, 2017 at 06:21:35PM +0800, Dongpo Li wrote:
> >> I think the error "No irq resource" happened for some other reason, has no relation with
> >> the info "(unnamed net_device) (uninitialized):".
> >> You can add more debug info to find bug.
> > Do you have any particular suggestions as to what to check out, or is
> > this just a general 'debug more' instruction?
> I haven't encountered such a problem. So it needs you to debug what happens.
>
Yes, I've figured out the origin here. It was user error, in that I was
not nesting the device node under the soc node, which had the
interrupt-parent property. Moving it there fixed that issue.

In any case, I've ran into another problem. Basic gist is, I was giving
it a go on my hi3521a board, because reading the registers for that and
comparing it to the source, I find they are nearly bit-for-bit
identical, but I suppose there is some tweakage needed to make it work
100%.

What information would it take to have this driver expanded to enable a
new, similar SoC?
> 
>     Regards,
>     Dongpo
> 
> .
> 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-14 23:59         ` Marty Plummer
@ 2017-02-15  6:18           ` Dongpo Li
  2017-02-16 18:45             ` Marty Plummer
  0 siblings, 1 reply; 10+ messages in thread
From: Dongpo Li @ 2017-02-15  6:18 UTC (permalink / raw)
  To: Marty Plummer; +Cc: netdev, yisen.zhuang, salil.mehta

Hi Marty,

On 2017/2/15 7:59, Marty Plummer wrote:
> On Mon, Feb 13, 2017 at 09:25:38AM +0800, Dongpo Li wrote:
>>
>>
>> On 2017/2/11 8:51, Marty Plummer wrote:
>>> On Fri, Feb 10, 2017 at 06:21:35PM +0800, Dongpo Li wrote:
>>>> I think the error "No irq resource" happened for some other reason, has no relation with
>>>> the info "(unnamed net_device) (uninitialized):".
>>>> You can add more debug info to find bug.
>>> Do you have any particular suggestions as to what to check out, or is
>>> this just a general 'debug more' instruction?
>> I haven't encountered such a problem. So it needs you to debug what happens.
>>
> Yes, I've figured out the origin here. It was user error, in that I was
> not nesting the device node under the soc node, which had the
> interrupt-parent property. Moving it there fixed that issue.
> 
> In any case, I've ran into another problem. Basic gist is, I was giving
> it a go on my hi3521a board, because reading the registers for that and
> comparing it to the source, I find they are nearly bit-for-bit
> identical, but I suppose there is some tweakage needed to make it work
> 100%.
> 
> What information would it take to have this driver expanded to enable a
> new, similar SoC?

Currently this driver can't support Hi3521a soc because of some new changes.
I don't know what's your purpose to run hix5hd2 driver on Hi3521a, please ask
the man who sells chips to you to raise your requirements.


    Regards,
    Dongpo

.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-15  6:18           ` Dongpo Li
@ 2017-02-16 18:45             ` Marty Plummer
  2017-02-17  1:32               ` Dongpo Li
  0 siblings, 1 reply; 10+ messages in thread
From: Marty Plummer @ 2017-02-16 18:45 UTC (permalink / raw)
  To: Dongpo Li; +Cc: netdev, yisen.zhuang, salil.mehta

On Wed, Feb 15, 2017 at 02:18:14PM +0800, Dongpo Li wrote:
> Hi Marty,
> 
> On 2017/2/15 7:59, Marty Plummer wrote:
> > On Mon, Feb 13, 2017 at 09:25:38AM +0800, Dongpo Li wrote:
> Currently this driver can't support Hi3521a soc because of some new changes.
> I don't know what's your purpose to run hix5hd2 driver on Hi3521a, please ask
> the man who sells chips to you to raise your requirements.
>
Its not so much a matter of wanting to run the hix5hd2 driver on
hi3521a, but running the hix5hd2 ip core driver on the same/similar ip
core on hi3521a. This is fairly common in the arm world, and a number of
drivers support multiple arm socs/ip cores, some from hisilicon in fact.
For instance "hisilicon,fmc-spi-nor" supports both the hi3519 and the
hi3521a.

Also, I'm not buying chips or boards from Hisilicon. I'm just working on
some consumer electronics that happens to include a hisilicon soc and
unreleased gpl code, working to improve it.

Regards

Marty.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: net: hix5hd2_gmac uninitialized net_device
  2017-02-16 18:45             ` Marty Plummer
@ 2017-02-17  1:32               ` Dongpo Li
  0 siblings, 0 replies; 10+ messages in thread
From: Dongpo Li @ 2017-02-17  1:32 UTC (permalink / raw)
  To: Marty Plummer; +Cc: netdev, yisen.zhuang, salil.mehta

Hi Marty,

On 2017/2/17 2:45, Marty Plummer wrote:
> On Wed, Feb 15, 2017 at 02:18:14PM +0800, Dongpo Li wrote:
>> Hi Marty,
>>
>> On 2017/2/15 7:59, Marty Plummer wrote:
>>> On Mon, Feb 13, 2017 at 09:25:38AM +0800, Dongpo Li wrote:
>> Currently this driver can't support Hi3521a soc because of some new changes.
>> I don't know what's your purpose to run hix5hd2 driver on Hi3521a, please ask
>> the man who sells chips to you to raise your requirements.
>>
> Its not so much a matter of wanting to run the hix5hd2 driver on
> hi3521a, but running the hix5hd2 ip core driver on the same/similar ip
> core on hi3521a. This is fairly common in the arm world, and a number of
> drivers support multiple arm socs/ip cores, some from hisilicon in fact.
> For instance "hisilicon,fmc-spi-nor" supports both the hi3519 and the
> hi3521a.
> 
> Also, I'm not buying chips or boards from Hisilicon. I'm just working on
> some consumer electronics that happens to include a hisilicon soc and
> unreleased gpl code, working to improve it.
> 
I see. Thanks for your explanation.
I will add this thing to my schedule. But there are many development things
that disturb me, I can't give a detailed time, maybe one or two months later.


    Regards,
    Dongpo

.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-02-17  1:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  7:41 Marty Plummer
2017-02-10  7:41 ` (unknown) Marty Plummer
2017-02-10  7:45 ` net: hix5hd2_gmac uninitialized net_device Marty Plummer
2017-02-10 10:21   ` Dongpo Li
2017-02-11  0:51     ` Marty Plummer
2017-02-13  1:25       ` Dongpo Li
2017-02-14 23:59         ` Marty Plummer
2017-02-15  6:18           ` Dongpo Li
2017-02-16 18:45             ` Marty Plummer
2017-02-17  1:32               ` Dongpo Li

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.