Lines Matching full:capacity
54 * @capacity: size of the disk in sectors
62 bool scsi_partsize(struct block_device *bdev, sector_t capacity, int geom[3]) in scsi_partsize() argument
126 geom[2] = (unsigned long)capacity / in scsi_partsize()
144 * Function : static int setsize(unsigned long capacity,unsigned int *cyls,
148 * SCSI disk in terms of lost space of size capacity, storing
167 * setsize() converts a read capacity value to int 13h
177 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, in setsize() argument
187 heads = capacity / temp; /* Compute value for number of heads */ in setsize()
188 if (capacity % temp) { /* If no remainder, done! */ in setsize()
191 sectors = capacity / temp; /* Compute value for sectors per in setsize()
193 if (capacity % temp) { /* If no remainder, done! */ in setsize()
196 cylinders = capacity / temp; /* Compute number of cylinders */ in setsize()
211 * @capacity: size of the disk in sectors
220 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) in scsicam_bios_param() argument
222 u64 capacity64 = capacity; /* Suppress gcc warning */ in scsicam_bios_param()
226 if (scsi_partsize(bdev, capacity, ip)) in scsicam_bios_param()
234 ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2, in scsicam_bios_param()
243 if ((capacity >> 11) > 65534) { in scsicam_bios_param()
251 if (capacity > 65535*63*255) in scsicam_bios_param()
254 ip[2] = (unsigned long)capacity / (ip[0] * ip[1]); in scsicam_bios_param()