# HG changeset patch # User jlarmour # Date 1163786683 0 # Node ID 6d4c075d293909827ff8c3720e1c5b7958b5985b # Parent ce093f7a034350ec9d7c1ddeb62232ed791df1eb * src/ide_disk.c (ide_read_sector, ide_write_sector): Length is counted in sectors now, not bytes (due to change in io/disk API). diff --git a/packages/devs/disk/ide/current/ChangeLog b/packages/devs/disk/ide/current/ChangeLog --- a/packages/devs/disk/ide/current/ChangeLog +++ b/packages/devs/disk/ide/current/ChangeLog @@ -1,3 +1,9 @@ +2006-11-17 Jonathan Larmour + + * src/ide_disk.c (ide_read_sector, ide_write_sector): Length + is counted in sectors now, not bytes (due to change in io/disk + API). + 2006-09-21 Jonathan Larmour * src/ide_disk.h: DISK_FUNS is now implicitly static. @@ -36,7 +42,7 @@ 2004-10-16 Iztok Zupet // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc. -// Copyright (C) 2004 eCosCentric, Ltd. +// Copyright (C) 2004, 2006 eCosCentric, Ltd. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free diff --git a/packages/devs/disk/ide/current/src/ide_disk.c b/packages/devs/disk/ide/current/src/ide_disk.c --- a/packages/devs/disk/ide/current/src/ide_disk.c +++ b/packages/devs/disk/ide/current/src/ide_disk.c @@ -9,7 +9,7 @@ // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. // Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004 Red Hat, Inc. -// Copyright (C) 2004 eCosCentric, Ltd. +// Copyright (C) 2004, 2006 eCosCentric, Ltd. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free @@ -264,8 +264,8 @@ ide_read_sector(int ctlr, int dev, cyg_u for (j = 0, c=0 ; j < (CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE / sizeof(cyg_uint16)); j++) { HAL_IDE_READ_UINT16(ctlr, IDE_REG_DATA, p); - if (c++>8)&0xff; + if (c++<(len*512)) *b++=p&0xff; + if (c++<(len*512)) *b++=(p>>8)&0xff; } return 1; } @@ -298,8 +298,8 @@ ide_write_sector(int ctlr, int dev, cyg_ // for (j = 0, c=0 ; j < (CYGDAT_DEVS_DISK_IDE_SECTOR_SIZE / sizeof(cyg_uint16)); j++) { - p = (c++