From patchwork Tue Jun 11 07:11:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 250479 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id E37272C0085 for ; Tue, 11 Jun 2013 17:11:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751877Ab3FKHLk (ORCPT ); Tue, 11 Jun 2013 03:11:40 -0400 Received: from mail-pb0-f52.google.com ([209.85.160.52]:38954 "EHLO mail-pb0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751871Ab3FKHLj (ORCPT ); Tue, 11 Jun 2013 03:11:39 -0400 Received: by mail-pb0-f52.google.com with SMTP id xa12so8155526pbc.11 for ; Tue, 11 Jun 2013 00:11:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=JAOfRuHCJquP/0vU+e+6hiyKO8LGxxSzi87Bui5fn/g=; b=Xx69Esf7e0B2R8Rm/bEG4qGepDtf+qrZY0TVida0Ye2kU1X7B4McLywT9znQbZX16T EU8HWPkzn9GNyYldjObZhSeRTM0Wc1nkCqqTcGiGiLsZWcvmGxw1rgwWGm/dj8u/QVxX bxJMfnZI6M/QEP2MAO1a0TwXpmKx68oB9CHvRP0tm9GFrB3kaYeQEiF+kS0NyUBIURbl 6c/tk91Ku2JqqiAxVHxktzFyiMJMexgv8C0qj9y/f9YD9ROkgl/gqEcXxAupacN4nloI ar+JytFP9zQtYp/TPy/lcs/AqMtKz1kmAkxyfTYluW3eqkCWqE0Jny9QG1lZkVne9Bme 8C5Q== X-Received: by 10.68.13.168 with SMTP id i8mr13405676pbc.86.1370934699327; Tue, 11 Jun 2013 00:11:39 -0700 (PDT) Received: from mtj.dyndns.org (c-69-181-251-227.hsd1.ca.comcast.net. [69.181.251.227]) by mx.google.com with ESMTPSA id ov2sm13477990pbc.34.2013.06.11.00.11.38 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 11 Jun 2013 00:11:38 -0700 (PDT) Date: Tue, 11 Jun 2013 00:11:36 -0700 From: Tejun Heo To: linux-ide@vger.kernel.org Cc: "H. Peter Anvin" Subject: [PATCH libata/for-3.10-fixes] libata: skip SRST for all SIMG [34]7x port-multipliers Message-ID: <20130611071136.GD22530@mtj.dyndns.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org For some reason, a lot of port-multipliers have issues with softreset. SIMG [34]7x series port-multipliers have been quite erratic in this regard. I recall that it was better with some firmware revisions and the current list of quirks worked fine for a while. I think it got worse with later firmwares or maybe my test coverage wasn't good enough. Anyways, HPA is reporting that his 3726 setup suffers SRST failures and then the PMP gets confused and fails to probe the last port. The hope was that we try to stick to the standard as much as possible and soonish the PMPs and their firmwares will improve in quality, so the quirk list was kept to minimum. Well, it seems like that's never gonna happen. Let's set NO_SRST for all [34]7x PMPs so that whatever remaining userbase of the device suffer the least. Maybe we should do the same for 57xx's but unfortunately I don't have any device left to test and I'm not even sure 57xx's have ever been made widely available, so let's leave those alone for now. Signed-off-by: Tejun Heo Reported-by: "H. Peter Anvin" Cc: stable@vger.kernel.org --- drivers/ata/libata-pmp.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 61c59ee..1c41722 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c @@ -389,9 +389,13 @@ static void sata_pmp_quirks(struct ata_port *ap) /* link reports offline after LPM */ link->flags |= ATA_LFLAG_NO_LPM; - /* Class code report is unreliable. */ + /* + * Class code report is unreliable and SRST times + * out under certain configurations. + */ if (link->pmp < 5) - link->flags |= ATA_LFLAG_ASSUME_ATA; + link->flags |= ATA_LFLAG_NO_SRST | + ATA_LFLAG_ASSUME_ATA; /* port 5 is for SEMB device and it doesn't like SRST */ if (link->pmp == 5) @@ -399,20 +403,17 @@ static void sata_pmp_quirks(struct ata_port *ap) ATA_LFLAG_ASSUME_SEMB; } } else if (vendor == 0x1095 && devid == 0x4723) { - /* sil4723 quirks */ - ata_for_each_link(link, ap, EDGE) { - /* link reports offline after LPM */ - link->flags |= ATA_LFLAG_NO_LPM; - - /* class code report is unreliable */ - if (link->pmp < 2) - link->flags |= ATA_LFLAG_ASSUME_ATA; - - /* the config device at port 2 locks up on SRST */ - if (link->pmp == 2) - link->flags |= ATA_LFLAG_NO_SRST | - ATA_LFLAG_ASSUME_ATA; - } + /* + * sil4723 quirks + * + * Link reports offline after LPM. Class code report is + * unreliable. SIMG PMPs never got SRST reliable and the + * config device at port 2 locks up on SRST. + */ + ata_for_each_link(link, ap, EDGE) + link->flags |= ATA_LFLAG_NO_LPM | + ATA_LFLAG_NO_SRST | + ATA_LFLAG_ASSUME_ATA; } else if (vendor == 0x1095 && devid == 0x4726) { /* sil4726 quirks */ ata_for_each_link(link, ap, EDGE) {