Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1412476

Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address

From Bjørn Mork <bjorn@mork.no>
Newsgroups linux.kernel
Subject Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address
Date 2016-06-02 20:10 +0200
Message-ID <rFFea-103-29@gated-at.bofh.it> (permalink)
References <rFmlc-5Hs-15@gated-at.bofh.it> <rFnqV-6zm-1@gated-at.bofh.it> <rFqoO-8qx-7@gated-at.bofh.it> <rFCJj-7Au-11@gated-at.bofh.it> <rFD2F-7GN-3@gated-at.bofh.it>
Organization m

Show all headers | View raw


<Mario_Limonciello@Dell.com> writes:

>> > 2) Track whether this is the first or second USB NIC plugged in.  Only offer it
>> on the first NIC detected by r8152.  When the second NIC is plugged in don't
>> match from ACPI.
>> > There would be a question of what to do if the first NIC is removed and
>> added back if it should get the persistent system MAC or not.
>> > I'd say yes, just make sure that only one NIC can have it at a time.
>> 
>> You are going to get things very complex very quickly if you try to do this.
>
> It's really not that hard, track a module wide static variable whether
> the feature is in use.  Track in each device whether the feature was
> in use.  If it in use, don't assign the next device plugged in via the
> ACPI string.  If a device is removed that has the feature activated,
> change the module wide static variable.

Having the mac address jump around in an arbitrary way like this is
going to confuse the hell out of your users.  Consider what happens if
the user docks a laptop with an r8152 usb dongle already plugged in...
How are you going to explain that the dock gets some other mac address
in this case? How are you going to explain the difference between using
an r8152 based dongle and some other ethernet usb dongle with your
systems?

Make it behave consistently if you're going to add this.  Which can be
done by specifically matching the Dell dock (doesn't it have an unique
Dell device ID?) and ignoring any other r8152 device.  You could also
choose to set the same mac for all r8152 devices.  Which is fine, but
will probably confuse many users.

What you definitely should not do is to change the mac for some
arbitrary "first" device.  Then you are better off with the userspace
proposal where you and your users have some chance to implement a
sensible policy based on e.g. usb port numbers.



Bjørn

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Mario Limonciello <mario_limonciello@dell.com> - 2016-06-02 00:00 +0200
  Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Andrew Lunn <andrew@lunn.ch> - 2016-06-02 00:30 +0200
    RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 00:40 +0200
      Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-02 01:10 +0200
        RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 04:00 +0200
  Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-02 01:10 +0200
    RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 04:20 +0200
      Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-02 17:30 +0200
        RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 17:50 +0200
          Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-02 18:10 +0200
            RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 19:00 +0200
              RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Hayes Wang <hayeswang@realtek.com> - 2016-06-03 11:30 +0200
                RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-03 17:00 +0200
          Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Bjørn Mork <bjorn@mork.no> - 2016-06-02 20:10 +0200
            RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 20:30 +0200
              Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Pali Rohár <pali.rohar@gmail.com> - 2016-06-02 21:10 +0200
                RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 21:20 +0200
            Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Pali Rohár <pali.rohar@gmail.com> - 2016-06-02 20:50 +0200
    RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 05:00 +0200
      Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Bjørn Mork <bjorn@mork.no> - 2016-06-02 10:20 +0200
        RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 16:30 +0200
    Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Bjørn Mork <bjorn@mork.no> - 2016-06-02 09:30 +0200
  RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary MAC address Hayes Wang <hayeswang@realtek.com> - 2016-06-02 08:20 +0200
  Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Pali Rohár <pali.rohar@gmail.com> - 2016-06-02 09:50 +0200
    RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 16:50 +0200
      RE: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 17:10 +0200
      Re: [PATCH] r8152: Add support for setting MAC to system's Auxiliary  MAC address Andrew Lunn <andrew@lunn.ch> - 2016-06-02 17:10 +0200

csiph-web