hc
2024-01-31 f9004dbfff8a3fbbd7e2a88c8a4327c7f2f8e5b2
kernel/include/scsi/scsi_device.h
....@@ -110,8 +110,8 @@
110110 atomic_t device_busy; /* commands actually active on LLDD */
111111 atomic_t device_blocked; /* Device returned QUEUE_FULL. */
112112
113
+ atomic_t restarts;
113114 spinlock_t list_lock;
114
- struct list_head cmd_list; /* queue of in use SCSI Command structures */
115115 struct list_head starved_entry;
116116 unsigned short queue_depth; /* How deep of a queue we want */
117117 unsigned short max_queue_depth; /* max queue depth */
....@@ -141,8 +141,10 @@
141141 const char * rev; /* ... "nullnullnullnull" before scan */
142142
143143 #define SCSI_VPD_PG_LEN 255
144
+ struct scsi_vpd __rcu *vpd_pg0;
144145 struct scsi_vpd __rcu *vpd_pg83;
145146 struct scsi_vpd __rcu *vpd_pg80;
147
+ struct scsi_vpd __rcu *vpd_pg89;
146148 unsigned char current_tag; /* current tag */
147149 struct scsi_target *sdev_target; /* used only for single_lun */
148150
....@@ -171,6 +173,7 @@
171173 * because we did a bus reset. */
172174 unsigned use_10_for_rw:1; /* first try 10-byte read / write */
173175 unsigned use_10_for_ms:1; /* first try 10-byte mode sense/select */
176
+ unsigned set_dbd_for_ms:1; /* Set "DBD" field in mode sense */
174177 unsigned no_report_opcodes:1; /* no REPORT SUPPORTED OPERATION CODES */
175178 unsigned no_write_same:1; /* no WRITE SAME command */
176179 unsigned use_16_for_rw:1; /* Use read/write(16) over read/write(10) */
....@@ -202,8 +205,8 @@
202205 unsigned unmap_limit_for_ws:1; /* Use the UNMAP limit for WRITE SAME */
203206 unsigned rpm_autosuspend:1; /* Enable runtime autosuspend at device
204207 * creation time */
205
- /* If non-zero, use timeout (in jiffies) for all commands */
206
- unsigned int timeout_override;
208
+
209
+ bool offline_already; /* Device offline message logged */
207210
208211 atomic_t disk_events_disable_depth; /* disable depth for disk events */
209212
....@@ -228,16 +231,20 @@
228231 struct scsi_device_handler *handler;
229232 void *handler_data;
230233
234
+ size_t dma_drain_len;
235
+ void *dma_drain_buf;
236
+
231237 unsigned char access_state;
232238 struct mutex state_mutex;
233239 enum scsi_device_state sdev_state;
234240 struct task_struct *quiesced_by;
235
- unsigned long sdev_data[0];
236241
237242 ANDROID_KABI_RESERVE(1);
238243 ANDROID_KABI_RESERVE(2);
239244 ANDROID_KABI_RESERVE(3);
240245 ANDROID_KABI_RESERVE(4);
246
+
247
+ unsigned long sdev_data[];
241248 } __attribute__((aligned(sizeof(unsigned long))));
242249
243250 #define to_scsi_device(d) \
....@@ -321,7 +328,7 @@
321328 char scsi_level;
322329 enum scsi_target_state state;
323330 void *hostdata; /* available to low-level driver */
324
- unsigned long starget_data[0]; /* for the transport */
331
+ unsigned long starget_data[]; /* for the transport */
325332 /* starget_data must be the last element!!!! */
326333 } __attribute__((aligned(sizeof(unsigned long))));
327334
....@@ -465,8 +472,6 @@
465472 extern void sdev_enable_disk_events(struct scsi_device *sdev);
466473 extern int scsi_vpd_lun_id(struct scsi_device *, char *, size_t);
467474 extern int scsi_vpd_tpg_id(struct scsi_device *, int *);
468
-extern void scsi_set_cmd_timeout_override(struct scsi_device *sdev,
469
- unsigned int timeout);
470475
471476 #ifdef CONFIG_PM
472477 extern int scsi_autopm_get_device(struct scsi_device *);