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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 8F8BDC7618B for ; Fri, 26 Jul 2019 15:29:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 578D4218D4 for ; Fri, 26 Jul 2019 15:29:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564154969; bh=NfmUCFLiynhvpHzrgnwobc64au4JaTnkhxfA4F/0VZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ih6+5eNekHBu5xkh38A74gU7pRJhEJDDSFseB5ow9obR7aK5GmTixQKA6dYHnX2Za 75ip1dqFAjUCUvCrUwV7YrU74b6Tn1w//BTNPdgAgjn9eZn5ibbPu6tXiu62cNwI/K w9WO1dDH+vHy7VJEmSh40cR7ta92y6J4a9ZT3D+Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388809AbfGZP31 (ORCPT ); Fri, 26 Jul 2019 11:29:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:44074 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387940AbfGZP3Y (ORCPT ); Fri, 26 Jul 2019 11:29:24 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DBAE4218D4; Fri, 26 Jul 2019 15:29:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564154964; bh=NfmUCFLiynhvpHzrgnwobc64au4JaTnkhxfA4F/0VZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ks0ERRTUK7XKGDUuVJJfCABosJGFHak4nwWUzSbYM4cR5M+uJYdPGZ6sCT3ezAN7I QVnOaadez50rSXC3BqE+FMH5qioI8ymDTn15WdkI68eegrF3q6RiQTFB7bHxAfeQ2l E3cOToIYiFFJgp+Ua7zxcyLaTEbESiupm/5/D5qU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Baruch Siach , Andrew Lunn , "David S. Miller" Subject: [PATCH 5.1 09/62] net: dsa: mv88e6xxx: wait after reset deactivation Date: Fri, 26 Jul 2019 17:24:21 +0200 Message-Id: <20190726152302.680792877@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190726152301.720139286@linuxfoundation.org> References: <20190726152301.720139286@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Baruch Siach [ Upstream commit 7b75e49de424ceb53d13e60f35d0a73765626fda ] Add a 1ms delay after reset deactivation. Otherwise the chip returns bogus ID value. This is observed with 88E6390 (Peridot) chip. Signed-off-by: Baruch Siach Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/dsa/mv88e6xxx/chip.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -4910,6 +4910,8 @@ static int mv88e6xxx_probe(struct mdio_d err = PTR_ERR(chip->reset); goto out; } + if (chip->reset) + usleep_range(1000, 2000); err = mv88e6xxx_detect(chip); if (err)