[Linux1394-cvslog] rev 683 - trunk
Brought to you by:
aeb,
bencollins
From: SVN U. <ben...@li...> - 2002-11-16 21:58:52
|
Author: bencollins Date: 2002-11-16 16:58:19 -0500 (Sat, 16 Nov 2002) New Revision: 683 Modified: trunk/sbp2.c Log: Fixes for 2.5.47 compat. in sbp2scsi_biosparam() Modified: trunk/sbp2.c ============================================================================== --- trunk/sbp2.c (original) +++ trunk/sbp2.c 2002-11-16 16:58:20.000000000 -0500 @@ -2947,24 +2947,27 @@ /* * Called by scsi stack to get bios parameters (used by fdisk, and at boot). */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,28) -static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,43) +static int sbp2scsi_biosparam (struct scsi_device *sdev, + struct block_device *dev, sector_t capacity, int geom[]) +{ #else -static int sbp2scsi_biosparam (Scsi_Disk *disk, struct block_device *dev, int geom[]) -#endif +static int sbp2scsi_biosparam (Scsi_Disk *disk, kdev_t dev, int geom[]) { + sector_t capacity = disk->capacity; +#endif int heads, sectors, cylinders; SBP2_DEBUG("Request for bios parameters"); heads = 64; sectors = 32; - cylinders = (int)disk->capacity / (heads * sectors); + cylinders = (int)capacity / (heads * sectors); if (cylinders > 1024) { heads = 255; sectors = 63; - cylinders = (int)disk->capacity / (heads * sectors); + cylinders = (int)capacity / (heads * sectors); } geom[0] = heads; |