From: Jeff Garzik <jeff@garzik.org>
To: Mark Nelson <mdnelson8@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH] ahci: add parameter to disable ahci driver on Promise PDC42819
Date: Mon, 16 Nov 2009 22:11:33 -0500 [thread overview]
Message-ID: <4B021465.2030500@garzik.org> (raw)
In-Reply-To: <65a6ef750911110154h4eff3b9cp4f5259f37834ea7a@mail.gmail.com>
On 11/11/2009 04:54 AM, Mark Nelson wrote:
> ahci can drive the Promise PDC42819, but obviously it can only use SATA
> disks connected to this controller. The controller can actually support
> SAS disks as well, but at the moment only with Promise's own binary
> t3sas driver.
>
> To allow users to use both the ahci and the t3sas drivers in the same
> system (with t3sas controlling the PDC42819) we add a parameter,
> promise_enable that can be used to disable ahci on the Promise chip (by
> setting it to 0). This way even if the ahci driver is loaded first the
> t3sas driver can grab the Promise chip and the user's SAS disks will be
> operational.
>
> By default the parameter is 1 so ahci drives the controller.
>
> While we're at it, add a message letting users know that with ahci
> driving their Promise chip they won't be able to use their SAS disks.
>
> Signed-off-by: Mark Nelson<mdnelson8@gmail.com>
> ---
> drivers/ata/ahci.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> Index: linux-2.6/drivers/ata/ahci.c
> ===================================================================
> --- linux-2.6.orig/drivers/ata/ahci.c
> +++ linux-2.6/drivers/ata/ahci.c
> @@ -700,6 +700,9 @@ static int marvell_enable = 1;
> module_param(marvell_enable, int, 0644);
> MODULE_PARM_DESC(marvell_enable, "Marvell SATA via AHCI (1 = enabled)");
>
> +static int promise_enable = 1;
> +module_param(promise_enable, int, 0644);
> +MODULE_PARM_DESC(promise_enable, "Promise PDC42819 via AHCI (1 = enabled)");
>
> static inline int ahci_nr_ports(u32 cap)
> {
> @@ -2988,6 +2991,26 @@ static int ahci_init_one(struct pci_dev
> if (pdev->vendor == PCI_VENDOR_ID_MARVELL&& !marvell_enable)
> return -ENODEV;
>
> + /* Promise's PDC42819 is a SAS/SATA controller that has an AHCI mode.
> + * At the moment, Promise's t3sas driver is required for SAS
> + * functionality. Disable ahci on this device if the user asked for
> + * it.
> + */
> + if (pdev->vendor == PCI_VENDOR_ID_PROMISE) {
> + if (promise_enable) {
> + dev_printk(KERN_INFO,&pdev->dev, "Promise PDC42819 "
> + "support enabled\n");
> + dev_printk(KERN_INFO,&pdev->dev, "Only SATA devices "
> + "will function with"
> + " this driver\n");
> +
> + } else {
> + dev_printk(KERN_INFO,&pdev->dev, "Promise PDC42819 "
> + "support disabled\n");
> + return -ENODEV;
I don't mind adding a warning "only SATA devices will function with this
driver."
The promise_enable is not something we do with closed-source drivers,
though, so that code logic is NAK'd
Jeff
next prev parent reply other threads:[~2009-11-17 3:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 9:54 [PATCH] ahci: add parameter to disable ahci driver on Promise PDC42819 Mark Nelson
2009-11-11 10:37 ` Alan Cox
2009-11-11 11:35 ` Mark Nelson
2009-11-17 3:11 ` Jeff Garzik [this message]
2009-11-22 0:16 ` Mark Nelson
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=4B021465.2030500@garzik.org \
--to=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=mdnelson8@gmail.com \
/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.