From patchwork Mon Sep 26 07:23:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 116371 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 EE65BB6F82 for ; Mon, 26 Sep 2011 17:23:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751292Ab1IZHXc (ORCPT ); Mon, 26 Sep 2011 03:23:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:55685 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151Ab1IZHXb convert rfc822-to-8bit (ORCPT ); Mon, 26 Sep 2011 03:23:31 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1R85XG-000233-Sq for linux-ide@vger.kernel.org; Mon, 26 Sep 2011 07:23:30 +0000 Received: by wyg34 with SMTP id 34so5617746wyg.19 for ; Mon, 26 Sep 2011 00:23:30 -0700 (PDT) MIME-Version: 1.0 Received: by 10.227.167.1 with SMTP id o1mr6885089wby.6.1317021810725; Mon, 26 Sep 2011 00:23:30 -0700 (PDT) Received: by 10.227.199.137 with HTTP; Mon, 26 Sep 2011 00:23:30 -0700 (PDT) In-Reply-To: References: <1316656512-4829-1-git-send-email-ming.lei@canonical.com> <20110924015859.GZ29319@htj.dyndns.org> <20110925000345.GD29319@htj.dyndns.org> Date: Mon, 26 Sep 2011 15:23:30 +0800 Message-ID: Subject: Re: [PATCH] ata: make DVD drive recognisable on systems with Intel Sandybridge CPT chipset From: Ming Lei To: Tejun Heo Cc: "Heasley, Seth" , "alan@linux.intel.com" , "linux-ide@vger.kernel.org" , Jeff Garzik Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hi Tejun, On Mon, Sep 26, 2011 at 2:51 PM, Ming Lei wrote: > Hi, > > On Sun, Sep 25, 2011 at 8:03 AM, Tejun Heo wrote: >> Sure I can do that but it would be better if you can revise your >> patch.  Please take a look at how different ops are mapped to >> different device IDs.  You just need to create another variant to be >> mapped to the problematic device IDs. > > OK, I will do it. How about this one below? thanks, --- Ming Lei -- 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/ata_piix.c b/drivers/ata/ata_piix.c index 43107e9..b35086b 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -147,6 +147,7 @@ enum piix_controller_ids { ich8m_apple_sata, /* locks up on second port enable */ tolapai_sata, piix_pata_vmw, /* PIIX4 for VMware, spurious DMA_ERR */ + ich8_sata_snb, }; struct piix_map_db { @@ -298,7 +299,7 @@ static const struct pci_device_id piix_pci_tbl[] = { /* SATA Controller IDE (PCH) */ { 0x8086, 0x3b2e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, /* SATA Controller IDE (CPT) */ - { 0x8086, 0x1c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, + { 0x8086, 0x1c00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, /* SATA Controller IDE (CPT) */ { 0x8086, 0x1c01, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata }, /* SATA Controller IDE (CPT) */ @@ -335,6 +336,11 @@ static struct scsi_host_template piix_sht = { ATA_BMDMA_SHT(DRV_NAME), }; +static struct ata_port_operations piix_sata_snb_ops = { + .inherits = &ata_bmdma_port_ops, + .sff_irq_check = piix_irq_check, +}; + static struct ata_port_operations piix_sata_ops = { .inherits = &ata_bmdma32_port_ops, .sff_irq_check = piix_irq_check, @@ -478,6 +484,7 @@ static const struct piix_map_db *piix_map_db_table[] = { [ich8_2port_sata] = &ich8_2port_map_db, [ich8m_apple_sata] = &ich8m_apple_map_db, [tolapai_sata] = &tolapai_map_db, + [ich8_sata_snb] = &ich8_map_db, }; static struct ata_port_info piix_port_info[] = { @@ -606,6 +613,15 @@ static struct ata_port_info piix_port_info[] = { .port_ops = &piix_vmw_ops, }, + [ich8_sata_snb] = + { + .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SIDPR, + .pio_mask = ATA_PIO4, + .mwdma_mask = ATA_MWDMA2, + .udma_mask = ATA_UDMA6, + .port_ops = &piix_sata_snb_ops, + }, + }; static struct pci_bits piix_enable_bits[] = {