Lines Matching refs:sector_size

787 	unsigned int logical_block_size = sdkp->device->sector_size;  in sd_config_discard()
887 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd()
914 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd()
964 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same()
1207 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd()
1210 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd()
1932 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes()
1975 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local
2006 if (resid & (sector_size - 1)) { in sd_done()
2009 resid, sector_size); in sd_done()
2012 round_up(resid, sector_size)); in sd_done()
2315 unsigned sector_size; in read_capacity_16() local
2362 sector_size = get_unaligned_be32(&buffer[8]); in read_capacity_16()
2371 sdkp->physical_block_size = (1 << (buffer[13] & 0xf)) * sector_size; in read_capacity_16()
2377 alignment = ((buffer[14] & 0x3f) << 8 | buffer[15]) * sector_size; in read_capacity_16()
2393 return sector_size; in read_capacity_16()
2408 unsigned sector_size; in read_capacity_10() local
2442 sector_size = get_unaligned_be32(&buffer[4]); in read_capacity_10()
2450 sdkp->physical_block_size = sector_size; in read_capacity_10()
2451 return sector_size; in read_capacity_10()
2455 sdkp->physical_block_size = sector_size; in read_capacity_10()
2456 return sector_size; in read_capacity_10()
2478 int sector_size; in sd_read_capacity() local
2482 sector_size = read_capacity_16(sdkp, sdp, buffer); in sd_read_capacity()
2483 if (sector_size == -EOVERFLOW) in sd_read_capacity()
2485 if (sector_size == -ENODEV) in sd_read_capacity()
2487 if (sector_size < 0) in sd_read_capacity()
2488 sector_size = read_capacity_10(sdkp, sdp, buffer); in sd_read_capacity()
2489 if (sector_size < 0) in sd_read_capacity()
2492 sector_size = read_capacity_10(sdkp, sdp, buffer); in sd_read_capacity()
2493 if (sector_size == -EOVERFLOW) in sd_read_capacity()
2495 if (sector_size < 0) in sd_read_capacity()
2499 int old_sector_size = sector_size; in sd_read_capacity()
2502 sector_size = read_capacity_16(sdkp, sdp, buffer); in sd_read_capacity()
2503 if (sector_size < 0) { in sd_read_capacity()
2507 sector_size = old_sector_size; in sd_read_capacity()
2534 if (sector_size == 0) { in sd_read_capacity()
2535 sector_size = 512; in sd_read_capacity()
2540 if (sector_size != 512 && in sd_read_capacity()
2541 sector_size != 1024 && in sd_read_capacity()
2542 sector_size != 2048 && in sd_read_capacity()
2543 sector_size != 4096) { in sd_read_capacity()
2545 sector_size); in sd_read_capacity()
2559 sector_size = 512; in sd_read_capacity()
2561 blk_queue_logical_block_size(sdp->request_queue, sector_size); in sd_read_capacity()
2564 sdkp->device->sector_size = sector_size; in sd_read_capacity()
2578 int sector_size = sdkp->device->sector_size; in sd_print_capacity() local
2584 string_get_size(sdkp->capacity, sector_size, in sd_print_capacity()
2586 string_get_size(sdkp->capacity, sector_size, in sd_print_capacity()
2592 sector_size, cap_str_10, cap_str_2); in sd_print_capacity()
2594 if (sdkp->physical_block_size != sector_size) in sd_print_capacity()
3563 sdp->sector_size = 512; in sd_probe()