From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4FB3AC433DB for ; Thu, 7 Jan 2021 20:22:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 230E123447 for ; Thu, 7 Jan 2021 20:22:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727227AbhAGUWD (ORCPT ); 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: netdev@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