From 9a9c177f4b5391dcdf170c2b66ec28ee6540fd12 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 11 Feb 2021 17:08:22 +0100 Subject: block.c: Allow PA-RISC to boot from ATA drives Boot directly from ATA drive without going through the process_op_32() function. Additionally PA-RISC can read/write chunks from disk which are bigger than 64kb, so don't abort when this is tried. Signed-off-by: Helge Deller --- src/block.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/block.c b/src/block.c index ec02d76..1b85154 100644 --- a/src/block.c +++ b/src/block.c @@ -544,6 +544,10 @@ static int process_op_both(struct disk_op_s *op) { switch (GET_FLATPTR(op->drive_fl->type)) { +#if CONFIG_PARISC + case DTYPE_ATA: + return ata_process_op(op); +#endif case DTYPE_ATA_ATAPI: return ata_atapi_process_op(op); case DTYPE_USB: @@ -624,7 +628,9 @@ process_op(struct disk_op_s *op) , op->count, op->command); int ret, origcount = op->count; - if (origcount * GET_FLATPTR(op->drive_fl->blksize) > 64*1024) { + /* Only x86 arch has problems with large reads/writes greater than 64kb */ + if (CONFIG_X86 && + (origcount * GET_FLATPTR(op->drive_fl->blksize) > 64*1024)) { op->count = 0; return DISK_RET_EBOUNDARY; } -- cgit v1.1