1. 29 10月, 2005 3 次提交
    • A
      [PATCH] USB: Rename hcd->hub_suspend to hcd->bus_suspend · 0c0382e3
      Alan Stern 提交于
      This patch (as580) is perhaps the only result from the long discussion I
      had with David about his changes to the root-hub suspend/resume code.  It
      renames the hub_suspend and hub_resume methods in struct usb_hcd to
      bus_suspend and bus_resume.  These are more descriptive names, since the
      methods really do suspend or resume an entire USB bus, and less likely to
      be confused with the hub_suspend and hub_resume routines in hub.c.
      
      It also takes David's advice about removing the layer of bus glue, where
      those methods are called.  And it implements a related change that David
      made to the other HCDs but forgot to put into dummy_hcd.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0c0382e3
    • D
      [PATCH] OHCI PM updates · f197b2c5
      David Brownell 提交于
      This simplifies the OHCI root hub suspend logic:
      
       - Uses new usbcore root hub calls to make autosuspend work again:
      	* Uses a newish usbcore root hub wakeup mechanism,
      	  making requests to khubd not keventd.
      	* Uses an even newer sibling suspend hook.
      
       - Expect someone always made usbcore call ohci_hub_suspend() before bus
         glue fires; and that ohci_hub_resume() is only called after that bus
         glue ran.  Previously, only CONFIG_USB_SUSPEND promised those things.
         (Includes updates to PCI and OMAP bus glue.)
      
       - Handle a not-noticed-before special case during resume from one of
         the swsusp snapshots when using "usb-handoff":  the controller isn't
         left in RESET state.  (A bug to fix in the usb-handoff code...)
      
      Also cleans up a minor debug printk glitch, and switches an mdelay over
      to an msleep (how did that stick around for so long?).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/host/ohci-dbg.c  |    4 ----
       drivers/usb/host/ohci-hcd.c  |    2 +-
       drivers/usb/host/ohci-hub.c  |   42 ++++++++++++------------------------------
       drivers/usb/host/ohci-mem.c  |    1 -
       drivers/usb/host/ohci-omap.c |   36 ++++++++++++------------------------
       drivers/usb/host/ohci-pci.c  |   40 ++++++++--------------------------------
       drivers/usb/host/ohci.h      |    1 -
       7 files changed, 33 insertions(+), 93 deletions(-)
      f197b2c5
    • D
      [PATCH] remove some USB_SUSPEND dependencies · 8ad7fe16
      David Brownell 提交于
      This simplifies some of the PM-related #ifdeffing by recognizing
      that USB_SUSPEND depends on PM.  Also, OHCI drivers were often
      testing for USB_SUSPEND when they should have tested just PM.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hcd.c          |    2 ++
       drivers/usb/host/ohci-hcd.c     |    2 +-
       drivers/usb/host/ohci-hub.c     |    4 ++--
       drivers/usb/host/ohci-omap.c    |    2 +-
       drivers/usb/host/ohci-pci.c     |    2 +-
       drivers/usb/host/ohci-ppc-soc.c |    4 ++--
       drivers/usb/host/ohci-pxa27x.c  |    2 +-
       drivers/usb/host/ohci-s3c2410.c |    3 +--
       drivers/usb/host/ohci-sa1111.c  |    2 +-
       9 files changed, 12 insertions(+), 11 deletions(-)
      8ad7fe16
  2. 13 9月, 2005 1 次提交
  3. 13 7月, 2005 1 次提交
    • K
      [PATCH] USB: coverity: (desc->bitmap)[] overrun fix · b2134bcd
      KAMBAROV, ZAUR 提交于
      The length of the array desc->bitmap is 3, and not 4:
      
      Definitions involved:
      
      In drivers/usb/core/hcd.h
      
      464  	#define bitmap 	DeviceRemovable
      
      In drivers/usb/host/ohci-hub.c
      
      395  		struct usb_hub_descriptor	*desc
      
      In drivers/usb/core/hub.h
      
      130  	struct usb_hub_descriptor {
      131  		__u8  bDescLength;
      132  		__u8  bDescriptorType;
      133  		__u8  bNbrPorts;
      134  		__u16 wHubCharacteristics;
      135  		__u8  bPwrOn2PwrGood;
      136  		__u8  bHubContrCurrent;
      137  		    	/* add 1 bit for hub status change; round to bytes */
      138  		__u8  DeviceRemovable[(USB_MAXCHILDREN + 1 + 7) / 8];
      139  		__u8  PortPwrCtrlMask[(USB_MAXCHILDREN + 1 + 7) / 8];
      140  	} __attribute__ ((packed));
      
      In include/linux/usb.h
      
      306  	#define USB_MAXCHILDREN		(16)
      
      This defect was found automatically by Coverity Prevent, a static analysis
      tool.
      
      (akpm: this code should be shot.  Field `bitmap' doesn't exist in struct
      usb_hub_descriptor.  And this .c file is #included in
      drivers/usb/host/ohci-hcd.c, and someone somewhere #defines `bitmap' to
      `DeviceRemovable'.
      
      >From a maintainability POV it would be better to memset the whole array
      beforehand - I changed the patch to do that)
      Signed-off-by: NZaur Kambarov <zkambarov@coverity.com>
      Cc: <linux-usb-devel@lists.sourceforge.net?
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b2134bcd
  4. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4