Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2355196imm; Thu, 23 Aug 2018 20:14:54 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzTRI4M46NTMIF9YP9bnLFSt0QsHfEuJuEJok5zJ7HjZQl+od/UxgfTMGaPK75iBzn3T4ga X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr38670257plh.52.1535080494387; Thu, 23 Aug 2018 20:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535080494; cv=none; d=google.com; s=arc-20160816; b=x0DkfgjzwCGPWd/mg/f8p6gDAu8GCHCc31sb3mJ0+9XthdR+xpsFcSJxcFa4hk87BQ GcUUqaK5R/nu4gk7yZnT0k3uFIhxrUqADDEkTPgnTMA6p7xP4gStH8YJuonzVpMW+utc XuoDJDArIRdASqTBKPc2/6jHCzpMRtNsYBQdCjdQ2zilMF74VfnmbYg4mir7RNFoA2DU 1IgxrTnuRSkCIfS5bIIlfzdlsgvsxpif9JMNc+94TyOlOXC26ivMcPd25vtAd8cjCMm/ znkjOlMpvCqjTj7zepEH0I19S0DGyJi4wPk+iJ2NSNWnn32YjqhGOesbjB/OJdB/UnvF pKTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=hb6rM4QYdmZ1UfObCcSfSFpUMV0d4Ju3ixXzHPESah4=; b=E6PdNcCPA5oywe9sGp2mG0JZLHhs3Gxnftb4+tpABoEPbYr+os1l5k9TWSkLSGzKrt TJkYYkym6y9aaAGRYskTB30iQsCokL1PdXYes2pag+DwUsaQsqQBJEVMW/LSSSuP/sE9 e4U3vS0KUwL3SQSOuV17gjjWpb1NufdgauvXIZQdv4GCYAUS3bZU8Lkfzmbi9lnEiqh9 N52Irz8sMAme0z98V7hw52SHZ+O7LwULB2C0XbSPxJrTyi/W2PIcZxaM598sETC35hR1 sJAb+mgVQ7ROG2ZKWQIsP63geVH12t5B3hO8wqAawA4bBuG2TGhubFxf9Ys+LGOgZpT7 1dUw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z187-v6si4923921pgd.2.2018.08.23.20.14.38; Thu, 23 Aug 2018 20:14:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727397AbeHXGpO (ORCPT + 99 others); Fri, 24 Aug 2018 02:45:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35172 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726244AbeHXGpN (ORCPT ); Fri, 24 Aug 2018 02:45:13 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 25F19486E7275; Fri, 24 Aug 2018 11:12:33 +0800 (CST) Received: from linux-ioko.site (10.71.200.31) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.399.0; Fri, 24 Aug 2018 11:12:26 +0800 From: Peng Li To: CC: , , , , , Subject: [PATCH net 0/3] net: hns: fix some bugs about speed and duplex change Date: Fri, 24 Aug 2018 11:42:20 +0800 Message-ID: <1535082143-122281-1-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.71.200.31] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 1, If there are packets in hardware when changing the spped or duplex, it may cause hardware hang up. This patchset adds the code for waiting chip to clean the all pkts(TX & RX) in chip when the driver uses the function named "adjust link". This patchset cleans the pkts as follows: 1) close rx of chip, close tx of protocol stack. 2) wait rcb, ppe, mac to clean. 3) adjust link 4) open rx of chip, open tx of protocol stack. 2, Hisilicon hip05 and hip06 board network card do not support 1000M half configuration. Driver can not config gmac as 1000M half. Peng Li (3): net: hns: add the code for cleaning pkt in chip net: hns: add netif_carrier_off before change speed and duplex net: hns: add configuration constraints for 1000M half drivers/net/ethernet/hisilicon/hns/hnae.h | 2 + drivers/net/ethernet/hisilicon/hns/hns_ae_adapt.c | 67 +++++++++++++++++++++- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 41 +++++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.c | 44 ++++++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_mac.h | 8 +++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 29 ++++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 3 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.c | 23 ++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_ppe.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 23 ++++++++ drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_dsaf_reg.h | 1 + drivers/net/ethernet/hisilicon/hns/hns_enet.c | 21 ++++++- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 + 14 files changed, 262 insertions(+), 4 deletions(-) -- 2.9.3