Deposition and entrainment in pipe flow of a suspension