Lines Matching defs:capacity
1302 uint64_t capacity);
4949 diskaddr_t capacity, int lbasize, int path_flag)
5134 " computed capacity(h*s*c): %d;\n", modesense_capacity);
5136 (void *)pgeom_p, capacity);
5141 * by read capacity. This is an idiosyncrasy of the original x86
5144 if (modesense_capacity >= capacity) {
5148 (modesense_capacity - capacity + spc - 1) / spc);
5155 pgeom_p->g_capacity = capacity;
5171 " nhead: %d; ncyl: %d; rpm: %d; capacity(ms): %d\n",
5180 " lbasize: %d; capacity: %ld; intrlv: %d; rpm: %d\n",
5226 * capacity - disk capacity in #blocks
5234 diskaddr_t capacity, int lbasize)
5243 (void) scsi_ifsetcap(SD_ADDRESS(un), "total-sectors", capacity, 1);
5261 * Note: The driver originally converted the capacity value from
5262 * target blocks to system blocks. However, the capacity value passed
5268 lgeom_p->g_capacity = capacity;
5293 * capacity: new target capacity, ie. block count
5299 sd_update_block_info(struct sd_lun *un, uint32_t lbasize, uint64_t capacity)
5309 if (capacity != 0) {
5310 un->un_blockcount = capacity;
5314 * The capacity has changed so update the errstats.
5319 capacity *= un->un_sys_blocksize;
5321 if (stp->sd_capacity.value.ui64 < capacity)
5322 stp->sd_capacity.value.ui64 = capacity;
7209 uint64_t capacity;
7677 * By default, we mark the capacity, lbasize, and geometry
7678 * as invalid. Only if we successfully read a valid capacity
7974 * it up (using the START_STOP_UNIT command) and read its capacity
7985 * capacity. If successful then save the results
7986 * and mark the capacity & lbasize as valid.
7991 status = sd_send_scsi_READ_CAPACITY(ssc, &capacity,
7996 if (capacity > DK_MAX_BLOCKS) {
7998 if ((capacity + 1) >
8014 "kernel", capacity);
8024 if (capacity -1 > DK_MAX_BLOCKS)
8032 * the capacity of the device is bigger than
8035 * the capacity by sending USCSI command, which
8046 * returning 0 for capacity and/or lbasize.
8048 sd_update_block_info(un, lbasize, capacity);
8051 "sd_unit_attach: un:0x%p capacity = %ld "
8066 "disk capacity is too large "
8102 * we could not spin it up or read the capacity, but
9130 * revision, serial number, and capacity device error stats.
9201 * Set capacity error stat to 0 for no media. This ensures
9202 * a valid capacity is displayed in response to 'iostat -E'
9209 * capacity.
10335 * If the lun is EFI labeled and lun capacity is greater than the
10336 * capacity contained in the label, log a sys-event to notify the
10639 uint64_t capacity;
10677 /* capacity has to be read every open. */
10679 status = sd_send_scsi_READ_CAPACITY(ssc, &capacity,
10693 sd_update_block_info(un, lbasize, capacity);
10836 * Initialize the capacity kstat value, if no media previously
10837 * (capacity kstat is 0) and a media has been inserted
18685 * capacity changes(2Ah/09). Mode parameters changed and
19618 uint64_t capacity;
19633 if (sd_send_scsi_READ_CAPACITY(ssc, &capacity,
19636 "sd_target_change_task: fail to read capacity\n");
19642 if (capacity <= un->un_blockcount) {
19647 sd_update_block_info(un, lbasize, capacity);
19651 * If lun is EFI labeled and lun capacity is greater than the
19652 * capacity contained in the label, log a sys event.
19794 * recover. First few attempts to read capacity and other things
19850 uint64_t capacity;
19859 rval = sd_send_scsi_READ_CAPACITY(ssc, &capacity, &lbasize,
19866 sd_update_block_info(un, lbasize, capacity);
20014 * the device capacity in number of blocks and the device native
20016 * values in *capp and *lbap are undefined. If the capacity
20023 * capacity value from the command.
20051 uint64_t capacity;
20097 /* Return failure if we did not get valid capacity data. */
20101 "capacity data");
20106 * Read capacity and block size from the READ CAPACITY 10 data.
20120 capacity = BE_32(capacity_buf[0]);
20129 * if the reported capacity is set to all 0xf's, then
20133 if (capacity == 0xffffffff) {
20135 status = sd_send_scsi_READ_CAPACITY_16(ssc, &capacity,
20187 capacity += 1;
20190 * Currently, for removable media, the capacity is saved in terms
20191 * of un->un_sys_blocksize, so scale the capacity value to reflect this.
20194 capacity *= (lbasize / un->un_sys_blocksize);
20202 *capp = capacity;
20206 "capacity:0x%llx lbasize:0x%x\n", capacity, lbasize);
20209 * Both the lbasize and capacity from the device must be nonzero,
20213 if ((capacity == 0) || (lbasize == 0)) {
20216 "capacity %llu lbasize %d", capacity, lbasize);
20227 * determine the device capacity in number of blocks and the
20231 * which will apply any device specific adjustments to capacity
20234 * adjust the capacity and lbasize.
20238 * capacity value from the command.
20269 uint64_t capacity;
20326 /* Return failure if we did not get valid capacity data. */
20330 "capacity data");
20336 * Read capacity and block size from the READ CAPACITY 16 data.
20351 capacity = BE_64(capacity16_buf[0]);
20363 * if the reported capacity is set to all 0xf's, then
20368 if (capacity == 0xffffffffffffffff) {
20417 capacity += 1;
20420 * Currently, for removable media, the capacity is saved in terms
20421 * of un->un_sys_blocksize, so scale the capacity value to reflect this.
20424 capacity *= (lbasize / un->un_sys_blocksize);
20426 *capp = capacity;
20431 "capacity:0x%llx lbasize:0x%x, pbsize: 0x%x\n",
20432 capacity, lbasize, pbsize);
20434 if ((capacity == 0) || (lbasize == 0) || (pbsize == 0)) {
20437 "capacity %llu lbasize %d pbsize %d", capacity, lbasize);
23401 * dki_capacity - capacity in blocks
23418 uint64_t capacity;
23516 * Now read the capacity so we can provide the lbasize,
23517 * pbsize and capacity.
23520 rval = sd_send_scsi_READ_CAPACITY_16(ssc, &capacity, &lbasize,
23532 rval = sd_send_scsi_READ_CAPACITY(ssc, &capacity, &lbasize,
23543 media_capacity = capacity;
23546 * sd_send_scsi_READ_CAPACITY() reports capacity in
23570 media_capacity = capacity;
23579 (capacity > un->un_blockcount)) {
23581 sd_update_block_info(un, lbasize, capacity);
23614 * drive capacity.
23650 * physical block size and disk capacity.
23829 uint64_t capacity;
23842 &capacity, &lbasize, SD_PATH_DIRECT);
23860 sd_update_block_info(un, lbasize, capacity);
23915 * Update the capacity kstat value, if no media previously
23916 * (capacity kstat is 0) and a media has been inserted
30572 * capacity larger than 2TB.
30761 * 15. Support for USB disks with capacity larger than 1TB
30763 * Currently, sd doesn't permit a fixed disk device with capacity
30766 * assumes that removable media devices cannot have a capacity larger
31769 uint64_t capacity;
31789 rval = sd_send_scsi_READ_CAPACITY_16(ssc, &capacity, &lbasize,