Search/patdown was excessive, IMO. Who knows what the cop's real motives for that were. Maybe in his own mind they were legitimate. No one knows but him.
If it was serious racial profiling, you'd probably have a ticket. I don't want to defend him, though. He may have just thought if one thing was illegal, there were others as well.