aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/sbp2.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/ieee1394/sbp2.c
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
-rw-r--r--drivers/ieee1394/sbp2.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c
index 6986ac188281..cd156d4e779e 100644
--- a/drivers/ieee1394/sbp2.c
+++ b/drivers/ieee1394/sbp2.c
@@ -493,20 +493,25 @@ static void sbp2util_notify_fetch_agent(struct scsi_id_instance_data *scsi_id,
493 scsi_unblock_requests(scsi_id->scsi_host); 493 scsi_unblock_requests(scsi_id->scsi_host);
494} 494}
495 495
496static void sbp2util_write_orb_pointer(void *p) 496static void sbp2util_write_orb_pointer(struct work_struct *work)
497{ 497{
498 struct scsi_id_instance_data *scsi_id =
499 container_of(work, struct scsi_id_instance_data,
500 protocol_work.work);
498 quadlet_t data[2]; 501 quadlet_t data[2];
499 502
500 data[0] = ORB_SET_NODE_ID( 503 data[0] = ORB_SET_NODE_ID(scsi_id->hi->host->node_id);
501 ((struct scsi_id_instance_data *)p)->hi->host->node_id); 504 data[1] = scsi_id->last_orb_dma;
502 data[1] = ((struct scsi_id_instance_data *)p)->last_orb_dma;
503 sbp2util_cpu_to_be32_buffer(data, 8); 505 sbp2util_cpu_to_be32_buffer(data, 8);
504 sbp2util_notify_fetch_agent(p, SBP2_ORB_POINTER_OFFSET, data, 8); 506 sbp2util_notify_fetch_agent(scsi_id, SBP2_ORB_POINTER_OFFSET, data, 8);
505} 507}
506 508
507static void sbp2util_write_doorbell(void *p) 509static void sbp2util_write_doorbell(struct work_struct *work)
508{ 510{
509 sbp2util_notify_fetch_agent(p, SBP2_DOORBELL_OFFSET, NULL, 4); 511 struct scsi_id_instance_data *scsi_id =
512 container_of(work, struct scsi_id_instance_data,
513 protocol_work.work);
514 sbp2util_notify_fetch_agent(scsi_id, SBP2_DOORBELL_OFFSET, NULL, 4);
510} 515}
511 516
512/* 517/*
@@ -843,7 +848,7 @@ static struct scsi_id_instance_data *sbp2_alloc_device(struct unit_directory *ud
843 INIT_LIST_HEAD(&scsi_id->scsi_list); 848 INIT_LIST_HEAD(&scsi_id->scsi_list);
844 spin_lock_init(&scsi_id->sbp2_command_orb_lock); 849 spin_lock_init(&scsi_id->sbp2_command_orb_lock);
845 atomic_set(&scsi_id->state, SBP2LU_STATE_RUNNING); 850 atomic_set(&scsi_id->state, SBP2LU_STATE_RUNNING);
846 INIT_WORK(&scsi_id->protocol_work, NULL, NULL); 851 INIT_DELAYED_WORK(&scsi_id->protocol_work, NULL);
847 852
848 ud->device.driver_data = scsi_id; 853 ud->device.driver_data = scsi_id;
849 854
@@ -2047,11 +2052,10 @@ static void sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id,
2047 * We do not accept new commands until the job is over. 2052 * We do not accept new commands until the job is over.
2048 */ 2053 */
2049 scsi_block_requests(scsi_id->scsi_host); 2054 scsi_block_requests(scsi_id->scsi_host);
2050 PREPARE_WORK(&scsi_id->protocol_work, 2055 PREPARE_DELAYED_WORK(&scsi_id->protocol_work,
2051 last_orb ? sbp2util_write_doorbell: 2056 last_orb ? sbp2util_write_doorbell:
2052 sbp2util_write_orb_pointer, 2057 sbp2util_write_orb_pointer);
2053 scsi_id); 2058 schedule_delayed_work(&scsi_id->protocol_work, 0);
2054 schedule_work(&scsi_id->protocol_work);
2055 } 2059 }
2056} 2060}
2057 2061