Searched refs:curlun (Results 1 – 3 of 3) sorted by relevance
/Linux-v6.1/drivers/usb/gadget/function/ |
D | storage_common.c | 168 void fsg_lun_close(struct fsg_lun *curlun) in fsg_lun_close() argument 170 if (curlun->filp) { in fsg_lun_close() 171 LDBG(curlun, "close backing file\n"); in fsg_lun_close() 172 fput(curlun->filp); in fsg_lun_close() 173 curlun->filp = NULL; in fsg_lun_close() 178 int fsg_lun_open(struct fsg_lun *curlun, const char *filename) in fsg_lun_open() argument 191 ro = curlun->initially_ro; in fsg_lun_open() 200 LINFO(curlun, "unable to open backing file: %s\n", filename); in fsg_lun_open() 209 LINFO(curlun, "invalid file type: %s\n", filename); in fsg_lun_open() 218 LINFO(curlun, "file not readable: %s\n", filename); in fsg_lun_open() [all …]
|
D | f_mass_storage.c | 260 struct fsg_lun *curlun; member 591 struct fsg_lun *curlun = common->curlun; in do_read() local 618 curlun->sense_data = SS_INVALID_FIELD_IN_CDB; in do_read() 622 if (lba >= curlun->num_sectors) { in do_read() 623 curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE; in do_read() 626 file_offset = ((loff_t) lba) << curlun->blkbits; in do_read() 642 curlun->file_length - file_offset); in do_read() 655 curlun->sense_data = in do_read() 657 curlun->sense_data_info = in do_read() 658 file_offset >> curlun->blkbits; in do_read() [all …]
|
D | storage_common.h | 125 static inline bool fsg_lun_is_open(struct fsg_lun *curlun) in fsg_lun_is_open() argument 127 return curlun->filp != NULL; in fsg_lun_is_open() 200 void fsg_lun_close(struct fsg_lun *curlun); 201 int fsg_lun_open(struct fsg_lun *curlun, const char *filename); 202 int fsg_lun_fsync_sub(struct fsg_lun *curlun); 204 ssize_t fsg_show_ro(struct fsg_lun *curlun, char *buf); 205 ssize_t fsg_show_nofua(struct fsg_lun *curlun, char *buf); 206 ssize_t fsg_show_file(struct fsg_lun *curlun, struct rw_semaphore *filesem, 208 ssize_t fsg_show_inquiry_string(struct fsg_lun *curlun, char *buf); 209 ssize_t fsg_show_cdrom(struct fsg_lun *curlun, char *buf); [all …]
|