From patchwork Tue Oct 22 00:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13844906 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 64C4A1CFB6; Tue, 22 Oct 2024 00:22:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.170 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556572; cv=none; b=P8ALW6d5/7/eTyY+uVK0dU7ExjcRDDuT03tFAyWpWpvJy24Jq62SbzJPRJnEov9JXoqZavlREypZR6O+sGXhRoG6koCkB1zCFUnB7IAOGeiQC69Lb3LIOxfe/4u1vyzdgpwhoinVKAmW+sH6Ys/ynPrCd3jpkyt0AoBWuNtbaZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556572; c=relaxed/simple; bh=MpPzqbf3QaeIL408JP0EEziCl+Tb8FH98+72eTKTBUI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PV5F6SwTK/8/rKVaFZMZ6k9uMVulwi0u1gvVBAcknGmHnEsW2qCT3kGhBv3W0zKsBJV4eir8qZFIHc6dsT+xf3Cfxwp4ouqNnEGUSTqfCjgZgXBHVur5ZV+ppIeSeLNZzmc/Ty1AHQGWDfBc7Tkv5UmV4Kiea0uXR4wMA79KJjY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=X58qno0c; arc=none smtp.client-ip=209.85.210.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X58qno0c" Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-71ec12160f6so1298188b3a.3; Mon, 21 Oct 2024 17:22:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729556569; x=1730161369; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=2Skv/FwWiqOmJCmi289YOKQkgyeCp5KZu2TwCeimUcA=; b=X58qno0cIBfW/Spmv3wA8eyXOz0AuW3XfKG0qkvJlXY8+KTKnjsfElnKshIf4XKeja n5l7g6Ni3SSUYGqM6jcv5TZ8LYUWVMxl/KSsHlvtgbJEi5zuQFIECbOB1NeAw1mGRYkp /Uud0+WcDCMsAtJVTL2OAGF4m0cvMuivQewfPyhjYMCBSIxbX9JaWSBu5JuqGSFQNpbB c42RngxSQ3ZqFp6/yqYqxELqwTnVfzaudI+hprEDYR/rOuWaq9ovAg0f3XM/jaU0cIyy unO0BnhwU+kXnt3ETrQuxXu6X7Btl/DgQEpoK9vyCTcXGC8ekAe7VODEWYcEFonY8OaA OzXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729556569; x=1730161369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2Skv/FwWiqOmJCmi289YOKQkgyeCp5KZu2TwCeimUcA=; b=V3TOyV45RiVMksMXGmBgTYsni63pEDxhlU03MuzV9xJPKNcIgefakcV9XgQsQ2ZpcG 0JBd5J3a7ZfmWXIY1fE1YNwwg8LnfoqkRMQgU3yJuMY7gXrhaNie0MCkCcyqtWpozA2Z jn4aTx89SX34EBpzyTwqEzvAysJavmwVjlouDK9ny+5F2IdXFEDyMRaLyuH5qbOaaV66 9WRXwb+rqxjRxN9HXp0V37fiJ7aWHezubfb7gWXtiZBFl7b8zCsMvrVQNmUYWaVgS1C8 bZsf4+UM1VfPJwv0k4qWo58AYUhlW+MDH/+yPRAejz1+IlU/iiH1pAXfAXr9eb2m+cxD GGuw== X-Forwarded-Encrypted: i=1; AJvYcCXOfx9WXaChyq5MTNoTwFrPhQ5fNPQ0mt9eciD9OyxPSJ09k+xZZ8svWiZcAWBnV1ziTKSC+Tg68m5k9QU=@vger.kernel.org X-Gm-Message-State: AOJu0YzNJdPbb6+FsHobK07OXNWmw03nPbF+0flq81uhhobcsn7QyuFU RA+W1pZ4JtNP05q78QxgY5FACFRLPZyiyNlZRYNMrP3gzdUKlFH8ws0Aclr6 X-Google-Smtp-Source: AGHT+IEZCV220ex4o5I0jhspxnJlBg6n8DKBkOiTuABBWCzFR79Srw8grPPiz4Vcuxk4duFmZ7Pfew== X-Received: by 2002:a05:6a21:394c:b0:1d9:aa1:23e3 with SMTP id adf61e73a8af0-1d92c589108mr18727550637.32.1729556569408; Mon, 21 Oct 2024 17:22:49 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec132ffdcsm3515828b3a.46.2024.10.21.17.22.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 17:22:49 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rosen Penev , Simon Horman , Shannon Nelson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv8 net-next 1/5] net: ibm: emac: use netif_receive_skb_list Date: Mon, 21 Oct 2024 17:22:41 -0700 Message-ID: <20241022002245.843242-2-rosenp@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022002245.843242-1-rosenp@gmail.com> References: <20241022002245.843242-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org Small rx improvement. Would use napi_gro_receive instead but that's a lot more involved than netif_receive_skb_list because of how the function is implemented. Before: > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 51556 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 559 MBytes 467 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 48228 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.03 sec 558 MBytes 467 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 47600 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 557 MBytes 466 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 37252 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 559 MBytes 467 Mbits/sec After: > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 40786 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 572 MBytes 478 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 52482 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 571 MBytes 477 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 48370 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 572 MBytes 478 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 46086 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.05 sec 571 MBytes 476 Mbits/sec > iperf -c 192.168.1.1 ------------------------------------------------------------ Client connecting to 192.168.1.1, TCP port 5001 TCP window size: 16.0 KByte (default) ------------------------------------------------------------ [ 1] local 192.168.1.101 port 46062 connected with 192.168.1.1 port 5001 [ ID] Interval Transfer Bandwidth [ 1] 0.00-10.04 sec 572 MBytes 478 Mbits/sec Signed-off-by: Rosen Penev Reviewed-by: Simon Horman --- drivers/net/ethernet/ibm/emac/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index dadd987efb6b..0edcb435e62f 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -1727,6 +1727,7 @@ static inline int emac_rx_sg_append(struct emac_instance *dev, int slot) /* NAPI poll context */ static int emac_poll_rx(void *param, int budget) { + LIST_HEAD(rx_list); struct emac_instance *dev = param; int slot = dev->rx_slot, received = 0; @@ -1783,8 +1784,7 @@ static int emac_poll_rx(void *param, int budget) skb->protocol = eth_type_trans(skb, dev->ndev); emac_rx_csum(dev, skb, ctrl); - if (unlikely(netif_receive_skb(skb) == NET_RX_DROP)) - ++dev->estats.rx_dropped_stack; + list_add_tail(&skb->list, &rx_list); next: ++dev->stats.rx_packets; skip: @@ -1828,6 +1828,8 @@ static int emac_poll_rx(void *param, int budget) goto next; } + netif_receive_skb_list(&rx_list); + if (received) { DBG2(dev, "rx %d BDs" NL, received); dev->rx_slot = slot; From patchwork Tue Oct 22 00:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13844907 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C7031132114; Tue, 22 Oct 2024 00:22:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556573; cv=none; b=G5fL9Qwg/cqnWspgqWb5hTMfCNW6AXvkTGtKr5PkRP+afddcJxuIapJ23Kar2LEcnWnqWJV69sWwCoHI9xoZTVQd0SFwnqAxrbYm1Rboq92lxuKJFVJYWr5HnuJuNEFEx+Ikvw/qawrllHehz6J6j+v346LQB+McPzdCOT9CdzQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556573; c=relaxed/simple; bh=Ijr5qcYCwL0MP8IwvmauY2dTqu7ak11nbr/ucp6yWLg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cfE2vFqv56ZSLhxl5/1tpY2oUzg3Zlj6zdniaefX+nx3ajC202Aq1eJTYxFztGJD9e8FwvKMHDH6reWmiKd3jnyLtnYMUhJIkh00NsDR7iAaol05Kbxd1QelqcO5/590jZlU/yXCk4fNaFP7fpy7/mQQ/6fDMtJAUTy7+Uzxy+c= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=K3aWPkkd; arc=none smtp.client-ip=209.85.215.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="K3aWPkkd" Received: by mail-pg1-f177.google.com with SMTP id 41be03b00d2f7-7ea7ad1e01fso3377936a12.0; Mon, 21 Oct 2024 17:22:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729556571; x=1730161371; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9iOvJHY7noQWPo50zyN8nZPU/GMtWV7jlXjn0h+1KFs=; b=K3aWPkkdsv8y+2k/OcnZhrc83pJd0T/X5hGMgIrm8FBxIKt7PNUDgzia091Fj+2i5z 9hw0V1miRVCf0aQ0K6y/YGRdAprpDBOG/g1qLHREGxCmzgMtPnmBsAFHWekgHAQ46jB/ vjONXY2c1357eh4G0J2BTO6suFOl4XG82h5wWimG2vuFozVbfHZYyToYR2H8T3ZFa1Ju 9hPxjsmO6ztX/mLsubZZwks0V0lgfvfkvKQ/f8s3vtHkJK3OeD9nwNHaELnDfvmpNUui /2aWRcHS+WwQg9G+KSal4HPS9vzuu10uIewJpKv7FUgmSl2uHb4r1QmphZ8o2Om0abLB cWhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729556571; x=1730161371; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9iOvJHY7noQWPo50zyN8nZPU/GMtWV7jlXjn0h+1KFs=; b=qcZbCQrmFkiBXTDxhHj0uz330mjb1VniMF3XcJQHJ9DQbFYg3aH9/S7kLaO+RSJ9Fn LmtwnxJJcos9DeoIUgpCC6cpamV8N+V1f/i6FBcR2xMq5zSbTKp7RhkBE46+yd7F/KFv ozKBGDJbRuTOxPu8TcFtT1ECOVc4+cG8V/rxOCd4y71qpxXs62mVNzQgzzHcm7Cwn01R H2Npa6z8ju451LhyTp3vfoVgjHuBPZTOzdtq3hBaSFX+BK1pdWv1S56ORYWrSgs5BrP+ ulwZx5AJ/Lo5zRFK8/5uqQFsYUOtGba+nDenT00AXYFvbXOk2H1Q6JyNuMRs43IHKl3E IiaQ== X-Forwarded-Encrypted: i=1; AJvYcCXoQj9qX0Fa5WZFtEJ6McyAiqtYx5tPmjuupG7WKNQd++/6BqHR5KoaEPIuQgBT4yapCHYlg72QduHy9/4=@vger.kernel.org X-Gm-Message-State: AOJu0Yz66ZLVEEOuis9MYXM8PKCADZCw24MzRMO76gnlpnB3xCURKa+R gu/DIHdt2JsqxdJQQsPirphQx6SmJiBYYYqmY6WalPGnWpSCrRRKA8tbIist X-Google-Smtp-Source: AGHT+IE2rCRwOxopf2j76K1O6AnrRG+wVa6XiRbvonFZCPdGPIs9bL50VQeZhEfT3GwR5nm/BeJIoQ== X-Received: by 2002:a05:6a20:cc0a:b0:1d8:f97e:b402 with SMTP id adf61e73a8af0-1d96c3cb217mr1962195637.13.1729556570862; Mon, 21 Oct 2024 17:22:50 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec132ffdcsm3515828b3a.46.2024.10.21.17.22.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 17:22:50 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rosen Penev , Simon Horman , Shannon Nelson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv8 net-next 2/5] net: ibm: emac: use devm_platform_ioremap_resource Date: Mon, 21 Oct 2024 17:22:42 -0700 Message-ID: <20241022002245.843242-3-rosenp@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022002245.843242-1-rosenp@gmail.com> References: <20241022002245.843242-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org No need to have a struct resource. Gets rid of the TODO. Signed-off-by: Rosen Penev Reviewed-by: Simon Horman --- drivers/net/ethernet/ibm/emac/core.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 0edcb435e62f..f387c4635cc6 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -3050,12 +3050,10 @@ static int emac_probe(struct platform_device *ofdev) ndev->irq = dev->emac_irq; - /* Map EMAC regs */ - // TODO : platform_get_resource() and devm_ioremap_resource() - dev->emacp = devm_of_iomap(&ofdev->dev, np, 0, NULL); - if (!dev->emacp) { + dev->emacp = devm_platform_ioremap_resource(ofdev, 0); + if (IS_ERR(dev->emacp)) { dev_err(&ofdev->dev, "can't map device registers"); - err = -ENOMEM; + err = PTR_ERR(dev->emacp); goto err_gone; } From patchwork Tue Oct 22 00:22:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13844908 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2575413957B; Tue, 22 Oct 2024 00:22:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556574; cv=none; b=lU5ZwaUR6a4/LshmThCGnKuNNJJ4E6Fj36+SaWTAr/dnU2WbUESzsIar1syJyt04sfOC5+QEa9IVvrTS46vjkj8QtDFGrJlWaGTa1qs0gLdIQk3jodCNOI+9XjfFa6b1/W6mOLaU13pAsn7XEd8HNOoGYHxtEA4i681hh5Zd6KA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556574; c=relaxed/simple; bh=QPD+w9WV8cDvz3ihvrGAzBAHZlCrhDAeouYa3KaoNWo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ERgB8aLkkRVM069gsxLehaGumm19q2UrfHVqv5DwOb4OdmXm3kZUaXSsBn0/H8AAK9YbbfVcHjG29pxNvqrwWDdDVVQevOhZ+FzBKCE9fE1ehBcvlAh6V+PJbQjzX5WKPvkLUAptxhLcg379+uQfC/jsO1Pk8+WT6gD93+272kg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=baGWC8ef; arc=none smtp.client-ip=209.85.210.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="baGWC8ef" Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-718e9c8bd83so4155071b3a.1; Mon, 21 Oct 2024 17:22:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729556572; x=1730161372; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=x4BxEn7ENonrVt9RzcXJADLmBbb8Hf8lMTRGUW7oIGA=; b=baGWC8ef06j99GXBEYP8Z3a9FaiuJwUHDRK3TBoa0onIr/6b7KdCSdxDOuwdeaJ3K2 9vIwKboa09eonoLbjhL9KE+RhtKtduPKRhqbuyHEfQpvvJhj9Ck+g3AMrwfqQ+df/2lv 6CvlYPxO7R4gzLLOoJ6Axf7SyxBg4nm6u4zL26iCKKv6wpnNZdveBgjdH6szjxli9hfl RjYRvgmCb5qJzeH1uel/vq2PdBU5qjGB1EO+5K1solYAnI71d2XmNqdhqMNZmTtGr4U5 s+3JtsWrJdHYTkai3Wx4razgaJw7BVQfmYIrwGFtKT9NgCh6fX3k8nTnA4yEXiVfJnXN HW2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729556572; x=1730161372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4BxEn7ENonrVt9RzcXJADLmBbb8Hf8lMTRGUW7oIGA=; b=KWiN6g2rOroNBnUNUK54HjGd6ePFJokoJxdc5F1cLWXsIakhExhCpNULvIc8jQgyEA BH5fbTDJ4CwWgznmluc9iRzADcLKwtGKTTiUUmt5PRVaBKfsGkUhljzyn34383N2bp0n xSWqzrjiNNszA0/G6L0q7BFTB1CoUYnct2osaPbW1i1Wvr/gdsbItU7cINEnT75BPqlU lLkRtn8WJyDRtkoRjLKVGDbz7fwNIqsnlA/xNtVXQ59/M8uBW50Nz3SBsZd/JVGPAtF1 SGK3tRNZfhzwkxNrhH4qgrIlfyqq42+ZwEi58EgD41pFQi2XlQRFpfH41+MLMFiWK8eI fZsA== X-Forwarded-Encrypted: i=1; AJvYcCXJ+PjGU0mBgz8jynKxML/hMfH2lZdOpDuuEn8px+oF7Cgdy60HR2FOISZh2w1NTKzZR1IlEL4mQkCcV6w=@vger.kernel.org X-Gm-Message-State: AOJu0YxqMB4ny2c8I98fRO6wQlCec+eAiwPKstLRHZcWV8QLZ5oZ7N3n W2/u89fL67VUIbWqwjHFC/eZLJp7JPxKQoCpxozcwzQnLyCXNXvYLn1jQFNf X-Google-Smtp-Source: AGHT+IEEq6VHhuFOOj+3kOkYnzChSHGo6QHHpoH1KdksXKoPcvgbjcNyI2KLaah20PW00dbEGPmGPw== X-Received: by 2002:a05:6a00:270f:b0:71e:591d:cb4c with SMTP id d2e1a72fcca58-71edc132de9mr1966789b3a.1.1729556572232; Mon, 21 Oct 2024 17:22:52 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec132ffdcsm3515828b3a.46.2024.10.21.17.22.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 17:22:51 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rosen Penev , Simon Horman , Shannon Nelson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv8 net-next 3/5] net: ibm: emac: use platform_get_irq Date: Mon, 21 Oct 2024 17:22:43 -0700 Message-ID: <20241022002245.843242-4-rosenp@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022002245.843242-1-rosenp@gmail.com> References: <20241022002245.843242-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org No need for irq_of_parse_and_map since we have platform_device. Signed-off-by: Rosen Penev Reviewed-by: Simon Horman --- drivers/net/ethernet/ibm/emac/core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index f387c4635cc6..8c6f69f90af9 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -3031,15 +3031,8 @@ static int emac_probe(struct platform_device *ofdev) if (err) goto err_gone; - /* Get interrupts. EMAC irq is mandatory */ - dev->emac_irq = irq_of_parse_and_map(np, 0); - if (!dev->emac_irq) { - printk(KERN_ERR "%pOF: Can't map main interrupt\n", np); - err = -ENODEV; - goto err_gone; - } - /* Setup error IRQ handler */ + dev->emac_irq = platform_get_irq(ofdev, 0); err = devm_request_irq(&ofdev->dev, dev->emac_irq, emac_irq, 0, "EMAC", dev); if (err) { From patchwork Tue Oct 22 00:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13844909 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89B5113BAD5; Tue, 22 Oct 2024 00:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556575; cv=none; b=f1MftT7Qt3EGsmGvH0nQw0VcGaMNb0e7LhEXijlwG18XjpVSPjLCVXAcwe5HAERaIP/oxcbFgYEQRhK1nsg+L4SlPhTVl6Nx6JpvPojNwO1pR1foXogf2VgPXJqN0HEqBV9YeE2IaPrGaEHExWcj+gdDIo/sJwR7eVkJcUWzluE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556575; c=relaxed/simple; bh=bRJEmCY6y5URF2HzcYMggNfJbAYgHx9jPeoF9VvccGA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bOeGs5jKZBUJginrT1ZZc08n9aF25rYN+Tlz9v4YY8V7WtgpgDY+QqIeiI05OVOgQXTmoRJ+aEVnjAkl/TkxMQ67zyDb2ZS5ldtVGOM5oNga1LpJ+grx/dYjCcZSfAsjK3ne4y6WVdwWXbkioLejDEFMCGoS6Qd4eRLLxn8myQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=j2JeGpSs; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="j2JeGpSs" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-71e4fa3ea7cso3865143b3a.0; Mon, 21 Oct 2024 17:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729556574; x=1730161374; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0BljbYSB0xd4xASN/k+CEDImFtvVnFRPDAYQ2ETtbOU=; b=j2JeGpSssahC4qR94Cr1lI8UA0ne8c0DXnLldxQHn6oeeW0N3h8PrMVJvi6uPOAeex b61RmU/j5DuGyKuq6Ta0RF+xz0y+N0yobQkZNe1sMVhVcu9GS8Hdllz01YtIrzD0k6rA q6Nlt0VP+Dea8czT+0+2sr5nedVVC0xNof4vl6WCYEzC4MXXwq8YUWmokL7D0fvru60v P8m/P3qJfBcFRNWpajg1DfKofXtooreehhw6o9W7Nxv4gy7JXI7gSBBUasDLypTmPIK7 wP+rRfYXhGVBcLQnynb38uJrKKf3gLD6UMCjJLto3p1SAkl358eQvgMwXwFWjMOwvfxc BbAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729556574; x=1730161374; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0BljbYSB0xd4xASN/k+CEDImFtvVnFRPDAYQ2ETtbOU=; b=brNyWzLcV5msB4iRyaCBk0sjAr0LACqlkTqf5ZUohlh2jzw9vy4smI0Zl6IIFBVDEO KZEA6GCcbLw8X6mYFm+Ycpl3oIScZWVP6+bMsfRWsZEoSLhXZZ5l45bKSpwp3k/PxNtv KqpCCdAuZL6QHYubDu8H2o4eFeGAW5ofBvE48B2RitmKZ9lHhf2Ds1aLYkM9siApOE7L nsAteXg1Uli/2ww6GoD+CDBiNPfVnXXubSIAdW31xCfHX4r8xVFtHEsN+4PAtqPi7Pjn hju4Om+YxLfaZXqY61QTRIAzuDjzKRuND5HNOwOXSYGkdPlc/Z0VI6brG1tx47DmLjka 8XPA== X-Forwarded-Encrypted: i=1; AJvYcCXcvdJAD5uVj33uoQfXNg3cQgbwQE0h8jyomz0XdbOwKatPPZVfTfsxNlJykqSBbq/X0rTWvfS4r2N/SQs=@vger.kernel.org X-Gm-Message-State: AOJu0Yy1dnV+6dmENuT43PcyOXMi8Sgy97X29Kt28q62G8p0SeUCuluj barU2lxXdcUilY6TIQ2K9epqMdbyzDHV+gwzalFdv4fjaxmg1Ty8UPVf5hvz X-Google-Smtp-Source: AGHT+IHs+DJm4ebsLhEHrCEq7VQ5+TOlGsc2hl0tpr6gA/ZvaRvoFE/AI543kSNY8CB2IulSOeiTyw== X-Received: by 2002:a05:6a00:23d1:b0:710:9d5d:f532 with SMTP id d2e1a72fcca58-71ea32ea78bmr20615281b3a.19.1729556573504; Mon, 21 Oct 2024 17:22:53 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec132ffdcsm3515828b3a.46.2024.10.21.17.22.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 17:22:53 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rosen Penev , Simon Horman , Shannon Nelson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv8 net-next 4/5] net: ibm: emac: use devm for mutex_init Date: Mon, 21 Oct 2024 17:22:44 -0700 Message-ID: <20241022002245.843242-5-rosenp@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022002245.843242-1-rosenp@gmail.com> References: <20241022002245.843242-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org It seems since inception that mutex_destroy was never called for these in _remove. Instead of handling this manually, just use devm for simplicity. Signed-off-by: Rosen Penev --- drivers/net/ethernet/ibm/emac/core.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 8c6f69f90af9..1f45f2a78829 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -3021,8 +3021,14 @@ static int emac_probe(struct platform_device *ofdev) SET_NETDEV_DEV(ndev, &ofdev->dev); /* Initialize some embedded data structures */ - mutex_init(&dev->mdio_lock); - mutex_init(&dev->link_lock); + err = devm_mutex_init(&ofdev->dev, &dev->mdio_lock); + if (err) + goto err_gone; + + err = devm_mutex_init(&ofdev->dev, &dev->link_lock); + if (err) + goto err_gone; + spin_lock_init(&dev->lock); INIT_WORK(&dev->reset_work, emac_reset_work); From patchwork Tue Oct 22 00:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 13844910 X-Patchwork-Delegate: kuba@kernel.org Received: from mail-pf1-f181.google.com (mail-pf1-f181.google.com [209.85.210.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C582F201029; Tue, 22 Oct 2024 00:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556577; cv=none; b=EutpC2rSrh0pr1Y5m7OlbmVLZz5dHWHZw+DDGnCHMH1PpRW83COh1F2fAPTdQ6ryNoC7066Oz8kjr2ggzGQQt4ZiM2gKBnPdwBt7+SrC/FBdsPgKo//2qMvIceblQSbbTHBDmoUaVsSHa/fN41pnWw4acbsDjMdXULHWjEngxb4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729556577; c=relaxed/simple; bh=7W1VylbnPy+6uViF1/ARBUmxtkB4fxKiP/VOXcbtY1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RY0cpj+QUGkpUarLzMazywi4bu1yGQKodfRbZD7UnyQab3GcBMFtwDnz5Hg+3zS8of+41F0zZTF/kp+lIF45JBnAIvDwqfyA64vIEM15BExeth1woOTENATnKXCJfSrQTMTKAiXftp88jL0tR4llKsQqxRkq8hRCOrF505jX7Iw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=hgWA+mLZ; arc=none smtp.client-ip=209.85.210.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hgWA+mLZ" Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-71e61b47c6cso3878074b3a.2; Mon, 21 Oct 2024 17:22:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729556575; x=1730161375; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c5WOHJ1q4XRyHeFfhL9R7ir/ceoH2LAuvd+/PdnVpoM=; b=hgWA+mLZdmaU0kzv+acUh8n9cZmzCY0vi4KBFIBA5g5+agL4AuqkIqoUCWBdr3xyJy Py9Luo1mcHgZUTUDK1bJ+zrjgxxDg4cf3yDRfelhTrX7/Ou4kovEgkUtFgryAUXoTlNc k3mhqqrUuLynHM9w14n3XMtA568/Z23OIhj8nkb5+o9Q/a9j37yLU3hDWaE0//VddXet XTZkpRnoqvOwqQA5qV3/XCEwm1izucZiOpQovf064ZNyXtyIyYVaC8XNV/M2VWF2+3KG Cae0S7CXANujFlHHgkuzd1NHRhaqzpGgah+70oi1PmHvMPmRFq6xV2WiNwVm8nC7+meO goow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729556575; x=1730161375; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c5WOHJ1q4XRyHeFfhL9R7ir/ceoH2LAuvd+/PdnVpoM=; b=C4Yywj+CA1EGTrndJqoNOePOcHp9Ffn5maF8bnPFcN8H/wdDp0vBtl+avsb+VyfEc0 hPuZOFa8JvAnp8DFjo8S4GetJ0KU8YuKHoYuJPT2iFOaezF1MkmxuEKs6Y9xke9h3dSw pYMc+ILUIiBFp623zYDUz+07D4nU01ccAUw3q2FtB37YcLSzU7CHAjT0nhWawxyJ6ofx WaWboIdnB/3ZhlKrPTI3NyjIZXKccgEeiopZaF08qnTucpZEm+p4NK3QWMtrezwTjU2n NkM/rFB4oAX4Qpv59ZU2EI1jqclBeBZAD0UUlDRbHKaQQjbx0BrmI8G3+kvTOogIu+2i E7sQ== X-Forwarded-Encrypted: i=1; AJvYcCXEXoVnLTg+LzwR2fx4qqEuDzRKL6MvbUNdBoy3/3xnI5P8KqEGaWsGP1Fk68Gsr4DzghoAhEzkSr6VlDw=@vger.kernel.org X-Gm-Message-State: AOJu0YwxdsHIw835cndekt7aE8mvIU194o0HOspTmHk+c6nkVkWENPRq 4uIka3MAeDXZwckdH4hVCKiagGF6aIPi7Ou3gfZeDRe3l9G+IFqI4Xj2SmNK X-Google-Smtp-Source: AGHT+IFTEYkZcE3f+h4Dj2pDLuhSLooDOpCqH47mOjVjYRKhzlOwJey41HqY4mot3jdMeJdVdx5kFA== X-Received: by 2002:a05:6a00:17a9:b0:71e:5033:c5 with SMTP id d2e1a72fcca58-71ea315a906mr20595588b3a.14.1729556574950; Mon, 21 Oct 2024 17:22:54 -0700 (PDT) Received: from ryzen.lan ([2601:644:8200:dab8::a86]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ec132ffdcsm3515828b3a.46.2024.10.21.17.22.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Oct 2024 17:22:54 -0700 (PDT) From: Rosen Penev To: netdev@vger.kernel.org Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rosen Penev , Simon Horman , Shannon Nelson , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-kernel@vger.kernel.org (open list) Subject: [PATCHv8 net-next 5/5] net: ibm: emac: generate random MAC if not found Date: Mon, 21 Oct 2024 17:22:45 -0700 Message-ID: <20241022002245.843242-6-rosenp@gmail.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241022002245.843242-1-rosenp@gmail.com> References: <20241022002245.843242-1-rosenp@gmail.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org On this Cisco MX60W, u-boot sets the local-mac-address property. Unfortunately by default, the MAC is wrong and is actually located on a UBI partition. Which means nvmem needs to be used to grab it. In the case where that fails, EMAC fails to initialize instead of generating a random MAC as many other drivers do. Match behavior with other drivers to have a working ethernet interface. Signed-off-by: Rosen Penev --- drivers/net/ethernet/ibm/emac/core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c index 1f45f2a78829..25b8a3556004 100644 --- a/drivers/net/ethernet/ibm/emac/core.c +++ b/drivers/net/ethernet/ibm/emac/core.c @@ -2937,9 +2937,12 @@ static int emac_init_config(struct emac_instance *dev) /* Read MAC-address */ err = of_get_ethdev_address(np, dev->ndev); - if (err) - return dev_err_probe(&dev->ofdev->dev, err, - "Can't get valid [local-]mac-address from OF !\n"); + if (err == -EPROBE_DEFER) + return err; + if (err) { + dev_warn(&dev->ofdev->dev, "Can't get valid mac-address. Generating random."); + eth_hw_addr_random(dev->ndev); + } /* IAHT and GAHT filter parameterization */ if (emac_has_feature(dev, EMAC_FTR_EMAC4SYNC)) {