usb: port usb_storage control request handling to new API

Change-Id: I1a19e09fdc0f05473d53c39bab0761d5cb8f6ff0
This commit is contained in:
Aidan MacDonald 2021-09-20 02:11:07 +01:00
parent 1b2cc053d3
commit 988f244c74

View file

@ -687,8 +687,7 @@ bool usb_storage_control_request(struct usb_ctrlrequest* req, void* reqdata, uns
if(skip_first) (*tb.max_lun) --; if(skip_first) (*tb.max_lun) --;
#endif #endif
logf("ums: getmaxlun"); logf("ums: getmaxlun");
usb_drv_recv_nonblocking(EP_CONTROL, NULL, 0); /* ack */ usb_drv_control_response(USB_CONTROL_ACK, tb.max_lun, 1);
usb_drv_send(EP_CONTROL, tb.max_lun, 1);
handled = true; handled = true;
break; break;
} }
@ -703,7 +702,7 @@ bool usb_storage_control_request(struct usb_ctrlrequest* req, void* reqdata, uns
usb_drv_reset_endpoint(ep_in, false); usb_drv_reset_endpoint(ep_in, false);
usb_drv_reset_endpoint(ep_out, true); usb_drv_reset_endpoint(ep_out, true);
#endif #endif
usb_drv_send(EP_CONTROL, NULL, 0); /* ack */ usb_drv_control_response(USB_CONTROL_ACK, NULL, 0);
handled = true; handled = true;
break; break;
} }