mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Phil Oester <kernel@theoesters.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] Allow 2.5.45 IDE to compile without DMA
Date: Fri, 1 Nov 2002 12:03:11 -0800	[thread overview]
Message-ID: <20021101120311.A31647@ns1.theoesters.com> (raw)

When I enable generic IDE chipset support, but do not enable DMA, the kernel won't compile.  The patch below (while admittedly inelegant) fixed that up for me.

For the record, I only enabled these IDE options:

CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_BLK_DEV_GENERIC=y

-Phil Oester


diff -ru linux-2.5.45-orig/drivers/ide/pci/generic.c linux-2.5.45/drivers/ide/pci/generic.c
--- linux-2.5.45-orig/drivers/ide/pci/generic.c Wed Oct 30 19:42:57 2002
+++ linux-2.5.45/drivers/ide/pci/generic.c      Fri Nov  1 14:42:16 2002
@@ -60,7 +60,11 @@
 
 static void init_dma_generic (ide_hwif_t *hwif, unsigned long dmabase)
 {
+#ifdef CONFIG_BLK_DEV_IDEDMA
        ide_setup_dma(hwif, dmabase, 8);
+#else /* !CONFIG_BLK_DEV_IDEDMA */
+       return;
+#endif /* CONFIG_BLK_DEV_IDEDMA */
 }
 
 extern void ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
diff -ru linux-2.5.45-orig/drivers/ide/setup-pci.c linux-2.5.45/drivers/ide/setup-pci.c
--- linux-2.5.45-orig/drivers/ide/setup-pci.c   Wed Oct 30 19:42:28 2002
+++ linux-2.5.45/drivers/ide/setup-pci.c        Fri Nov  1 14:00:55 2002
@@ -475,6 +475,8 @@
        return hwif;
 }
 
+#ifdef CONFIG_BLK_DEV_IDEDMA
+
 /**
  *     ide_hwif_setup_dma      -       configure DMA interface
  *     @dev: PCI device
@@ -528,6 +530,8 @@
        }
 }
 
+#endif /* CONFIG_BLK_DEV_IDEDMA */
+
 /**
  *     ide_setup_pci_controller        -       set up IDE PCI
  *     @dev: PCI device


                 reply	other threads:[~2002-11-01 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20021101120311.A31647@ns1.theoesters.com \
    --to=kernel@theoesters.com \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®