Lines Matching refs:MEDIA_INFO
117 #define MEDIA_INFO(us) ((struct alauda_info *)us->extra)->port[MEDIA_PORT(us)] macro
425 MEDIA_INFO(us).capacity = 1 << media_info->chipshift; in alauda_init_media()
427 MEDIA_INFO(us).capacity >> 20); in alauda_init_media()
429 MEDIA_INFO(us).pageshift = media_info->pageshift; in alauda_init_media()
430 MEDIA_INFO(us).blockshift = media_info->blockshift; in alauda_init_media()
431 MEDIA_INFO(us).zoneshift = media_info->zoneshift; in alauda_init_media()
433 MEDIA_INFO(us).pagesize = 1 << media_info->pageshift; in alauda_init_media()
434 MEDIA_INFO(us).blocksize = 1 << media_info->blockshift; in alauda_init_media()
435 MEDIA_INFO(us).zonesize = 1 << media_info->zoneshift; in alauda_init_media()
437 MEDIA_INFO(us).uzonesize = ((1 << media_info->zoneshift) / 128) * 125; in alauda_init_media()
438 MEDIA_INFO(us).blockmask = MEDIA_INFO(us).blocksize - 1; in alauda_init_media()
440 num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift in alauda_init_media()
441 + MEDIA_INFO(us).blockshift + MEDIA_INFO(us).pageshift); in alauda_init_media()
442 MEDIA_INFO(us).pba_to_lba = kcalloc(num_zones, sizeof(u16*), GFP_NOIO); in alauda_init_media()
443 MEDIA_INFO(us).lba_to_pba = kcalloc(num_zones, sizeof(u16*), GFP_NOIO); in alauda_init_media()
444 if (MEDIA_INFO(us).pba_to_lba == NULL || MEDIA_INFO(us).lba_to_pba == NULL) in alauda_init_media()
473 alauda_free_maps(&MEDIA_INFO(us)); in alauda_check_media()
483 alauda_free_maps(&MEDIA_INFO(us)); in alauda_check_media()
573 unsigned int zonesize = MEDIA_INFO(us).zonesize; in alauda_read_map()
574 unsigned int uzonesize = MEDIA_INFO(us).uzonesize; in alauda_read_map()
676 MEDIA_INFO(us).lba_to_pba[zone] = lba_to_pba; in alauda_read_map()
677 MEDIA_INFO(us).pba_to_lba[zone] = pba_to_lba; in alauda_read_map()
694 if (MEDIA_INFO(us).lba_to_pba[zone] == NULL in alauda_ensure_map_for_zone()
695 || MEDIA_INFO(us).pba_to_lba[zone] == NULL) in alauda_ensure_map_for_zone()
748 data, (MEDIA_INFO(us).pagesize + 64) * pages, NULL); in alauda_read_block_raw()
761 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_read_block()
799 (MEDIA_INFO(us).pagesize + 64) * MEDIA_INFO(us).blocksize, in alauda_write_block()
818 unsigned int uzonesize = MEDIA_INFO(us).uzonesize; in alauda_write_lba()
819 unsigned int zonesize = MEDIA_INFO(us).zonesize; in alauda_write_lba()
820 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_write_lba()
821 unsigned int blocksize = MEDIA_INFO(us).blocksize; in alauda_write_lba()
828 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset]; in alauda_write_lba()
839 new_pba = alauda_find_unused_pba(&MEDIA_INFO(us), zone); in alauda_write_lba()
898 MEDIA_INFO(us).pba_to_lba[zone][new_pba_offset] = lba; in alauda_write_lba()
899 MEDIA_INFO(us).lba_to_pba[zone][lba_offset] = new_pba; in alauda_write_lba()
907 MEDIA_INFO(us).pba_to_lba[zone][pba_offset] = UNDEF; in alauda_write_lba()
922 unsigned int blockshift = MEDIA_INFO(us).blockshift; in alauda_read_data()
923 unsigned int pageshift = MEDIA_INFO(us).pageshift; in alauda_read_data()
924 unsigned int blocksize = MEDIA_INFO(us).blocksize; in alauda_read_data()
925 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_read_data()
926 unsigned int uzonesize = MEDIA_INFO(us).uzonesize; in alauda_read_data()
945 page = (address & MEDIA_INFO(us).blockmask); in alauda_read_data()
946 max_lba = MEDIA_INFO(us).capacity >> (blockshift + pageshift); in alauda_read_data()
972 pba = MEDIA_INFO(us).lba_to_pba[zone][lba_offset]; in alauda_read_data()
1016 unsigned int blockshift = MEDIA_INFO(us).blockshift; in alauda_write_data()
1017 unsigned int pageshift = MEDIA_INFO(us).pageshift; in alauda_write_data()
1018 unsigned int blocksize = MEDIA_INFO(us).blocksize; in alauda_write_data()
1019 unsigned int pagesize = MEDIA_INFO(us).pagesize; in alauda_write_data()
1047 page = (address & MEDIA_INFO(us).blockmask); in alauda_write_data()
1048 max_lba = MEDIA_INFO(us).capacity >> (pageshift + blockshift); in alauda_write_data()
1159 num_zones = MEDIA_INFO(us).capacity >> (MEDIA_INFO(us).zoneshift in alauda_transport()
1160 + MEDIA_INFO(us).blockshift + MEDIA_INFO(us).pageshift); in alauda_transport()
1162 capacity = num_zones * MEDIA_INFO(us).uzonesize in alauda_transport()
1163 * MEDIA_INFO(us).blocksize; in alauda_transport()