Lines Matching refs:sector_size
820 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard()
914 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd()
946 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd()
1001 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same()
1080 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size); in sd_setup_write_same_cmnd()
1096 cmd->transfersize = sdp->sector_size; in sd_setup_write_same_cmnd()
1109 rq->__data_len = sdp->sector_size; in sd_setup_write_same_cmnd()
1303 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd()
1306 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd()
1990 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes()
2033 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local
2065 if (resid & (sector_size - 1)) { in sd_done()
2068 resid, sector_size); in sd_done()
2071 round_up(resid, sector_size)); in sd_done()
2362 unsigned sector_size; in read_capacity_16() local
2409 sector_size = get_unaligned_be32(&buffer[8]); in read_capacity_16()
2418 sdkp->physical_block_size = (1 << (buffer[13] & 0xf)) * sector_size; in read_capacity_16()
2424 alignment = ((buffer[14] & 0x3f) << 8 | buffer[15]) * sector_size; in read_capacity_16()
2440 return sector_size; in read_capacity_16()
2452 unsigned sector_size; in read_capacity_10() local
2486 sector_size = get_unaligned_be32(&buffer[4]); in read_capacity_10()
2494 sdkp->physical_block_size = sector_size; in read_capacity_10()
2495 return sector_size; in read_capacity_10()
2499 sdkp->physical_block_size = sector_size; in read_capacity_10()
2500 return sector_size; in read_capacity_10()
2522 int sector_size; in sd_read_capacity() local
2526 sector_size = read_capacity_16(sdkp, sdp, buffer); in sd_read_capacity()
2527 if (sector_size == -EOVERFLOW) in sd_read_capacity()
2529 if (sector_size == -ENODEV) in sd_read_capacity()
2531 if (sector_size < 0) in sd_read_capacity()
2532 sector_size = read_capacity_10(sdkp, sdp, buffer); in sd_read_capacity()
2533 if (sector_size < 0) in sd_read_capacity()
2536 sector_size = read_capacity_10(sdkp, sdp, buffer); in sd_read_capacity()
2537 if (sector_size == -EOVERFLOW) in sd_read_capacity()
2539 if (sector_size < 0) in sd_read_capacity()
2543 int old_sector_size = sector_size; in sd_read_capacity()
2546 sector_size = read_capacity_16(sdkp, sdp, buffer); in sd_read_capacity()
2547 if (sector_size < 0) { in sd_read_capacity()
2551 sector_size = old_sector_size; in sd_read_capacity()
2578 if (sector_size == 0) { in sd_read_capacity()
2579 sector_size = 512; in sd_read_capacity()
2584 if (sector_size != 512 && in sd_read_capacity()
2585 sector_size != 1024 && in sd_read_capacity()
2586 sector_size != 2048 && in sd_read_capacity()
2587 sector_size != 4096) { in sd_read_capacity()
2589 sector_size); in sd_read_capacity()
2603 sector_size = 512; in sd_read_capacity()
2605 blk_queue_logical_block_size(sdp->request_queue, sector_size); in sd_read_capacity()
2608 sdkp->device->sector_size = sector_size; in sd_read_capacity()
2622 int sector_size = sdkp->device->sector_size; in sd_print_capacity() local
2628 string_get_size(sdkp->capacity, sector_size, in sd_print_capacity()
2630 string_get_size(sdkp->capacity, sector_size, in sd_print_capacity()
2636 sector_size, cap_str_10, cap_str_2); in sd_print_capacity()
2638 if (sdkp->physical_block_size != sector_size) in sd_print_capacity()
2951 unsigned int sector_sz = sdkp->device->sector_size; in sd_read_block_limits()
3556 sdp->sector_size = 512; in sd_probe()