diff options
Diffstat (limited to 'include/scsi/scsi_device.h')
-rw-r--r-- | include/scsi/scsi_device.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 9dd37e2f5a8..2f3c5b8b1d6 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | #include <linux/blkdev.h> | ||
8 | #include <asm/atomic.h> | 9 | #include <asm/atomic.h> |
9 | 10 | ||
10 | struct request_queue; | 11 | struct request_queue; |
@@ -119,6 +120,7 @@ struct scsi_device { | |||
119 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ | 120 | unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */ |
120 | unsigned no_start_on_add:1; /* do not issue start on add */ | 121 | unsigned no_start_on_add:1; /* do not issue start on add */ |
121 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ | 122 | unsigned allow_restart:1; /* issue START_UNIT in error handler */ |
123 | unsigned manage_start_stop:1; /* Let HLD (sd) manage start/stop */ | ||
122 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ | 124 | unsigned no_uld_attach:1; /* disable connecting to upper level drivers */ |
123 | unsigned select_no_atn:1; | 125 | unsigned select_no_atn:1; |
124 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ | 126 | unsigned fix_capacity:1; /* READ_CAPACITY is too high by 1 */ |
@@ -154,8 +156,11 @@ struct scsi_device { | |||
154 | #define sdev_printk(prefix, sdev, fmt, a...) \ | 156 | #define sdev_printk(prefix, sdev, fmt, a...) \ |
155 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) | 157 | dev_printk(prefix, &(sdev)->sdev_gendev, fmt, ##a) |
156 | 158 | ||
157 | #define scmd_printk(prefix, scmd, fmt, a...) \ | 159 | #define scmd_printk(prefix, scmd, fmt, a...) \ |
158 | dev_printk(prefix, &(scmd)->device->sdev_gendev, fmt, ##a) | 160 | (scmd)->request->rq_disk ? \ |
161 | sdev_printk(prefix, (scmd)->device, "[%s] " fmt, \ | ||
162 | (scmd)->request->rq_disk->disk_name, ##a) : \ | ||
163 | sdev_printk(prefix, (scmd)->device, fmt, ##a) | ||
159 | 164 | ||
160 | enum scsi_target_state { | 165 | enum scsi_target_state { |
161 | STARGET_RUNNING = 1, | 166 | STARGET_RUNNING = 1, |
@@ -353,4 +358,9 @@ static inline int scsi_device_qas(struct scsi_device *sdev) | |||
353 | return 0; | 358 | return 0; |
354 | return sdev->inquiry[56] & 0x02; | 359 | return sdev->inquiry[56] & 0x02; |
355 | } | 360 | } |
361 | |||
362 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ | ||
363 | MODULE_ALIAS("scsi:t-" __stringify(type) "*") | ||
364 | #define SCSI_DEVICE_MODALIAS_FMT "scsi:t-0x%02x" | ||
365 | |||
356 | #endif /* _SCSI_SCSI_DEVICE_H */ | 366 | #endif /* _SCSI_SCSI_DEVICE_H */ |