cxgb4: Refactor t4_port_init function