Update of /cvsroot/blob/blob/src/lib
In directory usw-pr-cvs1:/tmp/cvs-serv13399
Modified Files:
ide.c
Log Message:
- use blocksize define
- calculate disk size
Index: ide.c
===================================================================
RCS file: /cvsroot/blob/blob/src/lib/ide.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ide.c 8 May 2002 13:55:28 -0000 1.5
+++ ide.c 8 May 2002 19:16:04 -0000 1.6
@@ -22,28 +22,6 @@
*
* $Id$
*
- * $Log$
- * Revision 1.5 2002/05/08 13:55:28 seletz
- * - added ide_setfeature() to set ide features
- *
- * Revision 1.4 2002/04/27 04:59:59 timriker
- * turn on ide and pcmcia again, fix pcmcia compiles (but not features) for non sa1111 systems
- *
- * Revision 1.3 2002/04/26 09:22:05 seletz
- * - added original copyright from Brad Parker
- * - corrected EMAIL addr
- *
- * Revision 1.2 2002/04/24 14:27:08 seletz
- * - first round of bugfixing. Now at last one can read 512 byte sectors
- * of a CF in true-ide mode. See system3.c::pcmciatest().
- *
- * Still WIP. YMMV, and so on....
- *
- * Revision 1.1 2002/04/18 19:52:49 seletz
- * - Added PCMCIA and IDE framework. Based on Brad Parker's code.
- * NOTE NOTE NOTE:
- * This is all Work-In-Progress (you have been warned)
- *
*/
/**********************************************************************
@@ -222,7 +200,7 @@
struct hd_driveid *id;
volatile u8 *port = NULL;
volatile u8 *reg = NULL;
- static char id_buffer[512];
+ static char id_buffer[IDE_BLOCK_SIZE];
if ( !drive || !drive->ide_port )
return -1;
@@ -240,6 +218,7 @@
printf("ide: model: '%s'\n", id->model);
printf("ide: CHS: %d/%d/%d\n", id->cyls, id->heads, id->sectors);
+ printf("ide: lba_capacity %d (total %d bytes)\n", id->lba_capacity, id->lba_capacity*IDE_BLOCK_SIZE);
if (id->sectors && id->heads) {
drive->disk_sectors_per_track = id->sectors;
@@ -343,7 +322,7 @@
hd_busy_wait(port);
- for (i = 0; i < 512; i++) {
+ for (i = 0; i < IDE_BLOCK_SIZE; i++) {
buffer[i] = port[0];
barrier();
}
@@ -451,7 +430,7 @@
hd_busy_wait(port);
- for (i = 0; i < 512; i++) {
+ for (i = 0; i < IDE_BLOCK_SIZE; i++) {
barrier();
buffer[i] = port[0];
}
|