2.5.68: Don't include SCSI block ioctls on non-scsi systems

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Christopher Hoove » Thu, 15 May 2003 05:40:05



Unless I'm missing something, there doesn't seem to be a good reason
for the block system to include SCSI ioctls unless there's a SCSI
block device (CONFIG_BLK_DEV_SD) in the system.

This is good for embedded systems with tight memory.

-ch

--
Christopher Hoover
mailto:ch(at)murgatroid.com
mailto:ch(at)hpl.hp.com

PATCH FOLLOWS
KernelVersion: 2.5.68

diff -Naur -X dontdiff.txt linux-2.5.68-rmk1/drivers/block/Makefile linux-2.5.68-rmk1-ceiva1/drivers/block/Makefile
--- linux-2.5.68-rmk1/drivers/block/Makefile    2003-05-06 11:53:42.000000000 -0700

 # In the future, some of these should be built conditionally.
 #

-obj-y  := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o deadline-iosched.o
+obj-y  := elevator.o ll_rw_blk.o ioctl.o genhd.o deadline-iosched.o

+obj-$(CONFIG_BLK_DEV_SD)       += scsi_ioctl.o
 obj-$(CONFIG_MAC_FLOPPY)       += swim3.o
 obj-$(CONFIG_BLK_DEV_FD)       += floppy.o
 obj-$(CONFIG_BLK_DEV_FD98)     += floppy98.o
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Christoph Hellwi » Thu, 15 May 2003 08:00:16



> Unless I'm missing something, there doesn't seem to be a good reason
> for the block system to include SCSI ioctls unless there's a SCSI
> block device (CONFIG_BLK_DEV_SD) in the system.

That's broken.  You can use them on ide, sd and sr currently.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Christopher Hoove » Thu, 15 May 2003 08:10:09


Quote:> > Unless I'm missing something, there doesn't seem to be a good reason
> > for the block system to include SCSI ioctls unless there's a SCSI
> > block device (CONFIG_BLK_DEV_SD) in the system.

> That's broken.  You can use them on ide, sd and sr currently.

Thanks for the G-2.  I'll revise the patch ...

-ch

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Christopher Hoove » Thu, 15 May 2003 10:10:10




> > Unless I'm missing something, there doesn't seem to be a good reason
> > for the block system to include SCSI ioctls unless there's a SCSI
> > block device (CONFIG_BLK_DEV_SD) in the system.

> That's broken.  You can use them on ide, sd and sr currently.

OK, let's try that again.

diff -X /home/ch/src/dontdiff.txt -Naurp linux-2.5.69.orig/drivers/block/Kconfig linux-2.5.69/drivers/block/Kconfig
--- linux-2.5.69.orig/drivers/block/Kconfig     2003-05-04 16:53:08.000000000 -0700

 endmenu

+config SCSI_IOCTL
+       bool
+       default y if IDE||SCSI
diff -X /home/ch/src/dontdiff.txt -Naurp linux-2.5.69.orig/drivers/block/Makefile linux-2.5.69/drivers/block/Makefile
--- linux-2.5.69.orig/drivers/block/Makefile    2003-05-04 16:53:37.000000000 -0700

 # In the future, some of these should be built conditionally.
 #

-obj-y  := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o deadline-iosched.o
+obj-y  := elevator.o ll_rw_blk.o ioctl.o genhd.o deadline-iosched.o
+
+obj-$(CONFIG_SCSI_IOCTL)       += scsi_ioctl.o

 obj-$(CONFIG_MAC_FLOPPY)       += swim3.o
 obj-$(CONFIG_BLK_DEV_FD)       += floppy.o
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Jens Axbo » Thu, 15 May 2003 10:20:14





> > > Unless I'm missing something, there doesn't seem to be a good reason
> > > for the block system to include SCSI ioctls unless there's a SCSI
> > > block device (CONFIG_BLK_DEV_SD) in the system.

> > That's broken.  You can use them on ide, sd and sr currently.

> OK, let's try that again.

That's better, but block/scsi_ioctl.c is potentially useful on non ide
or scsi systems too.

I agree with the config option, though.

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

2.5.68: Don't include SCSI block ioctls on non-scsi systems

Post by Christoph Hellwi » Thu, 15 May 2003 10:20:13





> > > Unless I'm missing something, there doesn't seem to be a good reason
> > > for the block system to include SCSI ioctls unless there's a SCSI
> > > block device (CONFIG_BLK_DEV_SD) in the system.

> > That's broken.  You can use them on ide, sd and sr currently.

> OK, let's try that again.

Well, the idea of this code is that it is generic - I'd rather make it
a standalone config option and add stubs so driver still compile with it disabled.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/