mirror of
https://github.com/LIV2/lide.device.git
synced 2025-12-06 00:32:45 +00:00
ATA: remove "actual" from ata read/write as it's not needed there
This commit is contained in:
parent
6fc2e7d8d4
commit
fd4045635b
8
ata.c
8
ata.c
@ -432,15 +432,13 @@ bool ata_set_multiple(struct IDEUnit *unit, BYTE multiple) {
|
||||
* @param buffer destination buffer
|
||||
* @param lba LBA Address
|
||||
* @param count Number of blocks to transfer
|
||||
* @param actual Pointer to the io requests io_Actual
|
||||
* @param unit Pointer to the unit structure
|
||||
* @returns error
|
||||
*/
|
||||
BYTE ata_read(void *buffer, ULONG lba, ULONG count, ULONG *actual, struct IDEUnit *unit) {
|
||||
BYTE ata_read(void *buffer, ULONG lba, ULONG count, struct IDEUnit *unit) {
|
||||
Trace("ata_read enter\n");
|
||||
Trace("ATA: Request sector count: %ld\n",count);
|
||||
|
||||
*actual = 0;
|
||||
UBYTE error = 0;
|
||||
ULONG txn_count; // Amount of sectors to transfer in the current READ/WRITE command
|
||||
|
||||
@ -520,15 +518,13 @@ BYTE ata_read(void *buffer, ULONG lba, ULONG count, ULONG *actual, struct IDEUni
|
||||
* @param buffer source buffer
|
||||
* @param lba LBA Address
|
||||
* @param count Number of blocks to transfer
|
||||
* @param actual Pointer to the io requests io_Actual
|
||||
* @param unit Pointer to the unit structure
|
||||
* @returns error
|
||||
*/
|
||||
BYTE ata_write(void *buffer, ULONG lba, ULONG count, ULONG *actual, struct IDEUnit *unit) {
|
||||
BYTE ata_write(void *buffer, ULONG lba, ULONG count, struct IDEUnit *unit) {
|
||||
Trace("ata_write enter\n");
|
||||
Trace("ATA: Request sector count: %ld\n",count);
|
||||
|
||||
*actual = 0;
|
||||
UBYTE error = 0;
|
||||
|
||||
ULONG txn_count; // Amount of sectors to transfer in the current READ/WRITE command
|
||||
|
||||
4
ata.h
4
ata.h
@ -95,8 +95,8 @@ bool ata_identify(struct IDEUnit *, UWORD *);
|
||||
bool ata_set_multiple(struct IDEUnit *unit, BYTE multiple);
|
||||
void ata_set_xfer(struct IDEUnit *unit, enum xfer method);
|
||||
|
||||
BYTE ata_read(void *buffer, ULONG lba, ULONG count, ULONG *actual, struct IDEUnit *unit);
|
||||
BYTE ata_write(void *buffer, ULONG lba, ULONG count, ULONG *actual, struct IDEUnit *unit);
|
||||
BYTE ata_read(void *buffer, ULONG lba, ULONG count, struct IDEUnit *unit);
|
||||
BYTE ata_write(void *buffer, ULONG lba, ULONG count, struct IDEUnit *unit);
|
||||
BYTE ata_set_pio(struct IDEUnit *unit, UBYTE pio);
|
||||
BYTE scsi_ata_passthrough( struct IDEUnit *unit, struct SCSICmd *cmd);
|
||||
|
||||
|
||||
12
idetask.c
12
idetask.c
@ -235,9 +235,9 @@ static BYTE handle_scsi_command(struct IOStdReq *ioreq) {
|
||||
direction = (scsi_command->scsi_Flags & SCSIF_READ) ? READ : WRITE;
|
||||
|
||||
if (direction == READ) {
|
||||
error = ata_read(data,lba,count,&scsi_command->scsi_Actual,unit);
|
||||
error = ata_read(data,lba,count,unit);
|
||||
} else {
|
||||
error = ata_write(data,lba,count,&scsi_command->scsi_Actual,unit);
|
||||
error = ata_write(data,lba,count,unit);
|
||||
}
|
||||
if (error == 0) {
|
||||
scsi_command->scsi_Actual = scsi_command->scsi_Length;
|
||||
@ -479,7 +479,7 @@ static BYTE init_units(struct IDETask *itask) {
|
||||
unit->changeInts.mlh_Head = (struct MinNode *)&unit->changeInts.mlh_Tail;
|
||||
unit->changeInts.mlh_TailPred = (struct MinNode *)&unit->changeInts;
|
||||
|
||||
Warn("testing unit %08lx\n",i);
|
||||
Warn("testing unit %ld\n",unit->unitNum);
|
||||
|
||||
if (ata_init_unit(unit)) {
|
||||
num_units++;
|
||||
@ -692,11 +692,11 @@ transfer:
|
||||
error = atapi_translate(ioreq->io_Data, lba, count, &ioreq->io_Actual, unit, direction);
|
||||
} else {
|
||||
if (direction == READ) {
|
||||
error = ata_read(ioreq->io_Data, lba, count, &ioreq->io_Actual, unit);
|
||||
error = ata_read(ioreq->io_Data, lba, count, unit);
|
||||
} else {
|
||||
error = ata_write(ioreq->io_Data, lba, count, &ioreq->io_Actual, unit);
|
||||
error = ata_write(ioreq->io_Data, lba, count, unit);
|
||||
}
|
||||
if (error == 0) ioreq->io_Actual = ioreq->io_Length;
|
||||
ioreq->io_Actual = ioreq->io_Length;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user