@ -455,6 +455,8 @@ void ide_init(void)
ide_dev_desc [ i ] . dev = i ;
ide_dev_desc [ i ] . part_type = PART_TYPE_UNKNOWN ;
ide_dev_desc [ i ] . blksz = 0 ;
ide_dev_desc [ i ] . log2blksz =
LOG2_INVALID ( typeof ( ide_dev_desc [ i ] . log2blksz ) ) ;
ide_dev_desc [ i ] . lba = 0 ;
ide_dev_desc [ i ] . block_read = ide_read ;
ide_dev_desc [ i ] . block_write = ide_write ;
@ -806,6 +808,7 @@ static void ide_ident(block_dev_desc_t *dev_desc)
/* assuming HD */
dev_desc - > type = DEV_TYPE_HARDDISK ;
dev_desc - > blksz = ATA_BLOCKSIZE ;
dev_desc - > log2blksz = LOG2 ( dev_desc - > blksz ) ;
dev_desc - > lun = 0 ; /* just to fill something in... */
#if 0 /* only used to test the powersaving mode,
@ -1448,6 +1451,7 @@ static void atapi_inquiry(block_dev_desc_t *dev_desc)
dev_desc - > lun = 0 ;
dev_desc - > lba = 0 ;
dev_desc - > blksz = 0 ;
dev_desc - > log2blksz = LOG2_INVALID ( typeof ( dev_desc - > log2blksz ) ) ;
dev_desc - > type = iobuf [ 0 ] & 0x1f ;
if ( ( iobuf [ 1 ] & 0x80 ) = = 0x80 )
@ -1492,6 +1496,7 @@ static void atapi_inquiry(block_dev_desc_t *dev_desc)
dev_desc - > blksz = ( ( unsigned long ) iobuf [ 4 ] < < 24 ) +
( ( unsigned long ) iobuf [ 5 ] < < 16 ) +
( ( unsigned long ) iobuf [ 6 ] < < 8 ) + ( ( unsigned long ) iobuf [ 7 ] ) ;
dev_desc - > log2blksz = LOG2 ( dev_desc - > blksz ) ;
# ifdef CONFIG_LBA48
/* ATAPI devices cannot use 48bit addressing (ATA/ATAPI v7) */
dev_desc - > lba48 = 0 ;