Searched refs:capacity (Results 1 - 25 of 124) sorted by relevance

12345

/drivers/scsi/
H A Dscsicam.c24 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds,
57 * @capacity: size of the disk in sectors
67 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) argument
70 u64 capacity64 = capacity; /* Suppress gcc warning */
78 ret = scsi_partsize(p, (unsigned long)capacity, (unsigned int *)ip + 2,
86 ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2,
93 if ((capacity >> 11) > 65534) {
101 if (capacity > 65535*63*255)
104 ip[2] = (unsigned long)capacity / (ip[0] * ip[1]);
114 * @capacity
125 scsi_partsize(unsigned char *buf, unsigned long capacity, unsigned int *cyls, unsigned int *hds, unsigned int *secs) argument
230 setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, unsigned int *secs) argument
[all...]
H A Dsr.h35 unsigned capacity; /* size in blocks */ member in struct:scsi_cd
H A Dqlogicfas408.h109 sector_t capacity, int ip[]);
H A Dsr.c351 cd->capacity - error_sector < 4 * 75)
686 cd->capacity = 0x1fffff;
696 cd->cdi.capacity = 1;
707 set_capacity(disk, cd->capacity);
756 cd->capacity = 0x1fffff;
761 cd->capacity = 1 + ((buffer[0] << 24) | (buffer[1] << 16) |
771 cd->capacity = max_t(long, cd->capacity, last_written);
788 cd->capacity *= 4;
795 cd->capacity
[all...]
H A Dsd.c1068 diskinfo[2] = sdkp->capacity >> 11;
1072 host->hostt->bios_param(sdp, bdev, sdkp->capacity, diskinfo);
1074 scsicam_bios_param(bdev, sdkp->capacity, diskinfo);
1151 sdkp->capacity = 0;
1691 sdkp->capacity = 0;
1723 * in the drive, but some drives fail read capacity even with
1726 sdkp->capacity = 0; /* unknown mapped to zero - as usual */
1798 if ((sizeof(sdkp->capacity) == 4) && (lba >= 0xffffffffULL)) {
1802 sdkp->capacity = 0;
1825 sdkp->capacity
[all...]
H A Dsd.h26 * Size of the initial data buffer for mode and read capacity data
56 sector_t capacity; /* size in 512-byte sectors */ member in struct:scsi_disk
H A Dt128.c328 sector_t capacity, int * ip)
332 ip[2] = capacity >> 11;
327 t128_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int * ip) argument
/drivers/scsi/aic7xxx/
H A Daiclib.h137 aic_sector_div(sector_t capacity, int heads, int sectors) argument
140 sector_div(capacity, (heads * sectors));
141 return (int)capacity;
/drivers/power/
H A Dds2782_battery.c27 #define DS2782_REG_RARC 0x06 /* Remaining active relative capacity */
39 #define DS2786_REG_RARC 0x02 /* Remaining active relative capacity */
48 int (*get_battery_capacity)(struct ds278x_info *info, int *capacity);
156 static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) argument
164 *capacity = raw;
196 static int ds2786_get_capacity(struct ds278x_info *info, int *capacity) argument
204 /* Relative capacity is displayed with resolution 0.5 % */
205 *capacity = raw/2 ;
213 int capacity; local
219 err = info->ops->get_battery_capacity(info, &capacity);
[all...]
H A Dda9052-battery.c55 /* Lookup table for voltage vs capacity */
350 static int da9052_bat_read_capacity(struct da9052_battery *bat, int *capacity) argument
374 *capacity = 100;
378 *capacity = 0;
397 *capacity = da9052_bat_interpolate(vbat_lower, vbat_upper, level_lower,
407 int capacity; local
419 ret = da9052_bat_read_capacity(bat, &capacity);
422 if (capacity < DA9052_BAT_LOW_CAP)
H A Dapm_power.c91 /* try guess battery with more capacity */
286 union power_supply_propval capacity, time_to_full, time_to_empty; local
309 /* battery life (i.e. capacity, in percents) */
311 if (MPSY_PROP(CAPACITY, &capacity) == 0) {
312 info->battery_life = capacity.intval;
/drivers/uwb/
H A Die.c203 int capacity; local
205 capacity = uwb_rc_get_ie(uwb_rc, &ie_info);
206 if (capacity < 0)
207 return capacity;
214 uwb_rc->ies_capacity = capacity;
/drivers/block/
H A Dvirtio_blk.c326 u64 capacity, size; local
332 /* Host must always specify the capacity. */
333 vdev->config->get(vdev, offsetof(struct virtio_blk_config, capacity),
334 &capacity, sizeof(capacity));
336 /* If capacity is too big, truncate with warning. */
337 if ((sector_t)capacity != capacity) {
339 (unsigned long long)capacity);
340 capacity
[all...]
H A Dub.c276 struct ub_capacity capacity; member in struct:ub_lun
694 block = blk_rq_pos(rq) >> lun->capacity.bshift;
695 nblks = blk_rq_sectors(rq) >> lun->capacity.bshift;
1611 lun->capacity.nsec = 0;
1612 lun->capacity.bsize = 512;
1613 lun->capacity.bshift = 0;
1619 if (ub_sync_read_cap(sc, lun, &lun->capacity) != 0) {
1623 * We keep this because sd.c has retries for capacity.
1625 if (ub_sync_read_cap(sc, lun, &lun->capacity) != 0) {
1626 lun->capacity
[all...]
/drivers/ide/
H A Dide-disk.c203 * Queries for true maximum capacity of the drive.
300 u64 capacity, set_max; local
302 capacity = drive->capacity64;
310 if (set_max == capacity + 1)
328 u64 capacity, set_max; local
331 capacity = drive->capacity64;
334 if (set_max <= capacity)
340 "\tcurrent capacity is %llu sectors (%llu MB)\n"
341 "\tnative capacity is %llu sectors (%llu MB)\n",
343 capacity, sectors_to_M
529 unsigned long long capacity; local
660 unsigned long long capacity; local
[all...]
H A Dide-cd.h72 unsigned long capacity; member in struct:atapi_toc
H A Dide-floppy.c306 * Look at the flexible disk page parameters. We ignore the CHS capacity
315 int capacity, lba_capacity; local
342 capacity = cyls * heads * sectors * sector_size;
347 drive->name, capacity / 1024, cyls, heads,
356 if (capacity < lba_capacity) {
357 printk(KERN_NOTICE PFX "%s: The disk reports a capacity of %d "
359 drive->name, lba_capacity, capacity);
361 capacity / floppy->block_size : 0;
370 * capacity.
396 desc_cnt = header_len / 8; /* capacity descripto
[all...]
H A Dide-cd.c112 * don't care about tray state messages for e.g. capacity
873 static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, argument
918 *capacity = 1 + be32_to_cpu(capbuf.lba);
922 *capacity, *sectors_per_frame);
985 /* try to get the total cdrom capacity and sector size */
986 stat = cdrom_read_capacity(drive, &toc->capacity, &sectors_per_frame,
989 toc->capacity = 0x1fffff;
991 set_capacity(info->disk, toc->capacity * sectors_per_frame);
992 /* save a private copy of the TOC capacity for error handling */
993 drive->probed_capacity = toc->capacity * sectors_per_fram
1393 unsigned long capacity, sectors_per_frame; local
[all...]
/drivers/usb/storage/
H A Dsddr55.c95 unsigned long capacity; /* Size of card in bytes */ member in struct:sddr55_card_info
571 US_DEBUGP("Reading capacity...\n");
659 if (!info->capacity)
662 numblocks = info->capacity >> (info->blockshift + info->pageshift);
793 unsigned long capacity; local
859 capacity = sddr55_get_capacity(us);
861 if (!capacity) {
866 info->capacity = capacity;
870 info->max_log_blks = ((info->capacity >> (inf
[all...]
H A Dalauda.c95 unsigned long capacity; /* total media size in bytes */ member in struct:alauda_media_info
178 unsigned char chipshift; /* 1<<cs bytes total capacity */
296 unsigned int num_zones = media_info->capacity >> shift;
353 * Retrieves a 4-byte media signature, which indicates manufacturer, capacity,
386 * Examines the media and deduces capacity, etc.
434 MEDIA_INFO(us).capacity = 1 << media_info->chipshift;
435 US_DEBUGP("Found media with capacity: %ldMB\n",
436 MEDIA_INFO(us).capacity >> 20);
449 num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift
952 max_lba = MEDIA_INFO(us).capacity >> (blockshif
1164 unsigned long capacity; local
[all...]
/drivers/firewire/
H A Dnosy.c72 size_t capacity; member in struct:packet_buffer
127 packet_buffer_init(struct packet_buffer *buffer, size_t capacity) argument
129 buffer->data = kmalloc(capacity, GFP_KERNEL);
134 buffer->capacity = capacity;
165 end = buffer->data + buffer->capacity;
199 if (buffer->capacity <
205 end = buffer->data + buffer->capacity;
/drivers/net/wireless/iwlwifi/
H A Diwl-trans-pcie-rx.c790 static int iwl_print_last_event_logs(struct iwl_trans *trans, u32 capacity, argument
802 capacity - (size - next_entry),
829 u32 capacity; /* event log capacity in # entries */ local
859 capacity = iwl_read_targ_mem(trans, base);
864 if (capacity > logsize) {
865 IWL_ERR(trans, "Log capacity %d is bogus, limit to %d "
866 "entries\n", capacity, logsize);
867 capacity = logsize;
876 size = num_wraps ? capacity
[all...]
H A Diwl-agn.c316 u32 capacity, u32 mode)
344 if (WARN_ON(num_events > capacity - start_idx))
345 num_events = capacity - start_idx;
370 u32 capacity; /* event log capacity in # entries */ local
372 u32 capacity; member in struct:__anon3587
386 capacity = read.capacity;
395 * Therefore, it can happen that we read next_entry == capacity,
398 if (unlikely(next_entry == capacity))
314 iwl_print_cont_event_trace(struct iwl_priv *priv, u32 base, u32 start_idx, u32 num_events, u32 capacity, u32 mode) argument
[all...]
/drivers/block/paride/
H A Dpd.c227 int capacity; /* Size of this volume in sectors */ member in struct:pd_unit
676 disk->capacity = le32_to_cpu(*(__le32 *) (pd_scratch + 120));
678 disk->capacity = disk->sectors * disk->heads * disk->cylinders;
693 disk->capacity, disk->capacity / 2048,
697 if (disk->capacity)
759 geo->cylinders = disk->capacity / (geo->heads * geo->sectors);
814 set_capacity(p, disk->capacity);
866 disk->capacity = 0;
900 set_capacity(disk->gd, disk->capacity);
[all...]
/drivers/message/fusion/
H A Dmptscsih.h125 extern int mptscsih_bios_param(struct scsi_device * sdev, struct block_device *bdev, sector_t capacity, int geom[]);

Completed in 1431 milliseconds

12345