]> Pileus Git - ~andy/linux/blobdiff - drivers/usb/host/ohci.h
Merge branch 'stable/for-linus-fixes-3.3' of git://git.kernel.org/pub/scm/linux/kerne...
[~andy/linux] / drivers / usb / host / ohci.h
index 0795b934d00c9709800948c137a1aa84fd96e47d..8ff6f7ea96fd1f28a970cce75b36bacdc9dd21ed 100644 (file)
@@ -344,6 +344,12 @@ typedef struct urb_priv {
  * a subset of what the full implementation needs. (Linus)
  */
 
+enum ohci_rh_state {
+       OHCI_RH_HALTED,
+       OHCI_RH_SUSPENDED,
+       OHCI_RH_RUNNING
+};
+
 struct ohci_hcd {
        spinlock_t              lock;
 
@@ -384,6 +390,7 @@ struct ohci_hcd {
        /*
         * driver state
         */
+       enum ohci_rh_state      rh_state;
        int                     num_ports;
        int                     load [NUM_INTS];
        u32                     hc_control;     /* copy of hc control reg */
@@ -679,11 +686,6 @@ static inline u16 ohci_hwPSW(const struct ohci_hcd *ohci,
 
 /*-------------------------------------------------------------------------*/
 
-static inline void disable (struct ohci_hcd *ohci)
-{
-       ohci_to_hcd(ohci)->state = HC_STATE_HALT;
-}
-
 #define        FI                      0x2edf          /* 12000 bits per frame (-1) */
 #define        FSMP(fi)                (0x7fff & ((6 * ((fi) - 210)) / 7))
 #define        FIT                     (1 << 31)
@@ -707,7 +709,7 @@ static inline void periodic_reinit (struct ohci_hcd *ohci)
 #define read_roothub(hc, register, mask) ({ \
        u32 temp = ohci_readl (hc, &hc->regs->roothub.register); \
        if (temp == -1) \
-               disable (hc); \
+               hc->rh_state = OHCI_RH_HALTED; \
        else if (hc->flags & OHCI_QUIRK_AMD756) \
                while (temp & mask) \
                        temp = ohci_readl (hc, &hc->regs->roothub.register); \