Sunan Abi Dawud, Book 40, Hadith 110 (Abu Dawud 4462)

Narrated Salamah ibn al-Muhabbaq:

The Messenger of Allah (ﷺ) made a decision about a man who had intercourse with his wife's slave-girl as follows. If he forced her, she is free, and he shall give her mistress a slave-girl similar to her; if she asked him to have intercourse voluntarily, she will belong to him, and he shall give her mistress a slave-girl similar to her. Abu Dawud said: This tradition has been transmitted by Yunus b. 'Ubaid, 'Amr b. Dinar, Mansur b. Zadhan and Salam from al-Hasan to the same effect. But yunus and Mansur did not mention Qabisah.