26 Jul, 2008

1 commit


22 Jul, 2008

1 commit


21 Jul, 2008

1 commit

  • Move the line disciplines towards a conventional ->ops arrangement. For
    the moment the actual 'tty_ldisc' struct in the tty is kept as part of
    the tty struct but this can then be changed if it turns out that when it
    all settles down we want to refcount ldiscs separately to the tty.

    Pull the ldisc code out of /proc and put it with our ldisc code.

    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alan Cox
     

15 Jul, 2008

2 commits

  • * 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6: (64 commits)
    firmware: convert sb16_csp driver to use firmware loader exclusively
    dsp56k: use request_firmware
    edgeport-ti: use request_firmware()
    edgeport: use request_firmware()
    vicam: use request_firmware()
    dabusb: use request_firmware()
    cpia2: use request_firmware()
    ip2: use request_firmware()
    firmware: convert Ambassador ATM driver to request_firmware()
    whiteheat: use request_firmware()
    ti_usb_3410_5052: use request_firmware()
    emi62: use request_firmware()
    emi26: use request_firmware()
    keyspan_pda: use request_firmware()
    keyspan: use request_firmware()
    ttusb-budget: use request_firmware()
    kaweth: use request_firmware()
    smctr: use request_firmware()
    firmware: convert ymfpci driver to use firmware loader exclusively
    firmware: convert maestro3 driver to use firmware loader exclusively
    ...

    Fix up trivial conflicts with BKL removal in drivers/char/dsp56k.c and
    drivers/char/ip2/ip2main.c manually.

    Linus Torvalds
     
  • Jonathan Corbet
     

10 Jul, 2008

1 commit


21 Jun, 2008

1 commit

  • All of the open() functions which don't need the BKL on their face may
    still depend on its acquisition to serialize opens against driver
    initialization. So make those functions acquire then release the BKL to be
    on the safe side.

    Signed-off-by: Jonathan Corbet

    Jonathan Corbet
     

25 May, 2008

1 commit


30 Apr, 2008

4 commits

  • Signed-off-by: Alan Cox

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

    Alan Cox
     
  • - Operations are now a shared const function block as with most other Linux
    objects

    - Introduce wrappers for some optional functions to get consistent behaviour

    - Wrap put_char which used to be patched by the tty layer

    - Document which functions are needed/optional

    - Make put_char report success/fail

    - Cache the driver->ops pointer in the tty as tty->ops

    - Remove various surplus lock calls we no longer need

    - Remove proc_write method as noted by Alexey Dobriyan

    - Introduce some missing sanity checks where certain driver/ldisc
    combinations would oops as they didn't check needed methods were present

    [akpm@linux-foundation.org: fix fs/compat_ioctl.c build]
    [akpm@linux-foundation.org: fix isicom]
    [akpm@linux-foundation.org: fix arch/ia64/hp/sim/simserial.c build]
    [akpm@linux-foundation.org: fix kgdb]
    Signed-off-by: Alan Cox
    Acked-by: Greg Kroah-Hartman
    Cc: Jason Wessel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • - remove i2os.h -- there was only macro to macro renaming or useless
    stuff
    - remove another uselless stuf (NULLFUNC, NULLPTR, YES, NO)
    - use outb/inb directly
    - use locking functions directly
    - don't define another ROUNDUP, use roundup(x, 2) instead
    - some comments and whitespace cleanup
    - remove some commented crap
    - prepend the rest by I2 prefix to not collide with rest of the world
    like in following output (pointed out by akpm)

    In file included from drivers/char/ip2/ip2main.c:128:
    drivers/char/ip2/i2ellis.h:608:1: warning: "COMPLETE" redefined
    In file included from include/net/netns/ipv4.h:8,
    from include/net/net_namespace.h:13,
    from include/linux/seq_file.h:7,
    from include/asm/machdep.h:12,
    from include/asm/pci.h:17,
    from include/linux/pci.h:951,
    from drivers/char/ip2/ip2main.c:95:
    include/net/inet_frag.h:28:1: warning: this is the location of the previous definition

    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • Replace init_module and cleanup_module with static functions and
    module_init/module_exit.

    Signed-off-by: Jon Schindler
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jon Schindler
     

29 Apr, 2008

2 commits

  • /******************************************/
    /* Remove useless comment, while I am it. */
    /******************************************/

    Signed-off-by: Alexey Dobriyan
    Cc: Greg Kroah-Hartman
    Cc: Jeff Garzik
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Remove proc_root export. Creation and removal works well if parent PDE is
    supplied as NULL -- it worked always that way.

    So, one useless export removed and consistency added, some drivers created
    PDEs with &proc_root as parent but removed them as NULL and so on.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

03 Apr, 2008

1 commit


08 Feb, 2008

1 commit


03 Feb, 2008

1 commit


24 Oct, 2007

2 commits


17 Oct, 2007

2 commits


13 Oct, 2007

1 commit


01 Aug, 2007

1 commit

  • CONFIG_PCI=n:

    drivers/char/ip2/ip2main.c: In function `ip2_loadmain':
    drivers/char/ip2/ip2main.c:503: warning: unused variable `status'

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

    Andrew Morton
     

20 Jul, 2007

1 commit


17 Jul, 2007

1 commit


22 Feb, 2007

1 commit


13 Feb, 2007

2 commits

  • Of kernel subsystems that work with pids the tty layer is probably the largest
    consumer. But it has the nice virtue that the assiation with a session only
    lasts until the session leader exits. Which means that no reference counting
    is required. So using struct pid winds up being a simple optimization to
    avoid hash table lookups.

    In the long term the use of pid_nr also ensures that when we have multiple pid
    spaces mixed everything will work correctly.

    Signed-off-by: Eric W. Biederman
    Cc: Alan Cox
    Cc: Oleg Nesterov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • - Use timer macros to set function and data members and to modify
    expiration time.
    - Use DEFINE_TIMER for global timers and do not init them at run-time in
    these cases.
    - del_timer_sync is common in most cases -- we want to wait for timer
    function if it's still running.

    Signed-off-by: Jiri Slaby
    Cc: Dave Airlie
    Cc: David Woodhouse
    Cc: Dominik Brodowski
    Cc: Alessandro Zummo
    Cc: Paul Fulghum
    Cc: Kylene Jo Hall
    Cc: Wim Van Sebroeck
    Acked-by: Dmitry Torokhov (Input bits)
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

12 Feb, 2007

1 commit

  • tty_wakeup cleanup

    - remove wake_up_interruptible(&tty->write_wait) surrounding
    tty_wakup(tty);
    - substitute tty->ldisc.write_wakeup(tty) + wake_up() by tty_wakeup(tty);

    Signed-off-by: Jiri Slaby
    Cc: Alan Cox
    Acked-by: Tilman Schmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     

06 Jan, 2007

1 commit

  • Make this:

    drivers/char/ip2/ip2main.c: In function 'ip2_loadmain':
    drivers/char/ip2/ip2main.c:654: warning: control may reach end of non-void function 'iiSetAddress' being inlined
    drivers/char/ip2/ip2main.c:808: warning: control may reach end of non-void function 'iiInitialize' being inlined

    go away.

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

    Andrew Morton
     

09 Dec, 2006

2 commits

  • This is the grungy swap all the occurrences in the right places patch that
    goes with the updates. At this point we have the same functionality as
    before (except that sgttyb() returns speeds not zero) and are ready to
    begin turning new stuff on providing nobody reports lots of bugs

    If you are a tty driver author converting an out of tree driver the only
    impact should be termios->ktermios name changes for the speed/property
    setting functions from your upper layers.

    If you are implementing your own TCGETS function before then your driver
    was broken already and its about to get a whole lot more painful for you so
    please fix it 8)

    Also fill in c_ispeed/ospeed on init for most devices, although the current
    code will do this for you anyway but I'd like eventually to lose that extra
    paranoia

    [akpm@osdl.org: bluetooth fix]
    [mp3@de.ibm.com: sclp fix]
    [mp3@de.ibm.com: warning fix for tty3270]
    [hugh@veritas.com: fix tty_ioctl powerpc build]
    [jdike@addtoit.com: uml: fix ->set_termios declaration]
    Signed-off-by: Alan Cox
    Signed-off-by: Martin Peschke
    Acked-by: Peter Oberparleiter
    Cc: Cornelia Huck
    Signed-off-by: Hugh Dickins
    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • Signed-off-by: Josef Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef Sipek
     

08 Dec, 2006

2 commits


22 Nov, 2006

1 commit


12 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
     

03 Oct, 2006

1 commit

  • Kill warning:

    drivers/char/ip2/ip2main.c: In function ‘ip2_loadmain’:
    drivers/char/ip2/ip2main.c:782: warning: label ‘out_class’ defined but not used

    This driver's initialization (and cleanup of errors during init) is
    extremely convoluted, and could stand to be transformed into the standard
    unwinding-goto style of error cleanup.

    Signed-off-by: Jeff Garzik
    Acked-by: Michael H. Warfield
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Garzik
     

02 Oct, 2006

1 commit

  • As part of an SMP cleanliness pass over UML, I consted a bunch of
    structures in order to not have to document their locking. One of these
    structures was a struct tty_operations. In order to const it in UML
    without introducing compiler complaints, the declaration of
    tty_set_operations needs to be changed, and then all of its callers need to
    be fixed.

    This patch declares all struct tty_operations in the tree as const. In all
    cases, they are static and used only as input to tty_set_operations. As an
    extra check, I ran an i386 allyesconfig build which produced no extra
    warnings.

    53 drivers are affected. I checked the history of a bunch of them, and in
    most cases, there have been only a handful of maintenance changes in the
    last six months. serial_core.c was the busiest one that I looked at.

    Signed-off-by: Jeff Dike
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

01 Oct, 2006

1 commit

  • This is one of a series of patches I plan to gradually trickle into the
    tree which eliminates almost all remaining use of pci_find_* and lets me
    build a pci_find_* free kernel for all but some obscure ISDN and SCSI
    drivers. This is important as all pci_find_* users are not hotplug safe -
    even if they are not the device being plugged.

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

    Alan Cox