Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1396363
| Path | csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 06/21] net: dsa: mv88e6xxx: factorize MAC address setting |
| Date | Sat, 07 May 2016 22:40:02 +0200 |
| Message-ID | <rwhb4-9a-9@gated-at.bofh.it> (permalink) |
| References | <rvVWV-4tS-5@gated-at.bofh.it> <rvVWW-4tS-11@gated-at.bofh.it> <rvWpZ-5eP-25@gated-at.bofh.it> |
| User-Agent | Notmuch/0.22 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-unknown-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 31 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@savoirfairelinux.com, "David S. Miller" <davem@davemloft.net>, Florian Fainelli <f.fainelli@gmail.com> |
| X-Original-Date | Sat, 07 May 2016 16:37:03 -0400 |
| X-Original-Message-ID | <878tzlfvv4.fsf@ketchup.mtl.sfl> |
| X-Original-References | <1462571843-14397-1-git-send-email-vivien.didelot@savoirfairelinux.com> <1462571843-14397-7-git-send-email-vivien.didelot@savoirfairelinux.com> <20160506222320.GB2073@lunn.ch> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1396363 |
Show key headers only | View raw
Hi Andrew,
Andrew Lunn <andrew@lunn.ch> writes:
>> @@ -378,6 +385,7 @@ enum mv88e6xxx_cap {
>> #define MV88E6XXX_FLAG_EEPROM BIT(MV88E6XXX_CAP_EEPROM)
>> #define MV88E6XXX_FLAG_PPU BIT(MV88E6XXX_CAP_PPU)
>> #define MV88E6XXX_FLAG_SMI_PHY BIT(MV88E6XXX_CAP_SMI_PHY)
>> +#define MV88E6XXX_FLAG_SWITCH_MAC BIT(MV88E6XXX_CAP_SWITCH_MAC_WOL_WOF)
>> #define MV88E6XXX_FLAG_TEMP BIT(MV88E6XXX_CAP_TEMP)
>> #define MV88E6XXX_FLAG_TEMP_LIMIT BIT(MV88E6XXX_CAP_TEMP_LIMIT)
>
> There is a general pattern here that the flag has a name derived from
> the capability. Except you dropped the WOL_WOF here. It would probably
> be better to not have WOL_WOF at all.
Indeed, I did that because the global 2 register 0x0D "Switch
MAC/WoL/WoF" is used to indirectly configure the switch MAC address, the
Wake on Lan and Wake on Frame. So I explicitly named the capability
MV88E6XXX_CAP_SWITCH_MAC_WOL_WOF and the flag for the switch MAC
MV88E6XXX_FLAG_SWITCH_MAC.
So if we add support for WoL, we can then define:
#define MV88E6XXX_FLAG_WOL BIT(MV88E6XXX_CAP_SWITCH_MAC_WOL_WOF)
But I can get rid of it if it feels confusing.
Thanks,
Vivien
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH net-next 06/21] net: dsa: mv88e6xxx: factorize MAC address setting Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-05-07 00:00 +0200
Re: [PATCH net-next 06/21] net: dsa: mv88e6xxx: factorize MAC address setting Andrew Lunn <andrew@lunn.ch> - 2016-05-07 00:30 +0200
Re: [PATCH net-next 06/21] net: dsa: mv88e6xxx: factorize MAC address setting Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-05-07 22:40 +0200
csiph-web