scsi: ncr5380: Pass hostdata pointer to register polling routines
Pass a NCR5380_hostdata struct pointer to the board-specific routines instead of a Scsi_Host struct pointer. This reduces pointer chasing in the PIO and PDMA fast paths. The old way was a mistake because it is slow and the board-specific code is not concerned with the mid-layer. 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>
This commit is contained in:

committed by
Martin K. Petersen

parent
61e1ce588b
commit
d5d37a0ab1
@@ -302,15 +302,15 @@ static void NCR5380_reselect(struct Scsi_Host *instance);
|
||||
static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
|
||||
static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
|
||||
static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
|
||||
static int NCR5380_poll_politely2(struct Scsi_Host *,
|
||||
static int NCR5380_poll_politely2(struct NCR5380_hostdata *,
|
||||
unsigned int, u8, u8,
|
||||
unsigned int, u8, u8, unsigned long);
|
||||
|
||||
static inline int NCR5380_poll_politely(struct Scsi_Host *instance,
|
||||
static inline int NCR5380_poll_politely(struct NCR5380_hostdata *hostdata,
|
||||
unsigned int reg, u8 bit, u8 val,
|
||||
unsigned long wait)
|
||||
{
|
||||
return NCR5380_poll_politely2(instance, reg, bit, val,
|
||||
return NCR5380_poll_politely2(hostdata, reg, bit, val,
|
||||
reg, bit, val, wait);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user