1. 28 3月, 2009 3 次提交
  2. 27 3月, 2009 9 次提交
  3. 26 3月, 2009 1 次提交
  4. 25 3月, 2009 27 次提交
    • A
      [libata] Improve timeout handling · c96f1732
      Alan Cox 提交于
      On a timeout call a device specific handler early in the recovery so that
      we can complete and process successful commands which timed out due to IRQ
      loss or the like rather more elegantly.
      
      [Revised to exclude the timeout handling on a few devices that inherit from
       SFF but are not SFF enough to use the default timeout handler]
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      c96f1732
    • A
      [libata] Drain data on errors · 3d47aa8e
      Alan Cox 提交于
      If the device is signalling that there is data to drain after an error we
      should read the bytes out and throw them away. Without this some devices
      and controllers get wedged and don't recover.
      
      Based on earlier work by Mark Lord
      Signed-off-by: NAlan Cox <alan@redhat.com>
      Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
      3d47aa8e
    • E
      22ddbd1e
    • M
    • G
      Dynamic debug: fix pr_fmt() build error · e6e66b02
      Greg Banks 提交于
      When CONFIG_DYNAMIC_DEBUG is enabled, allow callers of pr_debug()
      to provide their own definition of pr_fmt() even if that definition
      uses tricks like
      
      #define pr_fmt(fmt) "%s:" fmt, __func__
      Signed-off-by: NGreg Banks <gnb@sgi.com>
      Cc: Jason Baron <jbaron@redhat.com>
      Acked-by: NGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e6e66b02
    • J
      dynamic debug: combine dprintk and dynamic printk · e9d376f0
      Jason Baron 提交于
      This patch combines Greg Bank's dprintk() work with the existing dynamic
      printk patchset, we are now calling it 'dynamic debug'.
      
      The new feature of this patchset is a richer /debugfs control file interface,
      (an example output from my system is at the bottom), which allows fined grained
      control over the the debug output. The output can be controlled by function,
      file, module, format string, and line number.
      
      for example, enabled all debug messages in module 'nf_conntrack':
      
      echo -n 'module nf_conntrack +p' > /mnt/debugfs/dynamic_debug/control
      
      to disable them:
      
      echo -n 'module nf_conntrack -p' > /mnt/debugfs/dynamic_debug/control
      
      A further explanation can be found in the documentation patch.
      Signed-off-by: NGreg Banks <gnb@sgi.com>
      Signed-off-by: NJason Baron <jbaron@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e9d376f0
    • C
      Driver core: Fix device_move() vs. dpm list ordering, v2 · ffa6a705
      Cornelia Huck 提交于
      dpm_list currently relies on the fact that child devices will
      be registered after their parents to get a correct suspend
      order. Using device_move() however destroys this assumption, as
      an already registered device may be moved under a newly registered
      one.
      
      This patch adds a new argument to device_move(), allowing callers
      to specify how dpm_list should be adapted.
      Signed-off-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Acked-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ffa6a705
    • M
      Driver core: implement uevent suppress in kobject · f67f129e
      Ming Lei 提交于
      This patch implements uevent suppress in kobject and removes it
      from struct device, based on the following ideas:
      
      1,Uevent sending should be one attribute of kobject, so suppressing it
      in kobject layer is more natural than in device layer. By this way,
      we can do it for other objects embedded with kobject.
      
      2,It may save several bytes for each instance of struct device.(On my
      omap3(32bit ARM) based box, can save 8bytes per device object)
      
      This patch also introduces dev_set|get_uevent_suppress() helpers to
      set and query uevent_suppress attribute in case to help kobject
      as private part of struct device in future.
      
      [This version is against the latest driver-core patch set of Greg,please
      ignore the last version.]
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f67f129e
    • K
      vcs: hook sysfs devices into object lifetime instead of "binding" · 4995f8ef
      Kay Sievers 提交于
      During bootup performance tracing I noticed many occurrences of
      vca* device creation and removal, leading to the usual userspace
      uevent processing, which are, in this case, rather pointless.
      
      A simple test showing the kernel timing (not including all the
      work userspace has to do), gives us these numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m1.142s
        user    0m0.015s
        sys     0m0.540s
      
      If we move the hook for the vcs* driver core devices from the
      tty "binding" to the vc allocation/deallocation, which is what
      the vcs* devices represent, we get the following numbers:
        $ time for i in `seq 1000`; do echo a > /dev/tty2; done
        real    0m0.152s
        user    0m0.030s
        sys     0m0.072s
      
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4995f8ef
    • M
      driver core: move platform_data into platform_device · 006f4571
      Ming Lei 提交于
      This patch moves platform_data from struct device into
      struct platform_device, based on the two ideas:
      
      1. Now all platform_driver is registered by platform_driver_register,
         which makes probe()/release()/... of platform_driver passed parameter
         of platform_device *, so platform driver can get platform_data from
         platform_device;
      
      2. Other kind of devices do not need to use platform_data, we can
         decrease size of device if moving it to platform_device.
      
      Taking into consideration of thousands of files to be fixed and they
      can't be finished in one night(maybe it will take a long time), so we
      keep platform_data in device to allow two kind of cases coexist until
      all platform devices pass its platfrom data from
      platform_device->platform_data.
      
      All patches to do this kind of conversion are welcome.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      006f4571
    • G
      driver core: move knode_bus into private structure · ae1b4171
      Greg Kroah-Hartman 提交于
      Nothing outside of the driver core should ever touch knode_bus, so
      move it out of the public eye.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      ae1b4171
    • G
      driver core: move knode_driver into private structure · 8940b4f3
      Greg Kroah-Hartman 提交于
      Nothing outside of the driver core should ever touch knode_driver, so
      move it out of the public eye.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8940b4f3
    • G
      driver core: move klist_children into private structure · f791b8c8
      Greg Kroah-Hartman 提交于
      Nothing outside of the driver core should ever touch klist_children, or
      knode_parent, so move them out of the public eye.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      f791b8c8
    • G
      driver core: create a private portion of struct device · fb069a5d
      Greg Kroah-Hartman 提交于
      This is to be used to move things out of struct device that no code
      outside of the driver core should ever touch.
      
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      fb069a5d
    • M
      driver core: remove polling for driver_probe_done(v5) · b23530eb
      Ming Lei 提交于
      This patch removes 100ms polling for driver_probe_done in
      wait_for_device_probe(), and uses wait_event() instead.
      Removing polling in fs initialization may lead to
      a faster boot.
      
      This patch also changes the return type of wait_for_device_done()
      from int to void.
      
      This patch is against Arjan's patch in linux-next tree.
      Signed-off-by: NMing Lei <tom.leiming@gmail.com>
      Acked-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      b23530eb
    • H
      UIO: Add name attributes for mappings and port regions · 82057791
      Hans J. Koch 提交于
      If a UIO device has several memory mappings, it can be difficult for userspace
      to find the right one. The situation becomes even worse if the UIO driver can
      handle different versions of a card that have different numbers of mappings.
      Benedikt Spranger has such cards and pointed this out to me. Thanks, Bene!
      
      To address this problem, this patch adds "name" sysfs attributes for each
      mapping. Userspace can use these to clearly identify each mapping. The name
      string is optional. If a driver doesn't set it, an empty string will be
      returned, so this patch won't break existing drivers.
      
      The same problem exists for port region information, so a "name" attribute is
      added there, too.
      Signed-off-by: NHans J. Koch <hjk@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      82057791
    • E
      platform: introduce module id table for platform devices · 57fee4a5
      Eric Miao 提交于
      Now platform_device is being widely used on SoC processors where the
      peripherals are attached to the system bus, which is simple enough.
      
      However, silicon IPs for these SoCs are usually shared heavily across
      a family of processors, even products from different companies.  This
      makes the original simple driver name based matching insufficient, or
      simply not straight-forward.
      
      Introduce a module id table for platform devices, and makes it clear
      that a platform driver is able to support some shared IP and handle
      slight differences across different platforms (by 'driver_data').
      Module alias is handled automatically when a MODULE_DEVICE_TABLE()
      is defined.
      
      To not disturb the current platform drivers too much, the matched id
      entry is recorded and can be retrieved by platform_get_device_id().
      Signed-off-by: NEric Miao <eric.miao@marvell.com>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Cc: Ben Dooks <ben-linux@fluff.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      57fee4a5
    • K
      driver core: get rid of struct device's bus_id string array · 1fa5ae85
      Kay Sievers 提交于
      Now that all users of bus_id is gone, we can remove it from struct
      device.
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1fa5ae85
    • K
      wimax: struct device - replace bus_id with dev_name(), dev_set_name() · 2c0f3e96
      Kay Sievers 提交于
      Cc: inaky.perez-gonzalez@intel.com
      Cc: linux-wimax@intel.com
      Acked-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      2c0f3e96
    • P
      netlink: add NETLINK_NO_ENOBUFS socket flag · 38938bfe
      Pablo Neira Ayuso 提交于
      This patch adds the NETLINK_NO_ENOBUFS socket flag. This flag can
      be used by unicast and broadcast listeners to avoid receiving
      ENOBUFS errors.
      
      Generally speaking, ENOBUFS errors are useful to notify two things
      to the listener:
      
      a) You may increase the receiver buffer size via setsockopt().
      b) You have lost messages, you may be out of sync.
      
      In some cases, ignoring ENOBUFS errors can be useful. For example:
      
      a) nfnetlink_queue: this subsystem does not have any sort of resync
      method and you can decide to ignore ENOBUFS once you have set a
      given buffer size.
      
      b) ctnetlink: you can use this together with the socket flag
      NETLINK_BROADCAST_SEND_ERROR to stop getting ENOBUFS errors as
      you do not need to resync (packets whose event are not delivered
      are drop to provide reliable logging and state-synchronization).
      
      Moreover, the use of NETLINK_NO_ENOBUFS also reduces a "go up, go down"
      effect in terms of performance which is due to the netlink congestion
      control when the listener cannot back off. The effect is the following:
      
      1) throughput rate goes up and netlink messages are inserted in the
      receiver buffer.
      2) Then, netlink buffer fills and overruns (set on nlk->state bit 0).
      3) While the listener empties the receiver buffer, netlink keeps
      dropping messages. Thus, throughput goes dramatically down.
      4) Then, once the listener has emptied the buffer (nlk->state
      bit 0 is set off), goto step 1.
      
      This effect is easy to trigger with netlink broadcast under heavy
      load, and it is more noticeable when using a big receiver buffer.
      You can find some results in [1] that show this problem.
      
      [1] http://1984.lsi.us.es/linux/netlink/
      
      This patch also includes the use of sk_drop to account the number of
      netlink messages drop due to overrun. This value is shown in
      /proc/net/netlink.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38938bfe
    • D
      USB: gadget: composite device-level suspend/resume hooks · 8942939a
      David Brownell 提交于
      Address one open question in the composite gadget framework:
      Yes, we should have device-level suspend/resume callbacks
      in addition to the function-level ones.  We have at least one
      scenario (with gadget zero in OTG test mode) that's awkward
      to handle without it.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Felipe Balbi <felipe.balbi@nokia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8942939a
    • D
      USB: pedantic: spelling correction in comment for ch9.h · 64a3a25f
      D.J. Capelis 提交于
      Just noticed this during a grep, figured I might as well send it in.
      
      From: D.J. Capelis <dev@capelis.dj>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      64a3a25f
    • G
      USB: make actual_length in struct urb field u32 · 8c209e67
      Greg Kroah-Hartman 提交于
      actual_length should also be a u32 and not a signed value.  This patch
      changes this field to be 'u32' to prevent any potential negative
      conversion and comparison errors.
      
      This triggered a few compiler warning messages when these fields were
      being used with the min macro, so they have also been fixed up in this
      patch.
      
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      8c209e67
    • G
      USB: make transfer_buffer_lengths in struct urb field u32 · 16e2e5f6
      Greg Kroah-Hartman 提交于
      Roel Kluin pointed out that transfer_buffer_lengths in struct urb was
      declared as an 'int'.  This patch changes this field to be 'u32' to
      prevent any potential negative conversion and comparison errors.
      
      This triggered a few compiler warning messages when these fields were
      being used with the min macro, so they have also been fixed up in this
      patch.
      
      Cc: Roel Kluin <roel.kluin@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      16e2e5f6
    • D
      USB: allow libusb to talk to unauthenticated WUSB devices · 6da9c990
      David Vrabel 提交于
      To permit a userspace application to associate with WUSB devices
      using numeric association, control transfers to unauthenticated WUSB
      devices must be allowed.
      
      This requires that wusbcore correctly sets the device state to
      UNAUTHENTICATED, DEFAULT and ADDRESS and that control transfers can be
      performed to UNAUTHENTICATED devices.
      Signed-off-by: NDavid Vrabel <david.vrabel@csr.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      6da9c990
    • A
      usb-storage: prepare for subdriver separation · e6e244b6
      Alan Stern 提交于
      This patch (as1206) is the first step in converting usb-storage's
      subdrivers into separate modules.  It makes the following large-scale
      changes:
      
      	Remove a bunch of unnecessary #ifdef's from usb_usual.h.
      	Not truly necessary, but it does clean things up.
      
      	Move the USB device-ID table (which is duplicated between
      	libusual and usb-storage) into its own source file,
      	usual-tables.c, and arrange for this to be linked with
      	either libusual or usb-storage according to whether
      	USB_LIBUSUAL is configured.
      
      	Add to usual-tables.c a new usb_usual_ignore_device()
      	function to detect whether a particular device needs to be
      	managed by a subdriver and not by the standard handlers
      	in usb-storage.
      
      	Export a whole bunch of functions in usb-storage, renaming
      	some of them because their names don't already begin with
      	"usb_stor_".  These functions will be needed by the new
      	subdriver modules.
      
      	Split usb-storage's probe routine into two functions.
      	The subdrivers will call the probe1 routine, then fill in
      	their transport and protocol settings, and then call the
      	probe2 routine.
      
      	Take the default cases and error checking out of
      	get_transport() and get_protocol(), which run during
      	probe1, and instead put a check for invalid transport
      	or protocol values into the probe2 function.
      
      	Add a new probe routine to be used for standard devices,
      	i.e., those that don't need a subdriver.  This new routine
      	checks whether the device should be ignored (because it
      	should be handled by ub or by a subdriver), and if not,
      	calls the probe1 and probe2 functions.
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e6e244b6
    • A
      USB: otg: adding nop usb transceiver · f6d92a05
      Ajay Kumar Gupta 提交于
      NOP transceiver is used by all the usb transceiver which are mostly
      autonomous and doesn't require any programming or which are built
      into the usb ip itself.NOP transceiver only allocates the memory
      for struct xceiv and calls otg_set_transceiver() so function call
      to otg_get_transceiver() will return a valid transceiver.
      
      NOP transceiver device should be registered by calling
      usb_nop_xceiv_register() from platform files.
      Signed-off-by: NAjay Kumar Gupta <ajay.gupta@ti.com>
      Cc: Felipe Balbi <felipe.balbi@nokia.com>
      Cc: David Brownell <dbrownell@users.sourceforge.net>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      
      f6d92a05