Age | Commit message (Collapse) | Author |
|
Rather than hard-lock the kernel, we now BUG() when a driver takes
> 3 seconds to suspend. If the underlying platform supports panic dumps,
then the data can be collected for debug.
Signed-off-by: San Mehat <san@google.com>
|
|
This avoids the S305 panic during incoming connection.
S305 sends PSM 25 L2CAP connection request before the L2CAP info response.
When we receive that info response we crash on null pointer here.
Bug: 2127637
Change-Id: Ib637516251f46fa9a9c87ac015dc2f27df5a27fd
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
This provides userspace debugging tools access to ACL flow control state.
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
This is to support the Motorola HF850 carkit which reports the error code 0x10
for an eSCO attempt, even though it advertises eSCO support. Here is the
hcidump:
2009-09-22 15:40:24.492391 < HCI Command: Setup Synchronous Connection
(0x01|0x0028) plen 17
handle 1 voice setting 0x0060
2009-09-22 15:40:24.493002 > HCI Event: Command Status (0x0f) plen 4
Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1
2009-09-22 15:40:30.594869 > HCI Event: Synchronous Connect Complete (0x2c)
plen 17
status 0x10 handle 257 bdaddr 00:50:CD:20:C6:84 type eSCO
Error: Connection Accept Timeout Exceeded
With this patch we will retry with a SCO connection, which succeeds.
Unfortunately the Moto HF850 also takes 5 seconds to return the error for the
eSCO attempt, so it will still take 5 seconds to fallback to SCO with this
patch.
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
Legacy pairing is a bit of a problem because on the incoming end it is
impossible to know pairing has begun:
2009-09-18 18:29:24.115692 > HCI Event: Connect Request (0x04) plen 10
bdaddr 00:23:D4:04:51:7A class 0x58020c type ACL
2009-09-18 18:29:24.115966 < HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:23:D4:04:51:7A role 0x00
Role: Master
2009-09-18 18:29:24.117065 > HCI Event: Command Status (0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
2009-09-18 18:29:24.282928 > HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr 00:23:D4:04:51:7A role 0x00
Role: Master
2009-09-18 18:29:24.291534 > HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 1 bdaddr 00:23:D4:04:51:7A type ACL encrypt 0x00
2009-09-18 18:29:24.291839 < HCI Command: Read Remote Supported Features (0x01|0x001b) plen 2
handle 1
2009-09-18 18:29:24.292144 > HCI Event: Page Scan Repetition Mode Change (0x20) plen 7
bdaddr 00:23:D4:04:51:7A mode 1
2009-09-18 18:29:24.293823 > HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
2009-09-18 18:29:24.303588 > HCI Event: Max Slots Change (0x1b) plen 3
handle 1 slots 5
2009-09-18 18:29:24.309448 > HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 1
Features: 0xff 0xff 0x2d 0xfe 0x9b 0xff 0x79 0x83
2009-09-18 18:29:24.345916 < HCI Command: Remote Name Request (0x01|0x0019) plen 10
bdaddr 00:23:D4:04:51:7A mode 2 clkoffset 0x0000
2009-09-18 18:29:24.346923 > HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
2009-09-18 18:29:24.375793 > HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr 00:23:D4:04:51:7A name 'test'
2009-09-18 18:29:34.332190 < HCI Command: Disconnect (0x01|0x0006) plen 3
handle 1 reason 0x13
There are some mainline patches such as "Add different pairing timeout for
Legacy Pairing" but they do not address the HCI sequence above.
I think the real solution is to avoid using CreateBond(), and instead make
the profile connection immediately. This way both sides will use a longer
timeout because there is a higher level connection in progress, and we will
not end up with the useless HCI sequence above.
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
This fixes a bug where shutdown() and close() on a rfcomm socket during ACL
connection would not cause HCI Create Connection Cancel.
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
UART TX. The idea here is to provide a mechanism where we can wakeup our peer before sending data.
Signed-off-by: San Mehat <san@google.com>
|
|
Some platforms do not want to power down rfkill devices on suspend.
Change-Id: I62a11630521c636d54a4a02ab9037a43435925f5
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
Signed-off-by: Nick Pelly <npelly@google.com>
|
|
This provides kernel_debugger() which can be called from an interrupt
context low level debugger wedge to execute commands that inspect
kernel state. It doesn't do much on its own.
Signed-off-by: Brian Swetland <swetland@google.com>
kernel_debugger_core: Add sysrq command.
sysrq <c> will run the sysrq command <c> and dump what
was added to the kernel log while the command ran.
Signed-off-by: Brian Swetland <swetland@google.com>
Signed-off-by: Arve Hjønnevåg <arve@android.com>
|
|
If idx was non-zero and the log had wrapped, len did not get truncated
to stop at the last byte written to the log.
|
|
This reverts commit acff181d3574244e651913df77332e897b88bff4.
|
|
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
net: Fix a bitmask in PPPoPNS and rename constants in PPPoPNS and PPPoLAC.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix a potential deadlock while releasing PPPoLAC/PPPoPNS socket.
PPP driver guarantees that no thread will be executing start_xmit() after
returning from ppp_unregister_channel(). To achieve this, a spinlock (downl)
is used. In pppolac_release(), ppp_unregister_channel() is called after sk_udp
is locked. At the same time, another thread might be running in pppolac_xmit()
with downl. Thus a deadlock will occur if the thread tries to lock sk_udp.
The same situation might happen on sk_raw in pppopns_release().
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Force PPPoLAC and PPPoPNS to bind an interface before creating PPP channel.
It is common to manipulate the routing table after configuring PPP device.
Since both PPPoLAC and PPPoPNS run over IP, care must be taken to make sure
that there is no loop in the routing table.
Although this can be done by adding a host route, it might still cause
problems when the interface is down for some reason.
To solve this, this patch forces both drivers to bind an interface before
creating PPP channel, so the system will not re-route the tunneling sockets
to another interface when the original one is down. Another benefit is that
now the host route is no longer required, so there is no need to remove it
when PPP channel is closed.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Avoid sleep-inside-spinlock in PPPoLAC and PPPoPNS.
Since recv() and xmit() are called with a spinlock held, routines which might
sleep cannot be used. This issue is solved by following changes:
Incoming packets are now processed in backlog handler, recv_core(), instead of
recv(). Since backlog handler is always executed with socket spinlock held, the
requirement of ppp_input() is still satisfied.
Outgoing packets are now processed in workqueue handler, xmit_core(), instead of
xmit(). Note that kernel_sendmsg() is no longer used to prevent touching dead
sockets.
In release(), lock_sock() and pppox_unbind_sock() ensure that no thread is in
recv_core() or xmit(). Then socket handlers are restored before release_sock(),
so no packets will leak in backlog queue.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
net: Fix msg_iovlen in PPPoLAC and PPPoPNS.
Although any positive value should work (which is always true in both drivers),
the correct value should be 1.
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
|
|
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
ppopns: dont include px_proto define in if_pppopns.h
Change-Id: I27e687667db5b45182562f4a517a2e6cec6b1350
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Change-Id: I3ae3ee7520951ae24269db0ef2898c6455cf6bcc
Signed-off-by: Chia-chi Yeh <chiachi@android.com>
ppolac: dont include px_proto define in if_pppolac.h
Change-Id: I55bc9cf91ea0e9e8f7bf5d6e241d188e1269343a
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Rather than using explicit euid == 0 checks when trying to move
tasks into a cgroup via CFS, move permission checks into each
specific cgroup subsystem. If a subsystem does not specify a
'can_attach' handler, then we fall back to doing our checks the old way.
This way non-root processes can add arbitrary processes to
a cgroup if all the registered subsystems on that cgroup agree.
Also change explicit euid == 0 check to CAP_SYS_ADMIN
Signed-off-by: San Mehat <san@google.com>
|
|
Change-Id: I9ddc676382d26aef7f12145d412fe670cb486317
Signed-off-by: Dima Zavin <dima@android.com>
|
|
commit ddf33fed15c2376bfb602d62dd018c63fce60df8
Author: Timothy Manning <tfhmanning@gmail.com>
Date: Thu Dec 23 13:31:37 2010 +1300
yaffs updated direct/timothy_tests/quick_tests
Signed-off-by: Timothy Manning <tfhmanning@gmail.com>
Change-Id: I5bbe5a05277bdf8a6fe188bbe4c77725b3fa2aae
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Signed-off-by: San Mehat <san@android.com>
|
|
|
|
Change-Id: I9a99f007415c5be1bd1a86b138486eac51784e0d
Signed-off-by: Dima Zavin <dima@android.com>
|
|
Also remove disconnect debouncing, which didn't actually work on some platforms
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Microsoft recommends that the class and subclass fields of
an IAD match the same fields from the first interface in the
collection that the IAD is grouping. In practice, we are also
finding that the protocol fields should also match. Without
this change, the default Microsoft composite driver may not
group interfaces properly, which is what allows child
function drivers with IAD's to load correctly.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
bFirstInterface should be set equal to bInterfaceNumber of
the first interface in a grouping. It's currently being set
only when a composite device is bound, and it does not get
updated when functions are enabled or disabled.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
USB-IF core team mandates that composite devices containing
IAD's must use bDeviceClass=0xEF, bDeviceSubClass=0x02, &
bDeviceProtocol=0x01 instead of the usual 0x00 in all fields.
This is not a problem currently on Linux hosts, but it is a
problem when connecting to Windows hosts. Without this change
the default Microsoft composite driver will not group
interfaces properly, which is what allows child function
drivers with IAD's to load correctly.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
- Added multiple ACM instance support in Android gadget
- Fixed multiple instance naming issue in ACM function
- Increased max instances from 4 to 8
Change-Id: I65f1b0be94da859bab7ec0ad7cd804b896c7c4c5
Signed-off-by: John Michelau <john.michelau@motorola.com>
|
|
- Don't bind until all required functions have registered
- Consider multi-instance functions when matching products
Change-Id: I6fa10567db71d49cd81968c01d75e326ff9a17c8
Signed-off-by: John Michelau <john.michelau@motorola.com>
|
|
Since 2.6.36, spin_lock_bh has been added to dev_txq_stats_fold. So
dev_get_stats cannot be called from atomic context.
Replaced it by netdev_stats_to_stats64 to copy the stats directly. This
will work if the device driver does not need txq tx stats folding.
http://lkml.org/lkml/2010/9/20/250
Change-Id: I715b00892beda56cc369139d6e2bdc9efb6bfe79
Signed-off-by: Benoit Goby <benoit@android.com>
|
|
Send zero length packets at end of transfers that are a multiple of the
bulk max packet size as required by MTP.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
For backward compatibility with PTP, MTP is limited to a 32-bit file size.
When transferring files greater than 4 gig, MTP uses 0xFFFFFFFF as the file size
and the receiver reads until it receives a short packet.
Expanded size of mtp_file_range.length to 64 bits and added support for
writing zero length packets.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Returning number of bytes transfered does not work for files > 2 gig
since ioctl() result is a signed integer.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Use a work queue instead of a separate thread for file transfer ioctls
(note: the file transfer must be done on a kernel thread rather than in
process context so vfs_read and vfs_write will use the correct address space
for the buffers)
Enforce requirement that only one ioctl call may be active at a time,
and remove mutex in mtp_send_event that is now no longer necessary.
Synchronize around use of shared variables to avoid SMP issues
Fix mismatched calls to fget and fput
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Remove USB_CONFIG_ATT_WAKEUP from bmAttributes as we don't
support remote wakeup. This fixes an issue with the USB 2.0
compliance test tool.
Change-Id: Ic15e44710069f3f05ace6a82bbfa2b85a3649027
Signed-off-by: Benoit Goby <benoit@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
|
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
|
|
Use this rather than calling usb_gadget_disconnect and usb_gadget_connect
directly to avoid sending USB disconnect events to userspace when resetting
the bus.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Needed for MTP support.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Add switch to notify current USB configuration. This can be used to detect
USB connect and disconnect events.
Broadcast a change via the usb_composite class when a USB function is
enabled or disabled.
Rename usb_function.hidden to usb_function.disabled.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Integrate support for android composite driver and platform data
within CONFIG_USB_ANDROID_MASS_STORAGE.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
As part of formating the mass storage device, Host sends the INQUIRY
scsi command. As per the standard, the command length for this
command should be 6 bytes, whereas the Vista host sends 12 bytes.
When the command length of the command is not equal to the standard
length, the device sends a phase error as part of the status phase.
When the host receives a phase error, it re-enumerates, hence the
error.
If the command is INQUIRY, and the command length is 12 bytes,
treating this as a good command and not sending the phase error
to the host fixes this issue.
Signed-off-by: Velempati Chiranjeevi <c_cvelem@qualcomm.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
Pulling in some code from file_storage.c, we now handle interface changes
in do_set_config(), which is now not called until any pending requests have
been successfully completed or cancelled.
This fixes a race condition that resulted in usb_ep_free_request() being called
while the request is still busy.
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|
The old code did not allways disable interrupts when called from thread
context, but tried to lock the same spinlock from interrupt context.
This was merged from a change to drivers/usb/function/mass_storage.c
in the android-msm-2.6.29 branch.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Mike Lockwood <lockwood@android.com>
|