Lines Matching refs:capacity
60 bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]) in scsi_partsize() argument
124 geom[2] = (unsigned long)capacity / in scsi_partsize()
175 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, in setsize() argument
185 heads = capacity / temp; /* Compute value for number of heads */ in setsize()
186 if (capacity % temp) { /* If no remainder, done! */ in setsize()
189 sectors = capacity / temp; /* Compute value for sectors per in setsize()
191 if (capacity % temp) { /* If no remainder, done! */ in setsize()
194 cylinders = capacity / temp; /* Compute number of cylinders */ in setsize()
218 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) in scsicam_bios_param() argument
220 u64 capacity64 = capacity; /* Suppress gcc warning */ in scsicam_bios_param()
224 if (scsi_partsize(bdev, capacity, ip)) in scsicam_bios_param()
232 ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2, in scsicam_bios_param()
241 if ((capacity >> 11) > 65534) { in scsicam_bios_param()
249 if (capacity > 65535*63*255) in scsicam_bios_param()
252 ip[2] = (unsigned long)capacity / (ip[0] * ip[1]); in scsicam_bios_param()