Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp578857pxu; Thu, 7 Jan 2021 12:23:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzJ3xhyOL+2baCmCELbL6OWjBaK9BjYRoIB7ppAIhopmSQVLEFyYzE3WmsrpMvrTc74Wd8B X-Received: by 2002:aa7:de0f:: with SMTP id h15mr2975863edv.110.1610051032056; Thu, 07 Jan 2021 12:23:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610051032; cv=none; d=google.com; s=arc-20160816; b=VRNkmi+m9jCvpSeiaIwXfSg8vsLi8653J/vjID5AzN1DYJ3bvp94Asfq11t9lPCfW4 BSg6ErSds5hFJ0L0bcuqRNG9ujlL5tkq2K711YNHL6Qs2khWeYN6PiI4dQcS98hZCuXK qaRoopZC76sWVx1dN/3ImC+helFcesVxMJHCBtlSn3AaX5A1crNq2EEM7KYE3uzks0s3 ei4Y7Py7nQJhhYE97d8cwen2KxwLAy1YfHYRl6h5h9Q4AA1me6dXsGFHCFVu1j1pFEcm 8N3sPJdNfv46v461hhL9GVS+CVQXJ5L/u2DZUPUxNOhopQtRo2NxEr3QPTyaqYBwLtqq yEzQ== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=HJhN3b/z0PM/34cyTVmKIvS8MAZZPOWIBOy0WbFmxJY=; b=opb+FSRSEVp2JaKJumk2zuTXk8dZzhBWUOROfhZm86+IBeUYkc+nXz7lw+WH+Sd3Ic 80MKduTi/C1xKx+bHwvidxuXjDgI978puomFtM7FerJEPBjUJ+ZFpMkEW9LLC4h8EfaY JnsqMaeXQG7OXDLPdK7iImnUU8cDNMGs4Az+2mYUd7m7saSliC0NGKiNiyYlMlFiM6fq YTKJnB9yQXPrIoeZaTgEfy8eTqvEFFx9ACUY5eGj1ShFdn71wyTtIh9nzB7nacvQIQ2N saoSmLnPj/GgdUEEQboj1+OpFZGx5fQImjbNIXoHY4adANl/rr77wPGdP9Ip8yWSjKq7 X9uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ckicCLqy; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x11si2670241ejb.241.2021.01.07.12.23.28; Thu, 07 Jan 2021 12:23:52 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=ckicCLqy; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727222AbhAGUWD (ORCPT + 99 others); Thu, 7 Jan 2021 15:22:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:53790 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726541AbhAGUWC (ORCPT ); Thu, 7 Jan 2021 15:22:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C8D423403; Thu, 7 Jan 2021 20:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1610050882; bh=HJhN3b/z0PM/34cyTVmKIvS8MAZZPOWIBOy0WbFmxJY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ckicCLqyv24/NAVLKoBzSAqk8vuROgcxRg9i+5qNZTu/ZqXGdWiPHpGtAr7gqQ1zi MMl2YLQwnfurS98D+aIVGVenvJLzxyoLurH0o1S89agGywQiUhQ9uNklkjAaOnFOIp Xh5aquXcBNnYSVwzbaVmz7rj8edipntny9c72MJP0SJRPCLmYFjniWonrlrIkjDVFN u2+dDwTWjSW4qMCUBrpnsFXjbjxiOE+YhLrqDcoY8uVgyzZai++aJwCCBnDu8Z3egp vowEEdB7670tBqROk33q0SUtXvfCNLau8+NHNs2uI5OHEXD9l+5nYQLIc5Y3EiH1FU jpEZL89ODjpDg== Date: Thu, 7 Jan 2021 21:21:16 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Russell King - ARM Linux admin Cc: Andrew Lunn , Pali =?UTF-8?B?Um9ow6Fy?= , "David S. Miller" , Jakub Kicinski , Thomas Schreiber , Heiner Kallweit , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/3] net: sfp: add workaround for Realtek RTL8672 and RTL9601C chips Message-ID: <20210107212116.44a2baea@kernel.org> In-Reply-To: <20210107194549.GR1551@shell.armlinux.org.uk> References: <20201230154755.14746-1-pali@kernel.org> <20210106153749.6748-1-pali@kernel.org> <20210106153749.6748-2-pali@kernel.org> <20210107194549.GR1551@shell.armlinux.org.uk> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 7 Jan 2021 19:45:49 +0000 Russell King - ARM Linux admin wrote: > I think you're not reading the code very well. It checks for bytes at > offset 1..blocksize-1, blocksize+1..2*blocksize-1, etc are zero. It > does _not_ check that byte 0 or the byte at N*blocksize is zero - these > bytes are skipped. In other words, the first byte of each transfer can > be any value. The other bytes of the _entire_ ID must be zero. Wouldn't it be better, instead of checking if 1..blocksize-1 are zero, to check whether reading byte by byte returns the same as reading 16 bytes whole? Marek