summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/NCR5380.h
diff options
context:
space:
mode:
authorFinn Thain <fthain@telegraphics.com.au>2016-10-10 00:46:53 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-11-08 17:29:48 -0500
commit25894d1f98aed363bf03e2509d0237c69ab0c8ec (patch)
tree793082497d7ce41de12e345bf8c25fa37bc3ae9f /drivers/scsi/NCR5380.h
parent4822827a69d7cd3bc5a07b7637484ebd2cf88db6 (diff)
scsi: ncr5380: Improve hostdata struct member alignment and cache-ability
Re-order struct members so that hot data lies at the beginning of the struct and cold data at the end. Improve the comments while we're here. Signed-off-by: Finn Thain <fthain@telegraphics.com.au> Reviewed-by: Hannes Reinecke <hare@suse.com> Tested-by: Ondrej Zary <linux@rainbow-software.org> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/NCR5380.h')
-rw-r--r--drivers/scsi/NCR5380.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/scsi/NCR5380.h b/drivers/scsi/NCR5380.h
index f0eea44107d2..ceafa0cd80be 100644
--- a/drivers/scsi/NCR5380.h
+++ b/drivers/scsi/NCR5380.h
@@ -219,27 +219,27 @@
219#define FLAG_TOSHIBA_DELAY 128 /* Allow for borken CD-ROMs */ 219#define FLAG_TOSHIBA_DELAY 128 /* Allow for borken CD-ROMs */
220 220
221struct NCR5380_hostdata { 221struct NCR5380_hostdata {
222 NCR5380_implementation_fields; /* implementation specific */ 222 NCR5380_implementation_fields; /* Board-specific data */
223 struct Scsi_Host *host; /* Host backpointer */ 223 unsigned long poll_loops; /* Register polling limit */
224 unsigned char id_mask, id_higher_mask; /* 1 << id, all bits greater */ 224 spinlock_t lock; /* Protects this struct */
225 unsigned char busy[8]; /* index = target, bit = lun */ 225 struct scsi_cmnd *connected; /* Currently connected cmnd */
226 int dma_len; /* requested length of DMA */ 226 struct list_head disconnected; /* Waiting for reconnect */
227 unsigned char last_message; /* last message OUT */ 227 struct Scsi_Host *host; /* SCSI host backpointer */
228 struct scsi_cmnd *connected; /* currently connected cmnd */ 228 struct workqueue_struct *work_q; /* SCSI host work queue */
229 struct scsi_cmnd *selecting; /* cmnd to be connected */ 229 struct work_struct main_task; /* Work item for main loop */
230 struct list_head unissued; /* waiting to be issued */ 230 int flags; /* Board-specific quirks */
231 struct list_head autosense; /* priority issue queue */ 231 int dma_len; /* Requested length of DMA */
232 struct list_head disconnected; /* waiting for reconnect */ 232 int read_overruns; /* Transfer size reduction for DMA erratum */
233 spinlock_t lock; /* protects this struct */ 233 struct list_head unissued; /* Waiting to be issued */
234 int flags; 234 struct scsi_cmnd *selecting; /* Cmnd to be connected */
235 struct scsi_eh_save ses; 235 struct list_head autosense; /* Priority cmnd queue */
236 struct scsi_cmnd *sensing; 236 struct scsi_cmnd *sensing; /* Cmnd needing autosense */
237 struct scsi_eh_save ses; /* Cmnd state saved for EH */
238 unsigned char busy[8]; /* Index = target, bit = lun */
239 unsigned char id_mask; /* 1 << Host ID */
240 unsigned char id_higher_mask; /* All bits above id_mask */
241 unsigned char last_message; /* Last Message Out */
237 char info[256]; 242 char info[256];
238 int read_overruns; /* number of bytes to cut from a
239 * transfer to handle chip overruns */
240 struct work_struct main_task;
241 struct workqueue_struct *work_q;
242 unsigned long poll_loops; /* register polling limit */
243}; 243};
244 244
245#ifdef __KERNEL__ 245#ifdef __KERNEL__