The blacking out issue was caused by Marlboro for me! A really strong cigarette and, quite soon after I changed to them the cough/blackout issues began. I discussed with GP and he said that, the cough caused a blood vessel to the brain to become trapped stopping the blood supply. This caused the brain to temporarily "shutdown" so the coughing stopped and released the blood vessel. The flow began again and I'd come round within seconds.
He shrugged his shoulders and said "Until you stop smoking, or at least change brands, then this is likely to continue!" - at the time I thought he was quite uncaring; with hindsight I was just a numpty!
So, hopefully this helps explain the blackouts, as to the cause (unless it's Marlboro) I'm afraid I can't help.