Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4146243pxb; Mon, 27 Sep 2021 10:19:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIvxOCcbGf0XXriiBM8qHmq66mBc57wZXgsiATrxqgotMk1ZaQidiEkrtzRNAJu0BwFiwk X-Received: by 2002:aa7:9aee:0:b0:440:cd9d:405e with SMTP id y14-20020aa79aee000000b00440cd9d405emr766158pfp.47.1632763166424; Mon, 27 Sep 2021 10:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632763166; cv=none; d=google.com; s=arc-20160816; b=g/AcW10mNTOcpD4mz5vhNoPdKEIqc+yP82KK6EESjCYqabJBZ1hXgM65+NY9Fpsn+i yTBSS6+oabcxhQFmblYSwIMr0voqEfr27673fs9+XiqvpzN6oUlWLOGZQrT4fiDCteik fWXcWt0YtSapIDJ+9wuEdWueVxxB3hxEYn0nrgGORkGBNQe90kfAeKJjyFcC9ArJfq53 Yq8YWjU1Xpl3CcWMPlvwOMAXIlep2BlToeLzmgkttUXZnUg/g4uJGsLy7Z7sG4CGosAF i1+7tj4RX79JqEXIa32aSzoayINTODDzS3q9CfOdMnLSZn3dHYNXeugLIEhVV/aRWRhW UB1g== 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=tZaiJw5egtjw9R73QfnhQ5+Oye6LF8ghQvLs93EyYUQ=; b=QyH1aOw+tgvWfQ0lvp7Hcony15YvSl+Z60AbK+N97VOyQWmqeBRoSiqPVW+3OW3XDU KL8KbJV9S2fCwnkdYhKOMkEFyMuTwV29GQoUbE83NySVx98VvWyaIqN4lNKKLdxbANKb n+EORC0LdqIqbjSuxbc1+lztDg5CkSmRDPxoPgA0BXPbxPmc4BZ+Il96NH513gcTW5xS q7gIGc7/Tw2Qq9Hf7TahfaqIDRy8HTXXUfCSs6qwXYUdCCDkI/7ogk7O9iqePK0nXksv 87cYIeTJ4z2Y3Uijb5FXnlXEn3Om5+UcwgtO/DA0uYmn0WeaL4cT9/agDmEX+MWQXTRb Cahg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Jd0Z7EAf; 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 k8si21888879plt.115.2021.09.27.10.19.12; Mon, 27 Sep 2021 10:19:26 -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=Jd0Z7EAf; 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 S237033AbhI0RT7 (ORCPT + 99 others); Mon, 27 Sep 2021 13:19:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:56112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236775AbhI0RP3 (ORCPT ); Mon, 27 Sep 2021 13:15:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4275F6137F; Mon, 27 Sep 2021 17:10:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762659; bh=M5fkxkh7FW5Q9jQlRvy3DoD+wYtuLPhsV44j22NltWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Jd0Z7EAfiSs3QX3IczEMQCNv6z/HTVqbLl3nCPu+hxHRDPoR9tpi3ul+Sd8BigEf9 d8ByqnVDabm0+1t+zYrc76If8ID6C1JKLKx+yM3Q0qtJE7DhWZCWjnxmEZEEQvtAYs iVfAQr7AZfPFizsivoo5tSWtJbnDpL9ANXP0vMSA= 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.10 096/103] net: 6pack: Fix tx timeout and slot time Date: Mon, 27 Sep 2021 19:03:08 +0200 Message-Id: <20210927170229.083763412@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170225.702078779@linuxfoundation.org> References: <20210927170225.702078779@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 da13683d52d1..bd0beb16d68a 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