1. 08 5月, 2007 4 次提交
    • M
      serial driver PMC MSP71xx · beab697a
      Marc St-Jean 提交于
      Serial driver patch for the PMC-Sierra MSP71xx devices.
      
      There are three different fixes:
      
      1 Fix for DesignWare APB THRE errata: In brief, this is a non-standard
        16550 in that the THRE interrupt will not re-assert itself simply by
        disabling and re-enabling the THRI bit in the IER, it is only re-enabled
        if a character is actually sent out.
      
        It appears that the "8250-uart-backup-timer.patch" in the "mm" tree
        also fixes it so we have dropped our initial workaround.  This patch now
        needs to be applied on top of that "mm" patch.
      
      2 Fix for Busy Detect on LCR write: The DesignWare APB UART has a feature
        which causes a new Busy Detect interrupt to be generated if it's busy
        when the LCR is written.  This fix saves the value of the LCR and
        rewrites it after clearing the interrupt.
      
      3 Workaround for interrupt/data concurrency issue: The SoC needs to
        ensure that writes that can cause interrupts to be cleared reach the UART
        before returning from the ISR.  This fix reads a non-destructive register
        on the UART so the read transaction completion ensures the previously
        queued write transaction has also completed.
      Signed-off-by: NMarc St-Jean <Marc_St-Jean@pmc-sierra.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      beab697a
    • B
      add new_id to PCMCIA drivers · 6179b556
      Bernhard Walle 提交于
      PCI drivers have the new_id file in sysfs which allows new IDs to be added
      at runtime.  The advantage is to avoid re-compilation of a driver that
      works for a new device, but it's ID table doesn't contain the new device.
      This mechanism is only meant for testing, after the driver has been tested
      successfully, the ID should be added in source code so that new revisions
      of the kernel automatically detect the device.
      
      The implementation follows the PCI implementation. The interface is documented
      in Documentation/pcmcia/driver.txt. Computations should be done in userspace,
      so the sysfs string contains the raw structure members for matching.
      Signed-off-by: NBernhard Walle <bwalle@suse.de>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6179b556
    • D
      at91_cf, minor fix · 02c83595
      David Brownell 提交于
      This is a minor correctness fix: since the at91_cf driver probe() routine
      is in the init section, it should use platform_driver_probe() instead of
      leaving that pointer around in the driver struct after init section
      removal.
      Signed-off-by: NDavid Brownell <dbrownell@users.sourceforge.net>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      02c83595
    • P
      slab: introduce krealloc · fd76bab2
      Pekka Enberg 提交于
      This introduce krealloc() that reallocates memory while keeping the contents
      unchanged.  The allocator avoids reallocation if the new size fits the
      currently used cache.  I also added a simple non-optimized version for
      mm/slob.c for compatibility.
      
      [akpm@linux-foundation.org: fix warnings]
      Acked-by: NJosef Sipek <jsipek@fsl.cs.sunysb.edu>
      Acked-by: NMatt Mackall <mpm@selenic.com>
      Acked-by: NChristoph Lameter <clameter@sgi.com>
      Signed-off-by: NPekka Enberg <penberg@cs.helsinki.fi>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fd76bab2
  2. 07 5月, 2007 6 次提交
    • L
      Revert "[PATCH] x86: __pa and __pa_symbol address space separation" · e3ebadd9
      Linus Torvalds 提交于
      This was broken.  It adds complexity, for no good reason.  Rather than
      separate __pa() and __pa_symbol(), we should deprecate __pa_symbol(),
      and preferably __pa() too - and just use "virt_to_phys()" instead, which
      is more readable and has nicer semantics.
      
      However, right now, just undo the separation, and make __pa_symbol() be
      the exact same as __pa().  That fixes the bugs this patch introduced,
      and we can do the fairly obvious cleanups later.
      
      Do the new __phys_addr() function (which is now the actual workhorse for
      the unified __pa()/__pa_symbol()) as a real external function, that way
      all the potential issues with compile/link-time optimizations of
      constant symbol addresses go away, and we can also, if we choose to, add
      more sanity-checking of the argument.
      
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Vivek Goyal <vgoyal@in.ibm.com>
      Cc: Andi Kleen <ak@suse.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      e3ebadd9
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild · 15700770
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (38 commits)
        kconfig: fix mconf segmentation fault
        kbuild: enable use of code from a different dir
        kconfig: error out if recursive dependencies are found
        kbuild: scripts/basic/fixdep segfault on pathological string-o-death
        kconfig: correct minor typo in Kconfig warning message.
        kconfig: fix path to modules.txt in Kconfig help
        usr/Kconfig: fix typo
        kernel-doc: alphabetically-sorted entries in index.html of 'htmldocs'
        kbuild: be more explicit on missing .config file
        kbuild: clarify the creation of the LOCALVERSION_AUTO string.
        kbuild: propagate errors from find in scripts/gen_initramfs_list.sh
        kconfig: refer to qt3 if we cannot find qt libraries
        kbuild: handle compressed cpio initramfs-es
        kbuild: ignore section mismatch warning for references from .paravirtprobe to .init.text
        kbuild: remove stale comment in modpost.c
        kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE
        kbuild: fix make mrproper for Documentation/DocBook/man
        kbuild: remove kconfig binaries during make mrproper
        kconfig/menuconfig: do not hardcode '.config'
        kbuild: override build timestamp & version
        ...
      15700770
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm · 6de410c2
      Linus Torvalds 提交于
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm: (66 commits)
        KVM: Remove unused 'instruction_length'
        KVM: Don't require explicit indication of completion of mmio or pio
        KVM: Remove extraneous guest entry on mmio read
        KVM: SVM: Only save/restore MSRs when needed
        KVM: fix an if() condition
        KVM: VMX: Add lazy FPU support for VT
        KVM: VMX: Properly shadow the CR0 register in the vcpu struct
        KVM: Don't complain about cpu erratum AA15
        KVM: Lazy FPU support for SVM
        KVM: Allow passing 64-bit values to the emulated read/write API
        KVM: Per-vcpu statistics
        KVM: VMX: Avoid unnecessary vcpu_load()/vcpu_put() cycles
        KVM: MMU: Avoid heavy ASSERT at non debug mode.
        KVM: VMX: Only save/restore MSR_K6_STAR if necessary
        KVM: Fold drivers/kvm/kvm_vmx.h into drivers/kvm/vmx.c
        KVM: VMX: Don't switch 64-bit msrs for 32-bit guests
        KVM: VMX: Reduce unnecessary saving of host msrs
        KVM: Handle guest page faults when emulating mmio
        KVM: SVM: Report hardware exit reason to userspace instead of dmesg
        KVM: Retry sleeping allocation if atomic allocation fails
        ...
      6de410c2
    • L
      Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm · c6799ade
      Linus Torvalds 提交于
      * 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (82 commits)
        [ARM] Add comments marking in-use ptrace numbers
        [ARM] Move syscall saving out of the way of utrace
        [ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro
        [ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header
        [ARM] mm 10: allow memory type to be specified with ioremap
        [ARM] mm 9: add additional device memory types
        [ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6
        [ARM] iop: add missing parens in macro
        [ARM] mm 7: remove duplicated __ioremap() prototypes
        ARM: OMAP: fix OMAP1 mpuio suspend/resume oops
        ARM: OMAP: MPUIO wake updates
        ARM: OMAP: speed up gpio irq handling
        ARM: OMAP: plat-omap changes for 2430 SDP
        ARM: OMAP: gpio object shrinkage, cleanup
        ARM: OMAP: /sys/kernel/debug/omap_gpio
        ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon
        ARM: OMAP: Enable 24xx GPIO autoidling
        [ARM] 4318/2: DSM-G600 Board Support
        [ARM] 4227/1: minor head.S fixups
        [ARM] 4328/1: Move i.MX UART regs to driver
        ...
      c6799ade
    • R
      Merge branch 'ixp4xx' into devel · 5cd47155
      Russell King 提交于
      Conflicts:
      
      	include/asm-arm/arch-ixp4xx/io.h
      5cd47155
    • R
      Merge branches 'arm-mm', 'at91', 'clkevts', 'imx', 'iop', 'misc', 'netx',... · 6f95416e
      Russell King 提交于
      Merge branches 'arm-mm', 'at91', 'clkevts', 'imx', 'iop', 'misc', 'netx', 'ns9xxx', 'omap', 'pxa', 'rpc', 's3c' and 'sa1100' into devel
      6f95416e
  3. 06 5月, 2007 30 次提交
    • R
      1b116522
    • R
      [ARM] Move syscall saving out of the way of utrace · 5ba6d3fe
      Russell King 提交于
      utrace removes the ptrace_message field in task_struct.  Move our use
      of this field into a new member in thread_info called "syscall"
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5ba6d3fe
    • M
      kconfig: fix mconf segmentation fault · 11de39e2
      Marcin Garski 提交于
      I have found small bug in mconf, when you run it without any argument it
      will sigsegv.
      
      Without patch:
      $ scripts/kconfig/mconf
      Segmentation fault
      
      With patch:
      $ scripts/kconfig/mconf
      can't find file (null)
      Signed-off-by: NMarcin Garski <mgarski@post.pl>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      11de39e2
    • S
      kbuild: enable use of code from a different dir · 767e581d
      Sam Ravnborg 提交于
      To introduce support for source in one directory but output files
      in another directory during a non O= build prefix all paths
      with $(src) repsectively $(obj).
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      767e581d
    • S
      kconfig: error out if recursive dependencies are found · 5447d34b
      Sam Ravnborg 提交于
      Sample:
      config FOO
      	bool "This is foo"
      	depends on BAR
      
      config BAR
      	bool "This is bar"
      	depends on FOO
      
      This will result in following error message:
      error: found recursive dependency: FOO -> BAR -> FOO
      
      And will then exit with exit code equal 1 so make will stop.
      Inspired by patch from: Adrian Bunk <bunk@stusta.de>
      Signed-off-by: NSam Ravnborg <sam@ravnborg.org>
      Cc: Adrian Bunk <bunk@stusta.de>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      5447d34b
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · b7405e16
      Linus Torvalds 提交于
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        [CIFS] Fix typo in cifs readme from previous commit
        [CIFS] Make sec=none force an anonymous mount
        [CIFS] Change semaphore to mutex for cifs lock_sem
        [CIFS] Fix oops in reset_cifs_unix_caps on reconnect
        [CIFS] UID/GID override on CIFS mounts to Samba
        [CIFS] prefixpath mounts to servers supporting posix paths used wrong slash
        [CIFS] Update cifs version to 1.49
        [CIFS] Replace kmalloc/memset combination with kzalloc
        [CIFS]  Add IPv6 support
        [CIFS] New CIFS POSIX mkdir performance improvement (part 2)
        [CIFS] New CIFS POSIX mkdir performance improvement
        [CIFS] Add write perm for usr to file on windows should remove r/o dos attr
        [CIFS] Remove unnecessary parm to cifs_reopen_file
        [CIFS] Switch cifsd to kthread_run from kernel_thread
        [CIFS] Remove unnecessary checks
      b7405e16
    • S
      0ec54aa8
    • L
      Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 · ea62ccd0
      Linus Torvalds 提交于
      * 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
        [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
        [PATCH] i386: type may be unused
        [PATCH] i386: Some additional chipset register values validation.
        [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
        [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
        [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
        [PATCH] i386: white space fixes in i387.h
        [PATCH] i386: Drop noisy e820 debugging printks
        [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
        [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
        [PATCH] x86-64: Share identical video.S between i386 and x86-64
        [PATCH] x86-64: Remove CONFIG_REORDER
        [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
        [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
        [PATCH] i386: Little cleanups in smpboot.c
        [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
        [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
        [PATCH] i386: Add X86_FEATURE_RDTSCP
        [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
        [PATCH] i386: Implement alternative_io for i386
        ...
      
      Fix up trivial conflict in include/linux/highmem.h manually.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ea62ccd0
    • L
      Fix compile of tmscsim SCSI driver · 886a0768
      Linus Torvalds 提交于
      It still used the long-deprecated "pci_module_init()" interface, rather
      than the proper "pci_register_driver()" one.
      
      [ I don't have the hardware, and I doubt many do, but the fix is
        trivial and obvious, and can't be worse than not compiling ]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      886a0768
    • R
      Fix nfsroot build · 989485c1
      Ralf Baechle 提交于
        CC      fs/nfs/nfsroot.o
      fs/nfs/nfsroot.c:131: error: tokens causes a section type conflict
      make[2]: *** [fs/nfs/nfsroot.o] Error 1
      
      This is due to mixing const and non-const content in the same section
      which halfway recent gccs absolutely hate.  Fixed by dropping the const.
      Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      989485c1
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 · 68762f3d
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
        [TG3]: Add TG3_FLAG_SUPPORT_MSI flag.
        [TG3]: Eliminate the TG3_FLAG_5701_REG_WRITE_BUG flag.
        [TG3]: Eliminate the TG3_FLAG_GOT_SERDES_FLOWCTL flag.
        [TG3]: Remove reset during MAC address changes.
        [TG3]: WoL fixes.
        [TG3]: Clear GPIO mask before storing.
        [TG3]: Improve NVRAM sizing.
        [TG3]: Fix TSO bugs.
        [MAC80211]: Add maintainers entry for mac80211.
        [MAC80211]: Add debugfs attributes.
        [MAC80211]: Add mac80211 wireless stack.
        [MAC80211]: Add generic include/linux/ieee80211.h
        [NETLINK]: Remove references to process ID
        [AF_IUCV]: Compile fix - adopt to skbuff changes.
      68762f3d
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · 4f7a307d
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits)
        [SCSI] fusion: fix domain validation loops
        [SCSI] qla2xxx: fix regression on sparc64
        [SCSI] modalias for scsi devices
        [SCSI] sg: cap reserved_size values at max_sectors
        [SCSI] BusLogic: stop using check_region
        [SCSI] tgt: fix rdma transfer bugs
        [SCSI] aacraid: fix aacraid not finding device
        [SCSI] aacraid: Correct SMC products in aacraid.txt
        [SCSI] scsi_error.c: Add EH Start Unit retry
        [SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test.
        [SCSI] ipr: Driver version to 2.3.2
        [SCSI] ipr: Faster sg list fetch
        [SCSI] ipr: Return better qc_issue errors
        [SCSI] ipr: Disrupt device error
        [SCSI] ipr: Improve async error logging level control
        [SCSI] ipr: PCI unblock config access fix
        [SCSI] ipr: Fix for oops following SATA request sense
        [SCSI] ipr: Log error for SAS dual path switch
        [SCSI] ipr: Enable logging of debug error data for all devices
        [SCSI] ipr: Add new PCI-E IDs to device table
        ...
      4f7a307d
    • L
      Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/voyager-2.6 · fabb5c4e
      Linus Torvalds 提交于
      * master.kernel.org:/pub/scm/linux/kernel/git/jejb/voyager-2.6:
        [VOYAGER] add smp alternatives
        [VOYAGER] Use modern techniques to setup and teardown low identiy mappings.
        [VOYAGER] Convert the monitor thread to use the kthread API
        [VOYAGER] clockevents driver: bring voyager in to line
        [VOYAGER] clockevents: correct boot cpu is zero assumption
        [VOYAGER] add smp_call_function_single
      fabb5c4e
    • A
      [ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro · d0fdb5a5
      Arnaud Patard 提交于
      The S3C2410_UDC_SETIX() macro is not used and won't be used by the udc
      driver, so delete it.
      Signed-off-by: NArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      d0fdb5a5
    • A
      [ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header · c4b5bd4b
      Arnaud Patard 提交于
      linux/mmc/protocol.h header is gone, thus breaking the build of the
      mach-qt2410.c file. As this header is not used, I'm removing it. The
      right headers may still be added later if needed.
      Signed-off-by: NArnaud Patard <arnaud.patard@rtp-net.org>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      c4b5bd4b
    • M
      [TG3]: Add TG3_FLAG_SUPPORT_MSI flag. · 7544b097
      Michael Chan 提交于
      And fix up the code to always allow MSI on 5714 A2.
      
      Call tg3_find_peer() earlier because we need that information before
      we can determine whether we can set TG3_FLAG_SUPPORT_MSI or not.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7544b097
    • F
      ide-cs: recognize 2GB CompactFlash from Transcend · aa12b284
      Fabrice Aeschbacher 提交于
      Without the following patch, the kernel does not automatically detect
      2GB CompactFlash cards from Transcend.
      Signed-off-by: NFabrice Aeschbacher <fabrice.aeschbacher@siemens.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Acked-by: NPeter Stuge <peter@stuge.se>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      aa12b284
    • S
      hpt366: don't check enablebits for HPT36x · fdb0d72b
      Sergei Shtylyov 提交于
      HPT36x chip don't seem to have the channel enable bits, so prevent the IDE core
      from checking them...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Michal Kepien <michal.kepien@poczta.onet.pl>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      fdb0d72b
    • B
      ide-cris: fix ->speedproc and wrong ->swdma_mask · 55e4dee3
      Bartlomiej Zolnierkiewicz 提交于
      * fix ->speedproc to set the drive speed
      
      * this driver doesn't support SWDMA so use the correct ->swdma_mask
      
      * BUG() if an unsupported mode is passed to ->speedproc
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      55e4dee3
    • B
      siimage: fix wrong ->swdma_mask · 8e60d376
      Bartlomiej Zolnierkiewicz 提交于
      This driver doesn't support SWDMA so use the correct ->swdma_mask.
      
      While at it:
      
      * no need to call config_chipset_for_pio() in config_chipset_for_dma(),
        if DMA is not available config_chipset_for_pio() will be called
        by siimage_config_drive_for_dma() and if DMA is available
        config_siimage_chipset_for_pio() will be called by siimage_tune_chipset()
      
      * remove needless config_chipset_for_pio() wrapper
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      8e60d376
    • B
      it821x: PIO mode setup fixes · 0e9b4e53
      Bartlomiej Zolnierkiewicz 提交于
      * limit max PIO mode to PIO4, this driver doesn't support PIO5 and attempt
        to setup PIO5 by it821x_tuneproc() could result in incorrect PIO timings
        + incorrect base clock being set for controller in the passthrough mode
      
      * move code limiting max PIO according to the pair device capabilities from
        config_it821x_chipset_for_pio() to it821x_tuneproc() so the check is also
        applied for mode change requests coming through ->tuneproc and ->speedproc
        interfaces
      
      * set device speed in it821x_tuneproc()
      
      * in it821x_tune_chipset() call it821x_tuneproc() also if the controller is
        in the smart mode (so the check for pair device max PIO is done)
      
      * rename it821x_tuneproc() to it821x_tune_pio(), then add it821x_tuneproc()
        wrapper which does the max PIO mode check;  it worked by the pure luck
        previously, pio[4] and pio_want[4] arrays were used with index == 255
        so random PIO timings and base clock were set for the controller in the
        passthrough mode, thankfully PIO timings and base clock were corrected
        later by config_it821x_chipset_for_pio() call (but it was not called for
        PIO-only devices during resume and for user requested PIO autotuning)
      
      * remove config_it821x_chipset_for_pio() call from config_chipset_for_dma()
        as the driver sets ->autotune to 1 and ->tuneproc does the proper job now
      
      * convert the last user of config_it821x_chipset_for_pio() to use
        it821x_tuneproc(drive, 255) and remove no longer needed function
      
      While at it:
      
      * fix few comments
      
      * bump driver version
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      0e9b4e53
    • B
      pdc202xx_new: enable DMA for all ATAPI devices · 247b03f8
      Bartlomiej Zolnierkiewicz 提交于
      There is no reason to limit DMA to ide_cdrom type devices.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      247b03f8
    • B
      alim15x3: PIO fallback fix · 072cdcbb
      Bartlomiej Zolnierkiewicz 提交于
      If DMA tuning fails always set the best PIO mode.
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      072cdcbb
    • S
      aec62xx: fix PIO/DMA setup issues · 826a1b65
      Sergei Shtylyov 提交于
      Teach the driver's tuneproc() method to do PIO auto-runing properly since it
      treated 5 instead of 255 as auto-tune request, and also passed the mode limit
      of PIO5 to ide_get_best_pio_mode() despite supporting up to PIO4 only.
      
      While at it, also:
      
      - remove the driver's wrong claim about supporting SWDMA modes;
      
      - stop hooking ide_dma_timeout() method as the handler clearly doesn't fit for
        the task...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      826a1b65
    • S
      cmd64x: use interrupt status from MRDMODE register (take 2) · 66602c83
      Sergei Shtylyov 提交于
      Fold the parts of the ide_dma_end() methods identical to __ide_dma_end() into a
      mere call to it.
      Start using faster versions of the ide_dma_end() and ide_dma_test_irq() methods
      for the PCI0646U and newer chips that have the duplicate interrupt status bits
      in the I/O mapped MRDMODE register, determing what methods to use at the driver
      load time. Do some cleanup/renaming in the "old" ide_dma_test_irq() method too.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      66602c83
    • S
      cmd64x: procfs code fixes/cleanups (take 2) · 5826b318
      Sergei Shtylyov 提交于
      Fix several issues with the driver's procfs output:
      
      - when testing if channel is enabled, the code looks at the "simplex" bits, not
        at the real enable bits -- add #define for the primary channel enable bit;
      
      - UltraDMA modes 0, 1, 3 for slave drive reported incorrectly due to using the
        master drive's clock cycle resolution bit.
      
      While at it, also perform the following cleanups:
      
      - don't print extra newline before the first controller's dump;
      
      - correct the chipset names (from CMDxxx to PCI-xxx)
      
      - don't read from the registers which aren't used for dump;
      
      - better align the table column sizes;
      
      - rework UltraDMA mode dump code;
      
      - remove PIO mode dump code that has never been finished;
      
      - remove the duplicate interrupt status (the MRDMODE register bits mirror those
        those in the CFR and ARTTIM23 registers) and fold the dump into single line;
      
      - correct the style of the ?: operators...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5826b318
    • S
      cmd64x: add/fix enablebits (take 2) · 7accbffd
      Sergei Shtylyov 提交于
      The IDE core looks at the wrong bit when checking if the secondary channel is
      enabled on PCI0646 -- CNTRL register bit 7 is read-ahead disable, bit 3 is the
      correct one.
      Starting with PCI0646U chip, the primary channel can also be enabled/disabled --
      so, add 'enablebits' initializers to each 'ide_pci_device_t' structure, handling
      the original PCI0646 via adding the init_setup() method and clearing the 'reg'
      field there if necessary...
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7accbffd
    • S
      cmd64x: interrupt status fixes (take 2) · e51e2528
      Sergei Shtylyov 提交于
      The driver's ide_dma_test_irq() method was reading the MRDMODE register even on
      PCI0643/6 where it was write-only -- fix this by always reading the "backward-
      compatible" interrupt bits, renaming dma_alt_stat to irq_stat as the interrupt
      status bits are not coupled to DMA.
      In addition, wrong interrupt bit was tested/cleared for the primary channel --
      it's bit 2 in all the chip specs and the driver used bit 1... :-/
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e51e2528
    • S
      cmd64x: fix multiword and remove single-word DMA support · 60e7a82f
      Sergei Shtylyov 提交于
      Fix the multiword DMA and drop the single-word DMA support (which nobody will
      miss, I think).  In order to do it, a number of changes was necessary:
      
      - rename program_drive_counts() to program_cycle_times(), pass to it cycle's
        total/active times instead of the clock counts, and convert them into the
        active/recovery clocks there instead of cmd64x_tune_pio() -- this causes
        quantize_timing() to also move;
      
      - contrarywise, move all the code handling the address setup timing into
        cmd64x_tune_pio(), so that setting MWDMA mode wouldn't change address setup;
      
      - remove from the speedproc() method the  bogus code pretending to set the DMA
        timings by twiddling bits in the BMIDE status register, handle setting MWDMA
        by just calling program_cycle_times(); while at it, improve the style of that
        whole switch statement;
      
      - stop fiddling with the DMA capable bits in the speedproc() method -- they do
        not enable DMA, and are properly dealt with by the dma_host_{on,off} methods;
      
      - don't set hwif->swdma_mask in the init_hwif() method anymore.
      
      In addition to those changes, do the following:
      
      - in cmd64x_tune_pio(), when writing to ARTTIM23 register preserve the interrupt
        status bit, eliminate local_irq_{save|restore}() around this code as there's
        *no* actual race with the interrupt handler, and move cmdprintk() to a more
        fitting place -- after ide_get_best_pio_mode() call;
      
      - make {arttim|drwtim}_regs arrays single-dimensional, indexed with drive->dn;
      
      - rename {setup|recovery}_counts[] into more fitting {setup|recovery}_values[];
      
      - in  the speedproc() method, get rid of the duplicate reads/writes from/to the
        UDIDETCRx registers and of the extra variable used to store the transfer mode
        value after filtering,  use another method of determining master/slave drive,
        and cleanup useless parens;
      
      - beautify cmdprintk() output here and there.
      
      While at it, remove meaningless comment about the driver being used only on
      UltraSPARC and long non-relevant RCS tag. :-)
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      60e7a82f
    • S
      sl82c105: DMA support code cleanup (take 4) · 688a87d1
      Sergei Shtylyov 提交于
      Fold the now equivalent code in the ide_dma_check() method into a mere call to
      ide_use_dma().  Make config_for_dma() return non-zero if DMA mode has been set
      and call it from the ide_dma_check() method instead of ide_dma_on().
      Defer writing the DMA timings to the chip registers until DMA is really turned
      on (and do not enable IORDY for DMA).
      Remove unneeded code from the init_hwif() method, improve its overall looks.
      Rename the dma_start(), ide_dma_check(), and ide_dma_lostirq() methods, and
      also use more proper hwif->dma_command, fix printk() and comment in the latter
      one as well.  While at it, cleanup style in several places.
      Signed-off-by: NSergei Shtylyov <sshtylyov@ru.mvista.com>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      688a87d1