aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-05-15 20:09:32 +0200
committerJeff Garzik <jgarzik@redhat.com>2010-06-02 13:50:04 -0400
commit72ec24bd7725545bc149d80cbd21a7578d9aa206 (patch)
treea67f8fdda3b0dd69bb45ca19508b68431f1b69d8 /include/scsi
parented4e2f801cf1484a68c4b41878353f26e6554c6a (diff)
SCSI: implement sd_unlock_native_capacity()
Implement sd_unlock_native_capacity() method which calls into hostt->unlock_native_capacity() if implemented. This will be invoked by block layer if partitions extend beyond the end of the device and can be used to implement, for example, on-demand ATA host protected area unlocking. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi_host.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index c50a97fc76f..b7bdecb7b76 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -327,6 +327,14 @@ struct scsi_host_template {
sector_t, int []);
/*
+ * This function is called when one or more partitions on the
+ * device reach beyond the end of the device.
+ *
+ * Status: OPTIONAL
+ */
+ void (*unlock_native_capacity)(struct scsi_device *);
+
+ /*
* Can be used to export driver statistics and other infos to the
* world outside the kernel ie. userspace and it also provides an
* interface to feed the driver with information.