On Thu, 15 May 2014, BALATON Zoltan wrote:
confusing.) Do you think that replacing io->len in your patch with
s->io_buffer_size would be the correct thing to do?
Probably that's not enough. I've tried it and then it gets to here:
end of non-IO ATAPI DMA transfer
122 if (!s->packet_transfer_size) {
(gdb) p s->packet_transfer_size
$1 = 0
(gdb) n
123 MACIO_DPRINTF("end of transfer\n");
end of transfer
124 ide_atapi_cmd_ok(s);
125 m->dma_active = false;
128 if (io->len == 0) {
(gdb) p io->len
$2 = 804
(gdb) l
123 MACIO_DPRINTF("end of transfer\n");
124 ide_atapi_cmd_ok(s);
125 m->dma_active = false;
126 }
127
128 if (io->len == 0) {
129 MACIO_DPRINTF("end of DMA\n");
130 goto done;
131 }
132
133 /* launch next transfer */
134
135 /* handle unaligned accesses first, get them over with and only
do the
136 remaining bulk transfer using our async DMA helpers */
137 unaligned = io->len & 0x1ff;
138 if (unaligned) {
139 int sector_num = (s->lba << 2) + (s->io_buffer_index >> 9);
140 int nsector = io->len >> 9;
141
142 MACIO_DPRINTF("precopying unaligned %d bytes to %#"
HWADDR_PRIx "\n",
(gdb) c
Continuing.
precopying unaligned 292 bytes to 0xe4f50c
io->len = 0x200
set remainder to: -20
sector_num=-4 size=0, cmd_cmd=0
atapi_cmd_error: sense=0x5 asc=0x21
done DMA
DBDMA: dbdma_end
Regards,
BALATON Zoltan