usb: rework usb_maxpacket() using usb_pipe_endpoint()