linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sachin Sant <sachinp@in.ibm.com>
To: linux-scsi <linux-scsi@vger.kernel.org>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Tejun Heo <tj@kernel.org>
Subject: [PATCH] drivers/ata/ahci build break.
Date: Fri, 09 Oct 2009 11:57:46 +0530	[thread overview]
Message-ID: <4ACED7E2.2010108@in.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

On a Powerpc box latest git (2.6.32-rc3-git2: 36a07902...) failed to build with
following error :

drivers/ata/ahci.c: In function 'ahci_gtf_filter_workaround':
drivers/ata/ahci.c:2927: error: 'struct ata_device' has no member named
'gtf_filter'
make[2]: *** [drivers/ata/ahci.o] Error 1

The code was introduced by f80ae7e45a0e03da188494c6e947a5c8b0cdfb4a.

CONFIG_ATA_ACPI is not set in this case.

The following patch fixes the build break for me.

Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
---




[-- Attachment #2: fix-ata-ahci-build-break.patch --]
[-- Type: text/x-patch, Size: 1361 bytes --]

With !CONFIG_ATA_ACPI drivers/ata build breaks with following error

drivers/ata/ahci.c: In function 'ahci_gtf_filter_workaround':
drivers/ata/ahci.c:2927: error: 'struct ata_device' has no member named
'gtf_filter'
make[2]: *** [drivers/ata/ahci.o] Error 1

Box the function within CONFIG_ATA_ACPI.

Signed-off-by : Sachin Sant <sachinp@in.ibm.com>
---
diff -Naurp old/drivers/ata/ahci.c new/drivers/ata/ahci.c
--- old/drivers/ata/ahci.c	2009-10-09 11:34:28.000000000 +0530
+++ new/drivers/ata/ahci.c	2009-10-09 11:36:39.000000000 +0530
@@ -2884,6 +2884,7 @@ static bool ahci_broken_online(struct pc
 	return pdev->bus->number == (val >> 8) && pdev->devfn == (val & 0xff);
 }
 
+#ifdef CONFIG_ATA_ACPI
 static void ahci_gtf_filter_workaround(struct ata_host *host)
 {
 	static const struct dmi_system_id sysids[] = {
@@ -2927,6 +2928,7 @@ static void ahci_gtf_filter_workaround(s
 				dev->gtf_filter |= filter;
 	}
 }
+#endif
 
 static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
@@ -3093,8 +3095,10 @@ static int ahci_init_one(struct pci_dev
 	/* apply workaround for ASUS P5W DH Deluxe mainboard */
 	ahci_p5wdh_workaround(host);
 
+#ifdef CONFIG_ATA_ACPI
 	/* apply gtf filter quirk */
 	ahci_gtf_filter_workaround(host);
+#endif
 
 	/* initialize adapter */
 	rc = ahci_configure_dma_masks(pdev, hpriv->cap & HOST_CAP_64);

             reply	other threads:[~2009-10-09  6:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  6:27 Sachin Sant [this message]
2009-10-09  6:46 ` [PATCH] drivers/ata/ahci build break Matthew Wilcox
2009-10-09  7:00   ` Tejun Heo
2009-10-09  8:18     ` Sachin Sant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ACED7E2.2010108@in.ibm.com \
    --to=sachinp@in.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).