From: Hayes Wang <hayeswang@realtek.com>
To: Mario Limonciello <mario_limonciello@dell.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
Netdev <netdev@vger.kernel.org>,
Linux USB <linux-usb@vger.kernel.org>,
"pali.rohar@gmail.com" <pali.rohar@gmail.com>,
"anthony.wong@canonical.com" <anthony.wong@canonical.com>,
Greg KH <gregkh@linuxfoundation.org>
Subject: RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address
Date: Fri, 3 Jun 2016 09:43:35 +0000 [thread overview]
Message-ID: <0835B3720019904CB8F7AA43166CEEB2FED9B5@RTITMBSV03.realtek.com.tw> (raw)
In-Reply-To: <1464886687-16284-2-git-send-email-mario_limonciello@dell.com>
Mario Limonciello [mailto:mario_limonciello@dell.com]
> Sent: Friday, June 03, 2016 12:58 AM
[...]
> @@ -500,6 +502,7 @@ enum rtl8152_flags {
> SELECTIVE_SUSPEND,
> PHY_RESET,
> SCHEDULE_NAPI,
> + MAC_PASSTHRU = 0,
I don't think you have to give this a value.
> };
>
[...]
> static int set_ethernet_addr(struct r8152 *tp)
> {
> struct net_device *dev = tp->netdev;
> @@ -1041,6 +1088,10 @@ static int set_ethernet_addr(struct r8152 *tp)
> else
> ret = pla_ocp_read(tp, PLA_BACKUP, 8, sa.sa_data);
>
> + /* if system provides auxiliary MAC address */
> + if (get_auxiliary_addr(tp, &sa))
> + ret = 0;
It still has problem when tp->version == RTL_VER_01.
First, you would read the current MAC address (MAC1) to sa.sa_data.
Then sa.sa_data may be modified by MAC2 after get_auxiliary_addr().
However, the MAC2 wouldn't be set to the device, because
if (tp->version == RTL_VER_01)
ether_addr_copy(dev->dev_addr, sa.sa_data);
Therefore, you would find that dev_addr is MAC2, and the device
uses MAC1.
Best Regards,
Hayes
next prev parent reply other threads:[~2016-06-03 9:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 16:58 Mario Limonciello
2016-06-02 16:58 ` Mario Limonciello
2016-06-02 17:48 ` Greg KH
2016-06-02 18:32 ` Mario_Limonciello
2016-06-02 19:02 ` Andrew Lunn
2016-06-02 19:04 ` Mario_Limonciello
2016-06-02 19:09 ` Andrew Lunn
2016-06-03 14:44 ` Mario_Limonciello
2016-06-03 2:01 ` Greg KH
2016-06-03 15:10 ` Mario_Limonciello
2016-06-03 9:43 ` Hayes Wang [this message]
2016-06-03 15:08 ` Mario_Limonciello
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0835B3720019904CB8F7AA43166CEEB2FED9B5@RTITMBSV03.realtek.com.tw \
--to=hayeswang@realtek.com \
--cc=anthony.wong@canonical.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mario_limonciello@dell.com \
--cc=netdev@vger.kernel.org \
--cc=pali.rohar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®