Commit 72148aec authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: make scsi_request and scsi ioctl support optional



We only need this code to support scsi, ide, cciss and virtio.  And at
least for virtio it's a deprecated feature to start with.

This should shrink the kernel size for embedded device that only use,
say eMMC a bit.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 3719fa86
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -49,9 +49,13 @@ config LBDAF


	  If unsure, say Y.
	  If unsure, say Y.


config BLK_SCSI_REQUEST
	bool

config BLK_DEV_BSG
config BLK_DEV_BSG
	bool "Block layer SG support v4"
	bool "Block layer SG support v4"
	default y
	default y
	select BLK_SCSI_REQUEST
	help
	help
	  Saying Y here will enable generic SG (SCSI generic) v4 support
	  Saying Y here will enable generic SG (SCSI generic) v4 support
	  for any block device.
	  for any block device.
@@ -71,6 +75,7 @@ config BLK_DEV_BSGLIB
	bool "Block layer SG support v4 helper lib"
	bool "Block layer SG support v4 helper lib"
	default n
	default n
	select BLK_DEV_BSG
	select BLK_DEV_BSG
	select BLK_SCSI_REQUEST
	help
	help
	  Subsystems will normally enable this if needed. Users will not
	  Subsystems will normally enable this if needed. Users will not
	  normally need to manually enable this.
	  normally need to manually enable this.
+3 −2
Original line number Original line Diff line number Diff line
@@ -7,10 +7,11 @@ obj-$(CONFIG_BLOCK) := bio.o elevator.o blk-core.o blk-tag.o blk-sysfs.o \
			blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \
			blk-exec.o blk-merge.o blk-softirq.o blk-timeout.o \
			blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
			blk-lib.o blk-mq.o blk-mq-tag.o blk-stat.o \
			blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \
			blk-mq-sysfs.o blk-mq-cpumap.o blk-mq-sched.o ioctl.o \
			genhd.o scsi_ioctl.o partition-generic.o ioprio.o \
			genhd.o partition-generic.o ioprio.o \
			badblocks.o partitions/
			badblocks.o partitions/


obj-$(CONFIG_BOUNCE)		+= bounce.o
obj-$(CONFIG_BOUNCE)		+= bounce.o
obj-$(CONFIG_BLK_SCSI_REQUEST)	+= scsi_ioctl.o
obj-$(CONFIG_BLK_DEV_BSG)	+= bsg.o
obj-$(CONFIG_BLK_DEV_BSG)	+= bsg.o
obj-$(CONFIG_BLK_DEV_BSGLIB)	+= bsg-lib.o
obj-$(CONFIG_BLK_DEV_BSGLIB)	+= bsg-lib.o
obj-$(CONFIG_BLK_CGROUP)	+= blk-cgroup.o
obj-$(CONFIG_BLK_CGROUP)	+= blk-cgroup.o
+4 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,7 @@ config AMIGA_Z2RAM
config GDROM
config GDROM
	tristate "SEGA Dreamcast GD-ROM drive"
	tristate "SEGA Dreamcast GD-ROM drive"
	depends on SH_DREAMCAST
	depends on SH_DREAMCAST
	select BLK_SCSI_REQUEST # only for the generic cdrom code
	help
	help
	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
	  A standard SEGA Dreamcast comes with a modified CD ROM drive called a
	  "GD-ROM" by SEGA to signify it is capable of reading special disks
	  "GD-ROM" by SEGA to signify it is capable of reading special disks
@@ -114,6 +115,7 @@ config BLK_CPQ_CISS_DA
	tristate "Compaq Smart Array 5xxx support"
	tristate "Compaq Smart Array 5xxx support"
	depends on PCI
	depends on PCI
	select CHECK_SIGNATURE
	select CHECK_SIGNATURE
	select BLK_SCSI_REQUEST
	help
	help
	  This is the driver for Compaq Smart Array 5xxx controllers.
	  This is the driver for Compaq Smart Array 5xxx controllers.
	  Everyone using these boards should say Y here.
	  Everyone using these boards should say Y here.
@@ -386,6 +388,7 @@ config BLK_DEV_RAM_DAX
config CDROM_PKTCDVD
config CDROM_PKTCDVD
	tristate "Packet writing on CD/DVD media (DEPRECATED)"
	tristate "Packet writing on CD/DVD media (DEPRECATED)"
	depends on !UML
	depends on !UML
	select BLK_SCSI_REQUEST
	help
	help
	  Note: This driver is deprecated and will be removed from the
	  Note: This driver is deprecated and will be removed from the
	  kernel in the near future!
	  kernel in the near future!
@@ -497,6 +500,7 @@ config XEN_BLKDEV_BACKEND
config VIRTIO_BLK
config VIRTIO_BLK
	tristate "Virtio block driver"
	tristate "Virtio block driver"
	depends on VIRTIO
	depends on VIRTIO
	select BLK_SCSI_REQUEST
	---help---
	---help---
	  This is the virtual block driver for virtio.  It can be used with
	  This is the virtual block driver for virtio.  It can be used with
          lguest or QEMU based VMMs (like KVM or Xen).  Say Y or M.
          lguest or QEMU based VMMs (like KVM or Xen).  Say Y or M.
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ config PARIDE_PD
config PARIDE_PCD
config PARIDE_PCD
	tristate "Parallel port ATAPI CD-ROMs"
	tristate "Parallel port ATAPI CD-ROMs"
	depends on PARIDE
	depends on PARIDE
	select BLK_SCSI_REQUEST # only for the generic cdrom code
	---help---
	---help---
	  This option enables the high-level driver for ATAPI CD-ROM devices
	  This option enables the high-level driver for ATAPI CD-ROM devices
	  connected through a parallel port. If you chose to build PARIDE
	  connected through a parallel port. If you chose to build PARIDE
+1 −0
Original line number Original line Diff line number Diff line
@@ -10,6 +10,7 @@ menuconfig IDE
	tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)"
	tristate "ATA/ATAPI/MFM/RLL support (DEPRECATED)"
	depends on HAVE_IDE
	depends on HAVE_IDE
	depends on BLOCK
	depends on BLOCK
	select BLK_SCSI_REQUEST
	---help---
	---help---
	  If you say Y here, your kernel will be able to manage ATA/(E)IDE and
	  If you say Y here, your kernel will be able to manage ATA/(E)IDE and
	  ATAPI units. The most common cases are IDE hard drives and ATAPI
	  ATAPI units. The most common cases are IDE hard drives and ATAPI
Loading