Commit 25894d1f authored by Finn Thain's avatar Finn Thain Committed by Martin K. Petersen

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: default avatarFinn Thain <fthain@telegraphics.com.au>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Tested-by: default avatarOndrej Zary <linux@rainbow-software.org>
Tested-by: default avatarMichael Schmitz <schmitzmic@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 4822827a
...@@ -219,27 +219,27 @@ ...@@ -219,27 +219,27 @@
#define FLAG_TOSHIBA_DELAY 128 /* Allow for borken CD-ROMs */ #define FLAG_TOSHIBA_DELAY 128 /* Allow for borken CD-ROMs */
struct NCR5380_hostdata { struct NCR5380_hostdata {
NCR5380_implementation_fields; /* implementation specific */ NCR5380_implementation_fields; /* Board-specific data */
struct Scsi_Host *host; /* Host backpointer */ unsigned long poll_loops; /* Register polling limit */
unsigned char id_mask, id_higher_mask; /* 1 << id, all bits greater */ spinlock_t lock; /* Protects this struct */
unsigned char busy[8]; /* index = target, bit = lun */ struct scsi_cmnd *connected; /* Currently connected cmnd */
int dma_len; /* requested length of DMA */ struct list_head disconnected; /* Waiting for reconnect */
unsigned char last_message; /* last message OUT */ struct Scsi_Host *host; /* SCSI host backpointer */
struct scsi_cmnd *connected; /* currently connected cmnd */ struct workqueue_struct *work_q; /* SCSI host work queue */
struct scsi_cmnd *selecting; /* cmnd to be connected */ struct work_struct main_task; /* Work item for main loop */
struct list_head unissued; /* waiting to be issued */ int flags; /* Board-specific quirks */
struct list_head autosense; /* priority issue queue */ int dma_len; /* Requested length of DMA */
struct list_head disconnected; /* waiting for reconnect */ int read_overruns; /* Transfer size reduction for DMA erratum */
spinlock_t lock; /* protects this struct */ struct list_head unissued; /* Waiting to be issued */
int flags; struct scsi_cmnd *selecting; /* Cmnd to be connected */
struct scsi_eh_save ses; struct list_head autosense; /* Priority cmnd queue */
struct scsi_cmnd *sensing; struct scsi_cmnd *sensing; /* Cmnd needing autosense */
struct scsi_eh_save ses; /* Cmnd state saved for EH */
unsigned char busy[8]; /* Index = target, bit = lun */
unsigned char id_mask; /* 1 << Host ID */
unsigned char id_higher_mask; /* All bits above id_mask */
unsigned char last_message; /* Last Message Out */
char info[256]; char info[256];
int read_overruns; /* number of bytes to cut from a
* transfer to handle chip overruns */
struct work_struct main_task;
struct workqueue_struct *work_q;
unsigned long poll_loops; /* register polling limit */
}; };
#ifdef __KERNEL__ #ifdef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment