Lines Matching defs:buffer
217 static int sm_correct_sector(uint8_t *buffer, struct sm_oob *oob)
222 ecc_sw_hamming_calculate(buffer, SM_SMALL_PAGE, ecc, sm_order);
223 if (ecc_sw_hamming_correct(buffer, ecc, oob->ecc1, SM_SMALL_PAGE,
227 buffer += SM_SMALL_PAGE;
229 ecc_sw_hamming_calculate(buffer, SM_SMALL_PAGE, ecc, sm_order);
230 if (ecc_sw_hamming_correct(buffer, ecc, oob->ecc2, SM_SMALL_PAGE,
239 uint8_t *buffer, struct sm_oob *oob)
249 if (buffer)
250 memset(buffer, 0xFF, SM_SECTOR_SIZE);
263 ops.datbuf = buffer;
297 WARN_ON(buffer && ops.retlen != SM_SECTOR_SIZE);
299 if (!buffer)
311 (ftl->smallpagenand && sm_correct_sector(buffer, oob))) {
324 uint8_t *buffer, struct sm_oob *oob)
342 ops.datbuf = buffer;
361 WARN_ON(buffer && ops.retlen != SM_SECTOR_SIZE);
911 static void sm_cache_put(struct sm_ftl *ftl, char *buffer, int boffset)
913 memcpy(ftl->cache_data + boffset, buffer, SM_SECTOR_SIZE);
919 static int sm_cache_get(struct sm_ftl *ftl, char *buffer, int boffset)
925 memcpy(buffer, ftl->cache_data + boffset, SM_SECTOR_SIZE);
1154 /* Allocate temporary CIS buffer for read retry support */