/linux-2.6.39/drivers/scsi/ |
D | scsicam.c | 25 static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds, 68 int scsicam_bios_param(struct block_device *bdev, sector_t capacity, int *ip) in scsicam_bios_param() argument 71 u64 capacity64 = capacity; /* Suppress gcc warning */ in scsicam_bios_param() 79 ret = scsi_partsize(p, (unsigned long)capacity, (unsigned int *)ip + 2, in scsicam_bios_param() 87 ret = setsize((unsigned long)capacity, (unsigned int *)ip + 2, in scsicam_bios_param() 94 if ((capacity >> 11) > 65534) { in scsicam_bios_param() 102 if (capacity > 65535*63*255) in scsicam_bios_param() 105 ip[2] = (unsigned long)capacity / (ip[0] * ip[1]); in scsicam_bios_param() 126 int scsi_partsize(unsigned char *buf, unsigned long capacity, in scsi_partsize() argument 185 *cyls = capacity / ((end_head + 1) * end_sector); in scsi_partsize() [all …]
|
D | sr.c | 313 cd->capacity - error_sector < 4 * 75) in sr_done() 648 cd->capacity = 0x1fffff; in sr_probe() 658 cd->cdi.capacity = 1; in sr_probe() 669 set_capacity(disk, cd->capacity); in sr_probe() 718 cd->capacity = 0x1fffff; in get_sectorsize() 723 cd->capacity = 1 + ((buffer[0] << 24) | (buffer[1] << 16) | in get_sectorsize() 733 cd->capacity = max_t(long, cd->capacity, last_written); in get_sectorsize() 750 cd->capacity *= 4; in get_sectorsize() 757 cd->capacity = 0; in get_sectorsize() 766 set_capacity(cd->disk, cd->capacity); in get_sectorsize() [all …]
|
D | sd.c | 1036 diskinfo[2] = sdkp->capacity >> 11; in sd_getgeo() 1040 host->hostt->bios_param(sdp, bdev, sdkp->capacity, diskinfo); in sd_getgeo() 1042 scsicam_bios_param(bdev, sdkp->capacity, diskinfo); in sd_getgeo() 1114 sdkp->capacity = 0; in set_media_not_present() 1595 sdkp->capacity = 0; in sd_read_protection_type() 1630 sdkp->capacity = 0; /* unknown mapped to zero - as usual */ in read_capacity_error() 1702 if ((sizeof(sdkp->capacity) == 4) && (lba >= 0xffffffffULL)) { in read_capacity_16() 1706 sdkp->capacity = 0; in read_capacity_16() 1729 sdkp->capacity = lba + 1; in read_capacity_16() 1783 sdkp->capacity = 0; in read_capacity_10() [all …]
|
D | sr.h | 35 unsigned capacity; /* size in blocks */ member
|
/linux-2.6.39/drivers/ide/ |
D | ide-disk.c | 300 u64 capacity, set_max; in ide_disk_hpa_get_native_capacity() local 302 capacity = drive->capacity64; in ide_disk_hpa_get_native_capacity() 310 if (set_max == capacity + 1) in ide_disk_hpa_get_native_capacity() 328 u64 capacity, set_max; in idedisk_check_hpa() local 331 capacity = drive->capacity64; in idedisk_check_hpa() 334 if (set_max <= capacity) in idedisk_check_hpa() 343 capacity, sectors_to_MB(capacity), in idedisk_check_hpa() 524 unsigned long long capacity; in update_flush() local 534 capacity = ide_gd_capacity(drive); in update_flush() 538 capacity <= (1ULL << 28) || in update_flush() [all …]
|
D | ide-floppy.c | 316 int capacity, lba_capacity; in ide_floppy_get_flexible_disk_page() local 343 capacity = cyls * heads * sectors * sector_size; in ide_floppy_get_flexible_disk_page() 348 drive->name, capacity / 1024, cyls, heads, in ide_floppy_get_flexible_disk_page() 357 if (capacity < lba_capacity) { in ide_floppy_get_flexible_disk_page() 360 drive->name, lba_capacity, capacity); in ide_floppy_get_flexible_disk_page() 362 capacity / floppy->block_size : 0; in ide_floppy_get_flexible_disk_page()
|
D | ide-cd.c | 873 static int cdrom_read_capacity(ide_drive_t *drive, unsigned long *capacity, in cdrom_read_capacity() argument 918 *capacity = 1 + be32_to_cpu(capbuf.lba); in cdrom_read_capacity() 922 *capacity, *sectors_per_frame); in cdrom_read_capacity() 986 stat = cdrom_read_capacity(drive, &toc->capacity, §ors_per_frame, in ide_cd_read_toc() 989 toc->capacity = 0x1fffff; in ide_cd_read_toc() 991 set_capacity(info->disk, toc->capacity * sectors_per_frame); in ide_cd_read_toc() 993 drive->probed_capacity = toc->capacity * sectors_per_frame; in ide_cd_read_toc() 1106 if (!stat && (last_written > toc->capacity)) { in ide_cd_read_toc() 1107 toc->capacity = last_written; in ide_cd_read_toc() 1108 set_capacity(info->disk, toc->capacity * sectors_per_frame); in ide_cd_read_toc() [all …]
|
/linux-2.6.39/drivers/power/ |
D | ds2782_battery.c | 48 int (*get_battery_capacity)(struct ds278x_info *info, int *capacity); 156 static int ds2782_get_capacity(struct ds278x_info *info, int *capacity) in ds2782_get_capacity() argument 164 *capacity = raw; in ds2782_get_capacity() 196 static int ds2786_get_capacity(struct ds278x_info *info, int *capacity) in ds2786_get_capacity() argument 205 *capacity = raw/2 ; in ds2786_get_capacity() 213 int capacity; in ds278x_get_status() local 219 err = info->ops->get_battery_capacity(info, &capacity); in ds278x_get_status() 223 if (capacity == 100) in ds278x_get_status()
|
D | apm_power.c | 285 union power_supply_propval capacity, time_to_full, time_to_empty; in apm_battery_apm_get_power_status() local 310 if (MPSY_PROP(CAPACITY, &capacity) == 0) { in apm_battery_apm_get_power_status() 311 info->battery_life = capacity.intval; in apm_battery_apm_get_power_status()
|
/linux-2.6.39/drivers/usb/storage/ |
D | sddr55.c | 95 unsigned long capacity; /* Size of card in bytes */ member 659 if (!info->capacity) in sddr55_read_map() 662 numblocks = info->capacity >> (info->blockshift + info->pageshift); in sddr55_read_map() 793 unsigned long capacity; in sddr55_transport() local 859 capacity = sddr55_get_capacity(us); in sddr55_transport() 861 if (!capacity) { in sddr55_transport() 866 info->capacity = capacity; in sddr55_transport() 870 info->max_log_blks = ((info->capacity >> (info->pageshift + info->blockshift)) / 256) * 250; in sddr55_transport() 874 capacity = (capacity / 256) * 250; in sddr55_transport() 876 capacity /= PAGESIZE; in sddr55_transport() [all …]
|
D | alauda.c | 95 unsigned long capacity; /* total media size in bytes */ member 296 unsigned int num_zones = media_info->capacity >> shift; in alauda_free_maps() 434 MEDIA_INFO(us).capacity = 1 << media_info->chipshift; in alauda_init_media() 436 MEDIA_INFO(us).capacity >> 20); in alauda_init_media() 449 num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift in alauda_init_media() 952 max_lba = MEDIA_INFO(us).capacity >> (blockshift + pageshift); in alauda_read_data() 1056 max_lba = MEDIA_INFO(us).capacity >> (pageshift + blockshift); in alauda_write_data() 1164 unsigned long capacity; in alauda_transport() local 1170 num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift in alauda_transport() 1173 capacity = num_zones * MEDIA_INFO(us).uzonesize in alauda_transport() [all …]
|
D | sddr09.c | 262 unsigned long capacity; /* Size of card in bytes */ member 762 maxlba = info->capacity >> (info->pageshift + info->blockshift); in sddr09_read_data() 846 end = info->capacity >> (info->blockshift + info->pageshift); in sddr09_find_unused_pba() 991 maxlba = info->capacity >> (info->pageshift + info->blockshift); in sddr09_write_data() 1218 if (!info->capacity) in sddr09_read_map() 1224 numblocks = info->capacity >> (info->blockshift + info->pageshift); in sddr09_read_map() 1554 unsigned long capacity; in sddr09_transport() local 1609 info->capacity = (1 << cardinfo->chipshift); in sddr09_transport() 1624 capacity = (info->lbact << info->blockshift) - 1; in sddr09_transport() 1626 ((__be32 *) ptr)[0] = cpu_to_be32(capacity); in sddr09_transport()
|
/linux-2.6.39/include/scsi/ |
D | scsicam.h | 15 extern int scsicam_bios_param (struct block_device *bdev, sector_t capacity, int *ip); 16 extern int scsi_partsize(unsigned char *buf, unsigned long capacity,
|
/linux-2.6.39/Documentation/power/ |
D | power_supply_class.txt | 61 ~ Because both "charge" (µAh) and "energy" (µWh) represents "capacity" ~ 64 ~ CHARGE_* attributes represents capacity in µAh only. ~ 65 ~ ENERGY_* attributes represents capacity in µWh only. ~ 66 ~ CAPACITY attribute represents capacity in *percents*, from 0 to 100. ~ 90 no direct relation between voltage and battery capacity, but some dumb 91 batteries use voltage for very approximated calculation of capacity. 115 CAPACITY - capacity in percents. 116 CAPACITY_LEVEL - capacity level. This corresponds to 165 Q: Suppose, my battery monitoring chip/firmware does not provides capacity 167 percentage capacity manually, inside the driver, and register CAPACITY [all …]
|
/linux-2.6.39/drivers/scsi/aic7xxx/ |
D | aiclib.h | 137 aic_sector_div(sector_t capacity, int heads, int sectors) in aic_sector_div() argument 140 sector_div(capacity, (heads * sectors)); in aic_sector_div() 141 return (int)capacity; in aic_sector_div()
|
/linux-2.6.39/drivers/uwb/ |
D | ie.c | 202 int capacity; in uwb_rc_ie_setup() local 204 capacity = uwb_rc_get_ie(uwb_rc, &ie_info); in uwb_rc_ie_setup() 205 if (capacity < 0) in uwb_rc_ie_setup() 206 return capacity; in uwb_rc_ie_setup() 213 uwb_rc->ies_capacity = capacity; in uwb_rc_ie_setup()
|
/linux-2.6.39/drivers/block/paride/ |
D | pd.c | 226 int capacity; /* Size of this volume in sectors */ member 675 disk->capacity = le32_to_cpu(*(__le32 *) (pd_scratch + 120)); in pd_identify() 677 disk->capacity = disk->sectors * disk->heads * disk->cylinders; in pd_identify() 692 disk->capacity, disk->capacity / 2048, in pd_identify() 696 if (disk->capacity) in pd_identify() 758 geo->cylinders = disk->capacity / (geo->heads * geo->sectors); in pd_getgeo() 813 set_capacity(p, disk->capacity); in pd_revalidate() 865 disk->capacity = 0; in pd_detect() 899 set_capacity(disk->gd, disk->capacity); in pd_detect()
|
/linux-2.6.39/net/tipc/ |
D | ref.c | 66 u32 capacity; member 119 tipc_ref_table.capacity = requested_size; in tipc_ref_table_init() 181 } else if (tipc_ref_table.init_point < tipc_ref_table.capacity) { in tipc_ref_acquire()
|
/linux-2.6.39/drivers/firewire/ |
D | nosy.c | 72 size_t capacity; member 127 packet_buffer_init(struct packet_buffer *buffer, size_t capacity) in packet_buffer_init() argument 129 buffer->data = kmalloc(capacity, GFP_KERNEL); in packet_buffer_init() 134 buffer->capacity = capacity; in packet_buffer_init() 165 end = buffer->data + buffer->capacity; in packet_buffer_get() 199 if (buffer->capacity < in packet_buffer_put() 205 end = buffer->data + buffer->capacity; in packet_buffer_put()
|
/linux-2.6.39/drivers/md/ |
D | Kconfig | 88 kernel. In a set with N drives, the available space is the capacity 130 A RAID-5 set of N drives with a capacity of C MB per drive provides 131 the capacity of C * (N - 1) MB, and protects against a failure 138 A RAID-6 set of N drives with a capacity of C MB per drive 139 provides the capacity of C * (N - 2) MB, and protects 251 A RAID-5 set of N drives with a capacity of C MB per drive provides 252 the capacity of C * (N - 1) MB, and protects against a failure 259 A RAID-6 set of N drives with a capacity of C MB per drive 260 provides the capacity of C * (N - 2) MB, and protects
|
/linux-2.6.39/drivers/block/ |
D | ub.c | 313 struct ub_capacity capacity; member 731 block = blk_rq_pos(rq) >> lun->capacity.bshift; in ub_cmd_build_block() 732 nblks = blk_rq_sectors(rq) >> lun->capacity.bshift; in ub_cmd_build_block() 1648 lun->capacity.nsec = 0; in ub_revalidate() 1649 lun->capacity.bsize = 512; in ub_revalidate() 1650 lun->capacity.bshift = 0; in ub_revalidate() 1656 if (ub_sync_read_cap(sc, lun, &lun->capacity) != 0) { in ub_revalidate() 1662 if (ub_sync_read_cap(sc, lun, &lun->capacity) != 0) { in ub_revalidate() 1663 lun->capacity.nsec = 0; in ub_revalidate() 1664 lun->capacity.bsize = 512; in ub_revalidate() [all …]
|
/linux-2.6.39/drivers/message/i2o/ |
D | i2o_block.c | 541 static void i2o_block_biosparam(unsigned long capacity, unsigned short *cyls, in i2o_block_biosparam() argument 547 if (capacity <= BLOCK_SIZE_528M) in i2o_block_biosparam() 549 else if (capacity <= BLOCK_SIZE_1G) in i2o_block_biosparam() 551 else if (capacity <= BLOCK_SIZE_21G) in i2o_block_biosparam() 553 else if (capacity <= BLOCK_SIZE_42G) in i2o_block_biosparam() 558 cylinders = (unsigned long)capacity / (heads * sectors); in i2o_block_biosparam()
|
/linux-2.6.39/drivers/staging/rts_pstor/ |
D | rtsx_chip.h | 398 #define CHK_SD_HC(sd_card) (CHK_SD_HCXC(sd_card) && ((sd_card)->capacity <= 0x4000000)) 399 #define CHK_SD_XC(sd_card) (CHK_SD_HCXC(sd_card) && ((sd_card)->capacity > 0x4000000)) 462 u32 capacity; member 519 u32 capacity; member 565 u32 capacity; member 739 u32 capacity[MAX_ALLOWED_LUN_CNT]; member
|
/linux-2.6.39/drivers/net/ |
D | virtio_net.c | 577 int capacity; in start_xmit() local 583 capacity = xmit_skb(vi, skb); in start_xmit() 586 if (unlikely(capacity < 0)) { in start_xmit() 588 if (likely(capacity == -ENOMEM)) { in start_xmit() 595 capacity); in start_xmit() 610 if (capacity < 2+MAX_SKB_FRAGS) { in start_xmit() 614 capacity += free_old_xmit_skbs(vi); in start_xmit() 615 if (capacity >= 2+MAX_SKB_FRAGS) { in start_xmit()
|
/linux-2.6.39/drivers/staging/hv/ |
D | blkvsc_drv.c | 111 sector_t capacity; member 375 set_capacity(blkdev->gd, blkdev->capacity * (blkdev->sector_size/512)); in blkvsc_probe() 381 blkdev->gd->disk_name, (unsigned long)blkdev->capacity, in blkvsc_probe() 570 blkdev->capacity = 0; in blkvsc_do_read_capacity() 623 blkdev->capacity = ((buf[0] << 24) | (buf[1] << 16) | in blkvsc_do_read_capacity() 647 blkdev->capacity = 0; in blkvsc_do_read_capacity16() 699 blkdev->capacity = be64_to_cpu(*(unsigned long long *) &buf[0]) + 1; in blkvsc_do_read_capacity16() 703 blkdev->capacity = ((buf[0] << 24) | (buf[1] << 16) | in blkvsc_do_read_capacity16() 1357 set_capacity(blkdev->gd, blkdev->capacity * in blkvsc_revalidate_disk()
|