Re: [PATCH 4/5] convert st to use scsi_execte_async
From: Mike Christie <hidden>
Date: 2005-09-18 17:17:46
Mike Christie wrote:
quoted
I tested this but it does not quite work: there are now two retries in the same test that previously gave six retries. Unfortunately I don't just now have time to study the problem further.ok I will try to look into it.
Oh I bet it is from the change that James B noticed. With scsi_do_req() we passed in the sr_done function, but with scsi_execute* we pass in the requests end_io function. So with scsi_do_req, when we complete a command in scsi_finish_command() (where it calls cmd->done) we would call the done function passed into scsi_do_req(), but with scsi_execute* we call scsi_io_completion. Maybe it could be solved by having st implement a cmd->done function like sd.c that gets set in the init_command callout. Since all the commands will be coming down as REQ_BLOCK_PC commands, st can set the scsi_cmnd->done function and decide what to do there. Or maybe some of the scsi_io_completion logic needs to be fixed. What was the command that is causing the problems?