libata: identify and init ZPODD devices
authorAaron Lu <aaron.lu@intel.com>
Tue, 15 Jan 2013 09:20:58 +0000 (17:20 +0800)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 21 Jan 2013 20:40:35 +0000 (15:40 -0500)
commitafe759511808cd5bb508b598007cf0c7b0ca8e08
tree26073c5a74b5fe2183aa457da6d9b5cc3d9912bb
parent1757d902b029a29dfcef63609964385cf8865b5a
libata: identify and init ZPODD devices

The ODD can be enabled for ZPODD if the following three conditions are
satisfied:
1 The ODD supports device attention;
2 The platform can runtime power off the ODD through ACPI;
3 The ODD is either slot type or drawer type.
For such ODDs, zpodd_init is called and a new structure is allocated for
it to store ZPODD related stuffs.

And the zpodd_dev_enabled function is used to test if ZPODD is currently
enabled for this ODD.

A new config CONFIG_SATA_ZPODD is added to selectively build ZPODD code.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/Kconfig
drivers/ata/Makefile
drivers/ata/libata-core.c
drivers/ata/libata-scsi.c
drivers/ata/libata-zpodd.c [new file with mode: 0644]
drivers/ata/libata.h
include/linux/libata.h
include/uapi/linux/cdrom.h