1. 19 7月, 2008 2 次提交
    • D
      pkt_sched: Manage qdisc list inside of root qdisc. · 30723673
      David S. Miller 提交于
      Idea is from Patrick McHardy.
      
      Instead of managing the list of qdiscs on the device level, manage it
      in the root qdisc of a netdev_queue.  This solves all kinds of
      visibility issues during qdisc destruction.
      
      The way to iterate over all qdiscs of a netdev_queue is to visit
      the netdev_queue->qdisc, and then traverse it's list.
      
      The only special case is to ignore builting qdiscs at the root when
      dumping or doing a qdisc_lookup().  That was not needed previously
      because builtin qdiscs were not added to the device's qdisc_list.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      30723673
    • P
      packet: add PACKET_RESERVE sockopt · 8913336a
      Patrick McHardy 提交于
      Add new sockopt to reserve some headroom in the mmaped ring frames in
      front of the packet payload. This can be used f.i. when the VLAN header
      needs to be (re)constructed to avoid moving the entire payload.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8913336a
  2. 18 7月, 2008 15 次提交
  3. 17 7月, 2008 20 次提交
    • R
      ptrace children revamp · f470021a
      Roland McGrath 提交于
      ptrace no longer fiddles with the children/sibling links, and the
      old ptrace_children list is gone.  Now ptrace, whether of one's own
      children or another's via PTRACE_ATTACH, just uses the new ptraced
      list instead.
      
      There should be no user-visible difference that matters.  The only
      change is the order in which do_wait() sees multiple stopped
      children and stopped ptrace attachees.  Since wait_task_stopped()
      was changed earlier so it no longer reorders the children list, we
      already know this won't cause any new problems.
      Signed-off-by: NRoland McGrath <roland@redhat.com>
      f470021a
    • M
      block: Trivial fix for blk_integrity_rq() · d442cc44
      Martin K. Petersen 提交于
      Fail integrity check gracefully when request does not have a bio
      attached (BLOCK_PC).
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d442cc44
    • B
      PNP: convert resource options to single linked list · 1f32ca31
      Bjorn Helgaas 提交于
      ISAPNP, PNPBIOS, and ACPI describe the "possible resource settings" of
      a device, i.e., the possibilities an OS bus driver has when it assigns
      I/O port, MMIO, and other resources to the device.
      
      PNP used to maintain this "possible resource setting" information in
      one independent option structure and a list of dependent option
      structures for each device.  Each of these option structures had lists
      of I/O, memory, IRQ, and DMA resources, for example:
      
        dev
          independent options
            ind-io0  -> ind-io1  ...
            ind-mem0 -> ind-mem1 ...
            ...
          dependent option set 0
            dep0-io0  -> dep0-io1  ...
            dep0-mem0 -> dep0-mem1 ...
            ...
          dependent option set 1
            dep1-io0  -> dep1-io1  ...
            dep1-mem0 -> dep1-mem1 ...
            ...
          ...
      
      This data structure was designed for ISAPNP, where the OS configures
      device resource settings by writing directly to configuration
      registers.  The OS can write the registers in arbitrary order much
      like it writes PCI BARs.
      
      However, for PNPBIOS and ACPI devices, the OS uses firmware interfaces
      that perform device configuration, and it is important to pass the
      desired settings to those interfaces in the correct order.  The OS
      learns the correct order by using firmware interfaces that return the
      "current resource settings" and "possible resource settings," but the
      option structures above doesn't store the ordering information.
      
      This patch replaces the independent and dependent lists with a single
      list of options.  For example, a device might have possible resource
      settings like this:
      
        dev
          options
            ind-io0 -> dep0-io0 -> dep1->io0 -> ind-io1 ...
      
      All the possible settings are in the same list, in the order they
      come from the firmware "possible resource settings" list.  Each entry
      is tagged with an independent/dependent flag.  Dependent entries also
      have a "set number" and an optional priority value.  All dependent
      entries must be assigned from the same set.  For example, the OS can
      use all the entries from dependent set 0, or all the entries from
      dependent set 1, but it cannot mix entries from set 0 with entries
      from set 1.
      
      Prior to this patch PNP didn't keep track of the order of this list,
      and it assigned all independent options first, then all dependent
      ones.  Using the example above, that resulted in a "desired
      configuration" list like this:
      
        ind->io0 -> ind->io1 -> depN-io0 ...
      
      instead of the list the firmware expects, which looks like this:
      
        ind->io0 -> depN-io0 -> ind-io1 ...
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      1f32ca31
    • B
      PNP: support optional IRQ resources · d5ebde6e
      Bjorn Helgaas 提交于
      This patch adds an IORESOURCE_IRQ_OPTIONAL flag for use when
      assigning resources to a device.  If the flag is set and we are
      unable to assign an IRQ to the device, we can leave the IRQ
      disabled but allow the overall resource allocation to succeed.
      
      Some devices request an IRQ, but can run without an IRQ
      (possibly with degraded performance).  This flag lets us run
      the device without the IRQ instead of just leaving the
      device disabled.
      
      This is a reimplementation of this previous change by Rene
      Herman <rene.herman@gmail.com>:
          http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b73a223661ed137c5d3d2635f954382e94f5a43
      
      I reimplemented this for two reasons:
          - to prepare for converting all resource options into a single linked
            list, as opposed to the per-resource-type lists we have now, and
          - to preserve the order and number of resource options.
      
      In PNPBIOS and ACPI, we configure a device by giving firmware a
      list of resource assignments.  It is important that this list
      has exactly the same number of resources, in the same order,
      as the "template" list we got from the firmware in the first
      place.
      
      The problem of a sound card MPU401 being left disabled for want of
      an IRQ was reported by Uwe Bugla <uwe.bugla@gmx.de>.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      d5ebde6e
    • B
      PNP: make resource option structures private to PNP subsystem · a1802c42
      Bjorn Helgaas 提交于
      Nothing outside the PNP subsystem should need access to a
      device's resource options, so this patch moves the option
      structure declarations to a private header file.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      a1802c42
    • B
      PNP: define PNP-specific IORESOURCE_IO_* flags alongside IRQ, DMA, MEM · 08c9f262
      Bjorn Helgaas 提交于
      PNP previously defined PNP_PORT_FLAG_16BITADDR and PNP_PORT_FLAG_FIXED
      in a private header file, but put those flags in struct resource.flags
      fields.  Better to make them IORESOURCE_IO_* flags like the existing
      IRQ, DMA, and MEM flags.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      08c9f262
    • B
      PNP: add pnp_possible_config() -- can a device could be configured this way? · 57fd51a8
      Bjorn Helgaas 提交于
      As part of a heuristic to identify modem devices, 8250_pnp.c
      checks to see whether a device can be configured at any of the
      legacy COM port addresses.
      
      This patch moves the code that traverses the PNP "possible resource
      options" from 8250_pnp.c to the PNP subsystem.  This encapsulation
      is important because a future patch will change the implementation
      of those resource options.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NRene Herman <rene.herman@gmail.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      57fd51a8
    • B
      PNP: replace pnp_resource_table with dynamically allocated resources · aee3ad81
      Bjorn Helgaas 提交于
      PNP used to have a fixed-size pnp_resource_table for tracking the
      resources used by a device.  This table often overflowed, so we've
      had to increase the table size, which wastes memory because most
      devices have very few resources.
      
      This patch replaces the table with a linked list of resources where
      the entries are allocated on demand.
      
      This removes messages like these:
      
          pnpacpi: exceeded the max number of IO resources
          00:01: too many I/O port resources
      
      References:
      
          http://bugzilla.kernel.org/show_bug.cgi?id=9535
          http://bugzilla.kernel.org/show_bug.cgi?id=9740
          http://lkml.org/lkml/2007/11/30/110
      
      This patch also changes the way PNP uses the IORESOURCE_UNSET,
      IORESOURCE_AUTO, and IORESOURCE_DISABLED flags.
      
      Prior to this patch, the pnp_resource_table entries used the flags
      like this:
      
          IORESOURCE_UNSET
      	This table entry is unused and available for use.  When this flag
      	is set, we shouldn't look at anything else in the resource structure.
      	This flag is set when a resource table entry is initialized.
      
          IORESOURCE_AUTO
      	This resource was assigned automatically by pnp_assign_{io,mem,etc}().
      
      	This flag is set when a resource table entry is initialized and
      	cleared whenever we discover a resource setting by reading an ISAPNP
      	config register, parsing a PNPBIOS resource data stream, parsing an
      	ACPI _CRS list, or interpreting a sysfs "set" command.
      
      	Resources marked IORESOURCE_AUTO are reinitialized and marked as
      	IORESOURCE_UNSET by pnp_clean_resource_table() in these cases:
      
      	    - before we attempt to assign resources automatically,
      	    - if we fail to assign resources automatically,
      	    - after disabling a device
      
          IORESOURCE_DISABLED
      	Set by pnp_assign_{io,mem,etc}() when automatic assignment fails.
      	Also set by PNPBIOS and PNPACPI for:
      
      	    - invalid IRQs or GSI registration failures
      	    - invalid DMA channels
      	    - I/O ports above 0x10000
      	    - mem ranges with negative length
      
      After this patch, there is no pnp_resource_table, and the resource list
      entries use the flags like this:
      
          IORESOURCE_UNSET
      	This flag is no longer used in PNP.  Instead of keeping
      	IORESOURCE_UNSET entries in the resource list, we remove
      	entries from the list and free them.
      
          IORESOURCE_AUTO
      	No change in meaning: it still means the resource was assigned
      	automatically by pnp_assign_{port,mem,etc}(), but these functions
      	now set the bit explicitly.
      
      	We still "clean" a device's resource list in the same places,
      	but rather than reinitializing IORESOURCE_AUTO entries, we
      	just remove them from the list.
      
      	Note that IORESOURCE_AUTO entries are always at the end of the
      	list, so removing them doesn't reorder other list entries.
      	This is because non-IORESOURCE_AUTO entries are added by the
      	ISAPNP, PNPBIOS, or PNPACPI "get resources" methods and by the
      	sysfs "set" command.  In each of these cases, we completely free
      	the resource list first.
      
          IORESOURCE_DISABLED
      	In addition to the cases where we used to set this flag, ISAPNP now
      	adds an IORESOURCE_DISABLED resource when it reads a configuration
      	register with a "disabled" value.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      aee3ad81
    • B
      PNP: make pnp_{port,mem,etc}_start(), et al work for invalid resources · 20bfdbba
      Bjorn Helgaas 提交于
      Some callers use pnp_port_start() and similar functions without
      making sure the resource is valid.  This patch makes us fall
      back to returning the initial values if the resource is not
      valid or not even present.
      
      This mostly preserves the previous behavior, where we would just
      return the initial values set by pnp_init_resource_table().  The
      original 2.6.25 code didn't range-check the "bar", so it would
      return garbage if the bar exceeded the table size.  This code
      returns sensible values instead.
      Signed-off-by: NBjorn Helgaas <bjorn.helgaas@hp.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      20bfdbba
    • R
      Freezer: Introduce PF_FREEZER_NOSIG · ebb12db5
      Rafael J. Wysocki 提交于
      The freezer currently attempts to distinguish kernel threads from
      user space tasks by checking if their mm pointer is unset and it
      does not send fake signals to kernel threads.  However, there are
      kernel threads, mostly related to networking, that behave like
      user space tasks and may want to be sent a fake signal to be frozen.
      
      Introduce the new process flag PF_FREEZER_NOSIG that will be set
      by default for all kernel threads and make the freezer only send
      fake signals to the tasks having PF_FREEZER_NOSIG unset.  Provide
      the set_freezable_with_signal() function to be called by the kernel
      threads that want to be sent a fake signal for freezing.
      
      This patch should not change the freezer's observable behavior.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NPavel Machek <pavel@suse.cz>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      ebb12db5
    • E
      IDE: Remove unused code · 3ef5eb42
      Elias Oltmanns 提交于
      Remove some code which has been made obsolete and hasn't worked properly
      before anyway.  Part of the infrastructure may be reintroduced in a
      follow up patch to implement a working command aborting facility.
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
      Cc: "Randy Dunlap" <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3ef5eb42
    • E
      IDE: Fix HDIO_DRIVE_RESET handling · 79e36a9f
      Elias Oltmanns 提交于
      Currently, the code path executing an HDIO_DRIVE_RESET ioctl is broken
      in various ways.  Most importantly, it is treated as an out of band
      request in an illegal way which may very likely lead to system lock ups.
      Use the drive's request queue to avoid this problem (and fix a locking
      issue for free along the way).
      Signed-off-by: NElias Oltmanns <eo@nebensachen.de>
      Cc: "Alan Cox" <alan@lxorguk.ukuu.org.uk>
      Cc: "Randy Dunlap" <randy.dunlap@oracle.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      79e36a9f
    • B
      ide: ->port_init_devs -> ->init_dev · e6d95bd1
      Bartlomiej Zolnierkiewicz 提交于
      Change ->port_init_devs method to take 'ide_drive_t *' as an argument
      instead of 'ide_hwif_t *' and rename it to ->init_dev.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e6d95bd1
    • B
      ide: set hwif->dev in ide_init_port_hw() (take 2) · c56c5648
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'parent' field to hw_regs_t for optional parent device pointer (needed
        by macio PMAC IDE controllers) and set hwif->dev in ide_init_port_hw().
      
      * Update au1xxx-ide.c, sgiioc4.c, pmac.c and setup-pci.c accordingly.
      
      v2:
      
      * Update scc_pata.c.
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c56c5648
    • B
      ide: make ide_hwifs[] static · 63b51c6d
      Bartlomiej Zolnierkiewicz 提交于
      Move ide_hwifs[] from ide.c to ide-probe.c and make it static.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      63b51c6d
    • B
      ide: move PIO blacklist to ide-pio-blacklist.c · 9ad54093
      Bartlomiej Zolnierkiewicz 提交于
      Move PIO blacklist to ide-pio-blacklist.c.
      
      While at it:
      
      - fix comment
      
      - fix whitespace damage
      
      There should be no functional changes caused by this patch.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9ad54093
    • B
    • B
      ide: move ide_pio_cycle_time() to ide-timings.c · c9d6c1a2
      Bartlomiej Zolnierkiewicz 提交于
      All ide_pio_cycle_time() users already select CONFIG_IDE_TIMINGS
      so move the function from ide-lib.c to ide-timings.c.
      
      While at it:
      
      - convert ide_pio_cycle_time() to use ide_timing_find_mode()
      
      - cleanup ide_pio_cycle_time() a bit
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      c9d6c1a2
    • B
      ide: convert ide-timing.h to ide-timings.c library (take 2) · f06ab340
      Bartlomiej Zolnierkiewicz 提交于
      * Don't include ide-timing.h in cs5535 and sis5513 host drivers
        (they don't need it currently).
      
      * Convert ide-timing.h to ide-timings.c library and add CONFIG_IDE_TIMINGS
        config option to be selected by host drivers using the library.
      
      While at it:
      
      - fix ide_timing_find_mode() placement
      
      v2:
      * Add missing EXPORT_SYMBOLs. (Stephen Rothwell <sfr@canb.auug.org.au>)
      
      There should be no functional changes caused by this patch.
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f06ab340
    • B
      ide: move some bits from ide-timing.h to <linux/ide.h> · 3be53f3f
      Bartlomiej Zolnierkiewicz 提交于
      Move struct ide_timing and IDE_TIMING_* defines to <linux/ide.h>
      from drivers/ide/ide-timing.h.
      
      While at it:
      
      - use u8/u16 instead of short for struct ide_timing fields
      
      - use enum for IDE_TIMING_*
      
      There should be no functional changes caused by this patch.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      3be53f3f
  4. 16 7月, 2008 3 次提交
    • C
      SUNRPC: Support registering IPv6 interfaces with local rpcbind daemon · c2e1b09f
      Chuck Lever 提交于
      Introduce a new API to register RPC services on IPv6 interfaces to allow
      the NFS server and lockd to advertise on IPv6 networks.
      
      Unlike rpcb_register(), the new rpcb_v4_register() function uses rpcbind
      protocol version 4 to contact the local rpcbind daemon.  The version 4
      SET/UNSET procedures allow services to register address families besides
      AF_INET, register at specific network interfaces, and register transport
      protocols besides UDP and TCP.  All of this functionality is exposed via
      the new rpcb_v4_register() kernel API.
      
      A user-space rpcbind daemon implementation that supports version 4 of the
      rpcbind protocol is required in order to make use of this new API.
      
      Note that rpcbind version 3 is sufficient to support the new rpcbind
      facilities listed above, but most extant implementations use version 4.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      c2e1b09f
    • B
      ide: add ide_pc_intr() helper · 646c0cb6
      Bartlomiej Zolnierkiewicz 提交于
      * ide-tape.c: add 'drive' argument to idetape_update_buffers().
      
      * Add generic ide_pc_intr() helper to ide-atapi.c and then
        convert ide-{floppy,tape,scsi} device drivers to use it.
      
      * ide-tape.c: remove no longer needed DBG_PC_INTR.
      
      There should be no functional changes caused by this patch
      (unless the debugging is explicitely compiled in).
      
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      646c0cb6
    • B
      ide: add ide_issue_pc() helper · 6bf1641c
      Bartlomiej Zolnierkiewicz 提交于
      Add generic ide_issue_pc() helper to ide-atapi.c and then
      convert ide-{floppy,tape,scsi} device drivers to use it.
      
      There should be no functional changes caused by this patch.
      
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6bf1641c