@@ -86,6 +86,7 @@ static int atapi_packet_send(acAtaReg atareg, acAtapiPacketData *pkt, int flag)
8686 * ((volatile acUint16 * )0xB6010000 ) = flag & 1 ;
8787 * ((volatile acUint16 * )0xB6070000 ) = 160 ;
8888 tmout = 999 ;
89+ v6 = 1000 ;
8990 // cppcheck-suppress knownConditionTrueFalse
9091 while ( (* ((volatile acUint16 * )0xB6070000 ) & 0x80 ) != 0 )
9192 {
@@ -138,7 +139,7 @@ static int atapi_pio_read(acAtaReg atareg, acUint16 *buf, int count, int flag)
138139 if ( !sr )
139140 {
140141 sr_v5 = * ((volatile acUint16 * )0xB6070000 );
141- while ( (* (( volatile acUint16 * ) 0xB6070000 ) & 0x80 ) != 0 )
142+ while ( (sr_v5 & 0x80 ) != 0 )
142143 {
143144 xlen = * ((volatile acUint16 * )0xB6070000 );
144145 sr_v5 = xlen & 0xFF ;
@@ -148,7 +149,7 @@ static int atapi_pio_read(acAtaReg atareg, acUint16 *buf, int count, int flag)
148149 {
149150 xlen = * ((volatile acUint16 * )0xB6160000 );
150151 sr_v5 = xlen & 0xFF ;
151- while ( (* (( volatile acUint16 * ) 0xB6160000 ) & 0x80 ) != 0 )
152+ while ( (sr_v5 & 0x80 ) != 0 )
152153 {
153154 sr_v5 = -116 ;
154155 if ( SleepThread () != 0 )
@@ -314,7 +315,7 @@ static int atapi_ops_command(struct ac_ata_h *atah, int cmdpri, int pri)
314315 {
315316 xlen = * ((volatile acUint16 * )0xB6160000 );
316317 sr_v14 = xlen & 0xFF ;
317- while ( (* (( volatile acUint16 * ) 0xB6160000 ) & 0x80 ) != 0 )
318+ while ( (sr_v14 & 0x80 ) != 0 )
318319 {
319320 sr_v14 = -116 ;
320321 if ( SleepThread () != 0 )
@@ -325,7 +326,7 @@ static int atapi_ops_command(struct ac_ata_h *atah, int cmdpri, int pri)
325326 else
326327 {
327328 sr_v14 = * ((volatile acUint16 * )0xB6070000 );
328- while ( (* (( volatile acUint16 * ) 0xB6070000 ) & 0x80 ) != 0 )
329+ while ( (sr_v14 & 0x80 ) != 0 )
329330 {
330331 xlen = * ((volatile acUint16 * )0xB6070000 );
331332 sr_v14 = xlen & 0xFF ;
0 commit comments