I need a function that performs the kmapping to return a pointer with all
the data needed for that transaction of the data phase, and will cross
pages correctly, and may cross more than 2 pages at a time in PIO.
I do not care how you do.
char * majic_voodoo_mapping (
struct request *rq,
int nsect,
unsigned long *flags)
{
char * buffer_walk = ide_map_rq(rq, &flags);
nsect -= ide_rq_offset(rq);
do {
buffer_walk += get_some_more(rq, nsect);
} while (nsect)
return buffer_walk;
}
This should solve all the problems in the data-phases and let the driver
run correctly. The result is on each "get_some_more" will all BLOCK/BIO to
return the partial competions of at least one page
The function would behave like ide_end_request but only to adjust the
buffer in process, and make block/bio deal with munging it back to the top
layers on the partial completions, it will not stop the data IO process of
the ATOMIC command in process.
There is a possible place in while hanging on the HPIOO1 T-BAR to safely
leave and collect "ALL" of the buffer to be put down once we start IO'ing.
If it return with only a partial, YOU WILL HANG THE DRIVE, with one
acception the REMAINDER of the BLOCK_DATA transaction.
You get your early partial complete, and a correct running driver.
Better yet, I will shut my PIEHOLE!
Cheers,
Andre Hedrick
Linux Disk Certification Project Linux ATA Development
-
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/