Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3722984pxb; Mon, 4 Oct 2021 08:16:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdr+xhAF8JbNr9PdTFTV9bbukzD5DprnNfJRTCHsRybvaJrBCjCZhkTBOrTXBpZE/u5xOv X-Received: by 2002:a63:4b63:: with SMTP id k35mr11370531pgl.206.1633360586889; Mon, 04 Oct 2021 08:16:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633360586; cv=none; d=google.com; s=arc-20160816; b=KSHENSXaHBzYdsvg+KcxIGwmA77NW988/rkwwsepyjpMtNH3ryV7fCmkUmouWKRghC etO2dwmVF8Q4rtXeOhQrsh6Ud9VIuD201F9q6xsRxaPhU7CjS7UphFYa7vIMbJKQhRXr mzuEIAEk5SiN9FlHH2sXySs8wrpMQPBr4BKbtoDX6ft7i6JDGF9JiAQwxjgKa67MC1Gf zDxwp5uV1ykEf6OlQqWkD67yRgQwcoaf0YIRCSL11HkE2AGHzVLiKnTQ/A8tP7/8PxBU XCBkqTJtzHRUk+omgxt43gyBMl9XgDKbBbxc7ZZK9iVC0Y/3osZrDXVcK48X7e8o2y+Q xlzQ== 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=ZC76Qm4AwkxmRao3AV61616Fq5P43JCqItPs8UXSde4=; b=bff00VMcjjQCieFUDzAaMSXNSkurunPCLsAxGCsE/PYI1eWE8/TzYygtsmD9yE8FkU A4SNqqY9LcRvS1Vv99nYBWYGg3covphyN+zLg6lbgrlLTcVI8+cnb617iHPth2ABHynt ekOqsDkVoXgwxoWOqhInqR0L3CkwQMapodZ3rSx89WxLdVY02rLuwp/MD9nH1ccNGgCT P0t/LR1Ez+ujr+rYFFoBLNUJ0i2HW4xeXSAVozU4+tPw3nKEyI9aT1LAIK4+I2L/KD5A RhkSSPdvkp9Jqt/0Hy4+Gyzu+boCRZATncHHCo0AXGE57t8rhdNR4oyTMvKqzii+l1Mx r/uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=wqnE8mk6; 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 z3si21094246plg.209.2021.10.04.08.15.44; Mon, 04 Oct 2021 08:16: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=wqnE8mk6; 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 S235083AbhJDNFD (ORCPT + 99 others); Mon, 4 Oct 2021 09:05:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:37450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234968AbhJDNDd (ORCPT ); Mon, 4 Oct 2021 09:03:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 17D7061A78; Mon, 4 Oct 2021 12:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633352389; bh=PZphukInpo/nFI1X+TcSefwgh7kD0/GTSYOYSCK0vsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wqnE8mk6eKy3P0n3Co+jvrQc0U/RwF6cviaPwa5xqifsB/dofmmp98Qc/fKSwu2J6 FGtWldjKDcEsTSMZjuwZOBF/32H6RRT7bOv80XpCSEnw8Mc/BTDzVlqLYXjmx8G1W7 v/34Tvc3HZ41pElQ3gBSc0Pk6VaKtTTQt1lXJmME= 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 4.14 35/75] net: 6pack: Fix tx timeout and slot time Date: Mon, 4 Oct 2021 14:52:10 +0200 Message-Id: <20211004125032.688577623@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125031.530773667@linuxfoundation.org> References: <20211004125031.530773667@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 231eaef29266..7e430300818e 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