[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1421664332.1222.204.camel@xylophone.i.decadent.org.uk>
Date: Mon, 19 Jan 2015 10:45:32 +0000
From: Ben Hutchings <ben.hutchings@...ethink.co.uk>
To: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
Cc: ct178-internal@...ts.codethink.co.uk,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-kernel@...ts.codethink.co.uk,
Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@...esas.com>,
Mitsuhiro Kimura <mitsuhiro.kimura.kc@...esas.com>,
Hisashi Nakamura <hisashi.nakamura.ak@...esas.com>,
Yoshihiro Kaneko <ykaneko0929@...il.com>
Subject: Re: [PATCH net 1/2] sh_eth: Fix promiscuous mode on chips without
TSU
On Fri, 2015-01-16 at 22:27 +0300, Sergei Shtylyov wrote:
> Hello.
>
> On 01/16/2015 08:51 PM, Ben Hutchings wrote:
>
> > Currently net_device_ops::set_rx_mode is only implemented for
> > chips with a TSU (multiple address table). However we do need
> > to turn the PRM (promiscuous) flag on and off for other chips.
>
> > - Remove the unlikely() from the TSU functions that we may safely
> > call for chips without a TSU
>
> This is just optimization, worth pushing thru net-next instead.
This patch introduces calls to those functions for chips without a TSU,
and that makes the branch hint no longer correct. (Not that these
functions are speed-critical, so it doesn't matter that much.)
> > - Make setting of the MCT flag conditional on the tsu capability flag
> > - Rename sh_eth_set_multicast_list() to sh_eth_set_rx_mode() and plumb
> > it into both net_device_ops structures
> > - Remove the previously-unreachable branch in sh_eth_rx_mode() that
> > would otherwise reset the flags to defaults for non-TSU chips
>
> It couldn't be default for non-TSU chips, they don't seem to have
> ECMR.MCT. So it was just wrong.
>
> It would have been better if you did one thing per patch or at least
> didn't mix fixes with clean-ups...
[...]
I think this is one logical change.
Ben.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists