linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] allow hdX=scsi when ide-scsi is a module
@ 2001-08-20 16:28 Ion Badulescu
  0 siblings, 0 replies; 3+ messages in thread
From: Ion Badulescu @ 2001-08-20 16:28 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

Hi,

The current IDE code doesn't allow the user to reserve a drive to be used 
only with ide-scsi emulation, if the ide-scsi layer is compiled as a 
module. The following trivial patch fixes the problem, I've been using it 
for the last 6 months or so.

The patch removes the explicit dependency on CONFIG_SCSI because ide-scsi 
itself requires the SCSI subsystem.

Please apply...

Thanks,
Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.
-----------------------
diff -urX unpack/diff_kernel_excludes tmp/linux/drivers/ide/ide.c linux-2.4/drivers/ide/ide.c
--- tmp/linux/drivers/ide/ide.c	Mon Sep 11 08:42:57 2000
+++ linux-2.4/drivers/ide/ide.c	Wed Oct 11 14:25:14 2000
@@ -2973,7 +2973,7 @@
 				drive->remap_0_to_1 = 2;
 				goto done;
 			case -14: /* "scsi" */
-#if defined(CONFIG_BLK_DEV_IDESCSI) && defined(CONFIG_SCSI)
+#if defined(CONFIG_BLK_DEV_IDESCSI) || defined(CONFIG_BLK_DEV_IDESCSI_MODULE)
 				drive->scsi = 1;
 				goto done;
 #else


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] allow hdX=scsi when ide-scsi is a module
  2001-08-20 22:14 Andrzej Krzysztofowicz
@ 2001-08-21 14:03 ` Ion Badulescu
  0 siblings, 0 replies; 3+ messages in thread
From: Ion Badulescu @ 2001-08-21 14:03 UTC (permalink / raw)
  To: Andrzej Krzysztofowicz; +Cc: Alan Cox, kernel list

On Tue, 21 Aug 2001, Andrzej Krzysztofowicz wrote:

> Even worse.
> As the following legal steps:
> 
> CONFIG_BLK_DEV_IDESCSI=y
> CONFIG_SCSI=y
>     |
>     V
> make config
>     |
>     V
>   SCSI emulation support (CONFIG_BLK_DEV_IDESCSI) [Y/m/n/?] y
>   ...
>   SCSI support (CONFIG_SCSI) [Y/m/n/?] m
>     |
>     V
> CONFIG_BLK_DEV_IDESCSI=y
> CONFIG_SCSI=m
> 
> result in an invalid configuration.

Right. Unfortunately there isn't much we can do about it, other that what 
you proposed. Hopefully CML2 in 2.5 will fix this problem.

> So I suggest also the following change:
[...]

Makes sense. Alan, can you apply both patches?

Thanks,
Ion

-- 
  It is better to keep your mouth shut and be thought a fool,
            than to open it and remove all doubt.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] allow hdX=scsi when ide-scsi is a module
@ 2001-08-20 22:14 Andrzej Krzysztofowicz
  2001-08-21 14:03 ` Ion Badulescu
  0 siblings, 1 reply; 3+ messages in thread
From: Andrzej Krzysztofowicz @ 2001-08-20 22:14 UTC (permalink / raw)
  To: ionut, Alan Cox, kernel list

> The current IDE code doesn't allow the user to reserve a drive to be used 
> only with ide-scsi emulation, if the ide-scsi layer is compiled as a 
> module. The following trivial patch fixes the problem, I've been using it 
> for the last 6 months or so.
> 
> The patch removes the explicit dependency on CONFIG_SCSI because ide-scsi 
> itself requires the SCSI subsystem.

Even worse.
As the following legal steps:

CONFIG_BLK_DEV_IDESCSI=y
CONFIG_SCSI=y
    |
    V
make config
    |
    V
  SCSI emulation support (CONFIG_BLK_DEV_IDESCSI) [Y/m/n/?] y
  ...
  SCSI support (CONFIG_SCSI) [Y/m/n/?] m
    |
    V
CONFIG_BLK_DEV_IDESCSI=y
CONFIG_SCSI=m

result in an invalid configuration.
So I suggest also the following change:
**********************************************************
--- drivers/ide/ide.c.old	Mon Aug 20 23:03:11 2001
+++ drivers/ide/ide.c	Mon Aug 20 23:03:39 2001
@@ -3452,7 +3452,7 @@
  #ifdef CONFIG_SCSI
 	(void) idescsi_init();
  #else
-    #warning ide scsi-emulation selected but no SCSI-subsystem in kernel
+    #error ide scsi-emulation selected but no SCSI-subsystem in kernel
  #endif
 #endif /* CONFIG_BLK_DEV_IDESCSI */
 }



BTW, IDE config is broken in much more places :(

Andrzej
-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math.,   Technical University of Gdansk

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-21 14:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-20 16:28 [PATCH] allow hdX=scsi when ide-scsi is a module Ion Badulescu
2001-08-20 22:14 Andrzej Krzysztofowicz
2001-08-21 14:03 ` Ion Badulescu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).