lgue(4): Add missing braces and fix indentation.
authorSascha Wildner <saw@online.de>
Sat, 31 Mar 2012 01:46:53 +0000 (03:46 +0200)
committerSascha Wildner <saw@online.de>
Sat, 31 Mar 2012 01:47:10 +0000 (03:47 +0200)
It was returning too early in some cases.

While here, add an error message.

sys/dev/netif/lgue/if_lgue.c

index ccebe83..0b8780d 100644 (file)
@@ -379,12 +379,14 @@ lgue_intreof(usbd_xfer_handle xfer, usbd_private_handle priv, usbd_status status
        ifp = &sc->lgue_arpcom.ac_if;
        lwkt_serialize_enter(ifp->if_serializer);
        if (status != USBD_NORMAL_COMPLETION) {
-               if (status == USBD_NOT_STARTED || status == USBD_CANCELLED)
+               if (status == USBD_NOT_STARTED || status == USBD_CANCELLED) {
                        lwkt_serialize_exit(ifp->if_serializer);
                        return;
+               }
+               if_printf(ifp, "usb error on intr: %s\n", usbd_errstr(status));
                if (status == USBD_STALLED)
                        usbd_clear_endpoint_stall(sc->lgue_ep[LGUE_ENDPT_INTR]);
-                       lwkt_serialize_exit(ifp->if_serializer);
+               lwkt_serialize_exit(ifp->if_serializer);
                return;
        }
        lgue_intrstart(ifp);