FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu Kernel Team

 
 
LinkBack Thread Tools
 
Old 05-17-2012, 05:55 PM
Andy Whitcroft
 
Default UBUNTU: SAUCE: ata_piix: add a disable_driver option

We need to be able to fully disable the ata_piix driver from the kernel
command line. Add a generic disable_driver to the module init to
completely short circuit the initialisation.

BugLink: http://bugs.launchpad.net/bugs/994870
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Luis Henriques <luis.henriques@canonical.com>
Acked-by: Herton Krzesinski <herton.krzesinski@canonical.com>
Acked-by: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
---
drivers/ata/ata_piix.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 3c809bf..424084d 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1719,10 +1719,16 @@ static void piix_remove_one(struct pci_dev *pdev)
ata_pci_remove_one(pdev);
}

+static bool disable_driver = 0;
static int __init piix_init(void)
{
int rc;

+ if (disable_driver) {
+ printk(KERN_WARNING "ata_piix: driver disabled completely
");
+ return 0;
+ }
+
DPRINTK("pci_register_driver
");
rc = pci_register_driver(&piix_pci_driver);
if (rc)
@@ -1739,5 +1745,6 @@ static void __exit piix_exit(void)
pci_unregister_driver(&piix_pci_driver);
}

+module_param(disable_driver, bool, 0);
module_init(piix_init);
module_exit(piix_exit);
--
1.7.9.5


--------------090804090900030301030408
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team

--------------090804090900030301030408--
 
Old 05-17-2012, 05:55 PM
Andy Whitcroft
 
Default UBUNTU: SAUCE: ata_piix: add a disable_driver option

We need to be able to fully disable the ata_piix driver from the kernel
command line. Add a generic disable_driver to the module init to
completely short circuit the initialisation.

BugLink: http://bugs.launchpad.net/bugs/994870
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
drivers/ata/ata_piix.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 1952869..0d2cf7e 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -1708,10 +1708,16 @@ static void piix_remove_one(struct pci_dev *pdev)
ata_pci_remove_one(pdev);
}

+static bool disable_driver = 0;
static int __init piix_init(void)
{
int rc;

+ if (disable_driver) {
+ printk(KERN_WARNING "ata_piix: driver disabled completely
");
+ return 0;
+ }
+
DPRINTK("pci_register_driver
");
rc = pci_register_driver(&piix_pci_driver);
if (rc)
@@ -1732,3 +1738,4 @@ module_init(piix_init);
module_exit(piix_exit);

module_param(prefer_ms_hyperv, int, 0);
+module_param(disable_driver, bool, 0);
--
1.7.9.5


--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 05-17-2012, 06:16 PM
Luis Henriques
 
Default UBUNTU: SAUCE: ata_piix: add a disable_driver option

Andy Whitcroft <apw@canonical.com> writes:

> We need to be able to fully disable the ata_piix driver from the kernel
> command line. Add a generic disable_driver to the module init to
> completely short circuit the initialisation.
>
> BugLink: http://bugs.launchpad.net/bugs/994870
> Signed-off-by: Andy Whitcroft <apw@canonical.com>
> ---
> drivers/ata/ata_piix.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
> index 1952869..0d2cf7e 100644
> --- a/drivers/ata/ata_piix.c
> +++ b/drivers/ata/ata_piix.c
> @@ -1708,10 +1708,16 @@ static void piix_remove_one(struct pci_dev *pdev)
> ata_pci_remove_one(pdev);
> }
>
> +static bool disable_driver = 0;
> static int __init piix_init(void)
> {
> int rc;
>
> + if (disable_driver) {
> + printk(KERN_WARNING "ata_piix: driver disabled completely
");

The only comment I have would be that you could replace printk by
one of the dev_* functions, to be consistent with the code in the
file. Other than that, it looks fine to me.

--
Luis

> + return 0; + } + DPRINTK("pci_register_driver
"); rc =
> pci_register_driver(&piix_pci_driver); if (rc) @@ -1732,3 +1738,4 @@
> module_init(piix_init); module_exit(piix_exit);
>
> module_param(prefer_ms_hyperv, int, 0);
> +module_param(disable_driver, bool, 0);
> --
> 1.7.9.5

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 09-25-2012, 07:29 PM
Tim Gardner
 
Default UBUNTU: SAUCE: ata_piix: add a disable_driver option

This is a multi-part message in MIME format.Andy - do we still need this for Quantal Hyper-V ?

rtg
--
Tim Gardner tim.gardner@canonical.com
 

Thread Tools




All times are GMT. The time now is 01:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org