netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
       [not found] <200907240257.10906.marek.vasut@gmail.com>
@ 2009-07-28  3:01 ` Eric Miao
  2009-07-29 11:16   ` Alexander Beregalov
  0 siblings, 1 reply; 9+ messages in thread
From: Eric Miao @ 2009-07-28  3:01 UTC (permalink / raw)
  To: Marek Vasut
  Cc: linux-arm-kernel, Russell King - ARM Linux, samuel, netdev,
	Alexander Beregalov

[-- Attachment #1: Type: text/plain, Size: 1473 bytes --]

Marek Vasut wrote:
> Hi!
> 
> This patch fixes broken pxaficp-ir. The problem was in incorrect
> net_device_ops being specified which prevented the driver from
> operating. The symptoms were:
>  - failing ifconfig for IrLAN, resulting in
> 	SIOCSIFFLAGS: Cannot assign requested address
>  - irattach working for IrCOMM, but the port stayed disabled
> 
> Moreover this patch corrects missing sysfs device link.
> 
> btw. guys, be honest, when did you last tested pxaficp-ir on real hardware? ;-)
> 

Well, this seems to be brought by the net_device_ops change, which seems
to happen silently without any of us being notified.

OK, netdev and Alex are copied, so that we can look into this issue a bit
deeper:

1. it looks to me that SIOCSIFFLAGS actually returned -EADDRNOTAVAIL, which
   is likely caused by eth_validate_addr, the default eth_addr comes with
   irda should be "00:00:00:00:00:00" if not explicitly specified (kzalloc),
   and this should be the problem, solution ?  Either give a valid address
   to the irda net_device or remove this 'ndo_validate_addr'. And which is
   a correct fix will impact on the .ndo_set_mac_address

2. '.ndo_change_mtu' ? It looks to me that Irda device doesn't care too much
   about the MTU, eth_change_mtu is supposed to work just fine and not to
   cause any side effects, and may just benefit later irda device drivers if
   there is a weird device happens to care about MTU

- eric

Marek's original patch in attachment.

[-- Attachment #2: 0001-pxaficp-ir-remove-incorrect-net_device_ops.patch --]
[-- Type: text/x-diff, Size: 1520 bytes --]

>From 28b229f0f3f807d775a7e70b96c018eef935a24a Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Fri, 24 Jul 2009 02:44:02 +0200
Subject: [PATCH] pxaficp-ir - remove incorrect net_device_ops

This patch fixes broken pxaficp-ir. The problem was in incorrect
net_device_ops being specified which prevented the driver from
operating. The symptoms were:
 - failing ifconfig for IrLAN, resulting in
	SIOCSIFFLAGS: Cannot assign requested address
 - irattach working for IrCOMM, but the port stayed disabled

Moreover this patch corrects missing sysfs device link.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 drivers/net/irda/pxaficp_ir.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 4edbdbe..f5b7d83 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -820,9 +820,6 @@ static const struct net_device_ops pxa_irda_netdev_ops = {
 	.ndo_stop		= pxa_irda_stop,
 	.ndo_start_xmit		= pxa_irda_hard_xmit,
 	.ndo_do_ioctl		= pxa_irda_ioctl,
-	.ndo_change_mtu		= eth_change_mtu,
-	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address	= eth_mac_addr,
 };
 
 static int pxa_irda_probe(struct platform_device *pdev)
@@ -847,6 +844,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
 	if (!dev)
 		goto err_mem_3;
 
+	SET_NETDEV_DEV(dev, &pdev->dev);
 	si = netdev_priv(dev);
 	si->dev = &pdev->dev;
 	si->pdata = pdev->dev.platform_data;
-- 
1.6.3.3


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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-07-28  3:01 ` [PATCH] pxaficp-ir - remove incorrect net_device_ops Eric Miao
@ 2009-07-29 11:16   ` Alexander Beregalov
  2009-08-05 14:02     ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Beregalov @ 2009-07-29 11:16 UTC (permalink / raw)
  To: Eric Miao
  Cc: Marek Vasut, linux-arm-kernel, Russell King - ARM Linux, samuel,
	netdev

2009/7/28 Eric Miao <eric.y.miao@gmail.com>:
> Marek Vasut wrote:
>> Hi!
>>
>> This patch fixes broken pxaficp-ir. The problem was in incorrect
>> net_device_ops being specified which prevented the driver from
>> operating. The symptoms were:
>>  - failing ifconfig for IrLAN, resulting in
>>       SIOCSIFFLAGS: Cannot assign requested address
>>  - irattach working for IrCOMM, but the port stayed disabled
>>
>> Moreover this patch corrects missing sysfs device link.
>>
>> btw. guys, be honest, when did you last tested pxaficp-ir on real hardware? ;-)
>>
>
> Well, this seems to be brought by the net_device_ops change, which seems
> to happen silently without any of us being notified.
>
> OK, netdev and Alex are copied, so that we can look into this issue a bit
> deeper:
>
> 1. it looks to me that SIOCSIFFLAGS actually returned -EADDRNOTAVAIL, which
>   is likely caused by eth_validate_addr, the default eth_addr comes with
>   irda should be "00:00:00:00:00:00" if not explicitly specified (kzalloc),
>   and this should be the problem, solution ?  Either give a valid address
>   to the irda net_device or remove this 'ndo_validate_addr'. And which is
>   a correct fix will impact on the .ndo_set_mac_address
>
> 2. '.ndo_change_mtu' ? It looks to me that Irda device doesn't care too much
>   about the MTU, eth_change_mtu is supposed to work just fine and not to
>   cause any side effects, and may just benefit later irda device drivers if
>   there is a weird device happens to care about MTU
>
> - eric
>
> Marek's original patch in attachment.
>

Sorry about that and thanks.
Then we should fix the rest of irda drivers in the same way.

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-07-29 11:16   ` Alexander Beregalov
@ 2009-08-05 14:02     ` Marek Vasut
  2009-08-21 22:54       ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2009-08-05 14:02 UTC (permalink / raw)
  To: Alexander Beregalov
  Cc: Eric Miao, linux-arm-kernel, Russell King - ARM Linux, samuel,
	netdev

Dne St 29. července 2009 13:16:25 Alexander Beregalov napsal(a):
> 2009/7/28 Eric Miao <eric.y.miao@gmail.com>:
> > Marek Vasut wrote:
> >> Hi!
> >>
> >> This patch fixes broken pxaficp-ir. The problem was in incorrect
> >> net_device_ops being specified which prevented the driver from
> >> operating. The symptoms were:
> >>  - failing ifconfig for IrLAN, resulting in
> >>       SIOCSIFFLAGS: Cannot assign requested address
> >>  - irattach working for IrCOMM, but the port stayed disabled
> >>
> >> Moreover this patch corrects missing sysfs device link.
> >>
> >> btw. guys, be honest, when did you last tested pxaficp-ir on real
> >> hardware? ;-)
> >
> > Well, this seems to be brought by the net_device_ops change, which seems
> > to happen silently without any of us being notified.
> >
> > OK, netdev and Alex are copied, so that we can look into this issue a bit
> > deeper:
> >
> > 1. it looks to me that SIOCSIFFLAGS actually returned -EADDRNOTAVAIL,
> > which is likely caused by eth_validate_addr, the default eth_addr comes
> > with irda should be "00:00:00:00:00:00" if not explicitly specified
> > (kzalloc), and this should be the problem, solution ?  Either give a
> > valid address to the irda net_device or remove this 'ndo_validate_addr'.
> > And which is a correct fix will impact on the .ndo_set_mac_address
> >
> > 2. '.ndo_change_mtu' ? It looks to me that Irda device doesn't care too
> > much about the MTU, eth_change_mtu is supposed to work just fine and not
> > to cause any side effects, and may just benefit later irda device drivers
> > if there is a weird device happens to care about MTU
> >
> > - eric
> >
> > Marek's original patch in attachment.
>
> Sorry about that and thanks.
> Then we should fix the rest of irda drivers in the same way.

Hi!
Was my patch applied or what's the current status? Thanks

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-05 14:02     ` Marek Vasut
@ 2009-08-21 22:54       ` Marek Vasut
  2009-08-23 17:55         ` Alexander Beregalov
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2009-08-21 22:54 UTC (permalink / raw)
  To: Alexander Beregalov
  Cc: Eric Miao, linux-arm-kernel, Russell King - ARM Linux, samuel,
	netdev, linux-arm-kernel

Dne St 5. srpna 2009 16:02:34 Marek Vasut napsal(a):
> Dne St 29. července 2009 13:16:25 Alexander Beregalov napsal(a):
> > 2009/7/28 Eric Miao <eric.y.miao@gmail.com>:
> > > Marek Vasut wrote:
> > >> Hi!
> > >>
> > >> This patch fixes broken pxaficp-ir. The problem was in incorrect
> > >> net_device_ops being specified which prevented the driver from
> > >> operating. The symptoms were:
> > >>  - failing ifconfig for IrLAN, resulting in
> > >>       SIOCSIFFLAGS: Cannot assign requested address
> > >>  - irattach working for IrCOMM, but the port stayed disabled
> > >>
> > >> Moreover this patch corrects missing sysfs device link.
> > >>
> > >> btw. guys, be honest, when did you last tested pxaficp-ir on real
> > >> hardware? ;-)
> > >
> > > Well, this seems to be brought by the net_device_ops change, which
> > > seems to happen silently without any of us being notified.
> > >
> > > OK, netdev and Alex are copied, so that we can look into this issue a
> > > bit deeper:
> > >
> > > 1. it looks to me that SIOCSIFFLAGS actually returned -EADDRNOTAVAIL,
> > > which is likely caused by eth_validate_addr, the default eth_addr comes
> > > with irda should be "00:00:00:00:00:00" if not explicitly specified
> > > (kzalloc), and this should be the problem, solution ?  Either give a
> > > valid address to the irda net_device or remove this
> > > 'ndo_validate_addr'. And which is a correct fix will impact on the
> > > .ndo_set_mac_address
> > >
> > > 2. '.ndo_change_mtu' ? It looks to me that Irda device doesn't care too
> > > much about the MTU, eth_change_mtu is supposed to work just fine and
> > > not to cause any side effects, and may just benefit later irda device
> > > drivers if there is a weird device happens to care about MTU
> > >
> > > - eric
> > >
> > > Marek's original patch in attachment.
> >
> > Sorry about that and thanks.
> > Then we should fix the rest of irda drivers in the same way.
>
> Hi!
> Was my patch applied or what's the current status? Thanks

Hi!
any updates ? Are we letting this into .32 in current broken state?

Thanks!

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-21 22:54       ` Marek Vasut
@ 2009-08-23 17:55         ` Alexander Beregalov
  2009-08-24  1:49           ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Beregalov @ 2009-08-23 17:55 UTC (permalink / raw)
  To: David Miller
  Cc: Eric Miao, linux-arm-kernel, Russell King - ARM Linux, samuel,
	netdev, linux-arm-kernel, Marek Vasut

2009/8/22 Marek Vasut <marek.vasut@gmail.com>:
> Dne St 5. srpna 2009 16:02:34 Marek Vasut napsal(a):
>> Dne St 29. července 2009 13:16:25 Alexander Beregalov napsal(a):
>> > 2009/7/28 Eric Miao <eric.y.miao@gmail.com>:
>> > > Marek Vasut wrote:
>> > >> Hi!
>> > >>
>> > >> This patch fixes broken pxaficp-ir. The problem was in incorrect
>> > >> net_device_ops being specified which prevented the driver from
>> > >> operating. The symptoms were:
>> > >>  - failing ifconfig for IrLAN, resulting in
>> > >>       SIOCSIFFLAGS: Cannot assign requested address
>> > >>  - irattach working for IrCOMM, but the port stayed disabled
>> > >>
>> > >> Moreover this patch corrects missing sysfs device link.
>> > >>
>> > >> btw. guys, be honest, when did you last tested pxaficp-ir on real
>> > >> hardware? ;-)
>> > >
>> > > Well, this seems to be brought by the net_device_ops change, which
>> > > seems to happen silently without any of us being notified.
>> > >
>> > > OK, netdev and Alex are copied, so that we can look into this issue a
>> > > bit deeper:
>> > >
>> > > 1. it looks to me that SIOCSIFFLAGS actually returned -EADDRNOTAVAIL,
>> > > which is likely caused by eth_validate_addr, the default eth_addr comes
>> > > with irda should be "00:00:00:00:00:00" if not explicitly specified
>> > > (kzalloc), and this should be the problem, solution ?  Either give a
>> > > valid address to the irda net_device or remove this
>> > > 'ndo_validate_addr'. And which is a correct fix will impact on the
>> > > .ndo_set_mac_address
>> > >
>> > > 2. '.ndo_change_mtu' ? It looks to me that Irda device doesn't care too
>> > > much about the MTU, eth_change_mtu is supposed to work just fine and
>> > > not to cause any side effects, and may just benefit later irda device
>> > > drivers if there is a weird device happens to care about MTU
>> > >
>> > > - eric
>> > >
>> > > Marek's original patch in attachment.
>> >
>> > Sorry about that and thanks.
>> > Then we should fix the rest of irda drivers in the same way.
>>
>> Hi!
>> Was my patch applied or what's the current status? Thanks
>
> Hi!
> any updates ? Are we letting this into .32 in current broken state?
>

David, please have a look. Will you apply it?

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-23 17:55         ` Alexander Beregalov
@ 2009-08-24  1:49           ` David Miller
  2009-08-24  4:38             ` Alexander Beregalov
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2009-08-24  1:49 UTC (permalink / raw)
  To: a.beregalov
  Cc: eric.y.miao, linux-arm-kernel, linux, samuel, netdev,
	linux-arm-kernel, marek.vasut

From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Sun, 23 Aug 2009 21:55:45 +0400

> David, please have a look. Will you apply it?

Can someone please repost the patch to netdev?  I don't have a copy
handy and I'd like to see it tracked properly patchwork too.  If it's
in patchwork, it won't get lost.

Thanks.

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-24  1:49           ` David Miller
@ 2009-08-24  4:38             ` Alexander Beregalov
  2009-08-24  5:57               ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Alexander Beregalov @ 2009-08-24  4:38 UTC (permalink / raw)
  To: David Miller
  Cc: eric.y.miao, linux-arm-kernel, linux, samuel, netdev,
	linux-arm-kernel, marek.vasut

On Sun, Aug 23, 2009 at 06:49:24PM -0700, David Miller wrote:
> From: Alexander Beregalov <a.beregalov@gmail.com>
> Date: Sun, 23 Aug 2009 21:55:45 +0400
> 
> > David, please have a look. Will you apply it?
> 
> Can someone please repost the patch to netdev?  I don't have a copy
> handy and I'd like to see it tracked properly patchwork too.  If it's
> in patchwork, it won't get lost.

>From 28b229f0f3f807d775a7e70b96c018eef935a24a Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Fri, 24 Jul 2009 02:44:02 +0200
Subject: [PATCH] pxaficp-ir - remove incorrect net_device_ops

This patch fixes broken pxaficp-ir. The problem was in incorrect
net_device_ops being specified which prevented the driver from
operating. The symptoms were:
 - failing ifconfig for IrLAN, resulting in
	SIOCSIFFLAGS: Cannot assign requested address
 - irattach working for IrCOMM, but the port stayed disabled

Moreover this patch corrects missing sysfs device link.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 drivers/net/irda/pxaficp_ir.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index 4edbdbe..f5b7d83 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -820,9 +820,6 @@ static const struct net_device_ops pxa_irda_netdev_ops = {
 	.ndo_stop		= pxa_irda_stop,
 	.ndo_start_xmit		= pxa_irda_hard_xmit,
 	.ndo_do_ioctl		= pxa_irda_ioctl,
-	.ndo_change_mtu		= eth_change_mtu,
-	.ndo_validate_addr	= eth_validate_addr,
-	.ndo_set_mac_address	= eth_mac_addr,
 };
 
 static int pxa_irda_probe(struct platform_device *pdev)
@@ -847,6 +844,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
 	if (!dev)
 		goto err_mem_3;
 
+	SET_NETDEV_DEV(dev, &pdev->dev);
 	si = netdev_priv(dev);
 	si->dev = &pdev->dev;
 	si->pdata = pdev->dev.platform_data;
-- 
1.6.3.3


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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-24  4:38             ` Alexander Beregalov
@ 2009-08-24  5:57               ` David Miller
  2009-08-24 12:47                 ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2009-08-24  5:57 UTC (permalink / raw)
  To: a.beregalov
  Cc: eric.y.miao, linux-arm-kernel, linux, samuel, netdev,
	linux-arm-kernel, marek.vasut

From: Alexander Beregalov <a.beregalov@gmail.com>
Date: Mon, 24 Aug 2009 08:38:31 +0400

> Subject: [PATCH] pxaficp-ir - remove incorrect net_device_ops
> 
> This patch fixes broken pxaficp-ir. The problem was in incorrect
> net_device_ops being specified which prevented the driver from
> operating. The symptoms were:
>  - failing ifconfig for IrLAN, resulting in
> 	SIOCSIFFLAGS: Cannot assign requested address
>  - irattach working for IrCOMM, but the port stayed disabled
> 
> Moreover this patch corrects missing sysfs device link.
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>

Applied, thanks.

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

* Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops
  2009-08-24  5:57               ` David Miller
@ 2009-08-24 12:47                 ` Marek Vasut
  0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2009-08-24 12:47 UTC (permalink / raw)
  To: David Miller
  Cc: a.beregalov, eric.y.miao, linux-arm-kernel, linux, samuel, netdev,
	linux-arm-kernel

Dne Po 24. srpna 2009 07:57:43 David Miller napsal(a):
> From: Alexander Beregalov <a.beregalov@gmail.com>
> Date: Mon, 24 Aug 2009 08:38:31 +0400
>
> > Subject: [PATCH] pxaficp-ir - remove incorrect net_device_ops
> >
> > This patch fixes broken pxaficp-ir. The problem was in incorrect
> > net_device_ops being specified which prevented the driver from
> > operating. The symptoms were:
> >  - failing ifconfig for IrLAN, resulting in
> > 	SIOCSIFFLAGS: Cannot assign requested address
> >  - irattach working for IrCOMM, but the port stayed disabled
> >
> > Moreover this patch corrects missing sysfs device link.
> >
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
>
> Applied, thanks.

Thank you.

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

end of thread, other threads:[~2009-08-24 12:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200907240257.10906.marek.vasut@gmail.com>
2009-07-28  3:01 ` [PATCH] pxaficp-ir - remove incorrect net_device_ops Eric Miao
2009-07-29 11:16   ` Alexander Beregalov
2009-08-05 14:02     ` Marek Vasut
2009-08-21 22:54       ` Marek Vasut
2009-08-23 17:55         ` Alexander Beregalov
2009-08-24  1:49           ` David Miller
2009-08-24  4:38             ` Alexander Beregalov
2009-08-24  5:57               ` David Miller
2009-08-24 12:47                 ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).