Message ID | 20201105134112.25119-1-kraxel@redhat.com |
---|---|
Headers | show |
Series | usb: fix some guest-triggerable asserts | expand |
On 11/5/20 2:41 PM, Gerd Hoffmann wrote: > Replace most DPRINTF macros with trace events. > Drop some DPRINTF macros. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > hw/usb/dev-storage.c | 42 +++++++++++++++++------------------------- > hw/usb/trace-events | 12 ++++++++++++ > 2 files changed, 29 insertions(+), 25 deletions(-) ... > diff --git a/hw/usb/trace-events b/hw/usb/trace-events > index a3292d46248f..38e05fc7f4db 100644 > --- a/hw/usb/trace-events > +++ b/hw/usb/trace-events > @@ -252,6 +252,18 @@ usb_hub_attach(int addr, int nr) "dev %d, port %d" > usb_hub_detach(int addr, int nr) "dev %d, port %d" > usb_hub_status_report(int addr, int status) "dev %d, status 0x%x" > > +# dev-storage.c > +usb_msd_reset(void) "" > +usb_msd_maxlun(unsigned maxlun) "%d" > +usb_msd_send_status(unsigned status, unsigned tag, size_t size) "status %d, tag 0x%x, len %zd" > +usb_msd_data_in(unsigned packet, unsigned remaining, unsigned total) "%d/%d (scsi %d)" > +usb_msd_data_out(unsigned packet, unsigned remaining) "%d/%d" > +usb_msd_packet_async(void) "" > +usb_msd_packet_complete(void) "" > +usb_msd_cmd_submit(unsigned lun, unsigned tag, unsigned flags, unsigned len, unsigned data_len) "lun %u, tag 0x%x, flags 0x%08x, len %d, data-len %d" > +usb_msd_cmd_complete(unsigned status, unsigned tag) "status %d, tag 0x%x" Using '%u' format for unsigned type: Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
On 11/5/20 2:41 PM, Gerd Hoffmann wrote: > Add property so scsi command logging can be switched > at runtime instead of compile time. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> > --- > hw/usb/dev-storage.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>