@@ -327,7 +327,7 @@ static void gdth_scsi_done(struct scsi_cmnd *scp)
scp->host_scribble = NULL;
if (internal_command)
- complete((struct completion *)scp->request);
+ complete(cmndinfo->complete);
else
scp->scsi_done(scp);
}
@@ -353,13 +353,12 @@ int gdth_execute(gdth_ha_str *ha, gdth_cmd_str *gdtcmd, char *cmnd,
scp->device = ha->sdev;
memset(&cmndinfo, 0, sizeof(cmndinfo));
- /* use request field to save the ptr. to completion struct. */
- scp->request = (struct request *)&wait;
scp->cmd_len = 12;
scp->cmnd = cmnd;
cmndinfo.priority = IOCTL_PRI;
cmndinfo.internal_cmd_str = gdtcmd;
cmndinfo.internal_command = 1;
+ cmndinfo.complete = &wait;
TRACE(("__gdth_execute() cmd 0x%x\n", scp->cmnd[0]));
__gdth_queuecommand(ha, scp, &cmndinfo);
@@ -877,6 +877,7 @@ typedef struct {
u8 priority;
int timeout_count; /* # of timeout calls */
volatile int wait_for_completion;
+ struct completion *complete;
u16 status;
u32 info;
enum dma_data_direction dma_dir;
Do not overload the request point for completion but rather use a dedicated field in the cmndinfo structure. Signed-off-by: Hannes Reinecke <hare@suse.de> --- drivers/scsi/gdth.c | 5 ++--- drivers/scsi/gdth.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-)