I used to get bronchitis a lot as a kid, and I'm a reformed asthmatic (I quit ) here's a tip for a lingering cough that simply won't go away:

Asthma preventer inhalers are absolute gold. I find that (if your doc will give you one) a puff of that twice a day for a few days completely knocks a lingering cough dead. Just like magic.

I used to get sick soooo often when I was underweight and I always ended up with a cough. Have still been sick since I gained weight but just ordinary colds and flus, nothing lingering or awful.