Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4136946pxb; Mon, 27 Sep 2021 10:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7pQYXsrKKtSWLtoyGpk+LrFVVzFYorBsBSA1UStXpAcLTLLpKk4y5pXK3TweRT8DoXSvf X-Received: by 2002:a63:2b03:: with SMTP id r3mr663091pgr.188.1632762492295; Mon, 27 Sep 2021 10:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632762492; cv=none; d=google.com; s=arc-20160816; b=QMwsHis6PD7sC2HWO8Izl8IJPlq4E2KFQBP4HCsZru/hO79/AiJTIGCmmONLEJUl6P n+vjz1t8ed9Wyt2xAJ392hUUWuTzMINb0U8U/oB7f+9LRAF69oDd+vlc0Gup2yEZaUVo OnCyznx30jajRkytLR8hIQF0T1ziCujodDQ/EYq2OegFQzBlJlWe+zXNvYSQNpu0vtoX NwobO3dg87dF/gkgufmsRQo80SPLDZu6HealTS/TWA3GllpqAiE3UkDN7RjV/blFnHQO fvpQy6gG4t4gWjTtT8b3ku7RhBJjjsmsvIG9nFfuEKOboWWGkt4YfjVFY0NwhMrzJ745 i/5Q== 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=OY0c2zrH7X4PaXkacrC0SPFwLCxw8CVjfSxQx4HnT1WP3KulQSrXdzL01dL9TeV3jk Ydg6jEUQTRqanHT1G339YKPE2hXTFv90sk+dALp9CzJ9AKzJ3SzNCTKn7lQptIeeS2tH hWcCbOedGdlgd/okkN699rOTbSo43EErdsBKtx0WK+rCyKfgqv7EOS7Zs0mb9bkbpwCB f2Xu+3246wvBC12XLOYEiFHCd1OnB4sb8j0RriDcmzv9j87yziSu0DXOOUb7QOriDeC2 9dFVz7KgBM83hs24+sE9Jagm18T4ZGVr/224cLfTun5NJNV6fMxWYB3jbTWWY71/7DQY skgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yGoVqou0; 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 s7si20249276pgm.390.2021.09.27.10.07.59; Mon, 27 Sep 2021 10:08:12 -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=yGoVqou0; 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 S236425AbhI0RIx (ORCPT + 99 others); Mon, 27 Sep 2021 13:08:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:48050 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236247AbhI0RHn (ORCPT ); Mon, 27 Sep 2021 13:07:43 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EEECC6101A; Mon, 27 Sep 2021 17:06:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1632762365; bh=M5fkxkh7FW5Q9jQlRvy3DoD+wYtuLPhsV44j22NltWk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yGoVqou0m2Mwz/Gi1Ke7hvp5a+bn6/dT7Q90mz8xUrNkmz/5DOHXC027xhvQNG1P/ P2iWleKa/Q5rMjisMyGcpR7QpToO3bhUHFAz/EXL3Af9sPh3sP5jO+5g1q+4hb5JnP 3arNHQEgXt6Ue5mHxfa6S97n3W+cxSE9e3o9Sc9c= 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.4 62/68] net: 6pack: Fix tx timeout and slot time Date: Mon, 27 Sep 2021 19:02:58 +0200 Message-Id: <20210927170222.121698770@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210927170219.901812470@linuxfoundation.org> References: <20210927170219.901812470@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