23 Oct, 2010

2 commits

  • Again basically cut and paste

    Convert the main driver set to use the hooks for GICOUNT

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • Vasiliy found that pci_disable_device is not called on fail paths in
    mxser_probe. Actually, it is called from nowhere in the driver.

    There are three changes needed:
    1) don't use pseudo-generic mxser_release_res. Let's use it only from
    ISA paths from now on. All the pci stuff is moved to probe and
    remove PCI-related functions.
    2) reorder fail-paths in the probe function so that it makes sense and
    we can call them from the sequential code naturally (the further we
    are the earlier label we go to).
    3) add pci_disable_device both to mxser_probe and mxser_remove.

    There is a nit of adding CONFIG_PCI ifdef to mxser_remove. it is
    because this driver supports ISA-only compilations and it would choke
    up on the newly added calls now.

    Signed-off-by: Jiri Slaby
    Cc: Kulikov Vasiliy
    Signed-off-by: Greg Kroah-Hartman

    Jiri Slaby
     

11 Aug, 2010

1 commit


01 May, 2010

1 commit

  • This forgot to update a field in the old char drivers. The fact nobody
    has basically noticed (except one mxser user) rather suggests most of these
    drivers could go into the bitbucket.

    Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Cc: Dan Carpenter
    Cc: Andreas Pretzsch
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

07 Apr, 2010

1 commit

  • This should be spin_lock_irq() to match the spin_unlock_irq(). Originally
    it was a lock_kernel() but we switched everything to spin_lock_irq() last
    November.

    [akpm@linux-foundation.org: fix the MOXA_ASPP_MON case too (per Jiri)]
    Signed-off-by: Dan Carpenter
    Cc: Jiri Slaby
    Cc: Alan Cox
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dan Carpenter
     

30 Mar, 2010

1 commit

  • …it slab.h inclusion from percpu.h

    percpu.h is included by sched.h and module.h and thus ends up being
    included when building most .c files. percpu.h includes slab.h which
    in turn includes gfp.h making everything defined by the two files
    universally available and complicating inclusion dependencies.

    percpu.h -> slab.h dependency is about to be removed. Prepare for
    this change by updating users of gfp and slab facilities include those
    headers directly instead of assuming availability. As this conversion
    needs to touch large number of source files, the following script is
    used as the basis of conversion.

    http://userweb.kernel.org/~tj/misc/slabh-sweep.py

    The script does the followings.

    * Scan files for gfp and slab usages and update includes such that
    only the necessary includes are there. ie. if only gfp is used,
    gfp.h, if slab is used, slab.h.

    * When the script inserts a new include, it looks at the include
    blocks and try to put the new include such that its order conforms
    to its surrounding. It's put in the include block which contains
    core kernel includes, in the same order that the rest are ordered -
    alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
    doesn't seem to be any matching order.

    * If the script can't find a place to put a new include (mostly
    because the file doesn't have fitting include block), it prints out
    an error message indicating which .h file needs to be added to the
    file.

    The conversion was done in the following steps.

    1. The initial automatic conversion of all .c files updated slightly
    over 4000 files, deleting around 700 includes and adding ~480 gfp.h
    and ~3000 slab.h inclusions. The script emitted errors for ~400
    files.

    2. Each error was manually checked. Some didn't need the inclusion,
    some needed manual addition while adding it to implementation .h or
    embedding .c file was more appropriate for others. This step added
    inclusions to around 150 files.

    3. The script was run again and the output was compared to the edits
    from #2 to make sure no file was left behind.

    4. Several build tests were done and a couple of problems were fixed.
    e.g. lib/decompress_*.c used malloc/free() wrappers around slab
    APIs requiring slab.h to be added manually.

    5. The script was run on all .h files but without automatically
    editing them as sprinkling gfp.h and slab.h inclusions around .h
    files could easily lead to inclusion dependency hell. Most gfp.h
    inclusion directives were ignored as stuff from gfp.h was usually
    wildly available and often used in preprocessor macros. Each
    slab.h inclusion directive was examined and added manually as
    necessary.

    6. percpu.h was updated not to include slab.h.

    7. Build test were done on the following configurations and failures
    were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
    distributed build env didn't work with gcov compiles) and a few
    more options had to be turned off depending on archs to make things
    build (like ipr on powerpc/64 which failed due to missing writeq).

    * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
    * powerpc and powerpc64 SMP allmodconfig
    * sparc and sparc64 SMP allmodconfig
    * ia64 SMP allmodconfig
    * s390 SMP allmodconfig
    * alpha SMP allmodconfig
    * um on x86_64 SMP allmodconfig

    8. percpu.h modifications were reverted so that it could be applied as
    a separate patch and serve as bisection point.

    Given the fact that I had only a couple of failures from tests on step
    6, I'm fairly confident about the coverage of this conversion patch.
    If there is a breakage, it's likely to be something in one of the arch
    headers which should be easily discoverable easily on most builds of
    the specific arch.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>

    Tejun Heo
     

03 Mar, 2010

1 commit


12 Dec, 2009

2 commits

  • Propogate the init/shutdown mutex through the setserial logic. Use the proper
    locks for the various bits still using the BKL. Kill the BKL in this driver.

    Updated to fix the bug noted by Dan Carpenter

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     
  • At first this looks a fairly trivial conversion but we can't quite push
    everything into the right format yet. The open side is easy but care is needed
    over the setserial methods. Fix up the locking now that we've adopted the
    port->mutex locking rule for the initialization.

    Signed-off-by: Alan Cox
    Signed-off-by: Greg Kroah-Hartman

    Alan Cox
     

20 Sep, 2009

4 commits


13 Jul, 2009

1 commit

  • * Remove smp_lock.h from files which don't need it (including some headers!)
    * Add smp_lock.h to files which do need it
    * Make smp_lock.h include conditional in hardirq.h
    It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

    This will make hardirq.h inclusion cheaper for every PREEMPT=n config
    (which includes allmodconfig/allyesconfig, BTW)

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

    Alexey Dobriyan
     

25 Jun, 2009

1 commit


11 Jun, 2009

1 commit

  • Some drivers implement this internally, others miss it out. Push the
    behaviour into the core code as that way everyone will do it consistently.

    Update the dtr rts method to raise or lower depending upon flags. Having a
    single method in this style fits most of the implementations more cleanly than
    two funtions.

    We need this in place before we tackle the USB side

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

    Alan Cox
     

10 Jun, 2009

1 commit

  • There's a bug in the mxser kernel module that still appears in the
    2.6.29.4 kernel.

    mxser_get_ISA_conf takes a ioaddress as its first argument, by passing the
    not of the ioaddr, you're effectively passing 0 which means it won't be
    able to talk to an ISA card. I have tested this, and removing the !
    fixes the problem.

    Cc: "Peter Botha"
    Signed-off-by: Jiri Slaby
    Acked-by: Alan Cox
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Botha
     

07 Apr, 2009

1 commit

  • mxser_check_modem_status is called with tty parameter, so the
    reference should be increased by callers already -- for ioctl
    syscall it is held whole time gap since open to close, for
    interrupt, the reference count is increased in the irq handler.

    There is no tty_kref_put in that function, so this also fixes
    a refcounting bug.

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

    Jiri Slaby
     

03 Jan, 2009

5 commits


12 Nov, 2008

1 commit


14 Oct, 2008

2 commits


31 Jul, 2008

1 commit


26 Jul, 2008

5 commits

  • - remove unused macro
    - some whitespace cleanup
    - useless debug prints removal

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

    Jiri Slaby
     
  • Remove a support of ISA addresses predefined at compile time. It is
    unused (filled by zeroes) and prolongs the code. Don't initialize global
    array and add `ioaddr' module param description.

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

    Jiri Slaby
     
  • - use dev_* for printing in pci probe function
    - move ISA p[rints directly into isa find function, do not postpone it.
    Remove macros bound to it then.
    - prepend some prints by "mxser: " to know what it belongs to

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

    Jiri Slaby
     
  • - remove unused mxvar_diagflag
    - move mxser_msr into the only user/function
    - GMStatus, hmm, fix race-prone access to it. We need only one instance for
    real, not MXSER_PORTS. Move it to MOXA_GETMSTATUS ioctl.
    - mxser_mon_ext, almost the same, but alloc it on heap, since it has more than
    2 kilos.
    - fix indexing, `i' is not the index value, `i * MXSER_PORTS_PER_BOARD + j' is

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

    Jiri Slaby
     
  • - remove break ctl from ioctl handler, it's never reached, since
    tty_ops->break_ctl is defined (mxser break handling is done in software)
    - mark MOXA_GET_MAJOR as deprecated
    - fix TIOCGICOUNT (some retval non-checks of put_user). Use copy_to_user
    to whole structure instead.

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

    Jiri Slaby
     

23 Jul, 2008

3 commits

  • Add support for CP-102UF moxa card (update to 1.12 original driver) and
    increment this driver version.

    (Somewhat reworked by alan@redhat.com to merge in with other patches)

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

    Jiri Slaby
     
  • Some hardware needs to do break handling itself and may have partial
    support only. Make break_ctl return an error code. Add a tty driver flag
    so you can indicate driver hardware side break support.

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

    Alan Cox
     
  • Old style ioctl break code can go

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

    Alan Cox
     

21 Jul, 2008

2 commits


30 Apr, 2008

3 commits

  • Signed-off-by: Christoph Hellwig
    Signed-off-by: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Signed-off-by: Alan Cox
    Cc: Jiri Slaby
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • - Stop drivers calling their own flush method indirectly, it obfuscates code
    and it will change soon anyway

    - A few more lock_kernel paths temporarily needed in some driver internal
    waiting code

    - Remove private put_char method that does a write call for one char - we
    have that anyway

    - Most but not yet all of the termios copy under lock fixing (some has other
    dependencies to follow)

    - Note a few locking bugs in drivers found in the process

    - Kill remaining [ab]users of TIOCG/SSOFTCAR in the driver, these must go to
    fix the termios locking

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

    Alan Cox