From patchwork Thu Dec 12 15:34:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Schmidt X-Patchwork-Id: 13905397 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 D5CA1215777 for ; Thu, 12 Dec 2024 15:34:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017692; cv=none; b=fj/vgMiE6GlG6umhyXifCx3hHwBjz6RrkyArESqe3RheBPsr3mbjNgapputrzFEJku72TSobJtuO83ym5zN+DRslTuUk1ZHkvOO6V6s0GbDiBWp3yBL0O0nuwQhuMO+C4PhPk5EcVHHuxCAQ90IkXxsIOFqhjpqZWPNLtyxvl3M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017692; c=relaxed/simple; bh=waZhSssR+wVCPXSbljZm/oxMw0c1I81n9pG27iL0bLs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qlcQnAjK1K3QuD61fwoSBKahJVRz9vtYmIV78PEybz62ARuFErufBa3oS+oPUvs9fBgvDS1FuwjbtCWokgjYQYsIsgGUPKN32EsloiOhUnVZlHSzBhHKfBWDpvKeEkR52lVPXAD3+qEPrUXQg4Iiw0lnqBt2dVve+NTL+VUHH88= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Gr+4xbLf; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Gr+4xbLf" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734017689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=34N7kwn/zaU+vQFweCsw3RqHwt99xwUtzQvb6O57PsE=; b=Gr+4xbLfDHsNwySb/oCIm1CzIW93Gwk1iuFVpPhsv2yjQeAzC8LwNV06pzAwjC2nakCVFy yBodW/Y2hUBUT82OkS+pMCN0y8OjUpUbE/5dBkGEUIWslLCQC0OtTYe+tdBa06fp1ksnlM 9GfS0Cz46CydsmTyEUJPWnM5ILRBhFQ= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-311-k1jKMSBDNtKyQVKutMRq2g-1; Thu, 12 Dec 2024 10:34:46 -0500 X-MC-Unique: k1jKMSBDNtKyQVKutMRq2g-1 X-Mimecast-MFC-AGG-ID: k1jKMSBDNtKyQVKutMRq2g Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 77D8319560B1; Thu, 12 Dec 2024 15:34:45 +0000 (UTC) Received: from rhel-developer-toolbox-2.redhat.com (unknown [10.45.224.236]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5CD92195605A; Thu, 12 Dec 2024 15:34:42 +0000 (UTC) From: Michal Schmidt To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Arkadiusz Kubalewski , Karol Kolacinski , Przemek Kitszel , Tony Nguyen Subject: [PATCH iwl-next 1/3] ice: downgrade warning about gnss_insert_raw to debug level Date: Thu, 12 Dec 2024 16:34:15 +0100 Message-ID: <20241212153417.165919-2-mschmidt@redhat.com> In-Reply-To: <20241212153417.165919-1-mschmidt@redhat.com> References: <20241212153417.165919-1-mschmidt@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org gnss_insert_raw() will reject the GNSS data the ice driver produces whenever userspace has the gnss device open, but is not reading it fast enough for whatever reason. Do not spam kernel logs just because userspace misbehaves. Signed-off-by: Michal Schmidt --- drivers/net/ethernet/intel/ice/ice_gnss.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c index 66390eeb2343..9b1f970f4825 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.c +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c @@ -146,9 +146,9 @@ static void ice_gnss_read(struct kthread_work *work) count = gnss_insert_raw(pf->gnss_dev, buf, i); if (count != i) - dev_warn(ice_pf_to_dev(pf), - "gnss_insert_raw ret=%d size=%d\n", - count, i); + dev_dbg(ice_pf_to_dev(pf), + "gnss_insert_raw ret=%d size=%d\n", + count, i); delay = ICE_GNSS_TIMER_DELAY_TIME; free_buf: free_page((unsigned long)buf); From patchwork Thu Dec 12 15:34:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Schmidt X-Patchwork-Id: 13905398 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 5CE82215777 for ; Thu, 12 Dec 2024 15:34:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017698; cv=none; b=tDOX42AVZ6WX/IN77qRSmKa8sblUaPXii9Ul5JrG7fxXj+ClcFvteeMuRUhPEzqnTbu3+tgW8qa0eONG3lTFBp8kUq/bJpnDl6Vxi2HgN74wGTBezlKDvQlHJtSt0q2HZjSBLA7bA1kYBXT1MN3e9WypruDxzGhmNw+Uyos2mvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017698; c=relaxed/simple; bh=zXIR2NuuIFC6dj7Hxelwy+WDqXYThMpEBsNF4dCWpUA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AjF++GuXlCr2ShqwIuO48Lsn4G8yi/K3UxTOxxLGpY1rnleFij0rA/kGnwux4rzzUec3q43YJpQgVzlc9AN6u7Oy70gAAyolCnfe1GkQRdOQs+GfzWkyyTnEtcax0qiaceSSz7P0U6F/VmMoheP3OVi8ihQZzYx1m6M7+f5Uhdw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=YEV6kDcQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YEV6kDcQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734017695; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PJBxfCGWGRVTBMuIZgJFT97kyEa63qkWbjw3aPCqaY8=; b=YEV6kDcQlBY5Wp7WGWPUcyhJ0qkNnyLbfsXKzUEwXteu9aOFAgPXUI7FXfmD0vhg3ZUTYu 9ygRt+QYd/TYaizVzrV5lYyxc3sJ+oL7I0w4ir6zY543iy7V9BR5CNyXCe3Bnyz2mFIXa3 RBxKXxUckLxpZKxxC0txIgDfHfcHNDc= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-96-2yc1YoOROWKvqFxaensUjw-1; Thu, 12 Dec 2024 10:34:50 -0500 X-MC-Unique: 2yc1YoOROWKvqFxaensUjw-1 X-Mimecast-MFC-AGG-ID: 2yc1YoOROWKvqFxaensUjw Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 92476195609F; Thu, 12 Dec 2024 15:34:48 +0000 (UTC) Received: from rhel-developer-toolbox-2.redhat.com (unknown [10.45.224.236]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 00F07195605A; Thu, 12 Dec 2024 15:34:45 +0000 (UTC) From: Michal Schmidt To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Arkadiusz Kubalewski , Karol Kolacinski , Przemek Kitszel , Tony Nguyen , Miroslav Lichvar Subject: [PATCH iwl-next 2/3] ice: lower the latency of GNSS reads Date: Thu, 12 Dec 2024 16:34:16 +0100 Message-ID: <20241212153417.165919-3-mschmidt@redhat.com> In-Reply-To: <20241212153417.165919-1-mschmidt@redhat.com> References: <20241212153417.165919-1-mschmidt@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org The E810 is connected to the u-blox GNSS module over I2C. The ice driver periodically (every ~20ms) sends AdminQ commands to poll the u-blox for available data. Most of the time, there's no data. When the u-blox finally responds that data is available, usually it's around 800 bytes. It can be more or less, depending on how many NMEA messages were configured using ubxtool. ice then proceeds to read all the data. AdminQ and I2C are slow. The reading is performed in chunks of 15 bytes. ice reads all of the data before passing it to the kernel GNSS subsystem and onwards to userspace. Improve the NMEA message receiving latency. Pass each 15-bytes chunk to userspace as soon as it's received. Tested-by: Miroslav Lichvar Signed-off-by: Michal Schmidt --- drivers/net/ethernet/intel/ice/ice_gnss.c | 29 +++++++---------------- drivers/net/ethernet/intel/ice/ice_gnss.h | 6 ++++- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c index 9b1f970f4825..7922311d2545 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.c +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c @@ -88,10 +88,10 @@ static void ice_gnss_read(struct kthread_work *work) unsigned long delay = ICE_GNSS_POLL_DATA_DELAY_TIME; unsigned int i, bytes_read, data_len, count; struct ice_aqc_link_topo_addr link_topo; + char buf[ICE_MAX_I2C_DATA_SIZE]; struct ice_pf *pf; struct ice_hw *hw; __be16 data_len_b; - char *buf = NULL; u8 i2c_params; int err = 0; @@ -121,16 +121,6 @@ static void ice_gnss_read(struct kthread_work *work) goto requeue; /* The u-blox has data_len bytes for us to read */ - - data_len = min_t(typeof(data_len), data_len, PAGE_SIZE); - - buf = (char *)get_zeroed_page(GFP_KERNEL); - if (!buf) { - err = -ENOMEM; - goto requeue; - } - - /* Read received data */ for (i = 0; i < data_len; i += bytes_read) { unsigned int bytes_left = data_len - i; @@ -139,19 +129,18 @@ static void ice_gnss_read(struct kthread_work *work) err = ice_aq_read_i2c(hw, link_topo, ICE_GNSS_UBX_I2C_BUS_ADDR, cpu_to_le16(ICE_GNSS_UBX_EMPTY_DATA), - bytes_read, &buf[i], NULL); + bytes_read, buf, NULL); if (err) - goto free_buf; + goto requeue; + + count = gnss_insert_raw(pf->gnss_dev, buf, bytes_read); + if (count != bytes_read) + dev_dbg(ice_pf_to_dev(pf), + "gnss_insert_raw ret=%d size=%d\n", + count, bytes_read); } - count = gnss_insert_raw(pf->gnss_dev, buf, i); - if (count != i) - dev_dbg(ice_pf_to_dev(pf), - "gnss_insert_raw ret=%d size=%d\n", - count, i); delay = ICE_GNSS_TIMER_DELAY_TIME; -free_buf: - free_page((unsigned long)buf); requeue: kthread_queue_delayed_work(gnss->kworker, &gnss->read_work, delay); if (err) diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.h b/drivers/net/ethernet/intel/ice/ice_gnss.h index 15daf603ed7b..e0e939f1b102 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.h +++ b/drivers/net/ethernet/intel/ice/ice_gnss.h @@ -8,7 +8,11 @@ #define ICE_GNSS_POLL_DATA_DELAY_TIME (HZ / 50) /* poll every 20 ms */ #define ICE_GNSS_TIMER_DELAY_TIME (HZ / 10) /* 0.1 second per message */ #define ICE_GNSS_TTY_WRITE_BUF 250 -#define ICE_MAX_I2C_DATA_SIZE FIELD_MAX(ICE_AQC_I2C_DATA_SIZE_M) +/* ICE_MAX_I2C_DATA_SIZE is FIELD_MAX(ICE_AQC_I2C_DATA_SIZE_M). + * However, FIELD_MAX() does not evaluate to an integer constant expression, + * so it can't be used for the size of a non-VLA array. + */ +#define ICE_MAX_I2C_DATA_SIZE 15 #define ICE_MAX_I2C_WRITE_BYTES 4 /* u-blox ZED-F9T specific definitions */ From patchwork Thu Dec 12 15:34:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Schmidt X-Patchwork-Id: 13905399 X-Patchwork-Delegate: kuba@kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 1682D1547F0 for ; Thu, 12 Dec 2024 15:34:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017699; cv=none; b=s8CKbWGPHVqSVypZBr4C7AJFpWBDaz/s9yGb8M0jhS1Hs6DTnxDUaO9Hx/opqQvnk/DpU1DPTngnK5Xo6QXxNFjUnAjQdVtxqs5iSpa53qvdZcp7slXkiMEEEuQERhn+Ll3BZ+KqSkgqi/nAuQkYl/+ouDbEWeLibzm0pKZH3nA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734017699; c=relaxed/simple; bh=C57TKEpLKHLYwxxb5Nfo8nwCv4fS7Uymf4LiqSL7lx0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jX7rHfy+GqrsPTnR7HC6Va46PHHwxiRvccMWdAx9MtDaEiUCDn6NTscp8fhsBvUYXRkjCvRjJ9YNu8RWdTn/mGV5mfCOhNFA3dtgRagTcT8FYxZttBPvDjwPpZiwgxFldTeFt1aEecGwX3ffUUF10yY1hWSpW6y1FBwptsVMBsI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=CfTQiBsC; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CfTQiBsC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734017697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mgRpHTP53KJoPgmSVqas3EAYkmn+eljsiKnfwFmp98Y=; b=CfTQiBsCamrKTUyRldnjNlUX+/GyJaVNAkaOe2My5gwiJ9lmbP75xsusO3C9RCZEpG5ish fpEW7Ei81MeDrlfJMd5KRlAKiQr53vXUKCbgAvC+LvvfdTA7xEI2xurLYZfBssx4UfSqPp zr6pEA/K8HZFHgNvNb3+cLcKkymo1qY= Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-79-wnFhZv6mNTinhUTJ6RY-Jw-1; Thu, 12 Dec 2024 10:34:52 -0500 X-MC-Unique: wnFhZv6mNTinhUTJ6RY-Jw-1 X-Mimecast-MFC-AGG-ID: wnFhZv6mNTinhUTJ6RY-Jw Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6E91A1955D45; Thu, 12 Dec 2024 15:34:51 +0000 (UTC) Received: from rhel-developer-toolbox-2.redhat.com (unknown [10.45.224.236]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 23C02195606C; Thu, 12 Dec 2024 15:34:48 +0000 (UTC) From: Michal Schmidt To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, Arkadiusz Kubalewski , Karol Kolacinski , Przemek Kitszel , Tony Nguyen Subject: [PATCH iwl-next 3/3] ice: remove special delay after processing a GNSS read batch Date: Thu, 12 Dec 2024 16:34:17 +0100 Message-ID: <20241212153417.165919-4-mschmidt@redhat.com> In-Reply-To: <20241212153417.165919-1-mschmidt@redhat.com> References: <20241212153417.165919-1-mschmidt@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 X-Patchwork-Delegate: kuba@kernel.org I do not see a reason to have a special longer delay (100 ms) after passing read GNSS data to userspace. Just use the regular GNSS polling interval (20 ms). Signed-off-by: Michal Schmidt --- drivers/net/ethernet/intel/ice/ice_gnss.c | 5 ++--- drivers/net/ethernet/intel/ice/ice_gnss.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.c b/drivers/net/ethernet/intel/ice/ice_gnss.c index 7922311d2545..83a2f0d4091e 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.c +++ b/drivers/net/ethernet/intel/ice/ice_gnss.c @@ -85,7 +85,6 @@ static void ice_gnss_read(struct kthread_work *work) { struct gnss_serial *gnss = container_of(work, struct gnss_serial, read_work.work); - unsigned long delay = ICE_GNSS_POLL_DATA_DELAY_TIME; unsigned int i, bytes_read, data_len, count; struct ice_aqc_link_topo_addr link_topo; char buf[ICE_MAX_I2C_DATA_SIZE]; @@ -140,9 +139,9 @@ static void ice_gnss_read(struct kthread_work *work) count, bytes_read); } - delay = ICE_GNSS_TIMER_DELAY_TIME; requeue: - kthread_queue_delayed_work(gnss->kworker, &gnss->read_work, delay); + kthread_queue_delayed_work(gnss->kworker, &gnss->read_work, + ICE_GNSS_POLL_DATA_DELAY_TIME); if (err) dev_dbg(ice_pf_to_dev(pf), "GNSS failed to read err=%d\n", err); } diff --git a/drivers/net/ethernet/intel/ice/ice_gnss.h b/drivers/net/ethernet/intel/ice/ice_gnss.h index e0e939f1b102..fa52727cd3d7 100644 --- a/drivers/net/ethernet/intel/ice/ice_gnss.h +++ b/drivers/net/ethernet/intel/ice/ice_gnss.h @@ -6,7 +6,6 @@ #define ICE_E810T_GNSS_I2C_BUS 0x2 #define ICE_GNSS_POLL_DATA_DELAY_TIME (HZ / 50) /* poll every 20 ms */ -#define ICE_GNSS_TIMER_DELAY_TIME (HZ / 10) /* 0.1 second per message */ #define ICE_GNSS_TTY_WRITE_BUF 250 /* ICE_MAX_I2C_DATA_SIZE is FIELD_MAX(ICE_AQC_I2C_DATA_SIZE_M). * However, FIELD_MAX() does not evaluate to an integer constant expression,