aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2006-12-06 16:15:22 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-06 17:51:14 -0500
commit2fdb611d3102509e31ef21c79fc91f97f300b9c3 (patch)
tree715f253eb5a3231fe0691b54a7d9a9b428363470 /drivers/scsi
parent91c7c56855855d63c46c854c38576135be31a4c9 (diff)
[PATCH] ... and then some more work_struct-induced breakage (ibmvscsi)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvstgt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvstgt.c b/drivers/scsi/ibmvscsi/ibmvstgt.c
index 0e74174a1b37..e28260f05d6b 100644
--- a/drivers/scsi/ibmvscsi/ibmvstgt.c
+++ b/drivers/scsi/ibmvscsi/ibmvstgt.c
@@ -67,6 +67,7 @@ struct vio_port {
67 67
68 unsigned long liobn; 68 unsigned long liobn;
69 unsigned long riobn; 69 unsigned long riobn;
70 struct srp_target *target;
70}; 71};
71 72
72static struct workqueue_struct *vtgtd; 73static struct workqueue_struct *vtgtd;
@@ -685,10 +686,10 @@ static inline struct viosrp_crq *next_crq(struct crq_queue *queue)
685 return crq; 686 return crq;
686} 687}
687 688
688static void handle_crq(void *data) 689static void handle_crq(struct work_struct *work)
689{ 690{
690 struct srp_target *target = (struct srp_target *) data; 691 struct vio_port *vport = container_of(work, struct vio_port, crq_work);
691 struct vio_port *vport = target_to_port(target); 692 struct srp_target *target = vport->target;
692 struct viosrp_crq *crq; 693 struct viosrp_crq *crq;
693 int done = 0; 694 int done = 0;
694 695
@@ -822,6 +823,7 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
822 target->shost = shost; 823 target->shost = shost;
823 vport->dma_dev = dev; 824 vport->dma_dev = dev;
824 target->ldata = vport; 825 target->ldata = vport;
826 vport->target = target;
825 err = srp_target_alloc(target, &dev->dev, INITIAL_SRP_LIMIT, 827 err = srp_target_alloc(target, &dev->dev, INITIAL_SRP_LIMIT,
826 SRP_MAX_IU_LEN); 828 SRP_MAX_IU_LEN);
827 if (err) 829 if (err)
@@ -837,7 +839,7 @@ static int ibmvstgt_probe(struct vio_dev *dev, const struct vio_device_id *id)
837 vport->liobn = dma[0]; 839 vport->liobn = dma[0];
838 vport->riobn = dma[5]; 840 vport->riobn = dma[5];
839 841
840 INIT_WORK(&vport->crq_work, handle_crq, target); 842 INIT_WORK(&vport->crq_work, handle_crq);
841 843
842 err = crq_queue_create(&vport->crq_queue, target); 844 err = crq_queue_create(&vport->crq_queue, target);
843 if (err) 845 if (err)