Lines Matching refs:nb_sectors

60     return !s->tray_open && s->nb_sectors > 0;  in media_present()
66 return (media_present(s) && s->nb_sectors > CD_MAX_SECTORS); in media_is_dvd()
71 return (media_present(s) && s->nb_sectors <= CD_MAX_SECTORS); in media_is_cd()
324 static void ide_atapi_cmd_read_pio(IDEState *s, int lba, int nb_sectors, in ide_atapi_cmd_read_pio() argument
327 assert(0 <= lba && lba < (s->nb_sectors >> 2)); in ide_atapi_cmd_read_pio()
330 s->packet_transfer_size = nb_sectors * sector_size; in ide_atapi_cmd_read_pio()
424 static void ide_atapi_cmd_read_dma(IDEState *s, int lba, int nb_sectors, in ide_atapi_cmd_read_dma() argument
427 assert(0 <= lba && lba < (s->nb_sectors >> 2)); in ide_atapi_cmd_read_dma()
430 s->packet_transfer_size = nb_sectors * sector_size; in ide_atapi_cmd_read_dma()
442 static void ide_atapi_cmd_read(IDEState *s, int lba, int nb_sectors, in ide_atapi_cmd_read() argument
446 lba, nb_sectors); in ide_atapi_cmd_read()
448 ide_atapi_cmd_read_dma(s, lba, nb_sectors, sector_size); in ide_atapi_cmd_read()
450 ide_atapi_cmd_read_pio(s, lba, nb_sectors, sector_size); in ide_atapi_cmd_read()
494 total_sectors = s->nb_sectors >> 2; in ide_dvd_read_structure()
982 unsigned int nb_sectors, lba; in cmd_read() local
985 uint64_t total_sectors = s->nb_sectors >> 2; in cmd_read()
988 nb_sectors = lduw_be_p(buf + 7); in cmd_read()
990 nb_sectors = ldl_be_p(buf + 6); in cmd_read()
992 if (nb_sectors == 0) { in cmd_read()
998 if (lba >= total_sectors || lba + nb_sectors - 1 >= total_sectors) { in cmd_read()
1003 ide_atapi_cmd_read(s, lba, nb_sectors, 2048); in cmd_read()
1008 unsigned int nb_sectors, lba, transfer_request; in cmd_read_cd() local
1011 uint64_t total_sectors = s->nb_sectors >> 2; in cmd_read_cd()
1013 nb_sectors = (buf[6] << 16) | (buf[7] << 8) | buf[8]; in cmd_read_cd()
1014 if (nb_sectors == 0) { in cmd_read_cd()
1020 if (lba >= total_sectors || lba + nb_sectors - 1 >= total_sectors) { in cmd_read_cd()
1040 ide_atapi_cmd_read(s, lba, nb_sectors, 2048); in cmd_read_cd()
1044 ide_atapi_cmd_read(s, lba, nb_sectors, 2352); in cmd_read_cd()
1056 uint64_t total_sectors = s->nb_sectors >> 2; in cmd_seek()
1115 uint64_t total_sectors = s->nb_sectors >> 2; in cmd_read_toc_pma_atip()
1152 uint64_t total_sectors = s->nb_sectors >> 2; in cmd_read_cdvd_capacity()