lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1535082143-122281-4-git-send-email-lipeng321@huawei.com>
Date:   Fri, 24 Aug 2018 11:42:23 +0800
From:   Peng Li <lipeng321@...wei.com>
To:     <davem@...emloft.net>
CC:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linuxarm@...wei.com>, <yisen.zhuang@...wei.com>,
        <salil.mehta@...wei.com>, <lipeng321@...wei.com>
Subject: [PATCH NET 3/3] net: hns: add configuration constraints for 1000M half

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 <lipeng321@...wei.com>
---
 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ