From patchwork Tue Feb 18 08:58:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jijie Shao X-Patchwork-Id: 13979350 X-Patchwork-Delegate: kuba@kernel.org Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED1A9233D65; Tue, 18 Feb 2025 09:07:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739869679; cv=none; b=ueeqp570inUG02c28SvmZZJTWIOkhxz0OHODUtQ3FDE/Qfz6tV/dSMYqq3Nhm4bqMMkOzw2AorGiaETjxC+ViwdlVIJpjv5I7ZXPMIQtLDMA1K4VfEUucbQSpWXUCQ/BIfK4HBTXGpw40qWx14aOfiOnIFggHjaRfI3imTmz0nE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739869679; c=relaxed/simple; bh=OagImyTFvDBca1olZ2vqj6y6zfhL5U9ZXfBUD+OTWU0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iOT/CVwJXTsQM2XHB/lNMq5ESgi9n0w1UI9wQLxcCwFK4YCRIhIOJZTXd+RU5Ap73DduzwHvR90ukT5t0oZeZ2Q6NI47KSQ0/ZI2TCKlh0jjZknw1Xny3Cj+KgD1GwGirSlXt01RTAXnQ4aq5At3tjExaFzuP/wS8rSC64ehS7w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Yxtrd0YZwzTjWK; Tue, 18 Feb 2025 17:04:49 +0800 (CST) Received: from kwepemk100013.china.huawei.com (unknown [7.202.194.61]) by mail.maildlp.com (Postfix) with ESMTPS id 781E31402C1; Tue, 18 Feb 2025 17:07:48 +0800 (CST) Received: from localhost.localdomain (10.90.30.45) by kwepemk100013.china.huawei.com (7.202.194.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 18 Feb 2025 17:07:47 +0800 From: Jijie Shao To: , , , , , CC: , , , , , , , , , , , , , Subject: [PATCH v2 net-next 6/6] net: hibmcge: Add ioctl supported in this module Date: Tue, 18 Feb 2025 16:58:29 +0800 Message-ID: <20250218085829.3172126-7-shaojijie@huawei.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20250218085829.3172126-1-shaojijie@huawei.com> References: <20250218085829.3172126-1-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To kwepemk100013.china.huawei.com (7.202.194.61) X-Patchwork-Delegate: kuba@kernel.org This patch implements the .ndo_eth_ioctl() to read and write the PHY register. Signed-off-by: Jijie Shao Reviewed-by: Andrew Lunn --- ChangeLog: v1 -> v2: - Use phy_do_ioctl() to simplify ioctl code, suggested by Andrew. v1: https://lore.kernel.org/all/20250213035529.2402283-1-shaojijie@huawei.com/ --- drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c index be2279cbba00..de0c39559dea 100644 --- a/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c +++ b/drivers/net/ethernet/hisilicon/hibmcge/hbg_main.c @@ -5,6 +5,7 @@ #include #include #include +#include #include "hbg_common.h" #include "hbg_diagnose.h" #include "hbg_err.h" @@ -284,6 +285,7 @@ static const struct net_device_ops hbg_netdev_ops = { .ndo_set_rx_mode = hbg_net_set_rx_mode, .ndo_get_stats64 = hbg_net_get_stats, .ndo_fix_features = hbg_net_fix_features, + .ndo_eth_ioctl = phy_do_ioctl_running, }; static void hbg_service_task(struct work_struct *work)