Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1413285
| From | <Mario_Limonciello@Dell.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address |
| Date | 2016-06-03 17:10 +0200 |
| Message-ID | <rFYTv-4SD-1@gated-at.bofh.it> (permalink) |
| References | <rFE8p-8lc-1@gated-at.bofh.it> <rFE8p-8lc-3@gated-at.bofh.it> <rFTTP-1rX-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> -----Original Message-----
> From: Hayes Wang [mailto:hayeswang@realtek.com]
> Sent: Friday, June 3, 2016 4:44 AM
> To: Limonciello, Mario <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; 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
>
> 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
>
Hayes,
From the information that I got that this is only a valid thing to do on
RTL-8153-AD (when dock bit set), should this only match with
tp->version >= RTL_VER_03?
How can I confirm that the chip is 8153-AD specifically? I didn't see
something obvious in driver to tell this.
Thanks,
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Mario Limonciello <mario_limonciello@dell.com> - 2016-06-02 19:00 +0200
[PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Mario Limonciello <mario_limonciello@dell.com> - 2016-06-02 19:00 +0200
Re: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-02 19:50 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 20:40 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address <Mario_Limonciello@Dell.com> - 2016-06-02 21:10 +0200
Re: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Andrew Lunn <andrew@lunn.ch> - 2016-06-02 21:10 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address <Mario_Limonciello@Dell.com> - 2016-06-03 16:50 +0200
Re: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Andrew Lunn <andrew@lunn.ch> - 2016-06-02 21:10 +0200
Re: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Greg KH <gregkh@linuxfoundation.org> - 2016-06-03 04:10 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address <Mario_Limonciello@Dell.com> - 2016-06-03 17:20 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address Hayes Wang <hayeswang@realtek.com> - 2016-06-03 11:50 +0200
RE: [PATCH v2] r8152: Add support for setting MAC to system's Auxiliary MAC address <Mario_Limonciello@Dell.com> - 2016-06-03 17:10 +0200
csiph-web