2005-10-30 16:55:31

by Mark Tomich

[permalink] [raw]
Subject: patch to add a config option to enable SATA ATAPI by default

Below is a very straight-forward patch to add a config option to
enabling SATA ATAPI by default.
Please CC me with any comments.

diff -u -r linux-2.6.14-rc5/drivers/scsi/Kconfig
linux-2.6.14-rc5-patched/drivers/scsi/Kconfig
--- linux-2.6.14-rc5/drivers/scsi/Kconfig 2005-10-30 11:09:15.533533419
-0500
+++ linux-2.6.14-rc5-patched/drivers/scsi/Kconfig 2005-10-30
11:21:39.735696058 -0500
@@ -445,6 +445,17 @@

If unsure, say N.

+config SCSI_SATA_ENABLE_ATAPI
+ bool "Enable SATA ATAPI by default"
+ depends on SCSI_SATA
+ help
+ SATA ATAPI is disabled by default.
+ Use this option to enable it by default.
+
+ You probably want this if you have a CDROM attached on the SATA bus.
+
+ If unsure, say Y.
+
config SCSI_SATA_AHCI
tristate "AHCI SATA support"
depends on SCSI_SATA && PCI
diff -u -r linux-2.6.14-rc5/drivers/scsi/libata-core.c
linux-2.6.14-rc5-patched/drivers/scsi/libata-core.c
--- linux-2.6.14-rc5/drivers/scsi/libata-core.c 2005-10-30
11:09:15.614522543 -0500
+++ linux-2.6.14-rc5-patched/drivers/scsi/libata-core.c 2005-10-30
11:44:45.776652352 -0500
@@ -75,7 +75,12 @@
static unsigned int ata_unique_id = 1;
static struct workqueue_struct *ata_wq;

+#ifdef CONFIG_SCSI_SATA_ENABLE_ATAPI
+int atapi_enabled = 1;
+#else
int atapi_enabled = 0;
+#endif
+
module_param(atapi_enabled, int, 0444);
MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices
(0=off, 1=on)");




2005-10-31 10:27:29

by Olaf Hering

[permalink] [raw]
Subject: Re: patch to add a config option to enable SATA ATAPI by default

On Sun, Oct 30, Mark Tomich wrote:

> Below is a very straight-forward patch to add a config option to
> enabling SATA ATAPI by default.

> diff -u -r linux-2.6.14-rc5/drivers/scsi/Kconfig
> linux-2.6.14-rc5-patched/drivers/scsi/Kconfig
> --- linux-2.6.14-rc5/drivers/scsi/Kconfig 2005-10-30 11:09:15.533533419 -0500
> +++ linux-2.6.14-rc5-patched/drivers/scsi/Kconfig 2005-10-30 11:21:39.735696058 -0500
> @@ -445,6 +445,17 @@
>
> If unsure, say N.
>
> +config SCSI_SATA_ENABLE_ATAPI
> + bool "Enable SATA ATAPI by default"

Jeff, will you apply this?

--
short story of a lazy sysadmin:
alias appserv=wotan

2005-10-31 11:26:21

by Jeff Garzik

[permalink] [raw]
Subject: Re: patch to add a config option to enable SATA ATAPI by default

Olaf Hering wrote:
> On Sun, Oct 30, Mark Tomich wrote:
>
>
>>Below is a very straight-forward patch to add a config option to
>>enabling SATA ATAPI by default.
>
>
>>diff -u -r linux-2.6.14-rc5/drivers/scsi/Kconfig
>>linux-2.6.14-rc5-patched/drivers/scsi/Kconfig
>>--- linux-2.6.14-rc5/drivers/scsi/Kconfig 2005-10-30 11:09:15.533533419 -0500
>>+++ linux-2.6.14-rc5-patched/drivers/scsi/Kconfig 2005-10-30 11:21:39.735696058 -0500
>>@@ -445,6 +445,17 @@
>>
>> If unsure, say N.
>>
>>+config SCSI_SATA_ENABLE_ATAPI
>>+ bool "Enable SATA ATAPI by default"
>
>
> Jeff, will you apply this?

Nope. It's already a runtime option. The runtime option will default
to enabled when ATAPI is working 100%.

Jeff



2005-11-01 02:09:31

by Mark Tomich

[permalink] [raw]
Subject: Re: patch to add a config option to enable SATA ATAPI by default

Maybe I'm just not doing it properly, but I wasn't able to specify the
"atapi_enabled" option on the kernel command line. I tried it, but it
still didn't see my CD-ROM drive. That's why I wrote the patch.
Anyway, thanks for all your work on LIBATA.

On Mon, 2005-10-31 at 06:26 -0500, Jeff Garzik wrote:
> Olaf Hering wrote:
> > On Sun, Oct 30, Mark Tomich wrote:
> >
> >
> >>Below is a very straight-forward patch to add a config option to
> >>enabling SATA ATAPI by default.
> >
> >
> >>diff -u -r linux-2.6.14-rc5/drivers/scsi/Kconfig
> >>linux-2.6.14-rc5-patched/drivers/scsi/Kconfig
> >>--- linux-2.6.14-rc5/drivers/scsi/Kconfig 2005-10-30 11:09:15.533533419 -0500
> >>+++ linux-2.6.14-rc5-patched/drivers/scsi/Kconfig 2005-10-30 11:21:39.735696058 -0500
> >>@@ -445,6 +445,17 @@
> >>
> >> If unsure, say N.
> >>
> >>+config SCSI_SATA_ENABLE_ATAPI
> >>+ bool "Enable SATA ATAPI by default"
> >
> >
> > Jeff, will you apply this?
>
> Nope. It's already a runtime option. The runtime option will default
> to enabled when ATAPI is working 100%.
>
> Jeff
>
>
>

2005-11-01 07:36:12

by Olaf Hering

[permalink] [raw]
Subject: Re: patch to add a config option to enable SATA ATAPI by default

On Mon, Oct 31, Mark Tomich wrote:

> Maybe I'm just not doing it properly, but I wasn't able to specify the
> "atapi_enabled" option on the kernel command line. I tried it, but it
> still didn't see my CD-ROM drive. That's why I wrote the patch.

Use modulename.moduleoption=value, libata.atapi_enabled=1 will likely work.

--
short story of a lazy sysadmin:
alias appserv=wotan

2005-11-01 12:53:43

by Mark Tomich

[permalink] [raw]
Subject: Re: patch to add a config option to enable SATA ATAPI by default

Sounds good. Thanks again!

On Tue, 2005-11-01 at 08:35 +0100, Olaf Hering wrote:
> On Mon, Oct 31, Mark Tomich wrote:
>
> > Maybe I'm just not doing it properly, but I wasn't able to specify the
> > "atapi_enabled" option on the kernel command line. I tried it, but it
> > still didn't see my CD-ROM drive. That's why I wrote the patch.
>
> Use modulename.moduleoption=value, libata.atapi_enabled=1 will likely work.
>