From patchwork Mon Mar 25 14:12:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Limonciello, Mario" X-Patchwork-Id: 10869287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 03B4F1575 for ; Mon, 25 Mar 2019 14:13:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E389028CAC for ; Mon, 25 Mar 2019 14:13:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D797E29019; Mon, 25 Mar 2019 14:13:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C1DC28CAC for ; Mon, 25 Mar 2019 14:13:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726327AbfCYOM6 (ORCPT ); Mon, 25 Mar 2019 10:12:58 -0400 Received: from esa6.dell-outbound.iphmx.com ([68.232.149.229]:24156 "EHLO esa6.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725355AbfCYOM5 (ORCPT ); Mon, 25 Mar 2019 10:12:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dell.com; i=@dell.com; q=dns/txt; s=smtpout; t=1553523177; x=1585059177; h=cc:from:to:subject:date:message-id; bh=Igp6GPMRxzdz4EcLu4mmrctowFRXI8UkHE9HuizoM2s=; b=Y19f+xEaP5AUuAKwQ5GZUJXNa5zSCCILdI8PS8ySjuUixTf9mgh/Hg+h m8bPzQpq4M7VlmFqtJ4ZqkapZ9lje/bwKCnrLyw6o6E9pp+2s+dQra75L Sv0w42r80SSeDexmprTwNZs+muPZvUB/pTZUE9sZ4Zq+mxedf8rC30d+d o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2FwAACv4ZhchyeV50NkHgEGBwaBVAYLAYFmghUnjQmlHoFnDQEBhGyFFSI3Bg0BAQMBAQkBAwIBAQIQAQEBCgsJCCkvgjopAYJqFhVST4ECIoMAgXahfz0Cb4EBiQcBAQGBazOFRoRigS8BhmmESIFXP4RhhC1khRQDkjWSYQcCgkcEkG4CF5N9AS2eGQIEAgQFAhWBY4F5cIM8giSBCQECjTkiATGQJgEB X-IPAS-Result: A2FwAACv4ZhchyeV50NkHgEGBwaBVAYLAYFmghUnjQmlHoFnDQEBhGyFFSI3Bg0BAQMBAQkBAwIBAQIQAQEBCgsJCCkvgjopAYJqFhVST4ECIoMAgXahfz0Cb4EBiQcBAQGBazOFRoRigS8BhmmESIFXP4RhhC1khRQDkjWSYQcCgkcEkG4CF5N9AS2eGQIEAgQFAhWBY4F5cIM8giSBCQECjTkiATGQJgEB Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa6.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Mar 2019 09:12:43 -0500 Received: from pps.filterd (m0090351.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x2PE8Xrg079378; Mon, 25 Mar 2019 10:12:43 -0400 Received: from esa5.dell-outbound2.iphmx.com (esa5.dell-outbound2.iphmx.com [68.232.153.203]) by mx0b-00154901.pphosted.com with ESMTP id 2rewgq9953-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2019 10:12:42 -0400 Cc: davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hayeswang@realtek.com, sjg@google.com, campello@google.com, Ryan Hong , Crag Wang , Mario Limonciello Received: from ausxippc101.us.dell.com ([143.166.85.207]) by esa5.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 25 Mar 2019 20:11:51 +0600 X-LoopCount0: from 10.173.37.27 X-IronPort-AV: E=Sophos;i="5.60,269,1549951200"; d="scan'208";a="1215647042" From: Mario Limonciello To: linux-usb@vger.kernel.org Subject: [PATCH] r8152: Refresh MAC address during USBDEVFS_RESET Date: Mon, 25 Mar 2019 09:12:23 -0500 Message-Id: <1553523143-23072-1-git-send-email-mario.limonciello@dell.com> X-Mailer: git-send-email 2.7.4 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-03-25_09:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=807 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1903250106 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On some platforms it is possible to dynamically change the policy of what MAC address is selected from the ASL at runtime. These tools will reset the USB device and expect the change to be made immediately. Signed-off-by: Mario Limonciello Reviewed-by: Simon Glass --- drivers/net/usb/r8152.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c index 86c8c64..eb5351b 100644 --- a/drivers/net/usb/r8152.c +++ b/drivers/net/usb/r8152.c @@ -4268,6 +4268,9 @@ static int rtl8152_post_reset(struct usb_interface *intf) if (!tp) return 0; + /* reset the MAC adddress in case of policy change */ + set_ethernet_addr(tp); + netdev = tp->netdev; if (!netif_running(netdev)) return 0;