From patchwork Thu Mar 7 14:29:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: yxlraid@gmail.com X-Patchwork-Id: 225862 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 E53B22C0399 for ; Fri, 8 Mar 2013 01:29:38 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932120Ab3CGO3i (ORCPT ); Thu, 7 Mar 2013 09:29:38 -0500 Received: from mail-pa0-f49.google.com ([209.85.220.49]:45147 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755185Ab3CGO3h (ORCPT ); Thu, 7 Mar 2013 09:29:37 -0500 Received: by mail-pa0-f49.google.com with SMTP id kp6so503307pab.22 for ; Thu, 07 Mar 2013 06:29:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=PRP74Z0pZbI2ahllOANSqrZYVnQpM3pPqVs68bcSyS0=; b=nGcOPb1C7j0/MOTjVt2GF4iwD6hT4q9/2rRUdiDJ28zltS4MLoIS0DvriOePJv0Whh UgyF8Tzf+nYSS5b2Yl84tT0DDfy65NbrkRHuT3/sT52JrdNmwvSMGeNrNHH9M1cbWy+p +StQ6OT0vVUd5mLJC1powMlfH0mGTSvY5GX2j7MhN10PoFf0p1HZUvx6S39hatkJ8L7r 5IgkOhh2Tarv0/Ut6adIl/uII478FSMyiKbhfy9IshgRvVjkQQfOmm6C1XnV99K+nXGw udeCWhep3JpK9Q7nNM6quwThH2Yhm34Y8ncD8cq2DizIzmrIeBjrjlfhdTehlSrbqos/ sQKA== X-Received: by 10.68.211.103 with SMTP id nb7mr53901239pbc.140.1362666576762; Thu, 07 Mar 2013 06:29:36 -0800 (PST) Received: from localhost.localdomain ([218.11.176.23]) by mx.google.com with ESMTPS id rl3sm1871472pbb.28.2013.03.07.06.29.30 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 07 Mar 2013 06:29:35 -0800 (PST) From: yxlraid@gmail.com To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Xiangliang Yu Subject: [PATCH 2/2] PCI: fix system hang issue of Marvell SATA host controller Date: Thu, 7 Mar 2013 22:29:16 +0800 Message-Id: <1362666556-10036-1-git-send-email-yxlraid@gmail.com> X-Mailer: git-send-email 1.7.5.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Xiangliang Yu Fix system hang issue: if first accessed resource file of BAR0 ~ BAR4, system will hang after executing lspci command --- drivers/pci/quirks.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 0369fb6..d49f8dc 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -44,6 +44,21 @@ static void quirk_mmio_always_on(struct pci_dev *dev) DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on); +/* The BAR0 ~ BAR4 of Marvell 9125 device can't be accessed +* by IO resource file, and need to skip the files +*/ +static void quirk_marvell_mask_bar(struct pci_dev *dev) +{ + int i; + + for (i = 0; i < 5; i++) + if (dev->resource[i].start) + dev->resource[i].start = + dev->resource[i].end = 0; +} +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9125, + quirk_marvell_mask_bar); + /* The Mellanox Tavor device gives false positive parity errors * Mark this device with a broken_parity_status, to allow * PCI scanning code to "skip" this now blacklisted device.