Lines Matching refs:media_info
284 static void alauda_free_maps (struct alauda_media_info *media_info) in alauda_free_maps() argument
286 unsigned int shift = media_info->zoneshift in alauda_free_maps()
287 + media_info->blockshift + media_info->pageshift; in alauda_free_maps()
288 unsigned int num_zones = media_info->capacity >> shift; in alauda_free_maps()
291 if (media_info->lba_to_pba != NULL) in alauda_free_maps()
293 kfree(media_info->lba_to_pba[i]); in alauda_free_maps()
294 media_info->lba_to_pba[i] = NULL; in alauda_free_maps()
297 if (media_info->pba_to_lba != NULL) in alauda_free_maps()
299 kfree(media_info->pba_to_lba[i]); in alauda_free_maps()
300 media_info->pba_to_lba[i] = NULL; in alauda_free_maps()
383 struct alauda_card_info *media_info; in alauda_init_media() local
415 media_info = alauda_card_find_id(data[1]); in alauda_init_media()
416 if (media_info == NULL) { in alauda_init_media()
422 MEDIA_INFO(us).capacity = 1 << media_info->chipshift; in alauda_init_media()
426 MEDIA_INFO(us).pageshift = media_info->pageshift; in alauda_init_media()
427 MEDIA_INFO(us).blockshift = media_info->blockshift; in alauda_init_media()
428 MEDIA_INFO(us).zoneshift = media_info->zoneshift; in alauda_init_media()
430 MEDIA_INFO(us).pagesize = 1 << media_info->pageshift; in alauda_init_media()
431 MEDIA_INFO(us).blocksize = 1 << media_info->blockshift; in alauda_init_media()
432 MEDIA_INFO(us).zonesize = 1 << media_info->zoneshift; in alauda_init_media()
434 MEDIA_INFO(us).uzonesize = ((1 << media_info->zoneshift) / 128) * 125; in alauda_init_media()
1088 struct alauda_media_info *media_info = &info->port[port]; in alauda_info_destructor() local
1090 alauda_free_maps(media_info); in alauda_info_destructor()
1091 kfree(media_info->lba_to_pba); in alauda_info_destructor()
1092 kfree(media_info->pba_to_lba); in alauda_info_destructor()