Lines Matching refs:ftp
34 ssize_t (*transfer)(const struct hmcdrv_ftp_cmdspec *ftp,
39 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp);
108 * @ftp: Pointer to FTP command specification buffer (output)
112 static int hmcdrv_ftp_parse(char *cmd, struct hmcdrv_ftp_cmdspec *ftp)
117 ftp->id = HMCDRV_FTP_NOOP;
118 ftp->fname = NULL;
134 ftp->id = hmcdrv_ftp_cmd_getid(start, cmd - start);
139 ftp->fname = start;
149 if (!ftp->fname || (ftp->id == HMCDRV_FTP_NOOP))
157 * @ftp: pointer to FTP command specification
161 ssize_t hmcdrv_ftp_do(const struct hmcdrv_ftp_cmdspec *ftp)
169 ftp->id, ftp->fname, (long long) ftp->ofs, ftp->len);
170 len = hmcdrv_cache_cmd(ftp, hmcdrv_ftp_funcs->transfer);
189 struct hmcdrv_ftp_cmdspec ftp = {
196 ftp.buf = (void *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
198 if (!ftp.buf)
206 rc = hmcdrv_ftp_do(&ftp);
220 free_page((unsigned long) ftp.buf);
242 struct hmcdrv_ftp_cmdspec ftp = {.len = len, .ofs = offset};
243 ssize_t retlen = hmcdrv_ftp_parse(cmd, &ftp);
248 order = get_order(ftp.len);
249 ftp.buf = (void *) __get_free_pages(GFP_KERNEL | GFP_DMA, order);
251 if (!ftp.buf)
254 switch (ftp.id) {
258 retlen = hmcdrv_ftp_do(&ftp);
261 copy_to_user(buf, ftp.buf, retlen))
267 if (!copy_from_user(ftp.buf, buf, ftp.len))
268 retlen = hmcdrv_ftp_do(&ftp);
274 retlen = hmcdrv_ftp_do(&ftp);
282 free_pages((unsigned long) ftp.buf, order);