Skip to contentSkip to conversation

remove extra queue unplug calls

PATCH New Mike Christie 1 participant 1 message May 25, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove extra queue unplug calls

blk_insert_request will do the right thing and either unplug the queue or call the request_fn, so users of scsi_do_req do not need to call generic_unplug_device themselves. The attached patch just removes that call from scsi_lib.c and the sg driver after they do a scsi_do_req. It was built against 2.6.7-rc1

Mike

drivers/scsi/scsi_lib.c +0 -1
diff -arup linux-2.6.7-rc1/drivers/scsi/scsi_lib.c linux-2.6.7-rc1-work/drivers/scsi/scsi_lib.c
@@ -255,7 +255,6 @@ void scsi_wait_req(struct scsi_request *
 	sreq->sr_request->rq_status = RQ_SCSI_BUSY;
 	scsi_do_req(sreq, cmnd, buffer, bufflen, scsi_wait_done,
 			timeout, retries);
-	generic_unplug_device(sreq->sr_device->request_queue);
 	wait_for_completion(&wait);
 	sreq->sr_request->waiting = NULL;
 	if (sreq->sr_request->rq_status != RQ_SCSI_DONE)
drivers/scsi/sg.c +0 -1
diff -arup linux-2.6.7-rc1/drivers/scsi/sg.c linux-2.6.7-rc1-work/drivers/scsi/sg.c
@@ -727,7 +727,6 @@ sg_common_write(Sg_fd * sfp, Sg_request 
 		    (void *) SRpnt->sr_buffer, hp->dxfer_len,
 		    sg_cmd_done, timeout, SG_DEFAULT_RETRIES);
 	/* dxfer_len overwrites SRpnt->sr_bufflen, hence need for b_malloc_len */
-	generic_unplug_device(q);
 	return 0;
 }