From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751372AbdAOXLA (ORCPT ); Sun, 15 Jan 2017 18:11:00 -0500 Received: from mail-io0-f193.google.com ([209.85.223.193]:35801 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbdAOXK5 (ORCPT ); Sun, 15 Jan 2017 18:10:57 -0500 Date: Sun, 15 Jan 2017 18:10:49 -0500 From: Tejun Heo To: Bartosz Golaszewski Cc: Kevin Hilman , Sekhar Nori , Patrick Titiano , Michael Turquette , Rob Herring , Mark Rutland , Russell King , David Lechner , linux-ide@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 04/10] sata: hardreset: retry if phys link is down Message-ID: <20170115231049.GC14446@mtj.duckdns.org> References: <1484311084-31547-1-git-send-email-bgolaszewski@baylibre.com> <1484311084-31547-5-git-send-email-bgolaszewski@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1484311084-31547-5-git-send-email-bgolaszewski@baylibre.com> User-Agent: Mutt/1.7.1 (2016-10-04) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Fri, Jan 13, 2017 at 01:37:58PM +0100, Bartosz Golaszewski wrote: > The sata core driver already retries to resume the link because some > controllers ignore writes to the SControl register. > > We have a use case with the da850 SATA controller where at PLL0 > frequency of 456MHz (needed to properly service the LCD controller) > the chip becomes unstable and the hardreset operation is ignored the > first time 50% of times. > > Retrying just the resume operation doesn't work - we need to issue > the phy/wake reset again to make it work. > > If ata_phys_link_offline() returns true in sata_link_hardreset(), > retry a couple times before really giving up. I think it'd be better to implement the driver specific implementation rather than changing the behavior for everybody. Thanks. -- tejun