Correct so far.
> your design is to issue only 8 sectors or less. The issuing of 8 sectors
> or less in the sector_count, while the device is expecting 16 is a setup
> for problems.
No it's not. By your standards, that would mean that if the device is
setup for 16 sector multi mode, then I could never ever issue requests
less than that (without doing some crap 'toss away extra data' stuff).
How else would you handle, eg, 2 sector requests with multi mode set?
> The effective operations your changes have created without addressing all
> the variables is to terminate the command in process. Therefore, the
> decision made by you was to restrict the transfers to be process to the
> count in rq->current_nr_sectors. There is no bounds checking based on the
> command executed.
I'm not stopping a request in progress. I told the drive that the
request is current_nr_sectors big, so once it finishes transferring
current_nr_sectors sectors it truly thinks it's really done with that
request. And it is. However, I'm leaving the request on the queue (or,
really, ide_end_request is not taking it off because
end_that_request_first is not indicating it's complete). So I'm simply
starting from scratch with the remaining data. See?
> *****************************
> The questions to ask "How would the host terminate a command in progress,
> since BSY=1 (or DRQ=1) at this point? Is that done via a DEVICE_RESET or
> SRST write?"
[snip]
Moot, there's no premature termination going on.
-- Jens Axboe- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/