Lines Matching full:capacity
53 * @capacity: size of the disk in sectors
61 bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]) in scsi_partsize() argument
125 geom[2] = (unsigned long)capacity / in scsi_partsize()
143 * Function : static int setsize(unsigned long capacity,unsigned int *cyls,
147 * SCSI disk in terms of lost space of size capacity, storing
166 * setsize() converts a read capacity value to int 13h
176 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, in setsize() argument
186 heads = capacity / temp; /* Compute value for number of heads */ in setsize()
187 if (capacity % temp) { /* If no remainder, done! */ in setsize()
190 sectors = capacity / temp; /* Compute value for sectors per in setsize()
192 if (capacity % temp) { /* If no remainder, done! */ in setsize()
195 cylinders = capacity / temp; /* Compute number of cylinders */ in setsize()
210 * @capacity: size of the disk in sectors
219 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) in scsicam_bios_param() argument
221 u64 capacity64 = capacity; /* Suppress gcc warning */ in scsicam_bios_param()
225 if (scsi_partsize(bdev, capacity, ip)) in scsicam_bios_param()
233 ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2, in scsicam_bios_param()
242 if ((capacity >> 11) > 65534) { in scsicam_bios_param()
250 if (capacity > 65535*63*255) in scsicam_bios_param()
253 ip[2] = (unsigned long)capacity / (ip[0] * ip[1]); in scsicam_bios_param()