• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/staging/tidspbridge/dynload/

Lines Matching refs:dlthis

46  *  dlthis		Handle from dload_module_open for this module
56 static char *unpack_sec_name(struct dload_state *dlthis, u32 soffset, char *dst)
60 if (soffset >= dlthis->dfile_hdr.df_scn_name_size) {
61 dload_error(dlthis, stbl, soffset);
64 src = (u8 *) dlthis->str_head +
82 * dlthis Handle from dload_module_open for this module
88 static void expand_sec_names(struct dload_state *dlthis)
95 xsize = dlthis->dfile_hdr.df_max_str_len * dlthis->dfile_hdr.df_no_scns;
96 xstrings = (char *)dlthis->mysym->dload_allocate(dlthis->mysym, xsize);
98 dload_error(dlthis, err_alloc, xsize);
101 dlthis->xstrings = xstrings;
104 for (sec = 0; sec < dlthis->dfile_hdr.df_no_scns; sec++) {
105 shp = (struct ldr_section_info *)&dlthis->sect_hdrs[sec];
106 next = unpack_sec_name(dlthis, *(u32 *) &shp->name, curr);
142 struct dload_state *dlthis; /* internal state for this call */
157 dlthis = (struct dload_state *)
159 if (!dlthis) {
166 dp = (unsigned *)dlthis;
171 dlthis->strm = module;
172 dlthis->mysym = syms;
175 dload_headers(dlthis);
177 if (!dlthis->dload_errcount)
178 dload_strings(dlthis, true);
183 BYTE_TO_HOST(DOFF_ALIGN(dlthis->dfile_hdr.df_strtab_size));
185 if (dlthis->strm->set_file_posn(dlthis->strm, sec_start) != 0) {
186 dload_error(dlthis, seek, sec_start);
190 if (!dlthis->dload_errcount)
191 dload_sections(dlthis);
193 if (dlthis->dload_errcount) {
194 dload_module_close(dlthis); /* errors, blow off our state */
195 dlthis = NULL;
202 expand_sec_names(dlthis);
206 for (sec = 0; sec < dlthis->dfile_hdr.df_no_scns; sec++) {
208 (struct ldr_section_info *)&dlthis->sect_hdrs[sec];
209 shp->name = dlthis->str_head + *(u32 *) &shp->name;
213 return dlthis;
235 struct dload_state *dlthis;
239 dlthis = (struct dload_state *)minfo;
240 if (!dlthis)
243 for (sec = 0; sec < dlthis->dfile_hdr.df_no_scns; sec++) {
244 shp = (struct ldr_section_info *)&dlthis->sect_hdrs[sec];
276 struct dload_state *dlthis;
285 dlthis = (struct dload_state *)minfo;
286 if (!dlthis)
294 if (dlthis->strm->set_file_posn(dlthis->strm, pos) != 0) {
295 dload_error(dlthis, seek, pos);
302 if (dlthis->strm->read_buffer(dlthis->strm, &ipacket,
304 dload_error(dlthis, readstrm, "image packet");
308 if (dlthis->reorder_map)
309 dload_reorder(&ipacket, IPH_SIZE, dlthis->reorder_map);
316 dload_error(dlthis, isiz, ipsize);
319 if (dlthis->strm->read_buffer
320 (dlthis->strm, dest, ipsize) != ipsize) {
321 dload_error(dlthis, readstrm, "image packet");
326 if (dlthis->reorder_map)
327 dload_reorder(dest, ipsize, dlthis->reorder_map);
331 if (dlthis->dfile_hdr.df_byte_reshuffle !=
335 TARGET_ORDER(dlthis->
352 dload_error(dlthis, err_reloc, ipsize);
357 dload_error(dlthis, err_checksum, "image packet");
385 struct dload_state *dlthis;
387 dlthis = (struct dload_state *)minfo;
388 if (!dlthis)
391 if (dlthis->str_head)
392 dlthis->mysym->dload_deallocate(dlthis->mysym,
393 dlthis->str_head);
395 if (dlthis->sect_hdrs)
396 dlthis->mysym->dload_deallocate(dlthis->mysym,
397 dlthis->sect_hdrs);
400 if (dlthis->xstrings)
401 dlthis->mysym->dload_deallocate(dlthis->mysym,
402 dlthis->xstrings);
406 dlthis->mysym->dload_deallocate(dlthis->mysym, dlthis);