Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2354655imm; Thu, 23 Aug 2018 20:13:59 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYuXmg/dtRElVdOa0QCOzOzwtwJOtBEAuT448UPM1F7yycVOJOjoWELr4U81jpqFwo0pL2g X-Received: by 2002:a62:4f0b:: with SMTP id d11-v6mr5237342pfb.132.1535080439662; Thu, 23 Aug 2018 20:13:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535080439; cv=none; d=google.com; s=arc-20160816; b=BSfsJzT9caucUPZc0MaKvaaoDVGuerGXRqKosIvfrtt96fLNIFqGzLvvgLcRY839Ug GEwt8OhXXh2l8bzwIf248nhsnYlGX8z2AldekeIcV5qTfyBnqt5x4tKIa3YK6+2qWL2k P5VSEYI+rVoAS4vB8bqccfIraB2URe4XFodZ2XgFyuXbQPS0CmMLa7d6Dz8biObPDw0L bnZ4B58RRaVgC3DAfUKCqMotPICFFyqbY8yxFTd/xcimRVHH7c9WnY1mJvzWb6qq2VSB LaB1QQn6ZUUmws0YIXF+EhHx9cOaanoO+tu6njZNy4DEWS1EooAdUM8YBkg4+lRHdOob tdLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=S3Rk1dqcX8G9u7s6SJMSnp+iHD9JcKjS/oXdLh8QZME=; b=I9rMf/VmiV4ZSgv2q15VcZo1xieofOqCioyx1omM6MbxBOuDH50yEkbdWIO4A2HL3Y eSDv6gpFjIu/D0jTxUoqTkhGbZj8UNxF+DoKvn+KYMAie6yruSxTGhYrvNFdNEvnKESA /iG5B8SQJw8rvgcUEn5onif5GZ7JtHqMSmcWHHmO5yV0ccBOQOndePiduriRSHIxHNe7 xgciouvQzHuWGrzXLkdOzbTBm/HIdbKKaoPt34vK0DS31IsY6lxXeYsmncTTBSx1HSDJ BCDSIRuEqmKj05fxZTgZGXfDJc8YWlr8pt3f56P87Qv9totuaf1nTGBfL7nIajndA0hk /Ruw== 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 n19-v6si2881430pfi.360.2018.08.23.20.13.44; Thu, 23 Aug 2018 20:13:59 -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 S1727552AbeHXGpO (ORCPT + 99 others); Fri, 24 Aug 2018 02:45:14 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:35173 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726174AbeHXGpO (ORCPT ); Fri, 24 Aug 2018 02:45:14 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 2E38FB2CD407C; 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 3/3] net: hns: add configuration constraints for 1000M half Date: Fri, 24 Aug 2018 11:42:23 +0800 Message-ID: <1535082143-122281-4-git-send-email-lipeng321@huawei.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1535082143-122281-1-git-send-email-lipeng321@huawei.com> References: <1535082143-122281-1-git-send-email-lipeng321@huawei.com> 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 Hisilicon hip05 and hip06 board network card do not support 1000M half configuration. Driver can not config gmac as 1000M half. Signed-off-by: Peng Li --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c index 09e4061..c1d062e 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c @@ -272,6 +272,11 @@ static int hns_gmac_adjust_link(void *mac_drv, enum mac_speed speed, { struct mac_driver *drv = (struct mac_driver *)mac_drv; + if (full_duplex == DUPLEX_HALF && speed == MAC_SPEED_1000) { + dev_err(drv->dev, "HW do not support 1000M half\n"); + return -EINVAL; + } + dsaf_set_dev_bit(drv, GMAC_DUPLEX_TYPE_REG, GMAC_DUPLEX_TYPE_B, !!full_duplex); -- 2.9.3