From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161251AbaJ3VMi (ORCPT ); Thu, 30 Oct 2014 17:12:38 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:46586 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933193AbaJ3VMh (ORCPT ); Thu, 30 Oct 2014 17:12:37 -0400 Date: Thu, 30 Oct 2014 22:11:31 +0100 From: Andrew Lunn To: Guenter Roeck Cc: netdev@vger.kernel.org, "David S. Miller" , Florian Fainelli , Andrew Lunn , linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 09/15] net: dsa: Add support for switch EEPROM access Message-ID: <20141030211131.GB32139@lunn.ch> References: <1414604707-22407-1-git-send-email-linux@roeck-us.net> <1414604707-22407-10-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1414604707-22407-10-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > +static int dsa_slave_get_eeprom_len(struct net_device *dev) > +{ > + struct dsa_slave_priv *p = netdev_priv(dev); > + struct dsa_switch *ds = p->parent; > + > + if (ds->pd->eeprom_len) > + return ds->pd->eeprom_len; > + > + if (ds->drv->get_eeprom_len) > + return ds->drv->get_eeprom_len(ds); > + > + return 0; > +} > + Hi Guenter I just started doing some testing with this patchset. A bit late since David just accepted it, but... root@dir665:~# ethtool -e lan4 Cannot get EEPROM data: Invalid argument root@dir665:~# ethtool -e eth0 Cannot get EEPROM data: Operation not supported There is no eeprom for the hardware i'm testing. Operation not supported seems like a better error code and Invalid argument, and is what other network drivers i tried returned. Andrew