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

That the Messenger of Allah (ﷺ) came to Makkah while he was suffering from illness. He performed Tawaf riding his mount, and whenever he came to the Corner, he touched it with a curved staff. When he finished his Tawaf, he made his mount kneel and prayed two rak'ahs.