Searched refs:curlun (Results 1 – 5 of 5) sorted by relevance
/openbmc/linux/drivers/usb/gadget/function/ |
H A D | storage_common.c | 169 void fsg_lun_close(struct fsg_lun *curlun) in fsg_lun_close() argument 171 if (curlun->filp) { in fsg_lun_close() 172 LDBG(curlun, "close backing file\n"); in fsg_lun_close() 173 fput(curlun->filp); in fsg_lun_close() 174 curlun->filp = NULL; in fsg_lun_close() 179 int fsg_lun_open(struct fsg_lun *curlun, const char *filename) in fsg_lun_open() argument 192 ro = curlun->initially_ro; in fsg_lun_open() 201 LINFO(curlun, "unable to open backing file: %s\n", filename); in fsg_lun_open() 210 LINFO(curlun, "invalid file type: %s\n", filename); in fsg_lun_open() 219 LINFO(curlun, "file not readable: %s\n", filename); in fsg_lun_open() [all …]
|
H A D | f_mass_storage.c | 261 struct fsg_lun *curlun; member 608 struct fsg_lun *curlun = common->curlun; in do_read() local 635 curlun->sense_data = SS_INVALID_FIELD_IN_CDB; in do_read() 639 if (lba >= curlun->num_sectors) { in do_read() 640 curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE; in do_read() 643 file_offset = ((loff_t) lba) << curlun->blkbits; in do_read() 659 curlun->file_length - file_offset); in do_read() 672 curlun->sense_data = in do_read() 674 curlun->sense_data_info = in do_read() 675 file_offset >> curlun->blkbits; in do_read() [all …]
|
H A 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 …]
|
/openbmc/u-boot/drivers/usb/gadget/ |
H A D | f_mass_storage.c | 685 struct fsg_lun *curlun = &common->luns[common->lun]; in do_read() local 706 curlun->sense_data = SS_INVALID_FIELD_IN_CDB; in do_read() 710 if (lba >= curlun->num_sectors) { in do_read() 711 curlun->sense_data = SS_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE; in do_read() 748 curlun->sense_data = in do_read() 750 curlun->info_valid = 1; in do_read() 766 VLDBG(curlun, "file read %u @ %llu -> %d\n", amount, in do_read() 771 LDBG(curlun, "error in file read: %d\n", in do_read() 775 LDBG(curlun, "partial file read: %d/%u\n", in do_read() 787 curlun->sense_data = SS_UNRECOVERED_READ_ERROR; in do_read() [all …]
|
H A D | storage_common.c | 295 #define fsg_lun_is_open(curlun) ((curlun)->filp != NULL) argument 566 static int fsg_lun_open(struct fsg_lun *curlun, unsigned int num_sectors, in fsg_lun_open() argument 572 ro = curlun->initially_ro; in fsg_lun_open() 574 curlun->ro = ro; in fsg_lun_open() 575 curlun->file_length = num_sectors << 9; in fsg_lun_open() 576 curlun->num_sectors = num_sectors; in fsg_lun_open() 582 static void fsg_lun_close(struct fsg_lun *curlun) in fsg_lun_close() argument 592 static int fsg_lun_fsync_sub(struct fsg_lun *curlun) in fsg_lun_fsync_sub() argument
|