aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorHenrik Kretzschmar <henne@nachtwindheim.de>2006-09-06 04:49:48 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-07 13:39:34 -0400
commitb4620233d6a3510564c561a5a2a365a1d8a34b68 (patch)
treed91ffb0c62728f3dab97debfa244d517061bbfab /drivers
parentf479ab87936563a286b8aa0e39003c40fa31c6da (diff)
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/ultrastor.c23
-rw-r--r--drivers/scsi/ultrastor.h12
2 files changed, 19 insertions, 16 deletions
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
index e681681ab7a2..0372aa9fa190 100644
--- a/drivers/scsi/ultrastor.c
+++ b/drivers/scsi/ultrastor.c
@@ -196,8 +196,8 @@ struct mscp {
196 u32 sense_data PACKED; 196 u32 sense_data PACKED;
197 /* The following fields are for software only. They are included in 197 /* The following fields are for software only. They are included in
198 the MSCP structure because they are associated with SCSI requests. */ 198 the MSCP structure because they are associated with SCSI requests. */
199 void (*done)(Scsi_Cmnd *); 199 void (*done) (struct scsi_cmnd *);
200 Scsi_Cmnd *SCint; 200 struct scsi_cmnd *SCint;
201 ultrastor_sg_list sglist[ULTRASTOR_24F_MAX_SG]; /* use larger size for 24F */ 201 ultrastor_sg_list sglist[ULTRASTOR_24F_MAX_SG]; /* use larger size for 24F */
202}; 202};
203 203
@@ -289,7 +289,7 @@ static const unsigned short ultrastor_ports_14f[] = {
289 289
290static void ultrastor_interrupt(int, void *, struct pt_regs *); 290static void ultrastor_interrupt(int, void *, struct pt_regs *);
291static irqreturn_t do_ultrastor_interrupt(int, void *, struct pt_regs *); 291static irqreturn_t do_ultrastor_interrupt(int, void *, struct pt_regs *);
292static inline void build_sg_list(struct mscp *, Scsi_Cmnd *SCpnt); 292static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt);
293 293
294 294
295/* Always called with host lock held */ 295/* Always called with host lock held */
@@ -673,7 +673,7 @@ static const char *ultrastor_info(struct Scsi_Host * shpnt)
673 return buf; 673 return buf;
674} 674}
675 675
676static inline void build_sg_list(struct mscp *mscp, Scsi_Cmnd *SCpnt) 676static inline void build_sg_list(struct mscp *mscp, struct scsi_cmnd *SCpnt)
677{ 677{
678 struct scatterlist *sl; 678 struct scatterlist *sl;
679 long transfer_length = 0; 679 long transfer_length = 0;
@@ -694,7 +694,8 @@ static inline void build_sg_list(struct mscp *mscp, Scsi_Cmnd *SCpnt)
694 mscp->transfer_data_length = transfer_length; 694 mscp->transfer_data_length = transfer_length;
695} 695}
696 696
697static int ultrastor_queuecommand(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *)) 697static int ultrastor_queuecommand(struct scsi_cmnd *SCpnt,
698 void (*done) (struct scsi_cmnd *))
698{ 699{
699 struct mscp *my_mscp; 700 struct mscp *my_mscp;
700#if ULTRASTOR_MAX_CMDS > 1 701#if ULTRASTOR_MAX_CMDS > 1
@@ -833,7 +834,7 @@ retry:
833 834
834 */ 835 */
835 836
836static int ultrastor_abort(Scsi_Cmnd *SCpnt) 837static int ultrastor_abort(struct scsi_cmnd *SCpnt)
837{ 838{
838#if ULTRASTOR_DEBUG & UD_ABORT 839#if ULTRASTOR_DEBUG & UD_ABORT
839 char out[108]; 840 char out[108];
@@ -843,7 +844,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt)
843 unsigned int mscp_index; 844 unsigned int mscp_index;
844 unsigned char old_aborted; 845 unsigned char old_aborted;
845 unsigned long flags; 846 unsigned long flags;
846 void (*done)(Scsi_Cmnd *); 847 void (*done)(struct scsi_cmnd *);
847 struct Scsi_Host *host = SCpnt->device->host; 848 struct Scsi_Host *host = SCpnt->device->host;
848 849
849 if(config.slot) 850 if(config.slot)
@@ -960,7 +961,7 @@ static int ultrastor_abort(Scsi_Cmnd *SCpnt)
960 return SUCCESS; 961 return SUCCESS;
961} 962}
962 963
963static int ultrastor_host_reset(Scsi_Cmnd * SCpnt) 964static int ultrastor_host_reset(struct scsi_cmnd * SCpnt)
964{ 965{
965 unsigned long flags; 966 unsigned long flags;
966 int i; 967 int i;
@@ -1045,8 +1046,8 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1045 unsigned int mscp_index; 1046 unsigned int mscp_index;
1046#endif 1047#endif
1047 struct mscp *mscp; 1048 struct mscp *mscp;
1048 void (*done)(Scsi_Cmnd *); 1049 void (*done) (struct scsi_cmnd *);
1049 Scsi_Cmnd *SCtmp; 1050 struct scsi_cmnd *SCtmp;
1050 1051
1051#if ULTRASTOR_MAX_CMDS == 1 1052#if ULTRASTOR_MAX_CMDS == 1
1052 mscp = &config.mscp[0]; 1053 mscp = &config.mscp[0];
@@ -1079,7 +1080,7 @@ static void ultrastor_interrupt(int irq, void *dev_id, struct pt_regs *regs)
1079 return; 1080 return;
1080 } 1081 }
1081 if (icm_status == 3) { 1082 if (icm_status == 3) {
1082 void (*done)(Scsi_Cmnd *) = mscp->done; 1083 void (*done)(struct scsi_cmnd *) = mscp->done;
1083 if (done) { 1084 if (done) {
1084 mscp->done = NULL; 1085 mscp->done = NULL;
1085 mscp->SCint->result = DID_ABORT << 16; 1086 mscp->SCint->result = DID_ABORT << 16;
diff --git a/drivers/scsi/ultrastor.h b/drivers/scsi/ultrastor.h
index da759a11deff..a692905f95f7 100644
--- a/drivers/scsi/ultrastor.h
+++ b/drivers/scsi/ultrastor.h
@@ -14,11 +14,13 @@
14#define _ULTRASTOR_H 14#define _ULTRASTOR_H
15 15
16static int ultrastor_detect(struct scsi_host_template *); 16static int ultrastor_detect(struct scsi_host_template *);
17static const char *ultrastor_info(struct Scsi_Host * shpnt); 17static const char *ultrastor_info(struct Scsi_Host *shpnt);
18static int ultrastor_queuecommand(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)); 18static int ultrastor_queuecommand(struct scsi_cmnd *,
19static int ultrastor_abort(Scsi_Cmnd *); 19 void (*done)(struct scsi_cmnd *));
20static int ultrastor_host_reset(Scsi_Cmnd *); 20static int ultrastor_abort(struct scsi_cmnd *);
21static int ultrastor_biosparam(struct scsi_device *, struct block_device *, sector_t, int *); 21static int ultrastor_host_reset(struct scsi_cmnd *);
22static int ultrastor_biosparam(struct scsi_device *, struct block_device *,
23 sector_t, int *);
22 24
23 25
24#define ULTRASTOR_14F_MAX_SG 16 26#define ULTRASTOR_14F_MAX_SG 16