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
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
24 Apr, 2009
1 commit
-
This removes tty->low_latency from all USB serial drivers that push
data into the tty layer at hard interrupt context. It's no longer needed
and actually harmful.Signed-off-by: Oliver Neukum
Cc: Alan Cox
Signed-off-by: Greg Kroah-Hartman
25 Mar, 2009
1 commit
-
The ipaq driver currently enforces one port on all devices. This
is correct for 2 and 3 endpoint devices, but with 4 endpoint devices
meaningful communication occurs on the second pair.This patch allows 2 ports for 4 endpoint devices.
Signed-off-by: Mark Ellis
Signed-off-by: Greg Kroah-Hartman
18 Oct, 2008
2 commits
-
err() is going away, so switch to dev_err() or printk() if it's really
needed.Signed-off-by: Greg Kroah-Hartman
-
USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.Signed-off-by: Greg Kroah-Hartman
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
27 Jul, 2008
1 commit
-
The fix NULLed a pointer without freeing it.
Signed-off-by: Oliver Neukum
Reported-by: Juha Motorsportcom
Signed-off-by: Linus Torvalds
23 Jul, 2008
2 commits
-
Signed-off-by: Alan Cox
Signed-off-by: Greg Kroah-Hartman
Signed-off-by: Linus Torvalds -
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
22 Jul, 2008
1 commit
-
in the error case the ipaq driver leaves a dangling pointer to already
freed memory that will be freed again.Signed-off-by: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman
04 Jul, 2008
2 commits
-
The reason for forcing a number of ports should be documented.
Signed-off-by: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman -
Fixes bugzilla.kernel.org #10868
Signed-off-by: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman
25 Apr, 2008
4 commits
-
urb->context code cleanup
Signed-off-by: Ming Lei
Signed-off-by: Greg Kroah-Hartman -
__FUNCTION__ is gcc-specific, use __func__
Signed-off-by: Harvey Harrison
Signed-off-by: Greg Kroah-Hartman -
The usb-serial core no longer checks these fields so remove them from
all of the individual drivers. They will be removed from the usb-serial
core in a patch later in the series.Signed-off-by: Greg Kroah-Hartman
-
The ipaq module supports devices with one endpoint only. Some devices,
e.g. Yakumo Delta 300, have more than one endpoint.This patch fixes support for devices having up to 2 endpoints which used
to work on older kernel versions.Signed-off-by: Matthias Geissert
Signed-off-by: Greg Kroah-Hartman
20 Oct, 2007
1 commit
-
* Convert files to UTF-8.
* Also correct some people's names
(one example is Eißfeldt, which was found in a source file.
Given that the author used an ß at all in a source file
indicates that the real name has in fact a 'ß' and not an 'ss',
which is commonly used as a substitute for 'ß' when limited to
7bit.)* Correct town names (Goettingen -> Göttingen)
* Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313)
Signed-off-by: Jan Engelhardt
Signed-off-by: Adrian Bunk
13 Oct, 2007
2 commits
-
This patch supports for SHARP WS011SH[0] to ipaq.c
[0]: http://www.willcom-inc.com/ja/lineup/ws/011sh/index.html
(Sorry , Japanese only.)Signed-off-by: Nobuhiro Iwamatsu
Signed-off-by: Greg Kroah-Hartman -
the error code paths can be enter with buffers to freed buffers.
Serial core would do a kfree() on memory already freed.Signed-off-by: Oliver Neukum
Signed-off-by: Greg Kroah-Hartman
23 Aug, 2007
1 commit
-
This patch enables support for HTC Smartphones. The original patch is at
https://bugs.gentoo.org/show_bug.cgi?id=187522. Original author is Mike Doty
.Signed-off-by: Christian Heim
Signed-off-by: Greg Kroah-Hartman
13 Jul, 2007
1 commit
-
This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.Cc:
Cc: Ganesh Varadarajan
Signed-off-by: Greg Kroah-Hartman
28 Apr, 2007
1 commit
-
I write a patch adding support "SHARP EMONE(S01SH)" device for ipaq.c.
EMONE is a PDA with built-in HSDPA function.From: Norihiko Tomiyama
Signed-off-by: Greg Kroah-Hartman
10 Mar, 2007
1 commit
-
Additional devices
Signed-off-by: Andre Spahlinger
Signed-off-by: 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
14 Dec, 2006
1 commit
-
Run this:
#!/bin/sh
for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
echo "De-casting $f..."
perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
doneAnd then go through and reinstate those cases where code is casting pointers
to non-pointers.And then drop a few hunks which conflicted with outstanding work.
Cc: Russell King , Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Roman Zippel
Cc: Geert Uytterhoeven
Cc: Ralf Baechle
Cc: Paul Mackerras
Cc: Kyle McMartin
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: "David S. Miller"
Cc: Jeff Dike
Cc: Greg KH
Cc: Jens Axboe
Cc: Paul Fulghum
Cc: Alan Cox
Cc: Karsten Keil
Cc: Mauro Carvalho Chehab
Cc: Jeff Garzik
Cc: James Bottomley
Cc: Ian Kent
Cc: Steven French
Cc: David Woodhouse
Cc: Neil Brown
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Nov, 2006
1 commit
-
Adds support for HTC Smart Phones in modem mode (as opposed to sync
mode). Loads and works with pppd on my T-Mobile SDA.Signed-off-by: Alex Sanks
Signed-off-by: Greg Kroah-Hartman
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)
29 Sep, 2006
1 commit
-
Add yet another device ID to the ipaq USB-serial driver.
Signed-Off-By: Matthias Urlichs
Cc: Ganesh Varadarajan
Signed-off-by: Greg Kroah-Hartman
28 Sep, 2006
1 commit
-
Commit b512504e5671f83638be0ddr085c4b1832f623d3 made ipaq_open() a bit
messy by moving the read urb submission far from its usb_fill_bulk_urb()
call and the comment explaining what it does.This patch put they together again. Although only compiled tested, should
not break the fix introduced by b512504e5671f83638be0ddr085c4b1832f623d3,
of course.Signed-off-by: Luiz Fernando N. Capitulino
Signed-off-by: Greg Kroah-Hartman
12 Aug, 2006
1 commit
-
I write a patch for ipaq.c.
Would you like to add upstream tree ?This patch enables a support of "SHARP W-ZERO3(WS004SH)" and "SHARP W-ZERO3[es](WS007SH)".
From: Norihiko Tomiyama
Signed-off-by: Greg Kroah-Hartman
03 Aug, 2006
1 commit
-
This small patch enables a support of "SHARP WS003SH".
"SHARP WS003SH" (usullary called "W-ZERO3") is most polular All-in-one handheld
CellPhone-plus-WindowsMobile5.0 in Japan."SHARP WS003SH" has two modes, "Modem" and "ActiveSync".
But, "ActiveSync" mode uses NDIS connection.
Therefore, ipaq.c can only support "Modem" mode.http://www.sharp.co.jp/ws/ (Japanese Site)
http://greggman.com/edit/editheadlines/2005-12-24.htmFrom: Norihiko Tomiyama
Signed-off-by: Greg Kroah-Hartman
13 Jul, 2006
3 commits
-
USB serial outside of the kernel tree can not build properly due to
usb-serial.h being buried down in the source tree. This patch moves the
location of the file to include/linux/usb and fixes up all of the usb
serial drivers to handle the move properly.Cc: Sergei Organov
Signed-off-by: Greg Kroah-Hartman -
Adds configurable waiting periods to the ipaq connection code. These are
not needed when the pocketpc device is running normally when plugged in,
but they need extra delays if they are physically connected while
rebooting.There are two parameters :
* initial_wait : this is the delay before the driver attemts to start the
connection. This is needed because the pocktpc device takes much
longer to boot if the driver starts sending control packets too soon.* connect_retries : this is the number of times the control urb is
retried before finally giving up. The patch also adds a 1 second delay
between retries.I'm not sure if the cases where this patch is useful are general enough
to include this in the kernel.Signed-off-by: Frank Gevaerts
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman -
This patch fixes several problems in the ipaq.c driver with connecting
and disconnecting pocketpc devices:* The read urb stayed active if the connect failed, causing nullpointer
dereferences later on.* If a write failed, the driver continued as if nothing happened. Now it
handles that case the same way as other usb serial devices (fix by
Luiz Fernando N. Capitulino )Signed-off-by: Frank Gevaerts
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
22 Jun, 2006
1 commit
-
I'm going to throw schedule_work away, it's retarded. But for starters,
let's have it encapsulated.Also, generic and whiteheat were both calling usb_serial_port_softint
and scheduled work. Only one was necessary.Signed-off-by: Pete Zaitcev
Signed-off-by: Greg Kroah-Hartman
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 insertedThere 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 sayint 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
05 Jan, 2006
2 commits
-
It is no longer needed, so let's remove it, saving a bit of memory.
Signed-off-by: Greg Kroah-Hartman
-
This lets drivers, like the usb-serial ones, disable the ability to add
ids from sysfs.The usb-serial drivers are "odd" in that they are really usb-serial bus
drivers, not usb bus drivers, so the dynamic id logic will have to go
into the usb-serial bus core for those drivers to get that ability.Signed-off-by: Greg Kroah-Hartman