Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4158317pxb; Mon, 27 Sep 2021 10:34:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxn9Qr8PUHyB9iECK4u8j6fiDjyniqQDRUGmhWPBb3Mo+NB4BT5qTIXgI+55LaKKYRyGjGl X-Received: by 2002:a17:90a:4812:: with SMTP id a18mr339985pjh.40.1632764064961; Mon, 27 Sep 2021 10:34:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632764064; cv=none; d=google.com; s=arc-20160816; b=G9WYiFMbk2VlKfbQ2UGqWtIfG4jKjGecho14gNjH4kIpV/bLeS/lMt+5d5FxYNwG5A r9pjRRZH1FjKApfBBXUTc8icCDNhKamtSCnwmkQKtSVheZNKFHxA9aDn4jJmFwEkZOO0 R+eMMdqOm4BJsOvcYEzaJ8KxLSOp2OXcEdWZiQ2g4y6bzBldq5+zAPR8Pb+nO78L26nY /2IUgO+/O+JraacZ2rHJvRwEc1XwzVAnkqI2HZEl86Pw3wkqnMuFN3YwTTCmA+JEuOXC kzxESAl0WgY6P7PsdXfLbGRZ3gvb7V/nG2tSThmY3gfFImvLLp+vOVJ2tZrkZlww4uld igxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1h7BFe/GcyuS6j6xjZuPePlgY1Fm2fisyyl1dSJ0PRQ=; b=BHdAKrd9cvN+4DukVkJKF++zLQF0rJ9xFHmLWGjoxXo9qgHBPhqSc5qp+JKOmBeanc Q0o18Xeu9LPyAXDfE4I2Hfdsb5h6PfksIe5ZwHOLbzn4Sz6CnWqKK4Bg3TjPQ8LCL4Eq je7LSxf6NSQJEkVmKXE5ENsrZ/JmbBxNlPGS+uEyoZxmJyz4E96C9EBQLJtzhGDGn/yg Am9LOmuHm2Xl7XY4TcLtx+9L2Ekb8jjQUdKPz0OqaFcW4ShD5h393JVJYtC1zDdE0Gfi rETH9sHq8p2dWcbiwP2tXzwnB25DcuFLBN2+sEQ99St9LDCEVDfWnZgTCxAehXOO0il9 irGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VzNX4R6K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y67si11204706pfy.284.2021.09.27.10.34.07; Mon, 27 Sep 2021 10:34:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VzNX4R6K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238182AbhI0Rb4 (ORCPT + 99 others); Mon, 27 Sep 2021 13:31:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:45988 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237762AbhI0R2N (ORCPT ); Mon, 27 Sep 2021 13:28:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 22EB061440; Mon, 27 Sep 2021 17:17:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632763044; bh=5Jslq9+iulpOsN/N8aZfjjmg6vIsKvj3Nl29SUYKWmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VzNX4R6KbSzSATFi9LiD60TdxgbOoOmldInnl0muDLxgQXzf4p9DmsPuIW4uOi8Hk 4yDrplrpwQdXamxOmGb5oZIMawS+Zhxb7czuxnX86hXhfjKw0aXFPykIHLZm22FV/j MXDtx6J/CR1feTTj6I08wDS9rOWWkaemthFA9jeU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Guenter Roeck , Linus Torvalds , Sasha Levin Subject: [PATCH 5.14 146/162] net: 6pack: Fix tx timeout and slot time Date: Mon, 27 Sep 2021 19:03:12 +0200 Message-Id: <20210927170238.493966371@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170233.453060397@linuxfoundation.org> References: <20210927170233.453060397@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guenter Roeck [ Upstream commit 3c0d2a46c0141913dc6fd126c57d0615677d946e ] tx timeout and slot time are currently specified in units of HZ. On Alpha, HZ is defined as 1024. When building alpha:allmodconfig, this results in the following error message. drivers/net/hamradio/6pack.c: In function 'sixpack_open': drivers/net/hamradio/6pack.c:71:41: error: unsigned conversion from 'int' to 'unsigned char' changes value from '256' to '0' In the 6PACK protocol, tx timeout is specified in units of 10 ms and transmitted over the wire: https://www.linux-ax25.org/wiki/6PACK Defining a value dependent on HZ doesn't really make sense, and presumably comes from the (very historical) situation where HZ was originally 100. Note that the SIXP_SLOTTIME use explicitly is about 10ms granularity: mod_timer(&sp->tx_t, jiffies + ((when + 1) * HZ) / 100); and the SIXP_TXDELAY walue is sent as a byte over the wire. Signed-off-by: Guenter Roeck Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- drivers/net/hamradio/6pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 8fe8887d506a..6192244b304a 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -68,9 +68,9 @@ #define SIXP_DAMA_OFF 0 /* default level 2 parameters */ -#define SIXP_TXDELAY (HZ/4) /* in 1 s */ +#define SIXP_TXDELAY 25 /* 250 ms */ #define SIXP_PERSIST 50 /* in 256ths */ -#define SIXP_SLOTTIME (HZ/10) /* in 1 s */ +#define SIXP_SLOTTIME 10 /* 100 ms */ #define SIXP_INIT_RESYNC_TIMEOUT (3*HZ/2) /* in 1 s */ #define SIXP_RESYNC_TIMEOUT 5*HZ /* in 1 s */ -- 2.33.0