Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF313C636D4 for ; Mon, 13 Feb 2023 12:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230267AbjBMMAr (ORCPT ); Mon, 13 Feb 2023 07:00:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbjBMMAh (ORCPT ); Mon, 13 Feb 2023 07:00:37 -0500 Received: from mail.3ffe.de (0001.3ffe.de [IPv6:2a01:4f8:c0c:9d57::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8F2B18B20; Mon, 13 Feb 2023 04:00:18 -0800 (PST) Received: from mwalle01.kontron.local. (unknown [213.135.10.150]) (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 mail.3ffe.de (Postfix) with ESMTPSA id C54F91646; Mon, 13 Feb 2023 13:00:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walle.cc; s=mail2022082101; t=1676289616; 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=voxYeZ7wh5c7OrjzskwQHyd3j/r/yCtZhLRFGBW9fEM=; b=n1yzElJg/OxL7J4kVsS0FOK/7wizoIWnPnrbMKATH3ilguTjMhUbnbBghkiYoZyAQGPeR3 TL6HxNjofvC4k9qWG51WDpHb7nDgmXh9OAGTXUg8qw1F1oVEK//3mSck4XTHtss3Znl9+L gcVspdrCX1mQPS9ykjkvEtltO4l24tk9ayajznlrxIPfLGWwpJ0K1DjObJe9bRGdV21M47 TtWyJAgc44FK7i2hgHsgEgqfHj8EDIt/2fmNE64bAAx5fs21xb6ON12kbEKnZf1YbqaX2C yGjWBMfaHc9csLKYKF1iTk1jXsmKKrK2CeqbImuPh0CXozyRpm/CKIFqWs+ZoA== From: Michael Walle To: tharunkumar.pasumarthi@microchip.com Cc: gregkh@linuxfoundation.org, UNGLinuxDriver@microchip.com, arnd@arndb.de, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Michael Walle Subject: Re: [PATCH v5 char-misc-next] misc: microchip: pci1xxxx: Add OTP/EEPROM driver for the pci1xxxx switch Date: Mon, 13 Feb 2023 13:00:09 +0100 Message-Id: <20230213120009.2661528-1-michael@walle.cc> X-Mailer: git-send-email 2.30.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> + /* Wait for the EPC_BUSY bit to get cleared */ >>> + do { >>> + data = readl(priv->reg_base + MMAP_EEPROM_OFFSET(EEPROM_CMD_REG)); >>> + } while (data & EEPROM_CMD_EPC_BUSY_BIT); >> >> Again, you can not sit and spin in a busy-wait like this with no chance >> to recover if something goes wrong with the hardware (hint, what if it >> got removed?) Also, it is good practice to CC people who did comments on the former versions. -michael