08 Dec, 2006

2 commits

  • rmmod/3080 [HC0[0]:SC0[0]:HE0:SE1] is trying to acquire:
    (proc_subdir_lock){--..}, at: [] remove_proc_entry+0x40/0x191

    and this task is already holding:
    (ide_lock){++..}, at: [] ide_unregister_subdriver+0x39/0xc8
    which would create a new lock dependency:
    (ide_lock){++..} -> (proc_subdir_lock){--..}

    but this new dependency connects a hard-irq-safe lock:
    (ide_lock){++..}
    ... which became hard-irq-safe at:
    [] lock_acquire+0x4b/0x6b
    [] _spin_lock_irqsave+0x22/0x32
    [] ide_intr+0x17/0x1a9
    [] handle_IRQ_event+0x20/0x4d
    [] __do_IRQ+0x94/0xef
    [] do_IRQ+0x9e/0xbd

    to a hard-irq-unsafe lock:
    (proc_subdir_lock){--..}
    ... which became hard-irq-unsafe at:
    ... [] lock_acquire+0x4b/0x6b
    [] _spin_lock+0x19/0x28
    [] xlate_proc_name+0x1b/0x99
    [] proc_create+0x46/0xdf
    [] create_proc_entry+0x62/0xa5
    [] proc_misc_init+0x1c/0x1d2
    [] proc_root_init+0x4c/0xe9
    [] start_kernel+0x294/0x3b3

    Move ide_remove_proc_entries() out from under ide_lock; there is nothing
    that indicates that this is needed.

    In specific, the call to ide_add_proc_entries() is unprotected, and there
    is nothing else in the file using the respective ->proc fields. Also the
    lock order around destroy_proc_ide_interface() suggests this.

    Alan sayeth:

    proc_ide_write_settings walks the setting list under ide_setting_sem, read
    ditto. remove_proc_entry is doing proc side housekeeping.

    Looks fine to me, although that old code is such a mess anything could be
    going on.

    Signed-off-by: Peter Zijlstra
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Jeff noted that the via driver returned an error to an unsigned int in a
    a case where errors are not permitted. Move the check down earlier so we
    can handle it properly. Not as pretty but it works this way and avoids
    hacking up ugly stuff in the legacy ide core.

    Signed-off-by: Alan Cox
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

06 Dec, 2006

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/brodo/pcmcia-2.6:
    [PATCH] pcmcia: at91_cf update
    [PATCH] pcmcia: fix m32r_cfc.c compilation
    [PATCH] pcmcia: ds.c debug enhancements
    [PATCH] pcmcia: at91_cf update
    [PATCH] pcmcia: conf.ConfigBase and conf.Present consolidation
    [PATCH] pcmcia: remove prod_id indirection
    [PATCH] pcmcia: remove manf_id and card_id indirection
    [PATCH] pcmcia: IDs for Elan serial PCMCIA devcies
    [PATCH] pcmcia: allow for four multifunction subdevices
    [PATCH] pcmcia: handle __copy_from_user() return value in ioctl
    [PATCH] pcmcia: multifunction card handling fixes
    [PATCH] pcmcia: allow shared IRQs on pd6729 sockets
    [PATCH] pcmcia: start over after CIS override
    [PATCH] cm4000_cs: fix return value check
    [PATCH] pcmcia: yet another IDE ID
    [PATCH] pcmcia: Add an id to ide-cs.c

    Linus Torvalds
     

05 Dec, 2006

4 commits


04 Dec, 2006

1 commit


30 Nov, 2006

1 commit


26 Nov, 2006

1 commit

  • This patch removes a module_exit function that sgiioc4 should not have had.

    It seems that the IDE layer doesn't support submodule unloading. sgiioc4 was
    the only driver in drivers/ide/pci that had an exit function. After an
    unload, the devices would stay around and the next attempt to reference would
    crash...

    Signed-off-by: Jeremy Higdon
    Acked-by: "Bartlomiej Zolnierkiewicz"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Higdon
     

15 Nov, 2006

1 commit


14 Nov, 2006

1 commit


13 Nov, 2006

1 commit


04 Nov, 2006

1 commit


31 Oct, 2006

1 commit


29 Oct, 2006

1 commit

  • The Jmicron JMB368 is PATA only so has the PATA on function zero. Don't
    therefore skip function zero on this device when probing

    Signed-off-by: Alan Cox
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

22 Oct, 2006

1 commit

  • The change from __setup() to module_param_named() requires users to prefix
    the option with "generic.".

    This patch re-adds the __setup() additionally to the module_param_named().

    Usually it would make sense getting rid of such an obsolete __setup() at
    some time, but considering that drivers/ide/ is slowly approaching a RIP
    status it's already implicitely scheduled for removal.

    This patch fixes kernel Bugzilla #7353.

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

17 Oct, 2006

1 commit

  • The SGI PCI-RT card, based on the SGI IOC4 chip, will be made available on
    Altix XE (x86_64) platforms in the near future. As such it is now a
    misnomer for the IOC4 base device driver to live under drivers/sn, and
    would complicate builds for non-SN2.

    This patch moves the IOC4 base driver code from drivers/sn to drivers/misc,
    and updates the associated Makefiles and Kconfig files to allow building on
    non-SN2 configs. Due to the resulting change in link order, it is now
    necessary to use late_initcall() for IOC4 subdriver initialization.

    [akpm@osdl.org: __udivdi3 fix]
    [akpm@osdl.org: fix default in Kconfig]
    Acked-by: Pat Gefre
    Acked-by: Jeremy Higdon
    Signed-off-by: Brent Casavant
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brent Casavant
     

16 Oct, 2006

1 commit


12 Oct, 2006

3 commits


06 Oct, 2006

1 commit


05 Oct, 2006

1 commit

  • Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
    of passing regs around manually through all ~1800 interrupt handlers in the
    Linux kernel.

    The regs pointer is used in few places, but it potentially costs both stack
    space and code to pass it around. On the FRV arch, removing the regs parameter
    from all the genirq function results in a 20% speed up of the IRQ exit path
    (ie: from leaving timer_interrupt() to leaving do_IRQ()).

    Where appropriate, an arch may override the generic storage facility and do
    something different with the variable. On FRV, for instance, the address is
    maintained in GR28 at all times inside the kernel as part of general exception
    handling.

    Having looked over the code, it appears that the parameter may be handed down
    through up to twenty or so layers of functions. Consider a USB character
    device attached to a USB hub, attached to a USB controller that posts its
    interrupts through a cascaded auxiliary interrupt controller. A character
    device driver may want to pass regs to the sysrq handler through the input
    layer which adds another few layers of parameter passing.

    I've build this code with allyesconfig for x86_64 and i386. I've runtested the
    main part of the code on FRV and i386, though I can't test most of the drivers.
    I've also done partial conversion for powerpc and MIPS - these at least compile
    with minimal configurations.

    This will affect all archs. Mostly the changes should be relatively easy.
    Take do_IRQ(), store the regs pointer at the beginning, saving the old one:

    struct pt_regs *old_regs = set_irq_regs(regs);

    And put the old one back at the end:

    set_irq_regs(old_regs);

    Don't pass regs through to generic_handle_irq() or __do_IRQ().

    In timer_interrupt(), this sort of change will be necessary:

    - update_process_times(user_mode(regs));
    - profile_tick(CPU_PROFILING, regs);
    + update_process_times(user_mode(get_irq_regs()));
    + profile_tick(CPU_PROFILING);

    I'd like to move update_process_times()'s use of get_irq_regs() into itself,
    except that i386, alone of the archs, uses something other than user_mode().

    Some notes on the interrupt handling in the drivers:

    (*) input_dev() is now gone entirely. The regs pointer is no longer stored in
    the input_dev struct.

    (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
    something different depending on whether it's been supplied with a regs
    pointer or not.

    (*) Various IRQ handler function pointers have been moved to type
    irq_handler_t.

    Signed-Off-By: David Howells
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

04 Oct, 2006

4 commits

  • kbuild explicitly includes this at build time.

    Signed-off-by: Dave Jones

    Dave Jones
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: (39 commits)
    Add missing maintainer countries in CREDITS
    Fix bytes kilobytes typo in Kconfig for ramdisk
    fix a typo in Documentation/pi-futex.txt
    BUG_ON conversion for fs/xfs/
    BUG_ON() conversion in fs/nfsd/
    BUG_ON conversion for fs/reiserfs
    BUG_ON cleanups in arch/i386
    BUG_ON cleanup in drivers/net/tokenring/
    BUG_ON cleanup for drivers/md/
    kerneldoc-typo in led-class.c
    debugfs: spelling fix
    rcutorture: Fix incorrect description of default for nreaders parameter
    parport: Remove space in function calls
    Michal Wronski: update contact info
    Spelling fix: "control" instead of "cotrol"
    reboot parameter in Documentation/kernel-parameters.txt
    Fix copy&waste bug in comment in scripts/kernel-doc
    remove duplicate "until" from kernel/workqueue.c
    ite_gpio fix tabbage
    fix file specification in comments
    ...

    Fixed trivial path conflicts due to removed files:
    arch/mips/dec/boot/decstation.c, drivers/char/ite_gpio.c

    Linus Torvalds
     
  • Many files include the filename at the beginning, serveral used a wrong one.

    Signed-off-by: Uwe Zeisberger
    Signed-off-by: Adrian Bunk

    Uwe Zeisberger
     
  • As per feature-removal-schedule.txt.

    Signed-off-by: Yoichi Yuasa
    Acked-by: Alan Cox
    Signed-off-by: Ralf Baechle

    Yoichi Yuasa
     

03 Oct, 2006

12 commits

  • Git rid of the runtime warning about pcmcia not supporting exclusive IRQs,
    so "the driver needs updating".

    Signed-off-by: David Brownell
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Signed-off-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Allow ide/pci/generic to claim chipsets as a a module or when built-in. It
    requires using "all_generic_ide" as a boot option.

    Signed-off-by: Patrick Jefferson
    Acked-by: Alan Cox
    Closes-Bug: 7017
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Patrick Jefferson
     
  • Michal Miroslaw reported a problem (bugzilla #7023) where a user initiated
    reset while the IDE layer was already resetting the channel caused a crash,
    and provided a rough fix.

    This is a slightly cleaner version of the fix which tracks the reset state
    and blocks further reset requests while a reset is in progress.

    Note this is not a security issue - random end users can't access the
    ioctl in question anyway.

    Signed-off-by: Alan Cox
    Cc: Michal Miroslaw
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Remove some code which is unneeded if CONFIG_PM=n.

    Signed-off-by: Alexey Dobriyan
    Cc: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Few cards informations submitted by OpenZaurus users.

    Seagate 8GB microdrive:
    product info: "SEAGATE", "ST1"
    manfid 0x0111, 0x0000

    One CF card:
    product info: "SAMSUNG", "04/05/06", "", ""
    manfid : 0x0000, 0x0000

    Ridata 8GB Pro 150X Compact Flash Card:
    product info: "SMI VENDOR", "SMI PRODUCT", ""
    manfid: 0x000a, 0x0000

    product info: "M-Systems", "CF500", ""
    manfid: 0x000a, 0x0000

    product info: "TRANSCEND", "TS4GCF120", ""
    manfid: 0x000a, 0x0000

    Alan sayeth: "Same update needs to go into drivers/ata/pata_pcmcia"

    Signed-off-by: Marcin Juszkiewicz
    Cc: Dominik Brodowski
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Marcin Juszkiewicz
     
  • Add a step to the IDE PM state machine that reprograms disk PIO timings
    as the first step on resume. This prevents ide deadlock on
    resume-from-ram on my nforce3-based laptop.

    An earlier implementation was written entirely within the amd74xx ide
    driver, but Alan helpfully pointed out that this is the correct thing to
    do globally. Still, I'm only calling hwif->tuneproc() for disks, based
    on two things:

    - The existing state machine is already passed over for non-disk drives
    - Previous testing on my laptop shows that the hangs are related only
    to the disk - suspend/resume from a livecd showed that there's no
    need for this on the cdrom.

    Signed-off-by: Jason Lunz
    Cc: Bartlomiej Zolnierkiewicz
    Cc: "Rafael J. Wysocki"
    Cc: Sergei Shtylyov
    Cc: Pavel Machek
    Cc: Brad Campbell
    Cc: David Brownell
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Lunz
     
  • Remove dma_base2 field from ide_hwif_t as it's used only in 2 drivers and
    without great need.

    Signed-off-by: Sergei Shtylyov
    Cc: John Keller
    Signed-off-by: Jeremy Higdon
    Acked-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sergei Shtylyov
     
  • - setup-pci.c: remove the unused ide_pci_unregister_driver()
    - ide-dma.c: remove the unused EXPORT_SYMBOL_GPL(ide_in_drive_list)

    Signed-off-by: Adrian Bunk
    Acked-by: Alan Cox
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Check driver layer return values in IDE core.

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • There are three flags being set by default by the PIIX driver for speeds >
    PIO 1, and one not being cleared properly on fallback to PIO0. The most
    important one is the prefetch/post write control which only works for ATA
    and can do bad things with ATAPI.

    The patch does its best to set the flags correctly for drivers/ide. Its
    not 100% perfect but its closer than the original. 100% perfect requires
    proper IORDY handling but this isn't critical (and its not right in libata
    either .. yet)

    Sergei Shtylyov said:

    > + { 0, 0 },
    > + { 0, 0 },
    > + { 1, 0 },
    > + { 2, 1 },
    > + { 2, 3 }, };
    >
    > pio = ide_get_best_pio_mode(drive, pio, 5, NULL);

    BTW, there's quite obvious error here which leads to access outside of
    timings[] if somebody passes PIO mode 5 (or autotuning code finds out that
    drive supports PIO mode 5). Could have been fixed while at it... Those drives
    should be rare, though...

    > + }
    > master_data = master_data | (timings[pio][0] << 12) | (timings[pio][1] << 8);
    > }
    > pci_write_config_word(dev, master_port, master_data);

    Actually, there's one more serious issue with piix_tune_drive() -- it
    doesn't actually set the drive's own transfer mode.

    Signed-off-by: Alan Cox
    Cc: Sergei Shtylyov
    Cc: Bartlomiej Zolnierkiewicz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Fix ide_in_drive_list: drive_table->id_firmware should be searched *in*
    id->fw_rev, not vice versa.

    Signed-off-by: Kirill Smelkov
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Smelkov