mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 22:33:36 +08:00
usb/msd: move usb_msd_packet_complete()
Change ordering to avoid adding forward declarations in following patches. Fix comment code style while being at it. No functional change. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-Id: <20220830063827.813053-2-kraxel@redhat.com>
This commit is contained in:
parent
d8c2e6f2f6
commit
cea5aa8569
@ -177,6 +177,20 @@ static const USBDesc desc = {
|
||||
.str = desc_strings,
|
||||
};
|
||||
|
||||
static void usb_msd_packet_complete(MSDState *s)
|
||||
{
|
||||
USBPacket *p = s->packet;
|
||||
|
||||
/*
|
||||
* Set s->packet to NULL before calling usb_packet_complete
|
||||
* because another request may be issued before
|
||||
* usb_packet_complete returns.
|
||||
*/
|
||||
trace_usb_msd_packet_complete();
|
||||
s->packet = NULL;
|
||||
usb_packet_complete(&s->dev, p);
|
||||
}
|
||||
|
||||
static void usb_msd_copy_data(MSDState *s, USBPacket *p)
|
||||
{
|
||||
uint32_t len;
|
||||
@ -208,18 +222,6 @@ static void usb_msd_send_status(MSDState *s, USBPacket *p)
|
||||
memset(&s->csw, 0, sizeof(s->csw));
|
||||
}
|
||||
|
||||
static void usb_msd_packet_complete(MSDState *s)
|
||||
{
|
||||
USBPacket *p = s->packet;
|
||||
|
||||
/* Set s->packet to NULL before calling usb_packet_complete
|
||||
because another request may be issued before
|
||||
usb_packet_complete returns. */
|
||||
trace_usb_msd_packet_complete();
|
||||
s->packet = NULL;
|
||||
usb_packet_complete(&s->dev, p);
|
||||
}
|
||||
|
||||
void usb_msd_transfer_data(SCSIRequest *req, uint32_t len)
|
||||
{
|
||||
MSDState *s = DO_UPCAST(MSDState, dev.qdev, req->bus->qbus.parent);
|
||||
|
Loading…
Reference in New Issue
Block a user