Former winners Bayer Leverkusen dumped out Bundesliga rivals Hamburg SV in a thrilling second-leg tie, which they lost 3-2 but went through on away goals.