From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752993AbbJXPpy (ORCPT ); Sat, 24 Oct 2015 11:45:54 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:46719 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751416AbbJXPpx convert rfc822-to-8bit (ORCPT ); Sat, 24 Oct 2015 11:45:53 -0400 From: =?iso-8859-1?Q?M=E5ns_Rullg=E5rd?= To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 3/3] net: ethernet: add driver for Aurora VLSI NB8800 Ethernet controller References: <1445522558-5808-1-git-send-email-mans@mansr.com> <1445522558-5808-3-git-send-email-mans@mansr.com> <56297FF9.4070801@gmail.com> <562A7000.2080502@gmail.com> Date: Sat, 24 Oct 2015 16:45:48 +0100 In-Reply-To: <562A7000.2080502@gmail.com> (Florian Fainelli's message of "Fri, 23 Oct 2015 10:36:00 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Florian Fainelli writes: >>>> +static void nb8800_set_rx_mode(struct net_device *dev) >>>> +{ >>>> + struct nb8800_priv *priv = netdev_priv(dev); >>>> + struct netdev_hw_addr *ha; >>>> + int af_en; >>>> + >>>> + if ((dev->flags & (IFF_PROMISC | IFF_ALLMULTI)) || >>>> + netdev_mc_count(dev) > 64) >>> >>> 64, that's pretty generous for a perfect match filter, nice. >> >> That's bogus; I forgot to delete it. The hardware uses a 64-entry hash >> table, and whoever wrote the old driver apparently didn't understand how >> it works. > > Might be best to put the interface in promiscuous mode until you have > proper multicast support. Since this is for a Set-Top box chip, having > proper multicast support still seems like something highly desirable. The code below should work correctly with any number of multicast addresses. >>>> + phydev = phy_find_first(bus); >>>> + if (!phydev || phy_read(phydev, MII_BMSR) <= 0) { >>> >>> What is this additional MII_MBSR read used for? >> >> On one of my boards, phylib misdetects a phy on the second ethernet port >> even though there is none. Perhaps I should revisit that problem and >> look for a better solution. > > I think that would be best, if you are currently using the Generic PHY > driver, consider writing a specific driver which would take care of > quirky behavior. The problem is that there is no PHY, yet for some reason reading the ID registers appears to succeed. -- Måns Rullgård mans@mansr.com