Commit 6aa858cd authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by Martin K. Petersen

scsi: fc: use bsg_softirq_done

bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so
ditch the fc specific one.
Signed-off-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c00da4c9
...@@ -85,12 +85,13 @@ EXPORT_SYMBOL_GPL(bsg_job_done); ...@@ -85,12 +85,13 @@ EXPORT_SYMBOL_GPL(bsg_job_done);
* bsg_softirq_done - softirq done routine for destroying the bsg requests * bsg_softirq_done - softirq done routine for destroying the bsg requests
* @rq: BSG request that holds the job to be destroyed * @rq: BSG request that holds the job to be destroyed
*/ */
static void bsg_softirq_done(struct request *rq) void bsg_softirq_done(struct request *rq)
{ {
struct bsg_job *job = rq->special; struct bsg_job *job = rq->special;
kref_put(&job->kref, bsg_destroy_job); kref_put(&job->kref, bsg_destroy_job);
} }
EXPORT_SYMBOL_GPL(bsg_softirq_done);
static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req) static int bsg_map_buffer(struct bsg_buffer *buf, struct request *req)
{ {
......
...@@ -3590,17 +3590,6 @@ void fc_bsg_jobdone(struct bsg_job *job, int result, ...@@ -3590,17 +3590,6 @@ void fc_bsg_jobdone(struct bsg_job *job, int result,
} }
EXPORT_SYMBOL_GPL(fc_bsg_jobdone); EXPORT_SYMBOL_GPL(fc_bsg_jobdone);
/**
* fc_bsg_softirq_done - softirq done routine for destroying the bsg requests
* @rq: BSG request that holds the job to be destroyed
*/
static void fc_bsg_softirq_done(struct request *rq)
{
struct bsg_job *job = rq->special;
kref_put(&job->kref, bsg_destroy_job);
}
/** /**
* fc_bsg_job_timeout - handler for when a bsg request timesout * fc_bsg_job_timeout - handler for when a bsg request timesout
* @req: request that timed out * @req: request that timed out
...@@ -4033,7 +4022,7 @@ fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host) ...@@ -4033,7 +4022,7 @@ fc_bsg_hostadd(struct Scsi_Host *shost, struct fc_host_attrs *fc_host)
q->queuedata = shost; q->queuedata = shost;
queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q);
blk_queue_softirq_done(q, fc_bsg_softirq_done); blk_queue_softirq_done(q, bsg_softirq_done);
blk_queue_rq_timed_out(q, fc_bsg_job_timeout); blk_queue_rq_timed_out(q, fc_bsg_job_timeout);
blk_queue_rq_timeout(q, FC_DEFAULT_BSG_TIMEOUT); blk_queue_rq_timeout(q, FC_DEFAULT_BSG_TIMEOUT);
...@@ -4079,7 +4068,7 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport) ...@@ -4079,7 +4068,7 @@ fc_bsg_rportadd(struct Scsi_Host *shost, struct fc_rport *rport)
q->queuedata = rport; q->queuedata = rport;
queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q); queue_flag_set_unlocked(QUEUE_FLAG_BIDI, q);
blk_queue_softirq_done(q, fc_bsg_softirq_done); blk_queue_softirq_done(q, bsg_softirq_done);
blk_queue_rq_timed_out(q, fc_bsg_job_timeout); blk_queue_rq_timed_out(q, fc_bsg_job_timeout);
blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT); blk_queue_rq_timeout(q, BLK_DEFAULT_SG_TIMEOUT);
......
...@@ -70,5 +70,6 @@ int bsg_setup_queue(struct device *dev, struct request_queue *q, char *name, ...@@ -70,5 +70,6 @@ int bsg_setup_queue(struct device *dev, struct request_queue *q, char *name,
bsg_job_fn *job_fn, int dd_job_size); bsg_job_fn *job_fn, int dd_job_size);
void bsg_request_fn(struct request_queue *q); void bsg_request_fn(struct request_queue *q);
void bsg_destroy_job(struct kref *kref); void bsg_destroy_job(struct kref *kref);
void bsg_softirq_done(struct request *rq);
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment