Sunan Abi Dawud, Hadith 1876

Ibn ‘Abbas said When the Apostle of Allaah came to Makkah he was ill. So, he performed the circumambulation on his Camel. He touched the corner (Black Stone) with a crooked stick as often as he came to it. When he finished the circumambulation, he made his Camel kneel down and offered two rak’ahs of prayer.

حَدَّثَنَا مُسَدَّدٌ، حَدَّثَنَا خَالِدُ بْنُ عَبْدِ اللَّهِ، حَدَّثَنَا يَزِيدُ بْنُ أَبِي زِيَادٍ، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَدِمَ مَكَّةَ وَهُوَ يَشْتَكِي فَطَافَ عَلَى رَاحِلَتِهِ كُلَّمَا أَتَى عَلَى الرُّكْنِ اسْتَلَمَ الرُّكْنَ بِمِحْجَنٍ فَلَمَّا فَرَغَ مِنْ طَوَافِهِ أَنَاخَ فَصَلَّى رَكْعَتَيْنِ ‏.‏

sunnah.com

also referenced under: Hadith 1881 (DarusSalam)