16 Nov, 2011

1 commit


21 May, 2010

5 commits


03 Mar, 2010

3 commits

  • This patch (as1344) removes references to port->port.count from the
    USB serial drivers. Now that serial ports are properly reference
    counted, port.count checking is unnecessary and incorrect. Drivers
    should assume that the port is in use from the time the open method
    runs until the close method is called.

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

    Alan Stern
     
  • We have lots of callers that do not need to do this in the first place.
    Remove the calls as they both cost CPU and for big buffers can mess up the
    multi-page allocation avoidance.

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

    Alan Cox
     
  • The id_table field of the struct usb_device_id is constant in
    so it is worth to make the initialization data also constant.

    The semantic match that finds this kind of pattern is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r@
    disable decl_init,const_decl_init;
    identifier I1, I2, x;
    @@
    struct I1 {
    ...
    const struct I2 *x;
    ...
    };
    @s@
    identifier r.I1, y;
    identifier r.x, E;
    @@
    struct I1 y = {
    .x = E,
    };
    @c@
    identifier r.I2;
    identifier s.E;
    @@
    const struct I2 E[] = ... ;
    @depends on !c@
    identifier r.I2;
    identifier s.E;
    @@
    + const
    struct I2 E[] = ...;
    //

    Signed-off-by: Németh Márton
    Cc: Julia Lawall
    Cc: cocci@diku.dk
    Signed-off-by: Greg Kroah-Hartman

    Németh Márton
     

20 Sep, 2009

1 commit


11 Jun, 2009

1 commit

  • This allows us to clean stuff up, but is probably also going to cause
    some app breakage with buggy apps as we now implement proper POSIX behaviour
    for USB ports matching all the other ports. This does also mean other apps
    that break on USB will now work properly.

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

    Alan Cox
     

12 Nov, 2008

1 commit


18 Oct, 2008

1 commit


14 Oct, 2008

1 commit

  • Use kref in the USB serial drivers so that we don't free tty structures
    from under the URB receive handlers as has historically been the case if
    you were unlucky. This also gives us a framework for general tty drivers to
    use tty_port objects and refcount.

    Contains two err->dev_err changes merged together to fix clashes in the
    -next tree.

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

    Alan Cox
     

23 Jul, 2008

1 commit

  • USB serial likes to use port->tty back pointers for the real work it does and
    to do so without any actual locking. Unfortunately when you consider hangup
    events, hangup/parallel reopen or even worse hangup followed by parallel close
    events the tty->port and port->tty pointers are not guaranteed to be the same
    as port->tty is the active tty while tty->port is the port the tty may or
    may not still be attached to.

    So rework the entire API to pass the tty struct. For console cases we need
    to pass both for now. This shows up multiple drivers that immediately crash
    with USB console some of which have been fixed in the process.

    Longer term we need a proper tty as console abstraction

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

    Alan Cox
     

22 Jul, 2008

1 commit

  • General cleanup on ir-usb module. Introduced
    a common header that could be used also on
    usb gadget framework.

    Lot's of cleanups and now using macros from the header
    file.

    Signed-off-by: Felipe Balbi
    Signed-off-by: Greg Kroah-Hartman

    Felipe Balbi
     

25 Apr, 2008

3 commits


26 Oct, 2007

1 commit


13 Jul, 2007

2 commits

  • - Drivers don't call ldisc termios methods. They certainly don't call
    them the way this one does - remove wrong call
    - The tty buffer code isn't designed to be abused from IRQ handlers and
    the new buffering removes the need for the uglies involved - fix them
    - Style
    - Remove incorrect baud and change handling for termios changes

    The driver now has some style, but not a lot - it goes insane if you have
    two dongles for example as it continues to use global variables for per
    dongle state. That bit isn't my problem.

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

    Alan Cox
     
  • This done in anticipation of removal of urb->status, which will make
    that patch easier to review and apply in the future.

    Cc:
    Cc: Gary Brubaker
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 Feb, 2007

1 commit

  • Every usb serial driver should have a pointer to the corresponding usb driver.
    So the usb serial core can add a new id not only to the usb serial driver, but
    also to the usb driver.

    Also the usb drivers of ark3116, mos7720 and mos7840 missed the flag
    no_dynamic_id=1. This is added now.

    Signed-off-by: Johannes Hölzl
    Signed-off-by: Greg Kroah-Hartman

    Johannes Hölzl
     

09 Dec, 2006

1 commit

  • 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
     

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
     

29 Sep, 2006

1 commit


13 Jul, 2006

1 commit


01 Jul, 2006

1 commit


29 Jun, 2006

1 commit

  • Remove TTY_DONT_FLIP tty flag. This flag was introduced in 2.1.X kernels
    to prevent the N_TTY line discipline functions read_chan() and
    n_tty_receive_buf() from running at the same time. 2.2.15 introduced
    tty->read_lock to protect access to the N_TTY read buffer, which is the
    only state requiring protection between these two functions.

    The current TTY_DONT_FLIP implementation is broken for SMP, and is not
    universally honored by drivers that send data directly to the line
    discipline receive_buf function.

    Because TTY_DONT_FLIP is not necessary, is broken in implementation, and is
    not universally honored, it is removed.

    Signed-off-by: Paul Fulghum
    Cc: Alan Cox
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Fulghum
     

22 Jun, 2006

1 commit


21 Mar, 2006

1 commit


05 Jan, 2006

2 commits


29 Oct, 2005

3 commits


28 Jun, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds