From 06f61749667e59952c29b26ded50bab3e95e9d4e Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 8 Feb 2011 23:16:09 -0300 Subject: [PATCH] fw2/usb/patches/correct-array-size.patch: correct memset in ctrl_get_status This caused lsusb -v to fail with cannot read device status, Broken pipe (32) --- atusb/fw2/usb/patches/correct-array-size.patch | 13 +++++++++++++ atusb/fw2/usb/patches/series | 1 + 2 files changed, 14 insertions(+) create mode 100644 atusb/fw2/usb/patches/correct-array-size.patch diff --git a/atusb/fw2/usb/patches/correct-array-size.patch b/atusb/fw2/usb/patches/correct-array-size.patch new file mode 100644 index 0000000..c2f99c4 --- /dev/null +++ b/atusb/fw2/usb/patches/correct-array-size.patch @@ -0,0 +1,13 @@ +Index: usb/usb/ctrl.c +=================================================================== +--- usb.orig/usb/ctrl.c 2011-02-08 23:13:09.000000000 -0300 ++++ usb/usb/ctrl.c 2011-02-08 23:13:18.000000000 -0300 +@@ -136,7 +136,7 @@ + U8 status[2]; + usb_pcb_t *pcb = usb_pcb_get(); + +- memset(status, 0, 2 * sizeof(status)); ++ memset(status, 0, sizeof(status)); + switch (req->type) + { + case GET_DEVICE_STATUS: diff --git a/atusb/fw2/usb/patches/series b/atusb/fw2/usb/patches/series index 0ddbc6e..46b5888 100644 --- a/atusb/fw2/usb/patches/series +++ b/atusb/fw2/usb/patches/series @@ -1,3 +1,4 @@ cleanup.patch no-cdc.patch no-vbus-detect.patch +correct-array-size.patch