1. 30 10月, 2005 17 次提交
  2. 29 10月, 2005 23 次提交
    • S
      [ETH]: ether address compare · 360ac8e2
      Stephen Hemminger 提交于
      Expose faster ether compare for use by protocols and other
      driver. And change name to be more consistent with other ether
      address manipulation routines in same file
      Signed-off-by: NStephen Hemminger <shemminger@osdl.org>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@mandriva.com>
      360ac8e2
    • A
      [PATCH] USB: fix pm patches with CONFIG_PM off part 2 · 9a7834d0
      Andrew Morton 提交于
      With CONFIG_PM=n:
      
      drivers/built-in.o(.text+0x1098c): In function `hub_thread':
      drivers/usb/core/hub.c:2673: undefined reference to `.dpm_runtime_resume'
      drivers/built-in.o(.text+0x10998):drivers/usb/core/hub.c:2674: undefined reference to `.dpm_runtime_resume'
      
      Please, never ever ever put extern decls into .c files.  Use the darn header
      files :(
      
      Cc: David Brownell <david-b@pacbell.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      9a7834d0
    • A
      [PATCH] usbcore: Fix handling of sysfs strings and other attributes · 4f62efe6
      Alan Stern 提交于
      This patch (as592) makes a few small improvements to the way device
      strings are handled, and it fixes some bugs in a couple of other sysfs
      attribute routines.  (Look at show_configuration_string() to see what I
      mean.)
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4f62efe6
    • A
      [PATCH] usbcore: Wrap lines before column 80 · b724ae77
      Alan Stern 提交于
      I can't stand text lines that wrap-around in my 80-column windows.  This
      patch (as589) makes cosmetic changes to a couple of source files.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b724ae77
    • A
      [PATCH] usbcore: Improve endpoint sysfs file handling · be69e5b1
      Alan Stern 提交于
      This revised patch (as587b) improves the implementation of USB endpoint
      sysfs files.  Instead of storing a whole bunch of attributes for every
      single endpoint, each endpoint now gets its own kobject and they can
      share a static list of attributes.  The number of extra fields added to
      struct usb_host_endpoint has been reduced from 4 to 1.
      
      The bEndpointAddress field is retained even though it is redundant (it
      repeats the same information as the attributes' directory name).  The
      code avoids calling kobject_register, to prevent generating unwanted
      hotplug events.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      be69e5b1
    • A
      [PATCH] USB: Always do usb-handoff · 478a3bab
      Alan Stern 提交于
      This revised patch (as586b) makes usb-handoff permanently true and no
      longer a kernel boot parameter.  It also removes the piix3_usb quirk code;
      that was nothing more than an early version of the USB handoff code
      (written at a time when Intel's PIIX3 was about the only motherboard with
      USB support).  And it adds identifiers for the three PCI USB controller
      classes to pci_ids.h.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      478a3bab
    • P
      [PATCH] usb: Patch for USBDEVFS_IOCTL from 32-bit programs · c36fc889
      Pete Zaitcev 提交于
      Dell supplied me with the following test:
      
      #include<stdio.h>
      #include<errno.h>
      #include<sys/ioctl.h>
      #include<fcntl.h>
      #include<linux/usbdevice_fs.h>
      
      main(int argc,char*argv[])
      {
         struct usbdevfs_hub_portinfo hubPortInfo = {0};
         struct usbdevfs_ioctl command = {0};
         command.ifno = 0;
         command.ioctl_code = USBDEVFS_HUB_PORTINFO;
         command.data = (void*)&hubPortInfo;
         int fd, ret;
         if(argc != 2) {
           fprintf(stderr,"Usage: %s /proc/bus/usb/<BusNo>/<HubID>\n",argv[0]);
           fprintf(stderr,"Example: %s /proc/bus/usb/001/001\n",argv[0]);
           exit(1);
         }
         errno = 0;
         fd = open(argv[1],O_RDWR);
         if(fd < 0) {
           perror("open failed:");
           exit(errno);
         }
         errno = 0;
         ret = ioctl(fd,USBDEVFS_IOCTL,&command);
         printf("IOCTL return status:%d\n",ret);
         if(ret<0) {
           perror("IOCTL failed:");
           close(fd);
           exit(3);
         } else {
             printf("IOCTL passed:Num of ports %d\n",hubPortInfo.nports);
             close(fd);
             exit(0);
         }
         return 0;
      }
      
      I have verified that it breaks if built in 32 bit mode on x86_64 and that
      the patch below fixes it.
      Signed-off-by: NPete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      c36fc889
    • G
      [PATCH] USB: add notifier functions to the USB core for devices and busses · 3099e75a
      Greg Kroah-Hartman 提交于
      This should let us get rid of all of the different hooks in the USB core for
      when something has changed.
      
      Also, some other parts of the kernel have wanted to know this kind of
      information at times.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      3099e75a
    • J
      [PATCH] add usb transceiver set_suspend() method · 4e67185a
      Juha Yrj?l? 提交于
      When a USB device is put into suspend mode, the current drawn from VBUS
      has to be less than 500 uA. Some transceivers need to be put into a
      special power-saving mode to accomplish this, and won't have a separate
      OTG driver handling that.
      
      This adds a suspend method to the "otg_transceiver" struct -- misnamed,
      it's not only for OTG -- and calls it from the OMAP UDC driver.
      Signed-off-by: NJuha Yrj?l? <juha.yrjola@nokia.com>
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4e67185a
    • D
      [PATCH] stop exporting two functions · 5edbfb7c
      David Brownell 提交于
      The way we're looking at USB suspend lately doesn't expect drivers to
      call usb_suspend_device() or usb_resume_device() directly; that'll
      be implicit when no interfaces are in use.
      
      This patch removes those APIs from visibility outside usbcore.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      
       drivers/usb/core/hub.c |   12 ++++--------
       drivers/usb/core/usb.h |    4 ++++
       include/linux/usb.h    |    5 -----
       3 files changed, 8 insertions(+), 13 deletions(-)
      5edbfb7c
    • D
      [PATCH] one less word in struct device · e9b7bd4e
      David Brownell 提交于
      This saves a word from "struct device" ... there's a refcounting mechanism
      stub that's rather ineffective (the values are never even tested!), which
      can safely be deleted.  With this patch it uses normal device refcounting,
      so any potential users of the pm_parent mechanism will be more correct.
      (That mechanism is actually unusable for now though; it does nothing.)
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/base/power/main.c |   26 +++-----------------------
       include/linux/pm.h        |    1 -
       2 files changed, 3 insertions(+), 24 deletions(-)
      e9b7bd4e
    • D
      [PATCH] remove usb_suspend_device() parameter · 390a8c34
      David Brownell 提交于
      This patch removes the extra usb_suspend_device() parameter.  The original
      reason to pass that parameter was so that this routine could suspend any
      active children.  A previous patch removed that functionality ... leaving
      no reason to pass the parameter.  A close analogy is pci_set_power_state,
      which doesn't need a pm_message_t either.
      
      On the internal code path that comes through the driver model, the parameter
      is now used to distinguish cases where USB devices need to "freeze" but not
      suspend.   It also checks for an error case that's accessible through sysfs:
      attempting to suspend a device before its interfaces (or for hubs, ports).
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/hub.c         |   34 +++++++++++++++++++++-------------
       drivers/usb/core/usb.c         |   23 +++++++++++++++++++++--
       drivers/usb/host/ehci-hcd.c    |    2 +-
       drivers/usb/host/isp116x-hcd.c |    2 +-
       drivers/usb/host/ohci-pci.c    |    2 +-
       include/linux/usb.h            |    2 +-
       6 files changed, 46 insertions(+), 19 deletions(-)
      390a8c34
    • G
      [PATCH] devfs: Remove the mode field from usb_class_driver as it's no longer needed · d6e5bcf4
      Greg Kroah-Hartman 提交于
      Also fixes all drivers that set this field, and removes some other devfs
      specfic USB logic.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/class/usblp.c           |    3 +--
       drivers/usb/core/file.c             |   19 ++++---------------
       drivers/usb/image/mdc800.c          |    3 +--
       drivers/usb/input/aiptek.c          |    2 +-
       drivers/usb/input/hiddev.c          |    3 +--
       drivers/usb/media/dabusb.c          |    3 +--
       drivers/usb/misc/auerswald.c        |    3 +--
       drivers/usb/misc/idmouse.c          |    5 ++---
       drivers/usb/misc/legousbtower.c     |    5 ++---
       drivers/usb/misc/rio500.c           |    3 +--
       drivers/usb/misc/sisusbvga/sisusb.c |    5 -----
       drivers/usb/misc/usblcd.c           |    9 ++++-----
       drivers/usb/usb-skeleton.c          |    3 +--
       include/linux/usb.h                 |    7 ++-----
       14 files changed, 22 insertions(+), 51 deletions(-)
      d6e5bcf4
    • G
      [PATCH] USB: add endpoint information to sysfs · 094f1649
      Greg Kroah-Hartman 提交于
      This patch adds endpoint information for both devices and interfaces to
      sysfs.  Previously it was only possible to get the endpoint information
      from usbfs, and never possible to get any information on endpoint 0.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/usb/core/sysfs.c |  195 ++++++++++++++++++++++++++++++++++++++++++++++-
       include/linux/usb.h      |    4
       2 files changed, 197 insertions(+), 2 deletions(-)
      094f1649
    • G
      [PATCH] pci_ids: cleanup comments · 2f028234
      Grant Coady 提交于
      pci_ids.h cleanup: convert // comment to /* comment */
      Signed-off-by: NGrant Coady <gcoady@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      2f028234
    • A
      [PATCH] PCI: fix edac drivers for radisys 82600 borkage · d10211b2
      Andrew Morton 提交于
      I told you that the pci_ids.h cleanup was a bad idea ;)
      
      Cc: Alan Cox <alan@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d10211b2
    • G
      [PATCH] pci_ids: remove non-referenced symbols from pci_ids.h · b7924c38
      Grant Coady 提交于
      pci_ids.h cleanup: removed non-referenced symbols, compile tested
      with 'make allmodconfig'
      Signed-off-by: NGrant Coady <gcoady@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       include/linux/pci_ids.h |  540 ------------------------------------------------
       1 file changed, 540 deletions(-)
      b7924c38
    • G
      [PATCH] pci_ids: remove duplicates from pci_ids.h · b135c481
      Grant Coady 提交于
      pci_ids.h cleanup: remove duplicated entries and change some defines to
      explicit value rather than in terms of another constant, preparation for
      removing unused symbols
      Signed-off-by: NGrant Coady <gcoady@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       include/linux/pci_ids.h |   28 +++++++++-------------------
       1 file changed, 9 insertions(+), 19 deletions(-)
      b135c481
    • B
      [PATCH] PCI: Block config access during BIST · e04b0ea2
      Brian King 提交于
      Some PCI adapters (eg.  ipr scsi adapters) have an exposure today in that they
      issue BIST to the adapter to reset the card.  If, during the time it takes to
      complete BIST, userspace attempts to access PCI config space, the host bus
      bridge will master abort the access since the ipr adapter does not respond on
      the PCI bus for a brief period of time when running BIST.  On PPC64 hardware,
      this master abort results in the host PCI bridge isolating that PCI device
      from the rest of the system, making the device unusable until Linux is
      rebooted.  This patch is an attempt to close that exposure by introducing some
      blocking code in the PCI code.  When blocked, writes will be humored and reads
      will return the cached value.  Ben Herrenschmidt has also mentioned that he
      plans to use this in PPC power management.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
       drivers/pci/access.c    |   89 ++++++++++++++++++++++++++++++++++++++++++++++++
       drivers/pci/pci-sysfs.c |   20 +++++-----
       drivers/pci/pci.h       |    7 +++
       drivers/pci/proc.c      |   28 +++++++--------
       drivers/pci/syscall.c   |   14 +++----
       include/linux/pci.h     |    7 +++
       6 files changed, 134 insertions(+), 31 deletions(-)
      e04b0ea2
    • I
      [SCTP] Rename SCTP specific control message flags. · eaa5c54d
      Ivan Skytte Jorgensen 提交于
      Rename SCTP specific control message flags to use SCTP_ prefix rather than
      MSG_ prefix as per the latest sctp sockets API draft.
      Signed-off-by: NIvan Skytte Jorgensen <isj-sctp@i1.dk>
      Signed-off-by: NSridhar Samudrala <sri@us.ibm.com>
      eaa5c54d
    • G
      [PATCH] I2C: add i2c module alias for i2c drivers to use · a9d1b24d
      Greg Kroah-Hartman 提交于
      This is the start of adding hotplug-like support for i2c devices.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      a9d1b24d
    • J
      [PATCH] i2c: SMBus PEC support rewrite, 3 of 3 · 585b3160
      Jean Delvare 提交于
      The new SMBus PEC implementation doesn't support PEC emulation on
      non-PEC non-I2C SMBus masters, so we can drop all related code.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      585b3160
    • J
      [PATCH] i2c: SMBus PEC support rewrite, 2 of 3 · 421ef47b
      Jean Delvare 提交于
      This is my rewrite of the SMBus PEC support. The original
      implementation was known to have bugs (credits go to Hideki Iwamoto
      for reporting many of them recently), and was incomplete due to a
      conceptual limitation.
      
      The rewrite affects only software PEC. Hardware PEC needs very little
      code and is mostly untouched.
      
      Technically, both implementations differ in that the original one
      was emulating PEC in software by modifying the contents of an
      i2c_smbus_data union (changing the transaction to a different type),
      while the new one works one level lower, on i2c_msg structures (working
      on message contents). Due to the definition of the i2c_smbus_data union,
      not all SMBus transactions could be handled (at least not without
      changing the definition of this union, which would break user-space
      compatibility), and those which could had to be implemented
      individually. At the opposite, adding PEC to an i2c_msg structure
      can be done on any SMBus transaction with common code.
      
      Advantages of the new implementation:
      
      * It's about twice as small (from ~136 lines before to ~70 now, only
        counting i2c-core, including blank and comment lines). The memory
        used by i2c-core is down by ~640 bytes (~3.5%).
      
      * Easier to validate, less tricky code. The code being common to all
        transactions by design, the risk that a bug can stay uncovered is
        lower.
      
      * All SMBus transactions have PEC support in I2C emulation mode
        (providing the non-PEC transaction is also implemented). Transactions
        which have no emulation code right now will get PEC support for free
        when they finally get implemented.
      
      * Allows for code simplifications in header files and bus drivers
        (patch follows).
      
      Drawbacks (I guess there had to be at least one):
      
      * PEC emulation for non-PEC capable non-I2C SMBus masters was dropped.
        It was based on SMBus tricks and doesn't quite fit in the new design.
        I don't think it's really a problem, as the benefit was certainly
        not worth the additional complexity, but it's only fair that I at
        least mention it.
      
      Lastly, let's note that the new implementation does slightly affect
      compatibility (both in kernel and user-space), but doesn't actually
      break it. Some defines will be dropped, but the code can always be
      changed in a way that will work with both the old and the new
      implementations. It shouldn't be a problem as there doesn't seem to be
      many users of SMBus PEC to date anyway.
      Signed-off-by: NJean Delvare <khali@linux-fr.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      421ef47b