Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Remove trailing whitespace.



details:   https://anonhg.NetBSD.org/src/rev/d8de2ab2daa6
branches:  trunk
changeset: 790149:d8de2ab2daa6
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Sep 22 06:52:11 2013 +0000

description:
Remove trailing whitespace.

diffstat:

 sys/dev/ic/sl811hs.c |  379 +++++++++++++++++++++++++-------------------------
 1 files changed, 193 insertions(+), 186 deletions(-)

diffs (truncated from 877 to 300 lines):

diff -r cd7c960c8fc9 -r d8de2ab2daa6 sys/dev/ic/sl811hs.c
--- a/sys/dev/ic/sl811hs.c      Sat Sep 21 22:28:12 2013 +0000
+++ b/sys/dev/ic/sl811hs.c      Sun Sep 22 06:52:11 2013 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: sl811hs.c,v 1.35 2013/09/02 12:27:18 skrll Exp $       */
+/*     $NetBSD: sl811hs.c,v 1.36 2013/09/22 06:52:11 skrll Exp $       */
 
 /*
  * Not (c) 2007 Matthew Orgass
- * This file is public domain, meaning anyone can make any use of part or all 
- * of this file including copying into other works without credit.  Any use, 
- * modified or not, is solely the responsibility of the user.  If this file is 
- * part of a collection then use in the collection is governed by the terms of 
+ * This file is public domain, meaning anyone can make any use of part or all
+ * of this file including copying into other works without credit.  Any use,
+ * modified or not, is solely the responsibility of the user.  If this file is
+ * part of a collection then use in the collection is governed by the terms of
  * the collection.
  */
 
@@ -13,64 +13,64 @@
  * Cypress/ScanLogic SL811HS/T USB Host Controller
  * Datasheet, Errata, and App Note available at www.cypress.com
  *
- * Uses: Ratoc CFU1U PCMCIA USB Host Controller, Nereid X68k USB HC, ISA 
+ * Uses: Ratoc CFU1U PCMCIA USB Host Controller, Nereid X68k USB HC, ISA
  * HCs.  The Ratoc CFU2 uses a different chip.
  *
- * This chip puts the serial in USB.  It implements USB by means of an eight 
- * bit I/O interface.  It can be used for ISA, PCMCIA/CF, parallel port, 
- * serial port, or any eight bit interface.  It has 256 bytes of memory, the 
- * first 16 of which are used for register access.  There are two sets of 
- * registers for sending individual bus transactions.  Because USB is polled, 
- * this organization means that some amount of card access must often be made 
- * when devices are attached, even if when they are not directly being used.  
- * A per-ms frame interrupt is necessary and many devices will poll with a 
+ * This chip puts the serial in USB.  It implements USB by means of an eight
+ * bit I/O interface.  It can be used for ISA, PCMCIA/CF, parallel port,
+ * serial port, or any eight bit interface.  It has 256 bytes of memory, the
+ * first 16 of which are used for register access.  There are two sets of
+ * registers for sending individual bus transactions.  Because USB is polled,
+ * this organization means that some amount of card access must often be made
+ * when devices are attached, even if when they are not directly being used.
+ * A per-ms frame interrupt is necessary and many devices will poll with a
  * per-frame bulk transfer.
  *
- * It is possible to write a little over two bytes to the chip (auto 
- * incremented) per full speed byte time on the USB.  Unfortunately, 
- * auto-increment does not work reliably so write and bus speed is 
+ * It is possible to write a little over two bytes to the chip (auto
+ * incremented) per full speed byte time on the USB.  Unfortunately,
+ * auto-increment does not work reliably so write and bus speed is
  * approximately the same for full speed devices.
  *
- * In addition to the 240 byte packet size limit for isochronous transfers, 
- * this chip has no means of determining the current frame number other than 
- * getting all 1ms SOF interrupts, which is not always possible even on a fast 
- * system.  Isochronous transfers guarantee that transfers will never be 
- * retried in a later frame, so this can cause problems with devices beyond 
- * the difficulty in actually performing the transfer most frames.  I tried 
- * implementing isoc transfers and was able to play CD-derrived audio via an 
+ * In addition to the 240 byte packet size limit for isochronous transfers,
+ * this chip has no means of determining the current frame number other than
+ * getting all 1ms SOF interrupts, which is not always possible even on a fast
+ * system.  Isochronous transfers guarantee that transfers will never be
+ * retried in a later frame, so this can cause problems with devices beyond
+ * the difficulty in actually performing the transfer most frames.  I tried
+ * implementing isoc transfers and was able to play CD-derrived audio via an
  * iMic on a 2GHz PC, however it would still be interrupted at times and
- * once interrupted, would stay out of sync.  All isoc support has been 
+ * once interrupted, would stay out of sync.  All isoc support has been
  * removed.
  *
- * BUGS: all chip revisions have problems with low speed devices through hubs.  
- * The chip stops generating SOF with hubs that send SE0 during SOF.  See 
- * comment in dointr().  All performance enhancing features of this chip seem 
+ * BUGS: all chip revisions have problems with low speed devices through hubs.
+ * The chip stops generating SOF with hubs that send SE0 during SOF.  See
+ * comment in dointr().  All performance enhancing features of this chip seem
  * not to work properly, most confirmed buggy in errata doc.
  *
  */
 
 /*
- * The hard interrupt is the main entry point.  Start, callbacks, and repeat 
+ * The hard interrupt is the main entry point.  Start, callbacks, and repeat
  * are the only others called frequently.
  *
- * Since this driver attaches to pcmcia, card removal at any point should be 
+ * Since this driver attaches to pcmcia, card removal at any point should be
  * expected and not cause panics or infinite loops.
  *
- * This driver does fine grained locking for its own data structures, however 
- * the general USB code does not yet have locks, some of which would need to 
- * be used in this driver.  This is mostly for debug use on single processor 
+ * This driver does fine grained locking for its own data structures, however
+ * the general USB code does not yet have locks, some of which would need to
+ * be used in this driver.  This is mostly for debug use on single processor
  * systems.
  *
- * The theory of the wait lock is that start is the only function that would 
- * be frequently called from arbitrary processors, so it should not need to 
- * wait for the rest to be completed.  However, once entering the lock as much 
+ * The theory of the wait lock is that start is the only function that would
+ * be frequently called from arbitrary processors, so it should not need to
+ * wait for the rest to be completed.  However, once entering the lock as much
  * device access as possible is done, so any other CPU that tries to service
- * an interrupt would be blocked.  Ideally, the hard and soft interrupt could 
- * be assigned to the same CPU and start would normally just put work on the 
+ * an interrupt would be blocked.  Ideally, the hard and soft interrupt could
+ * be assigned to the same CPU and start would normally just put work on the
  * wait queue and generate a soft interrupt.
- * 
- * Any use of the main lock must check the wait lock before returning.  The 
- * aquisition order is main lock then wait lock, but the wait lock must be 
+ *
+ * Any use of the main lock must check the wait lock before returning.  The
+ * aquisition order is main lock then wait lock, but the wait lock must be
  * released last when clearing the wait queue.
  */
 
@@ -85,7 +85,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.35 2013/09/02 12:27:18 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.36 2013/09/22 06:52:11 skrll Exp $");
 
 #include "opt_slhci.h"
 
@@ -158,7 +158,7 @@
 #define A 0
 #define B 1
 
-static const uint8_t slhci_tregs[2][4] = 
+static const uint8_t slhci_tregs[2][4] =
 {{SL11_E0ADDR, SL11_E0LEN, SL11_E0PID, SL11_E0DEV },
  {SL11_E1ADDR, SL11_E1LEN, SL11_E1PID, SL11_E1DEV }};
 
@@ -176,7 +176,7 @@
 static const char *
 pnames(int ptype)
 {
-       static const char * const names[] = { "ROOT Ctrl", "ROOT Intr", 
+       static const char * const names[] = { "ROOT Ctrl", "ROOT Intr",
            "Control (setup)", "Control (data)", "Control (status)",
            "Interrupt", "Bulk", "BAD PTYPE" };
 
@@ -257,7 +257,7 @@
 /*
  * Set SLHCI_WAIT_SIZE to the desired maximum size of single FS transfer
  * to poll for after starting a transfer.  64 gets all full speed transfers.
- * Note that even if 0 polling will occur if data equal or greater than the 
+ * Note that even if 0 polling will occur if data equal or greater than the
  * transfer size is copied to the chip while the transfer is in progress.
  * Setting SLHCI_WAIT_TIME to -12000 will disable polling.
  */
@@ -425,16 +425,16 @@
 
        if (times->wraparound)
                for (i = times->current + 1; i < SLHCI_N_TIMES; i++)
-                       printf("start " CC_TYPE_FMT " stop " CC_TYPE_FMT 
-                           " difference %8i miscdata %#x\n", 
-                           times->times[i].start, times->times[i].stop, 
-                           (int)(times->times[i].stop - 
+                       printf("start " CC_TYPE_FMT " stop " CC_TYPE_FMT
+                           " difference %8i miscdata %#x\n",
+                           times->times[i].start, times->times[i].stop,
+                           (int)(times->times[i].stop -
                            times->times[i].start), times->times[i].miscdata);
 
        for (i = 0; i < times->current; i++)
-               printf("start " CC_TYPE_FMT " stop " CC_TYPE_FMT 
-                   " difference %8i miscdata %#x\n", times->times[i].start, 
-                   times->times[i].stop, (int)(times->times[i].stop - 
+               printf("start " CC_TYPE_FMT " stop " CC_TYPE_FMT
+                   " difference %8i miscdata %#x\n", times->times[i].start,
+                   times->times[i].stop, (int)(times->times[i].stop -
                    times->times[i].start), times->times[i].miscdata);
 }
 #else
@@ -442,7 +442,7 @@
 #define stop_cc_time(x)
 #endif /* SLHCI_PROFILE_TRANSFER */
 
-typedef usbd_status (*LockCallFunc)(struct slhci_softc *, struct slhci_pipe 
+typedef usbd_status (*LockCallFunc)(struct slhci_softc *, struct slhci_pipe
     *, struct usbd_xfer *);
 
 usbd_status slhci_allocm(struct usbd_bus *, usb_dma_t *, u_int32_t);
@@ -474,7 +474,7 @@
 #endif
 
 void slhci_reset_entry(void *);
-usbd_status slhci_lock_call(struct slhci_softc *, LockCallFunc, 
+usbd_status slhci_lock_call(struct slhci_softc *, LockCallFunc,
     struct slhci_pipe *, struct usbd_xfer *);
 void slhci_start_entry(struct slhci_softc *, struct slhci_pipe *);
 void slhci_callback_entry(void *arg);
@@ -512,34 +512,34 @@
 void slhci_pollxfer(struct slhci_softc *, struct usbd_xfer *, int *); /* XXX */
 #endif
 
-static usbd_status slhci_do_poll(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_do_poll(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_lsvh_warn(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_lsvh_warn(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_isoc_warn(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_isoc_warn(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_open_pipe(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_open_pipe(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_close_pipe(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_close_pipe(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_do_abort(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_do_abort(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_do_attach(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_do_attach(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
-static usbd_status slhci_halt(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_halt(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
 
 static void slhci_intrchange(struct slhci_softc *, uint8_t);
 static void slhci_drain(struct slhci_softc *);
 static void slhci_reset(struct slhci_softc *);
-static int slhci_reserve_bustime(struct slhci_softc *, struct slhci_pipe *, 
+static int slhci_reserve_bustime(struct slhci_softc *, struct slhci_pipe *,
     int);
 static void slhci_insert(struct slhci_softc *);
 
 static usbd_status slhci_clear_feature(struct slhci_softc *, unsigned int);
 static usbd_status slhci_set_feature(struct slhci_softc *, unsigned int);
 static void slhci_get_status(struct slhci_softc *, usb_port_status_t *);
-static usbd_status slhci_root(struct slhci_softc *, struct slhci_pipe *, 
+static usbd_status slhci_root(struct slhci_softc *, struct slhci_pipe *,
     struct usbd_xfer *);
 
 #ifdef SLHCI_DEBUG
@@ -716,6 +716,7 @@
        .allocx = slhci_allocx,
        .freex = slhci_freex,
        .get_lock = NULL,
+       NULL, /* new_device */
 };
 
 const struct usbd_pipe_methods slhci_pipe_methods = {
@@ -869,9 +870,9 @@
 #ifdef DIAGNOSTIC
        if (xfer->busy_free != XFER_BUSY) {
                struct slhci_softc *sc = bus->hci_private;
-               printf("%s: slhci_freex: xfer=%p not busy, %#08x halted\n", 
+               printf("%s: slhci_freex: xfer=%p not busy, %#08x halted\n",
                    SC_NAME(sc), xfer, xfer->busy_free);
-               DDOLOG("%s: slhci_freex: xfer=%p not busy, %#08x halted\n", 
+               DDOLOG("%s: slhci_freex: xfer=%p not busy, %#08x halted\n",
                    SC_NAME(sc), xfer, xfer->busy_free, 0);
                slhci_lock_call(sc, &slhci_halt, NULL, NULL);
                return;
@@ -888,14 +889,14 @@
        usbd_status error;
        int s;
 
-       DLOG(D_TRACE, "%s transfer xfer %p spipe %p ", 
+       DLOG(D_TRACE, "%s transfer xfer %p spipe %p ",
            pnames(SLHCI_XFER_TYPE(xfer)), xfer, xfer->pipe,0);
 
        /* Insert last in queue */
        error = usb_insert_transfer(xfer);
        if (error) {
                if (error != USBD_IN_PROGRESS)
-                       DLOG(D_ERR, "usb_insert_transfer returns %d!", error, 
+                       DLOG(D_ERR, "usb_insert_transfer returns %d!", error,
                            0,0,0);
                return error;
        }
@@ -935,7 +936,7 @@
 
        max_packet = UGETW(ed->wMaxPacketSize);
 
-       DLOG(D_TRACE, "%s start xfer %p spipe %p length %d", 
+       DLOG(D_TRACE, "%s start xfer %p spipe %p length %d",
            pnames(spipe->ptype), xfer, spipe, xfer->length);
 
        /* root transfers use slhci_root_start */
@@ -951,8 +952,8 @@
        spipe->frame = t->frame;
        spipe->control = SL11_EPCTRL_ARM_ENABLE;
        spipe->tregs[DEV] = pipe->device->address;
-       spipe->tregs[PID] = spipe->newpid = UE_GET_ADDR(ed->bEndpointAddress) 
-           | (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN ? SL11_PID_IN : 
+       spipe->tregs[PID] = spipe->newpid = UE_GET_ADDR(ed->bEndpointAddress)
+           | (UE_GET_DIR(ed->bEndpointAddress) == UE_DIR_IN ? SL11_PID_IN :
            SL11_PID_OUT);
        spipe->newlen[0] = xfer->length % max_packet;



Home | Main Index | Thread Index | Old Index