From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from fritzc.com (mail.fritzc.com [213.160.72.247]) (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 9FCF0BE66; Thu, 9 May 2024 17:07:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.160.72.247 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715274440; cv=none; b=gFDM4YsU3hDel4ygQZ263gkd6aBklAjYIeQrySKOpscBoK6yDRBOtb8dWTtnDUMOKocZy1v8w7rIfr1b0abugUCVkC76FrEHsOTIVEKQW4lmiuCEUJB90Su0BQfvHnvMXHa01ietDjfnvApXVXmlXHcFNTL2mJ7TGYaHGZfH92M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715274440; c=relaxed/simple; bh=k0gFByMqGHNy3MKYMJRe8RyZTM90AqHah86h/xiMaKg=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=iBR00Wm8usbGmJKe+jYZ4pMoXxTlOoJPS9V7FKRQWAYKaStvr39MJ8kIosSjz/YM8715vIiE7VD7c1zbC0XWT17qCDgx4Hr4GfNA/+BWFRr/0pih1amPbrajFyM0Cwq5bZTNxuU59PLGUHrYAgXCCiBCjDwpy3ej91oLLDg1GYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hexdev.de; spf=pass smtp.mailfrom=hexdev.de; dkim=pass (1024-bit key) header.d=fritzc.com header.i=@fritzc.com header.b=rte+Mh4X; arc=none smtp.client-ip=213.160.72.247 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hexdev.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hexdev.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=fritzc.com header.i=@fritzc.com header.b="rte+Mh4X" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fritzc.com; s=dkim; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References: In-Reply-To:Date:Cc:To:Reply-To:From:Subject:Message-ID:Sender:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sUztFsMyGZd9hnT+rv/hD8QxRQK2xhAXzjM5dYq9Q+4=; b=rte+Mh4XhnNANibuwvObP/HxSR zcjPGtpOuRBhhT/2Uw/tTbuOXfCv0fqBnSnk/J27+VhBLaJywQpr73Yyq7beKucMFEaa+cUx4yHx/ bBDhuHObt28XGDW36OtkSNKTnM2MVEdUik4BbyqN5WqfmqcKT4Lde+FGg7f/HvAhd+qU=; Received: from 127.0.0.1 by fritzc.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim latest) (envelope-from ) id 1s57EX-001jcC-1A; Thu, 09 May 2024 19:07:05 +0200 Message-ID: Subject: Re: [PATCH v3 09/11] can: lin: Handle rx offload config frames From: Christoph Fritz Reply-To: christoph.fritz@hexdev.de To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= Cc: Jiri Slaby , Oliver Hartkopp , Marc Kleine-Budde , Vincent Mailhol , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Jiri Kosina , Benjamin Tissoires , Greg Kroah-Hartman , Sebastian Reichel , Linus Walleij , Andreas Lauser , Jonathan Corbet , Pavel Pisa , linux-can@vger.kernel.org, Netdev , devicetree@vger.kernel.org, linux-input@vger.kernel.org, linux-serial Date: Thu, 09 May 2024 19:07:04 +0200 In-Reply-To: <9cf35451-9d03-e487-c06b-580208ac3a3d@linux.intel.com> References: <20240502182804.145926-1-christoph.fritz@hexdev.de> <20240502182804.145926-10-christoph.fritz@hexdev.de> <9cf35451-9d03-e487-c06b-580208ac3a3d@linux.intel.com> Organization: hexDEV GmbH Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.46.4-2 Precedence: bulk X-Mailing-List: linux-input@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit On Mon, 2024-05-06 at 20:11 +0300, Ilpo Järvinen wrote: > On Thu, 2 May 2024, Christoph Fritz wrote: > > > The CAN Broadcast Manager now has the capability to dispatch CANFD > > frames marked with the id LINBUS_RXOFFLOAD_ID. This patch introduces > > functionality to interpret these specific frames, enabling the > > configuration of RX offloading within the LIN driver. > > > > Signed-off-by: Christoph Fritz > > --- > > drivers/net/can/lin.c | 29 +++++++++++++++++++++++++++++ > > 1 file changed, 29 insertions(+) > > > > diff --git a/drivers/net/can/lin.c b/drivers/net/can/lin.c > > index 95906003666fb..ee2ebea2c865f 100644 > > --- a/drivers/net/can/lin.c > > +++ b/drivers/net/can/lin.c > > @@ -194,6 +194,27 @@ static void lin_remove_sysfs_id_files(struct net_device *ndev) > > } > > } > > > > +static int lin_setup_rxoffload(struct lin_device *ldev, > > + struct canfd_frame *cfd) > > +{ > > + struct lin_responder_answer answ; > > + > > + if (!(cfd->flags & CANFD_FDF)) > > + return -EMSGSIZE; > > This seems a bit odd error code. OK, will be changed in v4 to more common -EINVAL. > > > + BUILD_BUG_ON(sizeof(struct lin_responder_answer) > sizeof(cfd->data)); > > + memcpy(&answ, cfd->data, sizeof(struct lin_responder_answer)); > > 2x sizeof(answ) OK ... thanks -- Christoph