80 Commits

Author SHA1 Message Date
eb8364fdbb Re-organize and tidy up
No functional changes

* Move + Rename scsi command emulation out of idetask to scsi.c
* Move ATAPI SCSI command handling out of idetask to atapi.c
* Rename idetask to iotask
2025-08-03 09:37:29 +00:00
244e137d68 Compact Unit struct some more 2025-07-05 04:26:38 +00:00
6696cadfd2 Remove unused/unneeded parts of IDEUnit struct 2025-07-05 04:23:44 +00:00
7b23810bd2 Add "ata_xfer_func" type for the ATA transfer function pointers 2025-05-14 08:40:44 +00:00
39ed36fc26 Add CMD_PAUSE/CMD_RESUME commands to pause IO task during flash programming. 2025-04-19 21:58:00 +00:00
1981d255db Merge diskchange polling into idetask 2025-03-11 10:43:22 +00:00
4185bc5b8e ata: optimize read/write functions
Pass the src/dest pointers via registers rather than the stack
2025-01-07 00:44:41 +00:00
02147b492f Device version and revision now set based on the latest git tag 2025-01-03 05:20:25 +00:00
0d2fb8e309 Only start diskchange task if there are actually removable devices present 2024-12-27 09:49:52 +00:00
f5619de80d Optimization: Move device name and FSRes pointer out of the data segment 2024-11-24 04:07:26 +00:00
22e5a79baf Rework ideunit struct
No need for unit->drive to be a pointer any more
2024-11-13 22:47:57 +00:00
f434a797df Whitespace fixes 2024-11-13 22:36:30 +00:00
MHeinrichs
8e253bcc42 buffer alignment rework 2024-11-14 11:28:24 +13:00
aeb9beb56e Bump device revision 2024-08-30 21:47:40 +12:00
6fc2e7d8d4 ATA: Add support for SCSI ATA_PASSTHOUGH command and make use of it in lidetool to get ident data 2024-08-07 09:28:13 +00:00
b38f7aa209 ata: remove move16 transfer routine.
Apparently move16 is buggy in some system configurations, best to avoid it completely
2024-07-27 12:59:54 +00:00
8dffc97e5f Some code tidying 2024-06-24 01:25:07 +00:00
e5654d1462 Bump next rev to 40.8 2024-06-02 09:44:53 +00:00
1855f45d24 Bump next rev to 40.7 2024-06-02 14:47:36 +12:00
56317ec027 ATA: Fixup Rigid Drive Geometry mode page
HDToolbox uses this to calculate the disk size.

For drives larger than 502G we need to return the upper 8 bytes or it will be detected as a much smaller drive
2024-06-02 14:46:01 +12:00
4cd14f1267 Fixup build date format & add git rev to device id string 2024-06-02 14:46:01 +12:00
0d86a937ae ATAPI: Defer diskchange check on successful access
If we already know there's medium present we can defer the disk change check and avoid it interrupting a transfer
2024-06-02 14:46:01 +12:00
a505c633f5 Fix inconsistency of variable naming 2024-06-02 14:46:01 +12:00
3c7e8d90eb Fixup: Unit 2 would become unit 0 if there was no drive(s) on the primary channel 2024-06-02 14:46:01 +12:00
791f4dc089 Bump next version to 40.6 2023-12-19 16:58:38 -08:00
d2e7843bc0 Add LBA48 support 2023-12-19 16:26:15 -08:00
7d3f12281e Force dual-channel for RIPPLE 2023-12-19 16:26:15 -08:00
9cd206347a Create an ATA Task per channel 2023-12-19 16:26:15 -08:00
74202489ff Support binding to multiple boards + create an IDETask for each 2023-12-19 16:26:15 -08:00
d821509540 Use Semaphores when accessing Unit list 2023-12-19 16:26:15 -08:00
fa7125d0c3 Switch dev->units from a list to a linked list 2023-12-19 16:26:15 -08:00
936c0c0ca6 Decouple IDETask vars from DevBase
This will allow for multiple IDE Tasks to be run (e.g for multiple
cards)
2023-12-19 16:26:15 -08:00
651d5228ef Move unit init to idetask 2023-12-19 16:26:15 -08:00
b9779a4e8b Bump next rev to 40.5 2023-11-30 14:00:24 +01:00
4565798ef2 Add command CMD_XFER to set transfer method for a unit 2023-11-30 13:59:15 +01:00
1126d9ed4b Implement code for pluggable transfer routines
This will allow for additiomal transfer routines to be added and conditionally used i.e if some other board has a different need
2023-11-30 13:59:15 +01:00
d2f5a88343 Support secondary channel on Matze TKs
AT-Bus can't support second channel but Matze TKs should be able to (because the ROM goes away)
Added a detection routine to check if the ROM has gone away.
2023-11-30 13:59:15 +01:00
84ad4bc01e Add build option to set name to scsi.device 2023-11-30 13:59:15 +01:00
8af6f59f37 Bump rev to 40.4 2023-11-30 13:59:15 +01:00
a7e2afbee8 ata: optimize write_taskfile call
Instead of checking if the unit supports LBA on every transfer, use a function pointer set at init time
2023-11-16 11:08:27 +00:00
48da573547 Diskchange task: store previous medium presence status
Instead of reading mediumPresent from the unit struct before calling TUR
2023-11-15 01:00:53 +01:00
1d3ade82dd Make TD_REMOVE changeint volatile
It is modified in the begin_io scope but read in the diskchange stask
2023-11-15 01:00:53 +01:00
63f32cd7b4 Make ADD/REMCHANGEINT Synchronous
Moving them to BeginIO() means the node won't be enqueued / modified - so no ChangeInt struct is needed
2023-11-13 05:46:41 +00:00
163be93ba8 Revert "Wrap change interrupts with another node"
This reverts commit 676244839ae5a648e98f26d2c0be37843a6fd51e.
2023-11-13 05:36:03 +00:00
7c5071d3c0 Add TD_REMOVE support 2023-11-13 05:30:53 +00:00
07931d2822 Debug: Add traceCommand
Prints IO Command return status if enabled
2023-11-12 21:18:32 +00:00
676244839a Wrap change interrupts with another node
Previously we were running Remove() on the IORequest sent for the TD_REMCHANGEINT

The problem was that the IOReq gets enqueue'd to the ide task's message port.
This overwrites the old ln_succ/pred set by TD_ADDCHANGEINTs AddHead()

Because of this - when Remove() is called by TD_REMCHANGEINT this will not remove it from the unit changeint list
2023-11-12 18:42:52 +01:00
a741c8ddf8 Bump rev to 40.3 2023-11-12 17:42:03 +00:00
291ea94623 Support CHS 2023-10-03 09:39:51 +00:00
fbe6f0b274 ATA: wait for RDY after drive selection in ata_read/write
Bumps version to 40.2
2023-09-16 19:34:20 +02:00