01 Nov, 2012

1 commit

  • Remove all MODULE_VERSION macros and driver-version information (except
    for garmin_gps which uses it in a status reply).

    It is the kernel version that matters and not some private version
    scheme which rarely even gets updated.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

02 Oct, 2012

1 commit

  • Pull USB changes from Greg Kroah-Hartman:
    "Here is the big USB pull request for 3.7-rc1

    There are lots of gadget driver changes (including copying a bunch of
    files into the drivers/staging/ccg/ directory so that the other gadget
    drivers can be fixed up properly without breaking that driver), and we
    remove the old obsolete ub.c driver from the tree.

    There are also the usual XHCI set of updates, and other various driver
    changes and updates. We also are trying hard to remove the old dbg()
    macro, but the final bits of that removal will be coming in through
    the networking tree before we can delete it for good.

    All of these patches have been in the linux-next tree.

    Signed-off-by: Greg Kroah-Hartman "

    Fix up several annoying - but fairly mindless - conflicts due to the
    termios structure having moved into the tty device, and often clashing
    with dbg -> dev_dbg conversion.

    * tag 'usb-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (339 commits)
    USB: ezusb: move ezusb.c from drivers/usb/serial to drivers/usb/misc
    USB: uas: fix gcc warning
    USB: uas: fix locking
    USB: Fix race condition when removing host controllers
    USB: uas: add locking
    USB: uas: fix abort
    USB: uas: remove aborted field, replace with status bit.
    USB: uas: fix task management
    USB: uas: keep track of command urbs
    xhci: Intel Panther Point BEI quirk.
    powerpc/usb: remove checking PHY_CLK_VALID for UTMI PHY
    USB: ftdi_sio: add TIAO USB Multi-Protocol Adapter (TUMPA) support
    Revert "usb : Add sysfs files to control port power."
    USB: serial: remove vizzini driver
    usb: host: xhci: Fix Null pointer dereferencing with 71c731a for non-x86 systems
    Increase XHCI suspend timeout to 16ms
    USB: ohci-at91: fix null pointer in ohci_hcd_at91_overcurrent_irq
    USB: sierra_ms: don't keep unused variable
    fsl/usb: Add support for USB controller version 2.4
    USB: qcaux: add Pantech vendor class match
    ...

    Linus Torvalds
     

15 Sep, 2012

1 commit


17 Jul, 2012

1 commit

  • This will let us sort out a whole pile of tty related races. The
    alternative would be to keep points and refcount the termios objects.
    However
    1. They are tiny anyway
    2. Many devices don't use the stored copies
    3. We can remove a pty special case

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

    Alan Cox
     

09 May, 2012

1 commit

  • This reworks the usb_serial_register_drivers() and
    usb_serial_deregister_drivers() to not need a pointer to a struct
    usb_driver anymore. The usb_driver structure is now created dynamically
    and registered and unregistered as needed.

    This saves lines of code in each usb-serial driver. All in-kernel users
    of these functions were also fixed up at this time. The pl2303 driver
    was tested that everything worked properly.

    Thanks for the idea to do this from Alan Stern.

    Cc: Adhir Ramjiawan
    Cc: Alan Stern
    Cc: Al Borchers
    Cc: Aleksey Babahin
    Cc: Andrew Morton
    Cc: Andrew Worsley
    Cc: Bart Hartgers
    Cc: Bill Pemberton
    Cc: Dan Carpenter
    Cc: Dan Williams
    Cc: Donald Lee
    Cc: Eric Dumazet
    Cc: "Eric W. Biederman"
    Cc: Felipe Balbi
    Cc: Gary Brubaker
    Cc: Jesper Juhl
    Cc: Jiri Kosina
    Cc: Johan Hovold
    Cc: Julia Lawall
    Cc: Kautuk Consul
    Cc: Kuninori Morimoto
    Cc: Lonnie Mendez
    Cc: Matthias Bruestle and Harald Welte
    Cc: Matthias Urlichs
    Cc: Mauro Carvalho Chehab
    Cc: Michal Sroczynski
    Cc: "Michał Wróbel"
    Cc: Oliver Neukum
    Cc: Paul Gortmaker
    Cc: Peter Berger
    Cc: Preston Fick
    Cc: "Rafael J. Wysocki"
    Cc: Rigbert Hamisch
    Cc: Rusty Russell
    Cc: Simon Arlott
    Cc: Support Department
    Cc: Thomas Tuttle
    Cc: Uwe Bonnes
    Cc: Wang YanQing
    Cc: William Greathouse
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

08 May, 2012

2 commits

  • This is now set by the usb-serial core, no need for the driver to
    individually set it.

    Thanks to Alan Stern for the idea to get rid of it.

    Cc: William Greathouse
    Cc: Matthias Bruestle and Harald Welte
    Cc: Lonnie Mendez
    Cc: Peter Berger
    Cc: Al Borchers
    Cc: Gary Brubaker
    Cc: Oliver Neukum
    Cc: Matthias Urlichs
    Cc: Support Department
    Cc: Rusty Russell
    Cc: Alan Stern
    Cc: Mauro Carvalho Chehab
    Cc: Kautuk Consul
    Cc: Bill Pemberton
    Cc: Paul Gortmaker
    Cc: Bart Hartgers
    Cc: Johan Hovold
    Cc: Preston Fick
    Cc: Uwe Bonnes
    Cc: Simon Arlott
    Cc: Andrew Worsley
    Cc: "Michał Wróbel"
    Cc: Andrew Morton
    Cc: Eric Dumazet
    Cc: "Eric W. Biederman"
    Cc: Felipe Balbi
    Cc: Aleksey Babahin
    Cc: Dan Carpenter
    Cc: Jiri Kosina
    Cc: Donald Lee
    Cc: Julia Lawall
    Cc: Michal Sroczynski
    Cc: Wang YanQing
    Cc: Dan Williams
    Cc: Thomas Tuttle
    Cc: Rigbert Hamisch
    Cc: "Rafael J. Wysocki"
    Cc: Kuninori Morimoto
    Cc: Jesper Juhl
    Cc: Adhir Ramjiawan
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This is now set by the usb-serial core, no need for the driver to
    individually set it.

    Thanks to Alan Stern for the idea to get rid of it.

    Cc: William Greathouse
    Cc: Matthias Bruestle and Harald Welte
    Cc: Lonnie Mendez
    Cc: Peter Berger
    Cc: Al Borchers
    Cc: Gary Brubaker
    Cc: Oliver Neukum
    Cc: Matthias Urlichs
    Cc: Support Department
    Cc: Rusty Russell
    Cc: Alan Stern
    Cc: Mauro Carvalho Chehab
    Cc: Kautuk Consul
    Cc: Bill Pemberton
    Cc: Paul Gortmaker
    Cc: Bart Hartgers
    Cc: Johan Hovold
    Cc: Preston Fick
    Cc: Uwe Bonnes
    Cc: Simon Arlott
    Cc: Andrew Worsley
    Cc: "Michał Wróbel"
    Cc: Andrew Morton
    Cc: Eric Dumazet
    Cc: "Eric W. Biederman"
    Cc: Felipe Balbi
    Cc: Aleksey Babahin
    Cc: Dan Carpenter
    Cc: Jiri Kosina
    Cc: Donald Lee
    Cc: Julia Lawall
    Cc: Michal Sroczynski
    Cc: Wang YanQing
    Cc: Dan Williams
    Cc: Thomas Tuttle
    Cc: Rigbert Hamisch
    Cc: "Rafael J. Wysocki"
    Cc: Kuninori Morimoto
    Cc: Jesper Juhl
    Cc: Adhir Ramjiawan
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

04 May, 2012

1 commit


29 Feb, 2012

1 commit


25 Feb, 2012

1 commit


13 Jan, 2012

1 commit


21 May, 2010

1 commit

  • Kill custom read and write implementations (static 16*4k write-urb pool
    shared among all ports in system).

    Also remove old changelog entries in header (code is now gone, and
    these entries can still be retrieved through git).

    Compile-only tested.

    Signed-off-by: Johan Hovold
    Signed-off-by: Greg Kroah-Hartman

    Johan Hovold
     

03 Mar, 2010

2 commits

  • 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
     

10 Oct, 2009

1 commit

  • many serial subdrivers are clearly written as if throttle/unthrottle
    cannot sleep. This leads to unneeded atomic submissions. This
    patch converts affected drivers in a way to makes very clear that
    throttle/unthrottle can sleep. Thus future misdesigns can be avoided
    and efficiency and reliability improved.

    This removes any such assumption using GFP_KERNEL and spin_lock_irq()

    Signed-off-by: Oliver Neukum
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

20 Sep, 2009

2 commits


16 Jun, 2009

1 commit

  • This patch (as1254) splits up the shutdown method of usb_serial_driver
    into a disconnect and a release method.

    The problem is that the usb-serial core was calling shutdown during
    disconnect handling, but drivers didn't expect it to be called until
    after all the open file references had been closed. The result was an
    oops when the close method tried to use memory that had been
    deallocated by shutdown.

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

    Alan Stern
     

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
     

24 Apr, 2009

1 commit


18 Oct, 2008

2 commits


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

2 commits

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

    Alan Cox
     
  • 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
     

25 Apr, 2008

3 commits


26 Oct, 2007

1 commit


13 Jul, 2007

1 commit


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
     

13 Jul, 2006

1 commit


01 Jul, 2006

1 commit


22 Jun, 2006

1 commit


11 Jan, 2006

1 commit

  • The API and code have been through various bits of initial review by
    serial driver people but they definitely need to live somewhere for a
    while so the unconverted drivers can get knocked into shape, existing
    drivers that have been updated can be better tuned and bugs whacked out.

    This replaces the tty flip buffers with kmalloc objects in rings. In the
    normal situation for an IRQ driven serial port at typical speeds the
    behaviour is pretty much the same, two buffers end up allocated and the
    kernel cycles between them as before.

    When there are delays or at high speed we now behave far better as the
    buffer pool can grow a bit rather than lose characters. This also means
    that we can operate at higher speeds reliably.

    For drivers that receive characters in blocks (DMA based, USB and
    especially virtualisation) the layer allows a lot of driver specific
    code that works around the tty layer with private secondary queues to be
    removed. The IBM folks need this sort of layer, the smart serial port
    people do, the virtualisers do (because a virtualised tty typically
    operates at infinite speed rather than emulating 9600 baud).

    Finally many drivers had invalid and unsafe attempts to avoid buffer
    overflows by directly invoking tty methods extracted out of the innards
    of work queue structs. These are no longer needed and all go away. That
    fixes various random hangs with serial ports on overflow.

    The other change in here is to optimise the receive_room path that is
    used by some callers. It turns out that only one ldisc uses receive room
    except asa constant and it updates it far far less than the value is
    read. We thus make it a variable not a function call.

    I expect the code to contain bugs due to the size alone but I'll be
    watching and squashing them and feeding out new patches as it goes.

    Because the buffers now dynamically expand you should only run out of
    buffering when the kernel runs out of memory for real. That means a lot of
    the horrible hacks high performance drivers used to do just aren't needed any
    more.

    Description:

    tty_insert_flip_char is an old API and continues to work as before, as does
    tty_flip_buffer_push() [this is why many drivers dont need modification]. It
    does now also return the number of chars inserted

    There are also

    tty_buffer_request_room(tty, len)

    which asks for a buffer block of the length requested and returns the space
    found. This improves efficiency with hardware that knows how much to
    transfer.

    and tty_insert_flip_string_flags(tty, str, flags, len)

    to insert a string of characters and flags

    For a smart interface the usual code is

    len = tty_request_buffer_room(tty, amount_hardware_says);
    tty_insert_flip_string(tty, buffer_from_card, len);

    More description!

    At the moment tty buffers are attached directly to the tty. This is causing a
    lot of the problems related to tty layer locking, also problems at high speed
    and also with bursty data (such as occurs in virtualised environments)

    I'm working on ripping out the flip buffers and replacing them with a pool of
    dynamically allocated buffers. This allows both for old style "byte I/O"
    devices and also helps virtualisation and smart devices where large blocks of
    data suddenely materialise and need storing.

    So far so good. Lots of drivers reference tty->flip.*. Several of them also
    call directly and unsafely into function pointers it provides. This will all
    break. Most drivers can use tty_insert_flip_char which can be kept as an API
    but others need more.

    At the moment I've added the following interfaces, if people think more will
    be needed now is a good time to say

    int tty_buffer_request_room(tty, size)

    Try and ensure at least size bytes are available, returns actual room (may be
    zero). At the moment it just uses the flipbuf space but that will change.
    Repeated calls without characters being added are not cumulative. (ie if you
    call it with 1, 1, 1, and then 4 you'll have four characters of space. The
    other functions will also try and grow buffers in future but this will be a
    more efficient way when you know block sizes.

    int tty_insert_flip_char(tty, ch, flag)

    As before insert a character if there is room. Now returns 1 for success, 0
    for failure.

    int tty_insert_flip_string(tty, str, len)

    Insert a block of non error characters. Returns the number inserted.

    int tty_prepare_flip_string(tty, strptr, len)

    Adjust the buffer to allow len characters to be added. Returns a buffer
    pointer in strptr and the length available. This allows for hardware that
    needs to use functions like insl or mencpy_fromio.

    Signed-off-by: Alan Cox
    Cc: Paul Fulghum
    Signed-off-by: Hirokazu Takata
    Signed-off-by: Serge Hallyn
    Signed-off-by: Jeff Dike
    Signed-off-by: John Hawkes
    Signed-off-by: Martin Schwidefsky
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     

05 Jan, 2006

2 commits


29 Oct, 2005

1 commit