1. 19 4月, 2008 8 次提交
  2. 18 4月, 2008 32 次提交
    • P
      [INET]: Uninline the __inet_inherit_port call. · 53083773
      Pavel Emelyanov 提交于
      This deblats ~200 bytes when ipv6 and dccp are 'y'.
      
      Besides, this will ease compilation issues for patches
      I'm working on to make inet hash tables more scalable 
      wrt net namespaces.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53083773
    • P
      [INET]: Drop the inet_inherit_port() call. · e56d8b8a
      Pavel Emelyanov 提交于
      As I can see from the code, two places (tcp_v6_syn_recv_sock and
      dccp_v6_request_recv_sock) that call this one already run with
      BHs disabled, so it's safe to call __inet_inherit_port there.
      
      Besides (in case I missed smth with code review) the calltrace
      tcp_v6_syn_recv_sock
       `- tcp_v4_syn_recv_sock
           `- __inet_inherit_port
      and the similar for DCCP are valid, but assumes BHs to be disabled.
      Signed-off-by: NPavel Emelyanov <xemul@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e56d8b8a
    • B
      ide: remove ide_init_default_irq() macro · 273b8385
      Bartlomiej Zolnierkiewicz 提交于
      * Use ide_default_irq() instead of ide_init_default_irq() in
        ide_generic host driver (so the correct IRQ is always set
        regardless of CONFIG_PCI / CONFIG_BLK_DEV_IDEPCI).
      
      * Remove no longer needed ide_init_default_irq() macro.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      273b8385
    • B
      ide: remove ide_default_io_ctl() macro · 9dfcd15a
      Bartlomiej Zolnierkiewicz 提交于
      It is always == '((base) + 0x206)' if CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=y
      and it is not needed otherwise (arm, blackfin, parisc, ppc64, sh, sparc[64]).
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9dfcd15a
    • B
      ide: add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS (take 2) · 0e33555f
      Bartlomiej Zolnierkiewicz 提交于
      * Add CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS to drivers/ide/Kconfig and use
        it instead of defining IDE_ARCH_OBSOLETE_DEFAULTS in <arch/ide.h>.
      
      v2:
      * Define ide_default_irq() in ide-probe.c/ns87415.c if not already defined
        and drop defining ide_default_irq() for CONFIG_IDE_ARCH_OBSOLETE_DEFAULTS=n.
      
        [ Thanks to Stephen Rothwell and David Miller for noticing the problem. ]
      
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: David Miller <davem@davemloft.net>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e33555f
    • B
      ppc: remove ppc_ide_md · 1d850bd0
      Bartlomiej Zolnierkiewicz 提交于
      * Add special cases for pplus and prep to ide_default_{irq,io_base}()
        (+ FIXMEs about the need to use IDE platform host driver instead).
      
      * Remove no longer needed ppc_ide_md and struct ide_machdep_calls.
      
      * Then remove <linux/ide.h> include from:
        - arch/powerpc/kernel/setup_32.c
        - arch/ppc/kernel/ppc_ksyms.c
        - arch/ppc/kernel/setup.c
        - arch/ppc/platforms/pplus.c
        - arch/ppc/platforms/prep_setup.c
      
      There should be no functional changes caused by this patch.
      
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1d850bd0
    • B
    • B
      ide: add generic packet command representation ide_atapi_pc · 8303b46e
      Borislav Petkov 提交于
      This new struct unifies ide{-floppy,-tape,-scsi}'s view of a packet command. For now,
      it represents the common denominator between the three drivers while adding driver-
      specific members at the end of the struct which will be merged/simplified into the
      generic ATAPI handling code in later steps, or removed completely.
      
      Bart:
      - move struct ide_atapi_pc outside of #ifdef/#endif CONFIG_IDE_PROC_FS
      Signed-off-by: NBorislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8303b46e
    • B
      ide: remove IDE_*_REG macros · 23579a2a
      Bartlomiej Zolnierkiewicz 提交于
      * Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines.
      
      * Remove IDE_*_REG macros - this results in more readable
        and slightly smaller code.
      
      There should be no functional changes caused by this patch.
      
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      23579a2a
    • B
      ide: add ide_atapi_{discard_data,write_zeros} inline helpers · 7616c0ad
      Bartlomiej Zolnierkiewicz 提交于
      Add ide_atapi_{discard_data,write_zeros} inline helpers to <linux/ide.h>
      and use them instead of home-brewn helpers in ide-{floppy,tape,scsi}.
      
      There should be no functional changes caused by this patch.
      
      Cc: Borislav Petkov <petkovbb@gmail.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7616c0ad
    • B
      ide: remove ide_init_hwif_ports() · e6bfa38a
      Bartlomiej Zolnierkiewicz 提交于
      ide_init_hwif_ports() is only used by init_ide_data() now, inline it there.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e6bfa38a
    • B
      ide: remove ->hold field from ide_hwif_t (take 2) · 2304dc64
      Bartlomiej Zolnierkiewicz 提交于
      ->hold is write-only now, remove it.
      
      v2:
      * v1 missed bast-ide, palm_bk3710, ide-cs and delkin_cb host drivers.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2304dc64
    • B
      ide: remove broken/dangerous HDIO_[UNREGISTER,SCAN]_HWIF ioctls (take 3) · 93de00fd
      Bartlomiej Zolnierkiewicz 提交于
      hdparm explicitely marks HDIO_[UNREGISTER,SCAN]_HWIF ioctls as DANGEROUS
      and given the number of bugs we can assume that there are no real users:
      
      * DMA has no chance of working because DMA resources are released by
        ide_unregister() and they are never allocated again.
      
      * Since ide_init_hwif_ports() is used for ->io_ports[] setup the ioctls
        don't work for almost all hosts with "non-standard" (== non ISA-like)
        layout of IDE taskfile registers (there is a lot of such host drivers).
      
      * ide_port_init_devices() is not called when probing IDE devices so:
        - drive->autotune is never set and IDE host/devices are not programmed
          for the correct PIO/DMA transfer modes (=> possible data corruption)
        - host specific I/O 32-bit and IRQ unmasking settings are not applied
          (=> possible data corruption)
        - host specific ->port_init_devs method is not called (=> no luck with
          ht6560b, qd65xx and opti621 host drivers)
      
      * ->rw_disk method is not preserved (=> no HPT3xxN chipsets support).
      
      * ->serialized flag is not preserved (=> possible data corruption when
         using icside, aec62xx (ATP850UF chipset), cmd640, cs5530, hpt366
         (HPT3xxN chipsets), rz1000, sc1200, dtc2278 and ht6560b host drivers).
      
      * ->ack_intr method is not preserved (=> needed by ide-cris, buddha,
        gayle and macide host drivers).
      
      * ->sata_scr[] and sata_misc[] is cleared by ide_unregister() and it
        isn't initialized again (SiI3112 support needs them).
      
      * To issue an ioctl() there need to be at least one IDE device present
        in the system.
      
      * ->cable_detect method is not preserved + it is not called when probing
        IDE devices so cable detection is broken (however since DMA support is
        also broken it doesn't really matter ;-).
      
      * Some objects which may have already been freed in ide_unregister()
        are restored by ide_hwif_restore() (i.e. ->hwgroup).
      
      * ide_register_hw() may unregister unrelated IDE ports if free ide_hwifs[]
        slot cannot be found.
      
      * When IDE host drivers are modular unregistered port may be re-used by
        different host driver that owned it first causing subtle bugs.
      
      Since we now have a proper warm-plug support remove these ioctls,
      then remove no longer needed:
      - ide_register_hw() and ide_hwif_restore() functions
      - 'init_default' and 'restore' arguments of ide_unregister()
      - zeroeing of hwif->{dma,extra}_* fields in ide_unregister()
      
      As an added bonus IDE core code size shrinks by ~3kB (x86-32).
      
      v2:
      * fix ide_unregister() arguments in cleanup_module() (Andrew Morton).
      
      v3:
      * fix ide_unregister() arguments in palm_bk3710.c.
      Acked-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      93de00fd
    • B
      ide: remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters (take 2) · 9a0e77f2
      Bartlomiej Zolnierkiewicz 提交于
      * Remove obsoleted "idex=base[,ctl[,irq]]" kernel parameters
        and update Documentation/ide/ide.txt.
      
      * Remove no longer needed ide_forced chipset type.
      
      v2:
      * is_chipset_set[] -> is_chipset_set in ide.c.
      
      * Documentation/ide/ide.txt fix.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      9a0e77f2
    • B
      ide: add warm-plug support for IDE devices (take 2) · f74c9141
      Bartlomiej Zolnierkiewicz 提交于
      * Add 'struct class ide_port_class' ('ide_port' class) and a 'struct
        device *portdev' ('ide_port' class device) in ide_hwif_t.
      
      * Register 'ide_port' class in ide_init() and unregister it in
        cleanup_module().
      
      * Create ->portdev in ide_register_port () and unregister it in
        ide_unregister().
      
      * Add "delete_devices" class device attribute for unregistering IDE devices
        on a port and "scan" one for probing+registering IDE devices on a port.
      
      * Add ide_sysfs_register_port() helper for registering "delete_devices"
        and "scan" attributes with ->portdev.  Call it in ide_device_add_all().
      
      * Document IDE warm-plug support in Documentation/ide/warm-plug-howto.txt.
      
      v2:
      * Convert patch from using 'struct class_device' to use 'struct device'.
        (thanks to Kay Sievers for doing it)
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      f74c9141
    • B
      ide: remove dead/obsolete ->busproc method · 50672e5d
      Bartlomiej Zolnierkiewicz 提交于
      ->busproc method is used by HDIO_SET_BUSSTATE ioctl but it has no chance
      of working as intended (in 2.4.x days) because to issue an ioctl there
      is a device node needed and:
      
      - for BUSSTATE_TRISTATE+OFF it is too late (devices are already gone)
      
      - for BUSSTATE_TRISTATE+ON it is too early (devices are not registered yet)
      
      Just remove ->busproc method for now (it was only implemented by hpt366,
      siimage and tc86c001 host drivers).
      
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      50672e5d
    • B
      ide: rework PowerMac media-bay support (take 2) · 2dde7861
      Bartlomiej Zolnierkiewicz 提交于
      Rework PowerMac media-bay support in such way that instead of
      un/registering the IDE interface we un/register IDE devices:
      
      * Add ide_port_scan() helper for probing+registerering devices on a port.
      
      * Rename ide_port_unregister_devices() to __ide_port_unregister_devices().
      
      * Add ide_port_unregister_devices() helper for unregistering devices on a port.
      
      * Add 'ide_hwif_t *cd_port' to 'struct media_bay_info', pass 'hwif' instead
        of hwif->index to media_bay_set_ide_infos() and use it to setup 'cd_port'.
      
      * Use ide_port_unregister_devices() instead of ide_unregister()
        and ide_port_scan() instead of ide_register_hw() in media_bay_step().
      
      * Unexport ide_register_hw() and make it static.
      
      v2:
      * Fix build by adding <linux/ide.h> include to <asm-powerpc/mediabay.h>.
        (Reported by Michael/Kamalesh/Andrew).
      
      Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2dde7861
    • B
      ide: remove IDE devices from /proc/ide/ before unregistering them · 5b0c4b30
      Bartlomiej Zolnierkiewicz 提交于
      IDE devices need to be removed from /proc/ide/ _before_ being unregistered:
      
      * Drop 'ide_hwif_t *hwif' argument from destroy_proc_ide_device()
        and use drive->hwif instead.
      
      * Rename destroy_proc_ide_device() to ide_proc_unregister_device().
      
      * Call ide_proc_unregister_device() in drive_release_dev().
      
      * Remove no longer needed destroy_proc_ide_drives().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5b0c4b30
    • B
      ide: use ide_find_port() instead of ide_deprecated_find_port() · 4f0eee4d
      Bartlomiej Zolnierkiewicz 提交于
      * Use ide_find_port() instead of ide_deprecated_find_port() in bast-ide/
        palm_bk3710/ide-cs/delkin_cb host drivers and in ide_register_hw().
      
      * Remove no longer needed ide_deprecated_find_port().
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      4f0eee4d
    • G
      IDE: remove ide=reverse IDE core · a594eeb1
      Greg Kroah-Hartman 提交于
      This option is obsolete and can be removed safely.
      
      It allows us to remove the pci_get_device_reverse() function from the
      PCI core.
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      a594eeb1
    • D
      dmaengine: ack to flags: make use of the unused bits in the 'ack' field · 636bdeaa
      Dan Williams 提交于
      'ack' is currently a simple integer that flags whether or not a client is done
      touching fields in the given descriptor.  It is effectively just a single bit
      of information.  Converting this to a flags parameter allows the other bits to
      be put to use to control completion actions, like dma-unmap, and capture
      results, like xor-zero-sum == 0.
      
      Changes are one of:
      1/ convert all open-coded ->ack manipulations to use async_tx_ack
         and async_tx_test_ack.
      2/ set the ack bit at prep time where possible
      3/ make drivers store the flags at prep time
      4/ add flags to the device_prep_dma_interrupt prototype
      Acked-by: NMaciej Sosnowski <maciej.sosnowski@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      636bdeaa
    • D
      iop-adma: remove the workaround for missed interrupts on iop3xx · c4fe1554
      Dan Williams 提交于
      This workaround was covering the dependency submission bug in async_tx.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      c4fe1554
    • D
      async_tx: kill ->device_dependency_added · ce4d65a5
      Dan Williams 提交于
      DMA drivers no longer need to be notified of dependency submission
      events as async_tx_run_dependencies and async_tx_channel_switch will
      handle the scheduling and execution of dependent operations.
      
      [sfr@canb.auug.org.au: extend this for fsldma]
      Acked-by: NShannon Nelson <shannon.nelson@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      ce4d65a5
    • D
      async_tx: fix multiple dependency submission · 19242d72
      Dan Williams 提交于
      Shrink struct dma_async_tx_descriptor and introduce
      async_tx_channel_switch to properly inject a channel switch interrupt in
      the descriptor stream.  This simplifies the locking model as drivers no
      longer need to handle dma_async_tx_descriptor.lock.
      Acked-by: NShannon Nelson <shannon.nelson@intel.com>
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      19242d72
    • T
      libata: make PMP support optional · 88fcd562
      Tejun Heo 提交于
      Make PMP support optional by adding CONFIG_SATA_PMP and leaving out
      libata-pmp.c if it isn't set.  PMP helpers return constant values if
      PMP support is not enabled and PMP declarations alias non-PMP
      counterparts.  This makes the compiler to leave out PMP related part
      out and LLDs to use non-PMP counterparts automatically.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      88fcd562
    • T
      libata: implement PMP helpers · 071f44b1
      Tejun Heo 提交于
      Implement helpers to test whether PMP is supported, attached and
      determine pmp number to use when issuing SRST to a link.  While at it,
      move ata_is_host_link() so that it's together with the two new PMP
      helpers.
      
      This change simplifies LLDs and helps making PMP support optional.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      071f44b1
    • T
      libata: separate PMP support code from core code · 48515f6c
      Tejun Heo 提交于
      Most of PMP support code is already in libata-pmp.c.  All that are in
      libata-core.c are sata_pmp_port_ops and EXPORTs.  Move them to
      libata-pmp.c.  Also, collect PMP related prototypes and declarations
      in header files and move them right above of SFF stuff.
      
      This change is to make PMP support optional.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      48515f6c
    • T
      libata: make SFF support optional · 127102ae
      Tejun Heo 提交于
      Now that SFF support is completely separated out from the core layer,
      it can be made optional.  Add CONFIG_ATA_SFF and let SFF drivers
      depend on it.  If CONFIG_ATA_SFF isn't set, all codes in libata-sff.c
      and data structures for SFF support are disabled.  This saves good
      number of bytes for small systems.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      127102ae
    • T
      libata: kill ata_noop_dev_select() · c9f75b04
      Tejun Heo 提交于
      Now that SFF assumptions are separated out from non-SFF reset
      sequence, port_ops->sff_dev_select() is no longer necessary for
      non-SFF controllers.  Kill ata_noop_dev_select() and ->sff_dev_select
      initialization from base and other non-SFF port_ops.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      c9f75b04
    • T
      libata: drop @finish_qc from ata_qc_complete_multiple() · 79f97dad
      Tejun Heo 提交于
      ata_qc_complete_multiple() took @finish_qc and called it on every qc
      before completing it.  This was to give opportunity to update TF cache
      before ata_qc_complete() tries to fill result_tf.  Now that result TF
      is a separate operation, this is no longer necessary.
      
      Update sata_sil24, which was the only user of this mechanism, such
      that it implements its own ops->qc_fill_rtf() and drop @finish_qc from
      ata_qc_complete_multiple().
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      79f97dad
    • T
      libata: add qc_fill_rtf port operation · 22183bf5
      Tejun Heo 提交于
      On command completion, ata_qc_complete() directly called ops->tf_read
      to fill qc->result_tf.  This patch adds ops->qc_fill_rtf to replace
      hardcoded ops->tf_read usage.
      
      ata_sff_qc_fill_rtf() which uses ops->tf_read to fill result_tf is
      implemented and set in ata_base_port_ops and other ops tables which
      don't inherit from ata_base_port_ops, so this patch doesn't introduce
      any behavior change.
      
      ops->qc_fill_rtf() is similar to ops->sff_tf_read() but can only be
      called when a command finishes.  As some non-SFF controllers don't
      have TF registers defined unless they're associated with in-flight
      commands, this limited operation makes life easier for those drivers
      and help lifting SFF assumptions from libata core layer.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      22183bf5
    • T
      libata: move PMP SCR access failure during reset to ata_eh_reset() · 5958e302
      Tejun Heo 提交于
      If PMP fan-out reset fails and SCR isn't accessible, PMP should be
      reset.  This used to be tested by sata_pmp_std_hardreset() and
      communicated to EH by -ERESTART.  However, this logic is generic and
      doesn't really have much to do with specific hardreset implementation.
      
      This patch moves SCR access failure detection logic to ata_eh_reset()
      where it belongs.  As this makes sata_pmp_std_hardreset() identical to
      sata_std_hardreset(), the function is killed and replaced with the
      standard method.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      5958e302