[SCSI] scsi-driver ultrastore replace Scsi_Cmnd with struct scsi_cmnd
Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:
parent
f479ab8793
commit
b4620233d6
@ -196,8 +196,8 @@ struct mscp {
|
|||||||
u32 sense_data PACKED;
|
u32 sense_data PACKED;
|
||||||
/* The following fields are for software only. They are included in
|
/* The following fields are for software only. They are included in
|
||||||
the MSCP structure because they are associated with SCSI requests. */
|
the MSCP structure because they are associated with SCSI requests. */
|
||||||
void (*done)(Scsi_Cmnd *);
|
void (*done) (struct scsi_cmnd *);
|
||||||
Scsi_Cmnd *SCint;
|
struct scsi_cmnd *SCint;
|
||||||
ultrastor_sg_list sglist[ULTRASTOR_24F_MAX_SG]; /* use larger size for 24F */
|
ultrastor_sg_list sglist[ULTRASTOR_24F_MAX_SG]; /* use larger size for 24F */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -289,7 +289,7 @@ static const unsigned short ultrastor_ports_14f[] = {
|
|||||||
|
|
||||||
static void ultrastor_interrupt(int, void *, struct pt_regs *);
|
static void ultrastor_interrupt(int, void *, struct pt_regs *);
|
||||||
static irqreturn_t do_ultrastor_interrupt(int, void *, struct pt_regs *);
|
static irqreturn_t do_ultrastor_interrupt(int, void *, struct pt_regs *);
|
||||||
static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt);
|
static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt);
|
||||||
|
|
||||||
|
|
||||||
/* Always called with host lock held */
|
/* Always called with host lock held */
|
||||||
@ -673,7 +673,7 @@ static const char *ultrastor_info(struct Scsi_Host * shpnt)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void build_sg_list(struct mscp *mscp, Scsi_Cmnd *SCpnt)
|
static inline void build_sg_list(struct mscp *mscp, struct scsi_cmnd *SCpnt)
|
||||||
{
|
{
|
||||||
struct scatterlist *sl;
|
struct scatterlist *sl;
|
||||||
long transfer_length = 0;
|
long transfer_length = 0;
|
||||||
@ -694,7 +694,8 @@ static inline void build_sg_list(struct mscp *mscp, Scsi_Cmnd *SCpnt)
|
|||||||
mscp->transfer_data_length = transfer_length;
|
mscp->transfer_data_length = transfer_length;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
|
static int ultrastor_queuecommand(struct scsi_cmnd *SCpnt,
|
||||||
|
void (*done) (struct scsi_cmnd *))
|
||||||
{
|
{
|
||||||
struct mscp *my_mscp;
|
struct mscp *my_mscp;
|
||||||
#if ULTRASTOR_MAX_CMDS > 1
|
#if ULTRASTOR_MAX_CMDS > 1
|
||||||
@ -833,7 +834,7 @@ retry:
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int ultrastor_abort(Scsi_Cmnd *SCpnt)
|
static int ultrastor_abort(struct scsi_cmnd *SCpnt)
|
||||||
{
|
{
|
||||||
#if ULTRASTOR_DEBUG & UD_ABORT
|
#if ULTRASTOR_DEBUG & UD_ABORT
|
||||||
char out[108];
|
char out[108];
|
||||||
@ -843,7 +844,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt)
|
|||||||
unsigned int mscp_index;
|
unsigned int mscp_index;
|
||||||
unsigned char old_aborted;
|
unsigned char old_aborted;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
void (*done)(Scsi_Cmnd *);
|
void (*done)(struct scsi_cmnd *);
|
||||||
struct Scsi_Host *host = SCpnt->device->host;
|
struct Scsi_Host *host = SCpnt->device->host;
|
||||||
|
|
||||||
if(config.slot)
|
if(config.slot)
|
||||||
@ -960,7 +961,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt)
|
|||||||
return SUCCESS;
|
return SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ultrastor_host_reset(Scsi_Cmnd * SCpnt)
|
static int ultrastor_host_reset(struct scsi_cmnd * SCpnt)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int i;
|
int i;
|
||||||
@ -1045,8 +1046,8 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
unsigned int mscp_index;
|
unsigned int mscp_index;
|
||||||
#endif
|
#endif
|
||||||
struct mscp *mscp;
|
struct mscp *mscp;
|
||||||
void (*done)(Scsi_Cmnd *);
|
void (*done) (struct scsi_cmnd *);
|
||||||
Scsi_Cmnd *SCtmp;
|
struct scsi_cmnd *SCtmp;
|
||||||
|
|
||||||
#if ULTRASTOR_MAX_CMDS == 1
|
#if ULTRASTOR_MAX_CMDS == 1
|
||||||
mscp = &config.mscp[0];
|
mscp = &config.mscp[0];
|
||||||
@ -1079,7 +1080,7 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (icm_status == 3) {
|
if (icm_status == 3) {
|
||||||
void (*done)(Scsi_Cmnd *) = mscp->done;
|
void (*done)(struct scsi_cmnd *) = mscp->done;
|
||||||
if (done) {
|
if (done) {
|
||||||
mscp->done = NULL;
|
mscp->done = NULL;
|
||||||
mscp->SCint->result = DID_ABORT << 16;
|
mscp->SCint->result = DID_ABORT << 16;
|
||||||
|
@ -14,11 +14,13 @@
|
|||||||
#define _ULTRASTOR_H
|
#define _ULTRASTOR_H
|
||||||
|
|
||||||
static int ultrastor_detect(struct scsi_host_template *);
|
static int ultrastor_detect(struct scsi_host_template *);
|
||||||
static const char *ultrastor_info(struct Scsi_Host * shpnt);
|
static const char *ultrastor_info(struct Scsi_Host *shpnt);
|
||||||
static int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *));
|
static int ultrastor_queuecommand(struct scsi_cmnd *,
|
||||||
static int ultrastor_abort(Scsi_Cmnd *);
|
void (*done)(struct scsi_cmnd *));
|
||||||
static int ultrastor_host_reset(Scsi_Cmnd *);
|
static int ultrastor_abort(struct scsi_cmnd *);
|
||||||
static int ultrastor_biosparam(struct scsi_device *, struct block_device *, sector_t, int *);
|
static int ultrastor_host_reset(struct scsi_cmnd *);
|
||||||
|
static int ultrastor_biosparam(struct scsi_device *, struct block_device *,
|
||||||
|
sector_t, int *);
|
||||||
|
|
||||||
|
|
||||||
#define ULTRASTOR_14F_MAX_SG 16
|
#define ULTRASTOR_14F_MAX_SG 16
|
||||||
|
Loading…
x
Reference in New Issue
Block a user