Lines Matching refs:xfer
440 struct xfer_info_t *xfer; in erase_xfer() local
443 xfer = &part->XferInfo[xfernum]; in erase_xfer()
444 DEBUG(1, "ftl_cs: erasing xfer unit at 0x%x\n", xfer->Offset); in erase_xfer()
445 xfer->state = XFER_ERASING; in erase_xfer()
455 erase->addr = xfer->Offset; in erase_xfer()
462 xfer->EraseCount++; in erase_xfer()
479 struct xfer_info_t *xfer; in ftl_erase_callback() local
494 xfer = &part->XferInfo[i]; in ftl_erase_callback()
496 xfer->state = XFER_ERASED; in ftl_erase_callback()
498 xfer->state = XFER_FAILED; in ftl_erase_callback()
510 struct xfer_info_t *xfer; in prepare_xfer() local
516 xfer = &part->XferInfo[i]; in prepare_xfer()
517 xfer->state = XFER_FAILED; in prepare_xfer()
519 DEBUG(1, "ftl_cs: preparing xfer unit at 0x%x\n", xfer->Offset); in prepare_xfer()
524 header.EraseCount = cpu_to_le32(xfer->EraseCount); in prepare_xfer()
526 ret = part->mtd->write(part->mtd, xfer->Offset, sizeof(header), in prepare_xfer()
537 offset = xfer->Offset + le32_to_cpu(part->header.BAMOffset); in prepare_xfer()
548 xfer->state = XFER_PREPARED; in prepare_xfer()
570 struct xfer_info_t *xfer; in copy_erase_unit() local
579 xfer = &part->XferInfo[xferunit]; in copy_erase_unit()
581 eun->Offset, xfer->Offset); in copy_erase_unit()
603 xfer->state = XFER_UNKNOWN; in copy_erase_unit()
604 offset = xfer->Offset + 20; /* Bad! */ in copy_erase_unit()
616 src = eun->Offset; dest = xfer->Offset; in copy_erase_unit()
654 ret = part->mtd->write(part->mtd, xfer->Offset + le32_to_cpu(part->header.BAMOffset), in copy_erase_unit()
664 ret = part->mtd->write(part->mtd, xfer->Offset + 20, sizeof(u_int16_t), in copy_erase_unit()
674 i = xfer->EraseCount; in copy_erase_unit()
675 xfer->EraseCount = eun->EraseCount; in copy_erase_unit()
677 i = xfer->Offset; in copy_erase_unit()
678 xfer->Offset = eun->Offset; in copy_erase_unit()
709 u_int16_t i, eun, xfer; in reclaim_block() local
716 best = 0xffffffff; xfer = 0xffff; in reclaim_block()
741 xfer = i; in reclaim_block()
748 if (xfer == 0xffff) { in reclaim_block()
766 } while (xfer == 0xffff); in reclaim_block()
796 ret = copy_erase_unit(part, eun, xfer); in reclaim_block()
798 erase_xfer(part, xfer); in reclaim_block()