From patchwork Tue Jul 28 03:01:14 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 30284 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 6CDBFB7087 for ; Tue, 28 Jul 2009 13:01:34 +1000 (EST) Received: by ozlabs.org (Postfix) id 6130EDDD0C; Tue, 28 Jul 2009 13:01:34 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id DF3E5DDD0B for ; Tue, 28 Jul 2009 13:01:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752654AbZG1DB0 (ORCPT ); Mon, 27 Jul 2009 23:01:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752138AbZG1DB0 (ORCPT ); Mon, 27 Jul 2009 23:01:26 -0400 Received: from wf-out-1314.google.com ([209.85.200.168]:28983 "EHLO wf-out-1314.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbZG1DBZ (ORCPT ); Mon, 27 Jul 2009 23:01:25 -0400 Received: by wf-out-1314.google.com with SMTP id 26so957636wfd.4 for ; Mon, 27 Jul 2009 20:01:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type; bh=0WDCXqKoWNu/ximA8IF89pPFtU+pK1E07eXqb672EKA=; b=pufdkwZRYBnEYVytMDQlsxLOnOtIZihN5hINX9RUDPp42QtIhOpQBmsNNt/HE7i8+V KW/kuhaqL7CeiYY+8cqhY6pkrk+dbbDlFulbFeon/IgYdL0AYKVfr0nYSQyq4G2EQ+/w GQAio6z2N0dvi/R56i7xQ/y20M/GXt4hIk6w8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type; b=pGjmnEf22czgWGjtnLQ4T925B2GRdvwgh7nEGy7k3c2kEROKsNB8ojPXEUSQMQUWTi 2JbYwVkX0jG5eS2IhjGcJNjCzyxg39W942y3O1Ag/YOfenTayrCFV4paG0K6NDQjsJUt sCQb6FpeCQmXYQzb8Q8z2huukI+X7gLfL5c3k= Received: by 10.142.51.4 with SMTP id y4mr949192wfy.81.1248750084669; Mon, 27 Jul 2009 20:01:24 -0700 (PDT) Received: from ?192.168.1.200? ([58.33.2.161]) by mx.google.com with ESMTPS id f21sm26112254rvb.2.2009.07.27.20.01.18 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 27 Jul 2009 20:01:23 -0700 (PDT) Message-ID: <4A6E69FA.9010903@gmail.com> Date: Tue, 28 Jul 2009 11:01:14 +0800 From: Eric Miao User-Agent: Thunderbird 2.0.0.22 (X11/20090608) MIME-Version: 1.0 To: Marek Vasut CC: linux-arm-kernel@lists.arm.linux.org.uk, Russell King - ARM Linux , samuel@sortiz.org, netdev@vger.kernel.org, Alexander Beregalov Subject: Re: [PATCH] pxaficp-ir - remove incorrect net_device_ops References: <200907240257.10906.marek.vasut@gmail.com> In-Reply-To: <200907240257.10906.marek.vasut@gmail.com> X-Enigmail-Version: 0.96.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 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. From 28b229f0f3f807d775a7e70b96c018eef935a24a Mon Sep 17 00:00:00 2001 From: Marek Vasut 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 --- 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