Jeff wrote:robert worte:This is basically avoiding switching into register mode,right? I don'tthink this is a very good solution as the point of thetf_read functionis that it's supposed to read the taskfile provided by the drive to diagnose the error, so not doing this isn't a good thing.Agree with this analysis -- if ->tf_read() is being called, then obviously the core wants a current copy of the device's ATA registers.
It is not a good solution to simply avoiding returning meaningful data, because -- as Robert notes -- we need tf_read for analysis.
Jeff
The driver got one error : "nv_adma_check_cpb: CPB 0, flags=0x11". The
code entered ata_port_abort -> ata_qc_complete
-> fill_result_tf->nv_adma_tf_read.
Firstly, nv_adma_register_mode failed, showing the below messages:
timeout waiting for ADMA IDLE, stat=0x440
timeout waiting for ADMA LEGACY, stat=0x440
Then enter ata_tf_read function. I found the system hung at tf->hob_nsect = ioread8(ioaddr->nsect_addr);
Sometimes the screen showed "
CPU0: Machin check Exception 0000000000000004
Bank 4:b200000000070f0f
kernel panic -not syncing: CPU Context corrupt.
"
If nv_adma_register_mode failed, the reg result should be not
meaningful. I don't know why the systm hung.