A NYT article that discussed the Obama administration's plans to prohibit proprietary trading by large commercial banks told readers that: "big losses in the trading of those securities precipitated the credit crisis in 2008 and the federal bailout." This is not accurate.
Banks suffered big losses on their holdings of both mortgages and mortgage-backed securities. In most cases, they had bought mortgages to package into securities or had actually packaged them into securities that they were unable to sell off when the housing market collapsed. The losses they incurred from trading were in almost cases secondary.
There are three types of activities that need to be distinguished. There is the traditional commercial banking activity of taking deposits and making business and consumer loans. There is investment banking, which involves creating and underwriting securities, including mortgage-backed securities. And, there is trading for a bank's own account, an activity that generally had not been done by banks (investment or commercial) until the last two decades. The collapse of the housing bubble lead to large losses in all three.