[BACK]Return to sl811hs.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / dev / ic

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/dev/ic/sl811hs.c between version 1.47.6.13 and 1.47.6.14

version 1.47.6.13, 2015/10/11 09:17:51 version 1.47.6.14, 2015/10/20 15:31:21
Line 292  struct slhci_pipe {
Line 292  struct slhci_pipe {
         uint8_t         ptype;          /* Pipe type */          uint8_t         ptype;          /* Pipe type */
 };  };
   
   #define SLHCI_BUS2SC(bus)       ((bus)->ub_hcpriv)
   #define SLHCI_PIPE2SC(pipe)     SLHCI_BUS2SC((pipe)->up_dev->ud_bus)
   #define SLHCI_XFER2SC(xfer)     SLHCI_PIPE2SC((xfer)->ux_pipe)
   
   #define SLHCI_PIPE2SPIPE(pipe)  ((struct slhci_pipe *)(pipe))
   
 #ifdef SLHCI_PROFILE_TRANSFER  #ifdef SLHCI_PROFILE_TRANSFER
 #if defined(__mips__)  #if defined(__mips__)
 /*  /*
Line 786  slhci_freex(struct usbd_bus *bus, struct
Line 792  slhci_freex(struct usbd_bus *bus, struct
 #endif  #endif
 #ifdef DIAGNOSTIC  #ifdef DIAGNOSTIC
         if (xfer->ux_state != XFER_BUSY) {          if (xfer->ux_state != XFER_BUSY) {
                 struct slhci_softc *sc = bus->ub_hcpriv;                  struct slhci_softc *sc = SLHCI_BUS2SC(bus);
                 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->ux_state);                      SC_NAME(sc), xfer, xfer->ux_state);
                 DDOLOG("%s: slhci_freex: xfer=%p not busy, %#08x halted\n",                  DDOLOG("%s: slhci_freex: xfer=%p not busy, %#08x halted\n",
Line 803  slhci_freex(struct usbd_bus *bus, struct
Line 809  slhci_freex(struct usbd_bus *bus, struct
 static void  static void
 slhci_get_lock(struct usbd_bus *bus, kmutex_t **lock)  slhci_get_lock(struct usbd_bus *bus, kmutex_t **lock)
 {  {
         struct slhci_softc *sc = bus->ub_hcpriv;          struct slhci_softc *sc = SLHCI_BUS2SC(bus);
   
         *lock = &sc->sc_lock;          *lock = &sc->sc_lock;
 }  }
Line 811  slhci_get_lock(struct usbd_bus *bus, kmu
Line 817  slhci_get_lock(struct usbd_bus *bus, kmu
 usbd_status  usbd_status
 slhci_transfer(struct usbd_xfer *xfer)  slhci_transfer(struct usbd_xfer *xfer)
 {  {
         struct slhci_softc *sc = xfer->ux_pipe->up_dev->ud_bus->ub_hcpriv;          struct slhci_softc *sc = SLHCI_XFER2SC(xfer);
         usbd_status error;          usbd_status error;
   
         DLOG(D_TRACE, "%s transfer xfer %p spipe %p ",          DLOG(D_TRACE, "%s transfer xfer %p spipe %p ",
Line 845  slhci_transfer(struct usbd_xfer *xfer)
Line 851  slhci_transfer(struct usbd_xfer *xfer)
 usbd_status  usbd_status
 slhci_start(struct usbd_xfer *xfer)  slhci_start(struct usbd_xfer *xfer)
 {  {
         struct slhci_softc *sc = xfer->ux_pipe->up_dev->ud_bus->ub_hcpriv;          struct slhci_softc *sc = SLHCI_XFER2SC(xfer);
         struct usbd_pipe *pipe = xfer->ux_pipe;          struct usbd_pipe *pipe = xfer->ux_pipe;
         struct slhci_pipe *spipe = (struct slhci_pipe *)pipe;          struct slhci_pipe *spipe = SLHCI_PIPE2SPIPE(pipe);
         struct slhci_transfers *t = &sc->sc_transfers;          struct slhci_transfers *t = &sc->sc_transfers;
         usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;          usb_endpoint_descriptor_t *ed = pipe->up_endpoint->ue_edesc;
         unsigned int max_packet;          unsigned int max_packet;
Line 980  slhci_root_start(struct usbd_xfer *xfer)
Line 986  slhci_root_start(struct usbd_xfer *xfer)
         struct slhci_softc *sc;          struct slhci_softc *sc;
         struct slhci_pipe *spipe;          struct slhci_pipe *spipe;
   
         spipe = (struct slhci_pipe *)xfer->ux_pipe;          spipe = SLHCI_PIPE2SPIPE(xfer->ux_pipe);
         sc = xfer->ux_pipe->up_dev->ud_bus->ub_hcpriv;          sc = SLHCI_XFER2SC(xfer);
   
         return slhci_lock_call(sc, &slhci_root, spipe, xfer);          return slhci_lock_call(sc, &slhci_root, spipe, xfer);
 }  }
Line 997  slhci_open(struct usbd_pipe *pipe)
Line 1003  slhci_open(struct usbd_pipe *pipe)
         uint8_t rhaddr;          uint8_t rhaddr;
   
         dev = pipe->up_dev;          dev = pipe->up_dev;
         sc = dev->ud_bus->ub_hcpriv;          sc = SLHCI_PIPE2SC(pipe);
         spipe = (struct slhci_pipe *)pipe;          spipe = SLHCI_PIPE2SPIPE(pipe);
         ed = pipe->up_endpoint->ue_edesc;          ed = pipe->up_endpoint->ue_edesc;
         rhaddr = dev->ud_bus->ub_rhaddr;          rhaddr = dev->ud_bus->ub_rhaddr;
   
Line 1289  slhci_abort(struct usbd_xfer *xfer)
Line 1295  slhci_abort(struct usbd_xfer *xfer)
         struct slhci_softc *sc;          struct slhci_softc *sc;
         struct slhci_pipe *spipe;          struct slhci_pipe *spipe;
   
         spipe = (struct slhci_pipe *)xfer->ux_pipe;          spipe = SLHCI_PIPE2SPIPE(xfer->ux_pipe);
   
         if (spipe == NULL)          if (spipe == NULL)
                 goto callback;                  goto callback;
   
         sc = spipe->pipe.up_dev->ud_bus->ub_hcpriv;          sc = SLHCI_XFER2SC(xfer);
   
         KASSERT(mutex_owned(&sc->sc_lock));          KASSERT(mutex_owned(&sc->sc_lock));
   
Line 1315  slhci_close(struct usbd_pipe *pipe)
Line 1321  slhci_close(struct usbd_pipe *pipe)
         struct slhci_softc *sc;          struct slhci_softc *sc;
         struct slhci_pipe *spipe;          struct slhci_pipe *spipe;
   
         sc = pipe->up_dev->ud_bus->ub_hcpriv;          sc = SLHCI_PIPE2SC(pipe);
         spipe = (struct slhci_pipe *)pipe;          spipe = SLHCI_PIPE2SPIPE(pipe);
   
         DLOG(D_TRACE, "%s close spipe %p spipe->xfer %p",          DLOG(D_TRACE, "%s close spipe %p spipe->xfer %p",
             pnames(spipe->ptype), spipe, spipe->xfer, 0);              pnames(spipe->ptype), spipe, spipe->xfer, 0);
Line 1329  slhci_clear_toggle(struct usbd_pipe *pip
Line 1335  slhci_clear_toggle(struct usbd_pipe *pip
 {  {
         struct slhci_pipe *spipe;          struct slhci_pipe *spipe;
   
         spipe = (struct slhci_pipe *)pipe;          spipe = SLHCI_PIPE2SPIPE(pipe);
   
         DLOG(D_TRACE, "%s toggle spipe %p", pnames(spipe->ptype),          DLOG(D_TRACE, "%s toggle spipe %p", pnames(spipe->ptype),
             spipe,0,0);              spipe,0,0);
Line 1355  slhci_poll(struct usbd_bus *bus) /* XXX 
Line 1361  slhci_poll(struct usbd_bus *bus) /* XXX 
 {  {
         struct slhci_softc *sc;          struct slhci_softc *sc;
   
         sc = bus->ub_hcpriv;          sc = SLHCI_BUS2SC(bus);
   
         DLOG(D_TRACE, "slhci_poll", 0,0,0,0);          DLOG(D_TRACE, "slhci_poll", 0,0,0,0);
   
Line 1377  slhci_void(void *v) {}
Line 1383  slhci_void(void *v) {}
 void  void
 slhci_mem_use(struct usbd_bus *bus, int val)  slhci_mem_use(struct usbd_bus *bus, int val)
 {  {
         struct slhci_softc *sc = bus->ub_hcpriv;          struct slhci_softc *sc = SLHCI_BUS2SC(bus);
         int s;          int s;
   
         mutex_enter(&sc->sc_intr_lock);          mutex_enter(&sc->sc_intr_lock);
Line 2441  slhci_do_repeat(struct slhci_softc *sc, 
Line 2447  slhci_do_repeat(struct slhci_softc *sc, 
         struct slhci_pipe *spipe;          struct slhci_pipe *spipe;
   
         t = &sc->sc_transfers;          t = &sc->sc_transfers;
         spipe = (struct slhci_pipe *)xfer->ux_pipe;          spipe = SLHCI_PIPE2SPIPE(xfer->ux_pipe);
   
         if (xfer == t->rootintr)          if (xfer == t->rootintr)
                 return;                  return;
Line 3115  static int
Line 3121  static int
 slhci_roothub_ctrl(struct usbd_bus *bus, usb_device_request_t *req,  slhci_roothub_ctrl(struct usbd_bus *bus, usb_device_request_t *req,
     void *buf, int buflen)      void *buf, int buflen)
 {  {
         struct slhci_softc *sc = bus->ub_hcpriv;          struct slhci_softc *sc = SLHCI_BUS2SC(bus);
         struct slhci_transfers *t = &sc->sc_transfers;          struct slhci_transfers *t = &sc->sc_transfers;
         usbd_status error = USBD_IOERROR; /* XXX should be STALL */          usbd_status error = USBD_IOERROR; /* XXX should be STALL */
         uint16_t len, value, index;          uint16_t len, value, index;

Legend:
Removed from v.1.47.6.13  
changed lines
  Added in v.1.47.6.14

CVSweb <webmaster@jp.NetBSD.org>