Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1514192
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter |
| Date | 2016-11-02 23:40 +0100 |
| Message-ID | <szcml-3RL-13@gated-at.bofh.it> (permalink) |
| References | <syxVT-365-5@gated-at.bofh.it> <syxVT-365-13@gated-at.bofh.it> <syDRD-6U0-3@gated-at.bofh.it> <sySdY-7QX-13@gated-at.bofh.it> <syZSa-4ms-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Andrew,
Andrew Lunn <andrew@lunn.ch> writes:
> On Wed, Nov 02, 2016 at 02:07:09AM +0100, Vivien Didelot wrote:
>> Hi Andrew,
>>
>> Andrew Lunn <andrew@lunn.ch> writes:
>>
>> >> +#define LINK_UNKNOWN -1
>> >> +
>> >> + /* Port's MAC link state
>> >> + * LINK_UNKNOWN for normal link detection, 0 to force link down,
>> >> + * otherwise force link up.
>> >> + */
>> >> + int (*port_set_link)(struct mv88e6xxx_chip *chip, int port, int link);
>> >
>> > Maybe LINK_AUTO would be better than UNKNOWN? Or LINK_UNFORCED.
>>
>> I used LINK_UNKNOWN to be consistent with the supported SPEED_UNKNOWN
>> and DUPLEX_UNKNOWN values of PHY devices.
>
> These are i think for reporting back to user space what duplex or link
> is currently being used. But here you are setting, not
> reporting. Setting something to an unknown state is rather odd, and in
> fact, it is not unknown, it is unforced.
Do you expect to return an error if adjust_link is called with
phydev->duplex == DUPLEX_UNKNOWN, or, do you expect to fallback to
unforced duplex when setting such value?
Thanks,
Vivien
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-11-01 04:30 +0100
Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Andrew Lunn <andrew@lunn.ch> - 2016-11-01 10:50 +0100
Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-11-02 02:10 +0100
Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Andrew Lunn <andrew@lunn.ch> - 2016-11-02 10:20 +0100
Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-11-02 23:40 +0100
Re: [PATCH net-next 07/11] net: dsa: mv88e6xxx: add port link setter Andrew Lunn <andrew@lunn.ch> - 2016-11-03 00:10 +0100
csiph-web