From: Pascal Terjan <pterjan@mandriva.com>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] allow building both megaraid and megraid_mbox
Date: Sat, 13 Aug 2005 14:03:01 +0200 [thread overview]
Message-ID: <1123934582.8173.29.camel@plop> (raw)
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
Hello,
here is a small patch that allow building both drivers by removing the
devices supported by the new driver from the id_table of the old driver
when you want both.
It is usefull for distributions wanting to keep supporting legacy
hardware.
What's you opinion about that problem and the fix ?
Thanks in advance,
Pascal
[-- Attachment #2: megaraid-common_ids.patch --]
[-- Type: text/x-patch, Size: 2114 bytes --]
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c
+++ b/drivers/scsi/megaraid.c
@@ -30,6 +30,7 @@
*
*/
+#include <linux/config.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/blkdev.h>
@@ -5014,22 +5015,26 @@ megaraid_shutdown(struct pci_dev *pdev)
}
static struct pci_device_id megaraid_pci_tbl[] = {
+#if !defined(CONFIG_MEGARAID_MAILBOX) && !defined(CONFIG_MEGARAID_MAILBOX_MODULE)
+ /* If the new Megaraid driver is built, only support the adapters
+ * it doesn't support itself */
{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DISCOVERY,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_PERC4_DI,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
{PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_PERC4_QC_VERDE,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
+ {PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID3,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+ {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+#endif
{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
- {PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID3,
- PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
{0,}
};
MODULE_DEVICE_TABLE(pci, megaraid_pci_tbl);
diff --git a/drivers/scsi/megaraid/Kconfig.megaraid b/drivers/scsi/megaraid/Kconfig.megaraid
--- a/drivers/scsi/megaraid/Kconfig.megaraid
+++ b/drivers/scsi/megaraid/Kconfig.megaraid
@@ -64,7 +64,6 @@ config MEGARAID_MAILBOX
To compile this driver as a module, choose M here: the
module will be called megaraid_mbox
-if MEGARAID_NEWGEN=n
config MEGARAID_LEGACY
tristate "LSI Logic Legacy MegaRAID Driver"
depends on PCI && SCSI
@@ -75,4 +74,3 @@ config MEGARAID_LEGACY
To compile this driver as a module, choose M here: the
module will be called megaraid
-endif
next reply other threads:[~2005-08-13 12:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 12:03 Pascal Terjan [this message]
2005-08-15 10:15 ` [PATCH] allow building both megaraid and megraid_mbox Christoph Hellwig
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=1123934582.8173.29.camel@plop \
--to=pterjan@mandriva.com \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.