summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-12-06 15:02:26 +0000
committerDavid Howells <dhowells@warthog.cambridge.redhat.com>2006-12-06 15:02:26 +0000
commit06328b4f7919e9d2169d45cadc5a37b828a78eda (patch)
tree2c048aad57f0f9cf17bddfec864e57348b1fe3b8
parent4796b71fbb907ce6b8a9acf1852d3646a80b4576 (diff)
downloadop-kernel-dev-06328b4f7919e9d2169d45cadc5a37b828a78eda.zip
op-kernel-dev-06328b4f7919e9d2169d45cadc5a37b828a78eda.tar.gz
Actually update the fixed up compile failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
-rw-r--r--drivers/scsi/aic94xx/aic94xx_scb.c9
-rw-r--r--drivers/scsi/libsas/sas_scsi_host.c4
-rw-r--r--drivers/scsi/scsi_tgt_lib.c15
-rw-r--r--include/scsi/libsas.h2
4 files changed, 18 insertions, 12 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_scb.c b/drivers/scsi/aic94xx/aic94xx_scb.c
index 14d5d8c..75ed6b0 100644
--- a/drivers/scsi/aic94xx/aic94xx_scb.c
+++ b/drivers/scsi/aic94xx/aic94xx_scb.c
@@ -414,9 +414,10 @@ void asd_invalidate_edb(struct asd_ascb *ascb, int edb_id)
}
/* hard reset a phy later */
-static void do_phy_reset_later(void *data)
+static void do_phy_reset_later(struct work_struct *work)
{
- struct sas_phy *sas_phy = data;
+ struct sas_phy *sas_phy =
+ container_of(work, struct sas_phy, reset_work);
int error;
ASD_DPRINTK("%s: About to hard reset phy %d\n", __FUNCTION__,
@@ -430,7 +431,7 @@ static void do_phy_reset_later(void *data)
static void phy_reset_later(struct sas_phy *sas_phy, struct Scsi_Host *shost)
{
- INIT_WORK(&sas_phy->reset_work, do_phy_reset_later, sas_phy);
+ INIT_WORK(&sas_phy->reset_work, do_phy_reset_later);
queue_work(shost->work_q, &sas_phy->reset_work);
}
@@ -442,7 +443,7 @@ static void task_kill_later(struct asd_ascb *ascb)
struct Scsi_Host *shost = sas_ha->core.shost;
struct sas_task *task = ascb->uldd_task;
- INIT_WORK(&task->abort_work, (void (*)(void *))sas_task_abort, task);
+ INIT_WORK(&task->abort_work, sas_task_abort);
queue_work(shost->work_q, &task->abort_work);
}
diff --git a/drivers/scsi/libsas/sas_scsi_host.c b/drivers/scsi/libsas/sas_scsi_host.c
index e064aac..22672d5 100644
--- a/drivers/scsi/libsas/sas_scsi_host.c
+++ b/drivers/scsi/libsas/sas_scsi_host.c
@@ -846,8 +846,10 @@ static int do_sas_task_abort(struct sas_task *task)
return -EAGAIN;
}
-void sas_task_abort(struct sas_task *task)
+void sas_task_abort(struct work_struct *work)
{
+ struct sas_task *task =
+ container_of(work, struct sas_task, abort_work);
int i;
for (i = 0; i < 5; i++)
diff --git a/drivers/scsi/scsi_tgt_lib.c b/drivers/scsi/scsi_tgt_lib.c
index 39da5cd..386dbae 100644
--- a/drivers/scsi/scsi_tgt_lib.c
+++ b/drivers/scsi/scsi_tgt_lib.c
@@ -185,10 +185,11 @@ static void cmd_hashlist_del(struct scsi_cmnd *cmd)
spin_unlock_irqrestore(&qdata->cmd_hash_lock, flags);
}
-static void scsi_tgt_cmd_destroy(void *data)
+static void scsi_tgt_cmd_destroy(struct work_struct *work)
{
- struct scsi_cmnd *cmd = data;
- struct scsi_tgt_cmd *tcmd = cmd->request->end_io_data;
+ struct scsi_tgt_cmd *tcmd =
+ container_of(work, struct scsi_tgt_cmd, work);
+ struct scsi_cmnd *cmd = tcmd->rq->special;
dprintk("cmd %p %d %lu\n", cmd, cmd->sc_data_direction,
rq_data_dir(cmd->request));
@@ -214,6 +215,7 @@ static void init_scsi_tgt_cmd(struct request *rq, struct scsi_tgt_cmd *tcmd,
struct list_head *head;
tcmd->tag = tag;
+ INIT_WORK(&tcmd->work, scsi_tgt_cmd_destroy);
spin_lock_irqsave(&qdata->cmd_hash_lock, flags);
head = &qdata->cmd_hash[cmd_hashfn(tag)];
list_add(&tcmd->hash_list, head);
@@ -303,7 +305,7 @@ void scsi_tgt_free_queue(struct Scsi_Host *shost)
cmd = tcmd->rq->special;
shost->hostt->eh_abort_handler(cmd);
- scsi_tgt_cmd_destroy(cmd);
+ scsi_tgt_cmd_destroy(&tcmd->work);
}
}
EXPORT_SYMBOL_GPL(scsi_tgt_free_queue);
@@ -347,7 +349,6 @@ static void scsi_tgt_cmd_done(struct scsi_cmnd *cmd)
dprintk("cmd %p %lu\n", cmd, rq_data_dir(cmd->request));
scsi_tgt_uspace_send_status(cmd, tcmd->tag);
- INIT_WORK(&tcmd->work, scsi_tgt_cmd_destroy, cmd);
queue_work(scsi_tgtd, &tcmd->work);
}
@@ -549,13 +550,15 @@ static int scsi_tgt_copy_sense(struct scsi_cmnd *cmd, unsigned long uaddr,
static int scsi_tgt_abort_cmd(struct Scsi_Host *shost, struct scsi_cmnd *cmd)
{
+ struct scsi_tgt_cmd *tcmd;
int err;
err = shost->hostt->eh_abort_handler(cmd);
if (err)
eprintk("fail to abort %p\n", cmd);
- scsi_tgt_cmd_destroy(cmd);
+ tcmd = cmd->request->end_io_data;
+ scsi_tgt_cmd_destroy(&tcmd->work);
return err;
}
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index b09bdd8..9233ed5 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -646,6 +646,6 @@ void sas_unregister_dev(struct domain_device *);
void sas_init_dev(struct domain_device *);
-void sas_task_abort(struct sas_task *task);
+void sas_task_abort(struct work_struct *);
#endif /* _SASLIB_H_ */
OpenPOWER on IntegriCloud