The f-chromatic index of a graph whose f-core has maximum degree 2