Lines Matching refs:nsectors
2653 unsigned int nsectors, struct scsicmd_read16_s *cdb) in usbhost_readcdb16() argument
2660 usbhost_putbe32(rd16->xfrlen, nsectors); in usbhost_readcdb16()
2665 unsigned int nsectors, struct scsicmd_read10_s *cdb) in usbhost_readcdb10() argument
2672 usbhost_putbe16(rd10->xfrlen, nsectors); in usbhost_readcdb10()
2677 unsigned int nsectors, struct scsicmd_write16_s *cdb) in usbhost_writecbw16() argument
2683 usbhost_putbe32(wr16->xfrlen, nsectors); in usbhost_writecbw16()
2688 unsigned int nsectors, struct scsicmd_write10_s *cdb) in usbhost_writecbw10() argument
2694 usbhost_putbe16(wr10->xfrlen, nsectors); in usbhost_writecbw10()
2795 unsigned int nsectors, unsigned char *buf) in umass_read10() argument
2807 if ((sc->info.sectornum < (startsector + nsectors)) || (sc->info.sectorsize < blocksize)) in umass_read10()
2812 data_buf = (uint8_t *)memalign(USB_CACHE_ALIGN_SIZE, SKB_DATA_ALIGN(nsectors * blocksize)); in umass_read10()
2821 usbhost_readcdb10(startsector, blocksize, nsectors, &cdb); in umass_read10()
2823 ret = umass_command_start(sc, DIR_IN, (void *)data_buf, blocksize * nsectors, 0, in umass_read10()
2832 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors - sc->data_ccb->csio.resid)) { in umass_read10()
2833 …ret = memcpy_s(buf, nsectors * blocksize, data_buf, blocksize * nsectors - sc->data_ccb->csio.resi… in umass_read10()
2835 ret = ((nsectors * blocksize >= blocksize * nsectors - sc->data_ccb->csio.resid) ? in umass_read10()
2836 …LOS_ArchCopyToUser(buf, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid) : ERANGE_AND_RE… in umass_read10()
2854 unsigned int nsectors, unsigned char *buf) in umass_read16() argument
2867 if ((sc->info.sectornum < (startsector + nsectors)) || (sc->info.sectorsize < blocksize)) in umass_read16()
2871 data_buf = (uint8_t *)memalign(USB_CACHE_ALIGN_SIZE, SKB_DATA_ALIGN(nsectors * blocksize)); in umass_read16()
2880 usbhost_readcdb16(startsector, blocksize, nsectors, &cdb); in umass_read16()
2882 res = umass_command_start(sc, DIR_IN, (void *)data_buf, blocksize * nsectors, 0, in umass_read16()
2891 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors - sc->data_ccb->csio.resid)) { in umass_read16()
2892 …ret = memcpy_s(buf, nsectors * blocksize, data_buf, blocksize * nsectors - sc->data_ccb->csio.resi… in umass_read16()
2894 ret = ((nsectors * blocksize >= blocksize * nsectors - sc->data_ccb->csio.resid) ? in umass_read16()
2895 …LOS_ArchCopyToUser(buf, data_buf, blocksize * nsectors - sc->data_ccb->csio.resid) : ERANGE_AND_RE… in umass_read16()
2913 unsigned int nsectors, const unsigned char *buf) in umass_write10() argument
2925 if ((sc->info.sectornum < (startsector + nsectors)) || (sc->info.sectorsize < blocksize)) in umass_write10()
2929 data_buf = (uint8_t *)memalign(USB_CACHE_ALIGN_SIZE, SKB_DATA_ALIGN(nsectors * blocksize)); in umass_write10()
2935 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors)) { in umass_write10()
2936 (void)memcpy_s(data_buf, blocksize * nsectors, buf, blocksize * nsectors); in umass_write10()
2938 ret = LOS_ArchCopyFromUser(data_buf, buf, blocksize * nsectors); in umass_write10()
2949 usbhost_writecbw10(startsector, blocksize, nsectors, &cdb); in umass_write10()
2951 ret = umass_command_start(sc, DIR_OUT, (void *)data_buf, blocksize * nsectors, 1000, in umass_write10()
2968 unsigned int nsectors, const unsigned char *buf) in umass_write16() argument
2981 if ((sc->info.sectornum < (startsector + nsectors)) || (sc->info.sectorsize < blocksize)) { in umass_write16()
2987 data_buf = (uint8_t *)memalign(USB_CACHE_ALIGN_SIZE, SKB_DATA_ALIGN(nsectors * blocksize)); in umass_write16()
2993 if (!LOS_IsUserAddressRange((vaddr_t)buf, blocksize * nsectors)) { in umass_write16()
2994 (void)memcpy_s(data_buf, blocksize * nsectors, buf, blocksize * nsectors); in umass_write16()
2996 ret = LOS_ArchCopyFromUser(data_buf, buf, blocksize * nsectors); in umass_write16()
3007 usbhost_writecbw16(startsector, blocksize, nsectors, &cdb); in umass_write16()
3009 res = umass_command_start(sc, DIR_OUT, (void *)data_buf, blocksize * nsectors, 1000, in umass_write16()
3181 uint64_t start_sector, unsigned int nsectors) in umass_read() argument
3188 status = umass_read16(sc, start_sector, (uint16_t)sc->info.sectorsize, nsectors, buffer); in umass_read()
3190 status = umass_read10(sc, (size_t)start_sector, (uint16_t)sc->info.sectorsize, nsectors, buffer); in umass_read()
3197 return ((ssize_t)nsectors); in umass_read()
3202 uint64_t start_sector, unsigned int nsectors) in umass_write() argument
3209 status = umass_write16(sc, start_sector, (uint16_t)sc->info.sectorsize, nsectors, buffer); in umass_write()
3211 status = umass_write10(sc, (size_t)start_sector, (uint16_t)sc->info.sectorsize, nsectors, buffer); in umass_write()
3218 return ((ssize_t)nsectors); in umass_write()