1. 09 May, 2007 28 commits
    • Bartlomiej Zolnierkiewicz's avatar
      ide: legacy PCI bus order probing fixes · 6d208b39
      Bartlomiej Zolnierkiewicz authored
      IDE PCI host drivers should register themselves with IDE core only when
      IDE driver is built-in, otherwise (IDE driver is modular and thus IDE PCI
      host drivers are also modular) the code has no effect and just complicates
      the probing.
      
      Fix it by adding new config option CONFIG_IDEPCI_PCIBUS (defined only when
      needed and invisible to the user) and covering by #ifdef/#endif the code
      in question.  It turned out that "ide=reverse" was silently accepted but did
      nothing in case when IDE driver was modular, this is fixed now.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      6d208b39
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_proc_register_port() · 5cbf79cd
      Bartlomiej Zolnierkiewicz authored
      * create_proc_ide_interfaces() tries to add /proc entries for every probed
        and initialized IDE port, replace it by ide_proc_register_port() which does
        it only for the given port (also rename destroy_proc_ide_interface() to
        ide_proc_unregister_port() for consistency)
        
      * convert {create,destroy}_proc_ide_interface[s]() users to use new functions
      
      * pmac driver depended on proc_ide_create() to add /proc port entries, fix it
        
      * au1xxx-ide, swarm and cs5520 drivers depended indirectly on ide-generic
        driver (CONFIG_IDE_GENERIC=y) to add port /proc entries, fix them
      
      * there is now no need to add /proc entries for IDE ports in proc_ide_create()
        so don't do it
      
      * proc_ide_create() needs now to be called before drivers are probed - fix it,
        while at it make proc_ide_create() create /proc "ide" directory
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      5cbf79cd
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add "initializing" argument to ide_register_hw() · 869c56ee
      Bartlomiej Zolnierkiewicz authored
      Add "initializing" argument to ide_register_hw() and use it instead of ide.c
      wide variable of the same name.  Update all users of ide_register_hw()
      accordingly.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      869c56ee
    • Bartlomiej Zolnierkiewicz's avatar
      ide: cable detection fixes (take 2) · 7f8f48af
      Bartlomiej Zolnierkiewicz authored
      Tejun's recent eighty_ninty_three() fix has inspired me to do more thorough
      review of the cable detection code...
      
      * print user-friendly warning about limiting the maximum transfer speed
        to UDMA33 (and the reason behind it) when 80-wire cable is not detected,
        also while at it cleanup eighty_ninty_three() a bit
      
      * use eighty_ninty_three() in ide_ata66_check(), this actually fixes 3 bugs:
        - bit 14 (word 93 validity check) == 1 && bit 13 (80-wire cable test) == 1
          were used as 80-wire cable present test for CONFIG_IDEDMA_IVB=n case
          (please see FIXME comment in eighty_ninty_three() for more details)
        - CONFIG_IDEDMA_IVB=y/n cases were interchanged
        - check for SATA devices was missing
      
      * remove private cable warnings from pdc_202xx{old,new} drivers now that core
        code provides this functionality (plus, in pdc202xx_new case the test could
        give false warnings for ATAPI devices because pdc202xx_new driver doesn't
        even support ATAPI DMA)
      
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7f8f48af
    • Bartlomiej Zolnierkiewicz's avatar
      ide: move IDE settings handling to ide-proc.c · 7662d046
      Bartlomiej Zolnierkiewicz authored
      * move
      	__ide_add_setting()
      	ide_add_setting()
      	__ide_remove_setting()
      	auto_remove_settings()
      	ide_find_setting_by_name()
      	ide_read_setting()
      	ide_write_setting()
      	set_xfer_rate()
      	ide_add_generic_settings()
      	ide_register_subdriver()
      	ide_unregister_subdriver()
      
        from ide.c to ide-proc.c
      
      * set_{io_32bit,pio_mode,using_dma}() cannot be marked static now, fix it
      
      * rename ide_[un]register_subdriver() to ide_proc_[un]register_driver(),
        update device drivers to use new names
      
      * add CONFIG_IDE_PROC_FS=n versions of ide_proc_[un]register_driver()
        and ide_add_generic_settings()
      
      * make ide_find_setting_by_name(), ide_{read,write}_setting()
        and ide_{add,remove}_proc_entries() static
      
      * cover IDE settings code in device drivers with CONFIG_IDE_PROC_FS #ifdef,
        also while at it cover with CONFIG_IDE_PROC_FS #ifdef ide_driver_t.proc
      
      * remove bogus comment from ide.h
      
      * cover with CONFIG_IDE_PROC_FS #ifdef .proc and .settings in ide_drive_t
      
      Besides saner code this patch results in the IDE core smaller by ~2 kB
      (on x86-32) and IDE disk driver by ~1 kB (ditto) when CONFIG_IDE_PROC_FS=n.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      7662d046
    • Bartlomiej Zolnierkiewicz's avatar
      ide: split off ioctl handling from IDE settings (v2) · 1497943e
      Bartlomiej Zolnierkiewicz authored
      * do write permission and min/max checks in ide_procset_t functions
      
      * ide-disk.c: drive->id is always available so cleanup "multcount" setting
        accordingly
      
      * ide-disk.c: "address" setting was incorrectly defined as type TYPE_INTA,
        fix it by using type TYPE_BYTE and updating ide_drive_t->adressing field,
        the bug didn't trigger because this IDE setting uses custom ->set function
      
      * ide.c: add set_ksettings() for handling HDIO_SET_KEEPSETTINGS ioctl
      
      * ide.c: add set_unmaskirq() for handling HDIO_SET_UNMASKINTR ioctl
      
      * handle ioctls directly in generic_ide_ioclt() and idedisk_ioctl()
        instead of using IDE settings to deal with them
      
      * remove no longer needed ide_find_setting_by_ioctl() and {read,write}_ioctl
        fields from ide_settings_t, also remove now unused TYPE_INTA handling
      
      v2:
      * add missing EXPORT_SYMBOL_GPL(ide_setting_sem) needed now for ide-disk
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      1497943e
    • Bartlomiej Zolnierkiewicz's avatar
      ide: make /proc/ide/ optional · ecfd80e4
      Bartlomiej Zolnierkiewicz authored
      All important information/features should be already available through
      sysfs and ioctl interfaces.
      
      Add CONFIG_IDE_PROC_FS (CONFIG_SCSI_PROC_FS rip-off) config option,
      disabling it makes IDE driver ~5 kB smaller (on x86-32).
      
      While at it add CONFIG_PROC_FS=n versions of proc_ide_{create,destroy}()
      and remove no longer needed #ifdefs.
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      ecfd80e4
    • Bartlomiej Zolnierkiewicz's avatar
      ide: add ide_tune_dma() helper · 29e744d0
      Bartlomiej Zolnierkiewicz authored
      After reworking the code responsible for selecting the best DMA
      transfer mode it is now possible to add generic ide_tune_dma() helper.
      
      Convert some IDE PCI host drivers to use it (the ones left need more work).
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      29e744d0
    • Bartlomiej Zolnierkiewicz's avatar
      ide: rework the code for selecting the best DMA transfer mode (v3) · 2d5eaa6d
      Bartlomiej Zolnierkiewicz authored
      Depends on the "ide: fix UDMA/MWDMA/SWDMA masks" patch.
      
      * add ide_hwif_t.udma_filter hook for filtering UDMA mask
        (use it in alim15x3, hpt366, siimage and serverworks drivers)
      * add ide_max_dma_mode() for finding best DMA mode for the device
        (loosely based on some older libata-core.c code)
      * convert ide_dma_speed() users to use ide_max_dma_mode()
      * make ide_rate_filter() take "ide_drive_t *drive" as an argument instead
        of "u8 mode" and teach it to how to use UDMA mask to do filtering
      * use ide_rate_filter() in hpt366 driver
      * remove no longer needed ide_dma_speed() and *_ratemask()
      * unexport eighty_ninty_three()
      
      v2:
      * rename ->filter_udma_mask to ->udma_filter
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * updated for scc_pata driver (fixes XFER_UDMA_6 filtering for user-space
        originated transfer mode change requests when 100MHz clock is used)
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      2d5eaa6d
    • Bartlomiej Zolnierkiewicz's avatar
      ide: fix UDMA/MWDMA/SWDMA masks (v3) · 18137207
      Bartlomiej Zolnierkiewicz authored
      * use 0x00 instead of 0x80 to disable ->{ultra,mwdma,swdma}_mask
      * add udma_mask field to ide_pci_device_t and use it to initialize
        ->ultra_mask in aec62xx, cmd64x, pdc202xx_{new,old} and piix drivers
      * fix UDMA masks to match with chipset specific *_ratemask()
        (alim15x3, hpt366, serverworks and siimage drivers need UDMA mask
         filtering method - done in the next patch)
      
      v2:
      * piix: fix cable detection for 82801AA_1 and 82372FB_1
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * cmd64x: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      * aec62xx: fix newly introduced bug - check DMA status not command register
        [ Noticed by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      
      v3:
      * piix: use hwif->cds->udma_mask
        [ Suggested by Sergei Shtylyov <sshtylyov@ru.mvista.com>. ]
      Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      18137207
    • H. Peter Anvin's avatar
      Documentation/i386/boot.txt: update and correct · de372ecd
      H. Peter Anvin authored
      In the process of rewriting the x86 setup code, I found a number of
      inaccuracies and outdated recommendations in the boot protocol
      documentation.  Revamp to make it more up to date.
      
      In particular, the common use of the heap actually requires (slightly)
      more than 4K of heap plus stack, which is the recommended amount in
      the document; currently the code compensates by being smaller than
      specified, but we can't assume that will be true forever.  Thus,
      recommend that if we have a modern bzImage kernel, that the bootloader
      maximizes the available space.
      Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      de372ecd
    • Andrew Morton's avatar
      revert 'sched: redundant reschedule when set_user_nice() boosts a prio of a... · d5f9f942
      Andrew Morton authored
      revert 'sched: redundant reschedule when set_user_nice() boosts a prio of a task from the "expired" array'
      
      Revert commit bd53f96c.
      
      Con says:
      
      This is no good, sorry. The one I saw originally was with the staircase
      deadline cpu scheduler in situ and was different.
      
        #define TASK_PREEMPTS_CURR(p, rq) \
           ((p)->prio < (rq)->curr->prio)
           (((p)->prio < (rq)->curr->prio) && ((p)->array == (rq)->active))
      
      This will fail to wake up a runqueue for a task that has been migrated to the
      expired array of a runqueue which is otherwise idle which can happen with smp
      balancing,
      
      Cc: Dmitry Adamushko <dmitry.adamushko@gmail.com>
      Cc: Con Kolivas <kernel@kolivas.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      d5f9f942
    • Jean Delvare's avatar
      applesmc: Use standard sysfs names for labels · da4e8ca3
      Jean Delvare authored
      We have a standard suffix to associate a designation string to a sensor:
      _label.  Use it instead of _position so that libsensors will catch it.
      (This isn't implemented yet, but should be soon.)
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Nicolas Boichat <nicolas@boichat.ch>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      da4e8ca3
    • Jean Delvare's avatar
      applesmc: Use the address as platform device ID · ddfbf2af
      Jean Delvare authored
      Let the applesmc device export its address to userspace.  libsensors needs
      this to recognize the device and give it a unique ID.
      Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
      Cc: Nicolas Boichat <nicolas@boichat.ch>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      ddfbf2af
    • Tilman Schmidt's avatar
      usb_gigaset: don't kmalloc(0) · 21d36495
      Tilman Schmidt authored
      Zero-sized allocations are pointless anyway, and the SLUB allocator
      complains about them, so stop doing that.
      Signed-off-by: default avatarTilman Schmidt <tilman@imap.cc>
      Signed-off-by: default avatarHansjoerg Lipp <hjlipp@web.de>
      Cc: Greg KH <greg@kroah.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      21d36495
    • Geert Uytterhoeven's avatar
      m68k: <asm/scatterlist.h> needs <linux/types.h> · b590d2ba
      Geert Uytterhoeven authored
      The recent <linux/pci.h> cleanup uncovered that include/asm-m68k/scatterlist.h
      needs to include <linux/types.h>
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Cc: Roman Zippel <zippel@linux-m68k.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      b590d2ba
    • David Howells's avatar
      FRV: Miscellaneous fixes · 5616df20
      David Howells authored
      Miscellaneous fixes to bring FRV up to date:
      
       (1) Copy the new syscall numbers from i386 to asm-frv/unistd.h and fill out
           the syscall table in entry.S too.
      
       (2) Mark __frv_uart0 and __frv_uart1 __pminitdata rather than __initdata so
           that determine_clocks() can access them when CONFIG_PM=y.
      
       (3) Make arch/frv/mm/elf-fdpic.c include asm/mman.h so that MAP_FIXED is
           available (fixes commit 2fd3beba).
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      5616df20
    • David Rientjes's avatar
      smaps: only define clear_refs for CONFIG_MMU · 4b8df891
      David Rientjes authored
      /proc/pid/clear_refs is only defined in the CONFIG_MMU case, so make sure we
      don't have any references to clear_refs_smap() in generic procfs code.
      Signed-off-by: default avatarDavid Rientjes <rientjes@google.com>
      Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4b8df891
    • Yasunori Goto's avatar
      Fix unnecesary meminit · 7e81ab9d
      Yasunori Goto authored
      This is to fix unnecessary __meminit definition.  These are exported for
      kernel modules.
      
      I compiled on ia64/x86-64 with memory hotplug on/off.
      Signed-off-by: default avatarYasunori Goto <y-goto@jp.fujitsu.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7e81ab9d
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6 · f4ebc993
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        [CRYPTO] cryptomgr: Fix use after free
      f4ebc993
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 · 0c23664e
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
        [SPARC64]: Optimize fault kprobe handling just like powerpc.
        [SPARC]: Wire up utimensat syscall.
        [SPARC64]: Fix request_irq() ignored result warnings in PCI controller code.
        [SPARC64]: Kill asm-sparc64/pbm.h
        [ATYFB]: Fix sparc includes.
        [QLA2XXX]: Fix build on sparc.
        [SPARC64]: Removal of trivial pci_controller_info uses.
        [SPARC64]: Move index info pci_pbm_info.
        [SPARC64]: Move {setup,teardown}_msi_irq into pci_pbm_info.
        [SPARC64]: Move pci_ops into pci_pbm_info.
        [SPARC64] SBUS: Error interrupt registry cleanups.
        [SPARC64] PCI: Use root list of pbm's instead of pci_controller_info's
        [SPARC64] PCI: Kill PROM_PCIRNG_MAX and PROM_PCIIMAP_MAX.
        [SPARC64] PCI: Use common routine to fetch PBM properties.
      0c23664e
    • Linus Torvalds's avatar
      Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6 · 6ec129c3
      Linus Torvalds authored
      * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits)
        [SCSI] zfcp: clear boxed flag on unit reopen.
        [SCSI] zfcp: clear adapter failed flag if an fsf request times out.
        [SCSI] zfcp: rework request ID management.
        [SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI
        [SCSI] zfcp: Locking for req_no and req_seq_no
        [SCSI] zfcp: print S_ID and D_ID with 3 bytes
        [SCSI] ipr: Use PCI-E reset API for new ipr adapter
        [SCSI] qla2xxx: Update version number to 8.01.07-k7.
        [SCSI] qla2xxx: Add MSI support.
        [SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
        [SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed.
        [SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
        [SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
        [SCSI] zfcp: Stop system after memory corruption
        [SCSI] mesh: cleanup variable usage in interrupt handler
        [SCSI] megaraid: replace yield() with cond_resched()
        [SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
        [SCSI] aacraid: correct SUN products to README
        [SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers
        [SCSI] aacraid: kexec fix (reset interrupt handler)
        ...
      6ec129c3
    • Linus Torvalds's avatar
      Revert "fbdev: ignore VESA modes if framebuffer is disabled" · 01e73be3
      Linus Torvalds authored
      This reverts commit 464bdd33.
      
      Peter Anvin correctly points out that VESA modes have nothing to do with
      frame buffers per se - they are often just regular extended text modes.
      Disabling them just because we don't have frame buffer support is very
      wrong.
      
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Antonino A. Daplas <adaplas@gmail.com>,
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      01e73be3
    • Linus Torvalds's avatar
      Remove suid/sgid bits on [f]truncate() · 7b82dc0e
      Linus Torvalds authored
      .. to match what we do on write().  This way, people who write to files
      by using [f]truncate + writable mmap have the same semantics as if they
      were using the write() family of system calls.
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7b82dc0e
    • Herbert Xu's avatar
      [CRYPTO] cryptomgr: Fix use after free · 1605b847
      Herbert Xu authored
      By the time kthread_run returns the param may have already been freed
      so writing the returned thread_struct pointer to param is wrong.
      
      In fact, we don't need it in param anyway so this patch simply puts it
      on the stack.
      Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
      1605b847
    • David S. Miller's avatar
      [SPARC64]: Optimize fault kprobe handling just like powerpc. · 127cda1e
      David S. Miller authored
      And eliminate DIE_GPF while we're at it.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      127cda1e
    • David S. Miller's avatar
      [SPARC]: Wire up utimensat syscall. · 6c114260
      David S. Miller authored
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c114260
    • David S. Miller's avatar
  2. 08 May, 2007 12 commits