summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2014-06-25 17:27:36 +0400
committerChristoph Hellwig <hch@lst.de>2014-07-18 00:07:37 +0400
commit9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3 (patch)
tree576b86c3ec56dd7176285ec2d27f27ca55f77bc3 /include/scsi
parent755f516bbb983915d6cbfb5aa592cc0a5a99fd00 (diff)
downloadlinux-9cb78c16f5dadefd8dc5ba0ae5a2f26cd59419b3.tar.xz
scsi: use 64-bit LUNs
The SCSI standard defines 64-bit values for LUNs, and large arrays employing large or hierarchical LUN numbers become more and more common. So update the linux SCSI stack to use 64-bit LUN numbers. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@infradead.org> Reviewed-by: Ewan Milne <emilne@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h2
-rw-r--r--include/scsi/scsi_device.h22
-rw-r--r--include/scsi/scsi_transport.h2
3 files changed, 13 insertions, 13 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 0a4edfe8af51..91e2e4215ba0 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -385,7 +385,7 @@ struct scsi_lun {
#define SCSI_W_LUN_ACCESS_CONTROL (SCSI_W_LUN_BASE + 2)
#define SCSI_W_LUN_TARGET_LOG_PAGE (SCSI_W_LUN_BASE + 3)
-static inline int scsi_is_wlun(unsigned int lun)
+static inline int scsi_is_wlun(u64 lun)
{
return (lun & 0xff00) == SCSI_W_LUN_BASE;
}
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 27ab31017f09..9aa38f7b303b 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -98,8 +98,8 @@ struct scsi_device {
unsigned long last_queue_ramp_up; /* last queue ramp up time */
- unsigned int id, lun, channel;
-
+ unsigned int id, channel;
+ u64 lun;
unsigned int manufacturer; /* Manufacturer of device, for using
* vendor-specific cmd's */
unsigned sector_size; /* size in bytes */
@@ -321,9 +321,9 @@ static inline struct scsi_target *scsi_target(struct scsi_device *sdev)
dev_printk(prefix, &(starget)->dev, fmt, ##a)
extern struct scsi_device *__scsi_add_device(struct Scsi_Host *,
- uint, uint, uint, void *hostdata);
+ uint, uint, u64, void *hostdata);
extern int scsi_add_device(struct Scsi_Host *host, uint channel,
- uint target, uint lun);
+ uint target, u64 lun);
extern int scsi_register_device_handler(struct scsi_device_handler *scsi_dh);
extern void scsi_remove_device(struct scsi_device *);
extern int scsi_unregister_device_handler(struct scsi_device_handler *scsi_dh);
@@ -332,13 +332,13 @@ void scsi_attach_vpd(struct scsi_device *sdev);
extern int scsi_device_get(struct scsi_device *);
extern void scsi_device_put(struct scsi_device *);
extern struct scsi_device *scsi_device_lookup(struct Scsi_Host *,
- uint, uint, uint);
+ uint, uint, u64);
extern struct scsi_device *__scsi_device_lookup(struct Scsi_Host *,
- uint, uint, uint);
+ uint, uint, u64);
extern struct scsi_device *scsi_device_lookup_by_target(struct scsi_target *,
- uint);
+ u64);
extern struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *,
- uint);
+ u64);
extern void starget_for_each_device(struct scsi_target *, void *,
void (*fn)(struct scsi_device *, void *));
extern void __starget_for_each_device(struct scsi_target *, void *,
@@ -411,13 +411,13 @@ extern void scsi_device_resume(struct scsi_device *sdev);
extern void scsi_target_quiesce(struct scsi_target *);
extern void scsi_target_resume(struct scsi_target *);
extern void scsi_scan_target(struct device *parent, unsigned int channel,
- unsigned int id, unsigned int lun, int rescan);
+ unsigned int id, u64 lun, int rescan);
extern void scsi_target_reap(struct scsi_target *);
extern void scsi_target_block(struct device *);
extern void scsi_target_unblock(struct device *, enum scsi_device_state);
extern void scsi_remove_target(struct device *);
-extern void int_to_scsilun(unsigned int, struct scsi_lun *);
-extern int scsilun_to_int(struct scsi_lun *);
+extern void int_to_scsilun(u64, struct scsi_lun *);
+extern u64 scsilun_to_int(struct scsi_lun *);
extern const char *scsi_device_state_name(enum scsi_device_state);
extern int scsi_is_sdev_device(const struct device *);
extern int scsi_is_target_device(const struct device *);
diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h
index af244f4bba53..81292392adbc 100644
--- a/include/scsi/scsi_transport.h
+++ b/include/scsi/scsi_transport.h
@@ -35,7 +35,7 @@ struct scsi_transport_template {
/*
* If set, called from sysfs and legacy procfs rescanning code.
*/
- int (*user_scan)(struct Scsi_Host *, uint, uint, uint);
+ int (*user_scan)(struct Scsi_Host *, uint, uint, u64);
/* The size of the specific transport attribute structure (a
* space of this size will be left at the end of the