From patchwork Mon Jan 14 21:01:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Terry Suereth X-Patchwork-Id: 211930 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 46BC72C009D for ; Tue, 15 Jan 2013 08:01:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757233Ab3ANVBe (ORCPT ); Mon, 14 Jan 2013 16:01:34 -0500 Received: from mail-qc0-f179.google.com ([209.85.216.179]:39914 "EHLO mail-qc0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756459Ab3ANVBd (ORCPT ); Mon, 14 Jan 2013 16:01:33 -0500 Received: by mail-qc0-f179.google.com with SMTP id b14so2776577qcs.38 for ; Mon, 14 Jan 2013 13:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=v8CUwFiDCw/wmFMWhkiOFuGebfU6o8erjkN463kHlvs=; b=dEW6iODSY4W6vdP7c45C+NA48hpmmTK5HhJODXpNXyjd+NsSQ3g6VTmCVWeW0FgXZt spyhNMCv4w5sWfs1pYs+llk1kEEMpE4FRJWn+cAoaULAs/B1fMQwbD5nWDetRyw1K2f1 LLVlBqcHUvhPZ5Vun2O+VZ0lXs4LGlFqSXgEO8wiQrqi+ti7ulJkT0/funrXHlj81m3k gmoFhMZNi6rYWGNDjCT5svNDHxr4ZGFpQNqKOgpGnlQX9zs/87NiQz84MPeKN6fqZgls xA8PLYRAqtOowWlo4U+ZVJP/d1TgvmPTRY/eJvMqJPMYeYz9+cH1hwtEYRtiw/Dk/1SW EYEQ== MIME-Version: 1.0 Received: by 10.49.127.240 with SMTP id nj16mr86488960qeb.13.1358197292921; Mon, 14 Jan 2013 13:01:32 -0800 (PST) Received: by 10.49.17.230 with HTTP; Mon, 14 Jan 2013 13:01:32 -0800 (PST) Date: Mon, 14 Jan 2013 13:01:32 -0800 Message-ID: Subject: [PATCH] libata: apply behavioral quirks to sil3826 PMP From: Terry Suereth To: linux-ide@vger.kernel.org Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Fixing support for the Silicon Image 3826 port multiplier, by applying to it the same quirks applied to the Silicon Image 3726. Specifically fixes the repeated timeout/reset process which previously afflicted the 3726, as described from line 290. Slightly based on notes from: https://bugzilla.redhat.com/show_bug.cgi?id=890237 Signed-off-by: Terry Suereth --- -- 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 -up drivers/ata/libata-pmp.c.old drivers/ata/libata-pmp.c --- drivers/ata/libata-pmp.c.old 2013-01-13 13:42:56.582780772 -0800 +++ drivers/ata/libata-pmp.c 2013-01-13 13:43:33.670964680 -0800 @@ -289,24 +289,24 @@ static int sata_pmp_configure(struct ata /* Disable sending Early R_OK. * With "cached read" HDD testing and multiple ports busy on a SATA - * host controller, 3726 PMP will very rarely drop a deferred + * host controller, 3x26 PMP will very rarely drop a deferred * R_OK that was intended for the host. Symptom will be all * 5 drives under test will timeout, get reset, and recover. */ - if (vendor == 0x1095 && devid == 0x3726) { + if (vendor == 0x1095 && (devid == 0x3726 || devid == 0x3826)) { u32 reg; err_mask = sata_pmp_read(&ap->link, PMP_GSCR_SII_POL, ®); if (err_mask) { rc = -EIO; - reason = "failed to read Sil3726 Private Register"; + reason = "failed to read Sil3x26 Private Register"; goto fail; } reg &= ~0x1; err_mask = sata_pmp_write(&ap->link, PMP_GSCR_SII_POL, reg); if (err_mask) { rc = -EIO; - reason = "failed to write Sil3726 Private Register"; + reason = "failed to write Sil3x26 Private Register"; goto fail; } } @@ -383,8 +383,8 @@ static void sata_pmp_quirks(struct ata_p u16 devid = sata_pmp_gscr_devid(gscr); struct ata_link *link; - if (vendor == 0x1095 && devid == 0x3726) { - /* sil3726 quirks */ + if (vendor == 0x1095 && (devid == 0x3x26 || devid == 0x3826)) { + /* sil3x26 quirks */ ata_for_each_link(link, ap, EDGE) { /* link reports offline after LPM */ link->flags |= ATA_LFLAG_NO_LPM;