BlackBerry reports $670 mn loss, may exit smartphone business