hw/block/fdc: do not set SEEK status bit in multi track commands
PATCH 1/1 hw/block/fdc: do not set SEEK status bit in multi track commands
I don't understand when SEEK must be set or not, but it seems to fix Minix...
--- hw/block/fdc.c | 1 - 1 file changed, 1 deletion(-)
hw/block/fdc.c +0 -1
@@ -1404,7 +1404,6 @@ static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) }else { new_head =0 ; new_track++; - fdctrl->status0 |=FD_SR0_SEEK ;if ((cur_drv->flags &FDISK_DBL_SIDES ) ==0 ) { ret =0 ; }
Signature · 1 line
2.40.1
Ping.
Le 12/08/2023 à 10:59, Hervé Poussineau a écrit :
Quoted 20 lines
I don't understand when SEEK must be set or not, but it seems to fix Minix...
Signed-off-by Hervé Poussineau <[email protected]>--- hw/block/fdc.c | 1 - 1 file changed, 1 deletion(-)hw/block/fdc.c +0
-1@@ -1404,7 +1404,6 @@ static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) }else { new_head =0 ; new_track++; - fdctrl->status0 |=FD_SR0_SEEK ;if ((cur_drv->flags &FDISK_DBL_SIDES ) ==0 ) { ret =0 ; }
Quoted 12 lines · Hervé Poussineau
Ping.
Quoted 8 lines · Hervé Poussineau
I don't understand when SEEK must be set or not, but it seems to fix Minix...
Signed-off-by Hervé Poussineau <[email protected]>--- hw/block/fdc.c | 1 - 1 file changed, 1 deletion(-)
Quoted 13 lines
hw/block/fdc.c static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) · line 1409
Quoted 12 lines
hw/block/fdc.c +0
-1@@ -1404,7 +1404,6 @@ static int fdctrl_seek_to_next_sect(FDCtrl *fdctrl, FDrive *cur_drv) }else { new_head =0 ; new_track++; - fdctrl->status0 |=FD_SR0_SEEK ;if ((cur_drv->flags &FDISK_DBL_SIDES ) ==0 ) { ret =0 ; }
I'll be honest, I don't have the time to audit this and I don't have the test suite necessary to prove that it's safe enough. Do you have any suggestions for how we can prove or test this beyond 'works for me'?
I could read the spec sheet for this controller until I'm blue in the face, but it doesn't seem to necessarily correlate to how the controller behaves IRL or with what real operating systems actually do with that controller. I also don't have access to a physical controller anymore to even begin to try and write my own hardware probe for it.
We need a robust test suite for FDC behavior, but it seems unlikely that anyone will want to actually write one (I sure don't). Are there any good shortcuts to victory here?