Age | Commit message (Collapse) | Author | Files | Lines |
|
The semaphore data->lock is semantically a mutex. Convert it to a real
mutex.
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The mass storage function responded needlessly to a set
configuration packet. This was a leftover from converting
gadget (file storage gadget) into a composite function.
Moreover, it has failed to respond to get max LUN request.
Adding request queueing made the function work better.
Signed-off-by: Michal Nazarewicz <[email protected]>
Signed-off-by: Marek Szyprowski <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: David Brownell <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Adds a fallback which forces all LUNs ejection (including
non-removable and with prevent_medium_removal flag) when mass storage
function (MSF) worker thread exits and gadget fails to handle the
situation.
Previously, if thread_exits was not specified mass storage function
(MSF) did nothing when exiting thread as it's unclear for *function*
what to do when it's thread terminates so responsibility of handling
this situation was left to the *gadget* using the function.
The g_mass_storage handled the situation by unregistering itself (the
same thing that file storage gadget does). However, g_multi did
nothing and so MSF did not eject LUNs which prevented file system
unmounting.
Signed-off-by: Michal Nazarewicz <[email protected]>
Reviewed-by: Kyungmin Park <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Trying to use double buffer modes in RTL versions <2.0 may result in
infinite hangs or data corruption. So avoid them with older versions.
Signed-off-by: Cliff Cai <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
All current Blackfin parts are using RTL v1.9, but they don't expose the
hardware registers to probe this dynamically. So hardcode the version to
v1.9 for now.
Need to move the local hwvers related defines higher up in the header so
that sub-musb headers may utilize them.
Signed-off-by: Cliff Cai <[email protected]>
Signed-off-by: Mike Frysinger <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
As reported by Antonio, there are cases where the ep->lock
can be taken twice, triggering a deadlock.
The typical sequence is :
irq_handler
\
-> gadget.complete()
\
-> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
\
-> gadget.complete()
\
-> pxa27x_udc.pxa_ep_queue() : ep->lock is taken
==> *deadlock*
The patch fixes this by :
- releasing the lock each time gadget.complete() is called
- adding a check in handle_ep() to detect a recursive call,
in which case the function becomes on no-op.
The patch is still not good enough for ep0. For this unique
endpoint, another well thought over patch will be needed.
Reported-by: Antonio Ospite <[email protected]>
Tested-by: Antonio Ospite <[email protected]>
Signed-off-by: Robert Jarzmik <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Eric Miao <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add support for the serial port on devices based on the MosChip 7715,
which provides a serial and parallel port on a single usb interface.
This is added to the existing driver for the Moschip 7720 dual serial
port device. The 7715 is very similiar to the 7720, requiring only the
addition of a calc_num_ports() function, a separate interrupt-in
endpoint callback, and some manipulation of the port pointers added to
the attach() function to correct the fact that the usbserial core
erroneously assigns the first bulk in/out endpoint pair to the serial
port (the 7715 uses these for its parallel port). There is no support
for the 7715's parallel port yet.
Signed-off-by: Mike Dunn <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Johan Hovold points out that get_string() is basically just a
re-implimentation of usb_string(). It is also buggy. It does DMA on
the stack and it doesn't handle negative returns from
usb_get_descriptor(). Plus unicode_to_ascii() is a rubbish function and
moving to usb_string() avoids using it.
Let's eliminate get_string() entirely.
Reported-by: Johan Hovold <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Johan Hovold <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This replaces deprecated dma_sync_single() with dma_sync_single_for_cpu().
There is no functional change because dma_sync_single() simply calls
dma_sync_single_for_cpu():
static inline void __deprecated dma_sync_single(struct device *dev,
dma_addr_t addr, size_t size,
enum dma_data_direction dir)
{
dma_sync_single_for_cpu(dev, addr, size, dir);
}
This fixes the following compile warnings:
drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_unmap_dma':
drivers/usb/gadget/s3c-hsotg.c:376: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)
drivers/usb/gadget/s3c-hsotg.c: In function 's3c_hsotg_map_dma':
drivers/usb/gadget/s3c-hsotg.c:758: warning: 'dma_sync_single' is deprecated (declared at /home/fujita/git/linux-2.6/include/linux/dma-mapping.h:109)
Signed-off-by: FUJITA Tomonori <[email protected]>
Acked-by: Ben Dooks <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
we were printing the info about musb probe too early where
it was still possible for things to go wrong. Move the
down right before the return 0 statement. While at that
also convert pr_info to dev_info.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
when probe() fails, we should iounmap() the mapped address.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Trivial patch, no functional changes.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
after 2.6.34, those fields will be removed from
struct musb_hdrc_platform_data, it's expected
that other architectures are fixed by then.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
... and even added a flag to struct musb, so let's
use that.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
we have those addresses already ioremaped, so let's
use our __raw_readl/writel wrappers.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Adding support for MUSB register save and restore during system
suspend and resume.
Changes:
- Added musb_save/restore_context() functions
- Added platform specific musb_platform_save/restore_context()
to handle platform specific jobs.
- Maintaining BlackFin compatibility by adding read/write
functions for registers which are not available in BlackFin
Tested system suspend and resume on OMAP3EVM board.
Signed-off-by: Anand Gadiyar <[email protected]>
Signed-off-by: Ajay Kumar Gupta <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The configuration Option USB_HCD_DMA is not reachable in KConfig so
this piece of Code is effectively dead and useless. Remove it to avoid
confusion.
Signed-off-by: Christoph Egger <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Uses the new snoop function from commit 4c6e8971cbe0148085,
but includes the buffer data where appropriate, as before.
Signed-off-by: Chris Frey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Keeps sparse happy if nothing else.
Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
- correct spelling
- correct non-tabbed .tiocmget/.tiocmset entries
Signed-off-by: Andreas Mohr <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
- correct spelling/whitespace in ftdi_sio.h and ftdi_sio_ids.h
Signed-off-by: Andreas Mohr <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The variables priv and portdata are initialized twice to the same (side
effect-free) expressions. Drop one initialization in each case.
A simplified version of the semantic match that finds this problem is:
(http://coccinelle.lip6.fr/)
// <smpl>
@forall@
idexpression *x;
identifier f!=ERR_PTR;
@@
x = f(...)
... when != x
(
x = f(...,<+...x...+>,...)
|
* x = f(...)
)
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The problem with Ethernet based networking devices is to clearly
identify what's their usage. Special interfaces like bridges, WiFi,
Bluetooth, WiMAX or WWAN are already using DEVTYPE identification.
This patch marks the Ethernet functions of gadgets from the device
type "gadget". Automatic setup of these interfaces can now happen
from userspace without the need of hardcoding the network interface
name.
Signed-off-by: Marcel Holtmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The Barry project's userspace program, bcharge, can better handle this
device and functionality, and it also works with the latest phones,
which this driver does not support. So remove it, as the userspace code
should be used instead.
Cc: Chris Frey <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Total removal from the ioctl code path except for the outcall
to external modules. Locking is ensured by the normal locks
of usbfs.
Signed-off-by: Oliver Neukum <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This driver had used BKL to guard against disconnect but
was incorrectly converted leaving an SMP race.
BKL was added to disconnect() to fix this race
BKL was removed from ioctl() as the mutex is sufficient
on its own.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
BKL was not needed at all. Removed without replacement.
Signed-off-by: Oliver Neukum <[email protected]>
Acked-by: Pete Zaitcev <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Ben Hutchings <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This pushes BKL down in ioctl handling and drops it
for some important ioctls
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Straightforward push into the drivers to allow
auditing individual drivers separately
Signed-off-by: Oliver Neukum <[email protected]>
Acked-by: Mauro Carvalho Chehab <[email protected]>
Cc: Jiri Kosina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace it by
mutex_lock(&file->f_dentry->d_inode->i_mutex);
following the example of the generic method
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Locking had long been changed making BKL redundant.
Simply remove it.
Signed-off-by: Oliver Neukum <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace BKL with usbfs_mutex to protect a global counter
and a per file data structure
Signed-off-by: Oliver Neukum <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Thiago Farina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The 4G XS Stick W14 seems to not understand RTS/DTR setting in
option_send_setup causing long timeouts on any open() which disturbs a
lot of well-known userspace applications like minicom or ModemManager.
Therefore, we enable OPTION_BLACKLIST_SENDSETUP blacklisting for it.
Signed-off-by: Gernot Hillier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
handling
As suggested by Matthias Urlichs, this patch adds a somehow generic
mechanism for special handling of devices which don't support all bits
expected by this driver.
The blacklisting code is heavily stolen from sierra.c, but extended to
support different special cases.
For now, one case is implemented (OPTION_BLACKLIST_SENDSETUP), targeted
at the 4G W14 device: devices which don't understand the setting of
RTS/DTR in option_send_setup() causing a USB timeout of 5 s in any
userspace open() which leads to errors in most userspace applications.
In addition, I prepared another case for devices with interfaces which
shall not be accessed by this driver (targeted at the D-Link DWM 652).
However, OPTION_BLACKLIST_RESERVED_IF is not fully implemented yet as I
have no device to test this. Anyone volunteering to help here? If not,
I'll contact the guys who added D-Link DWM 652 support soon.
Signed-off-by: Gernot Hillier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Carsten Juttner thankfully investigated a bit and found out some details
about the chipset used in the 4G W14 device I recently added to
option.c.
I think this information is useful for reference, so I'd be happy if you
could include those bits.
Signed-off-by: Gernot Hillier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The id_table field of the struct pci_driver is constant in <linux/pci.h>
so it is worth to make pci_ids also constant.
The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@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[] = ...;
// </smpl>
Signed-off-by: Németh Márton <[email protected]>
Cc: Julia Lawall <[email protected]>
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|