SELECT_DRIVE and friends
Quoted 12 lines
Quoted 12 lines
Quoted 11 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
The OUTB breaks my interface because I don't really have byte-level access to the resgisters. So, is selectproc a pre-select procedure or should it be a substitute?
pre-select but you can change it to be substitute if you need (just remember to update all users if you decide to do this)
I'll have to search the kernel to see what uses it. Maybe the better way would be to define a new select proc that *is* a substitute.
Nope.
Quoted 7 lines
Quoted 4 lines
So then we break anyone who is using the selectproc as a pre-select proc? I don't understand what you mean here. There are several drivers that use this function. How do you propose that we provide both types of behavior with one entry point?
You can add last line of
SELECT_DRIVE()to all ->selectproc() implementations and add 'else' toSELECT_DRIVE().
This would probably work if all references to the IDE_SELECT_REG were replaced with SELECT_DRIVE calls. This, it turns out, is not true. There are direct calls to access the select register in several files listed below. Are you confortable with all of these being replaced with SELECT_DRIVE calls?
ide-disk.c: hwif->OUTB(0x00|drive->select.all,IDE_SELECT_REG); ide-disk.c: hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG); ide-disk.c: hwif->OUTB(head|drive->select.all,IDE_SELECT_REG); ide-floppy.c: HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG); ide-io.c: hwif->OUTB(sel, IDE_SELECT_REG); ide-iops.c: HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG); ide-probe.c: hwif->OUTB(drive->select.all, IDE_SELECT_REG); ide-tape.c: hwif->OUTB(drive->select.all, IDE_SELECT_REG); ide-taskfile.c: hwif->OUTB((taskfile->device_head & HIHI) | drive->select.all, IDE_SELECT_REG); ide-taskfile.c: hwif->OUTB(taskfile->device_head | drive->select.all, IDE_SELECT_REG);
Quoted 18 lines · Marc Singer
Quoted 18 lines
Quoted 17 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
The OUTB breaks my interface because I don't really have byte-level access to the resgisters. So, is selectproc a pre-select procedure or should it be a substitute?
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
pre-select but you can change it to be substitute if you need (just remember to update all users if you decide to do this)
I'll have to search the kernel to see what uses it. Maybe the better way would be to define a new select proc that *is* a substitute.
Nope.
So then we break anyone who is using the selectproc as a pre-select proc? I don't understand what you mean here. There are several drivers that use this function. How do you propose that we provide both types of behavior with one entry point?
Quoted 8 lines
Quoted 2 lines
You can add last line of
SELECT_DRIVE()to all ->selectproc() implementations and add 'else' toSELECT_DRIVE().This would probably work if all references to the
IDE_SELECT_REGwere replaced withSELECT_DRIVEcalls. This, it turns out, is not true. There are direct calls to access the select register in several files listed below. Are you confortable with all of these being replaced withSELECT_DRIVEcalls?
No, SELECT_DRIVE only writes drive->select.all.
I need to think some more about it.
Quoted 13 lines
ide-disk.c:hwif->OUTB(0x00|drive->select.all,IDE_SELECT_REG);ide-disk.c:hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG); ide-disk.c: hwif->OUTB(head|drive->select.all,IDE_SELECT_REG); ide-floppy.c: HWIF(drive)->OUTB(drive->select.all, IDE_SELECT_REG); ide-io.c: hwif->OUTB(sel, IDE_SELECT_REG);
ide-iops.c: HWIF(drive)->OUTB(drive->select.all,IDE_SELECT_REG);ide-probe.c:hwif->OUTB(drive->select.all, IDE_SELECT_REG);ide-tape.c:hwif->OUTB(drive->select.all, IDE_SELECT_REG);
ide-taskfile.c: hwif->OUTB((taskfile->device_head & HIHI) |drive->select.all,IDE_SELECT_REG);ide-taskfile.c:hwif->OUTB(taskfile->device_head | drive->select.all, IDE_SELECT_REG);