This is my first patch, so apologies if I've got the protocol wrong! I'm not sure if this is the best place to post this patch or even if I've done everything correctly (I assume I simply add a signed-off-by in my name).
<br><br>I came across this bug when getting sixaxis controllers to work under Linux on the PS3, although it actually seems to be a generic bluetooth problem under Linux.<br><br>Basically, the problem is that unless the bluetooth connection is killed prior to reboot, the PS3 controllers continue sending out data which the kernel correctly identifies as not associated with an active connection. However, it simply logs the error and continues, so the syslog rapidly fills up. It addition, because the device it will not attempt to re-initiate a new bluetooth connection, so the only current solution is to halt the linux box until the controller times out.
<br><br>This one line addition sends the device a reset which causes it to switch off.<br><br>Signed-off-by: Ranulf Doswell &lt;ralf at <a href="http://ranulf.net">ranulf.net</a>&gt;<br><br><div style="direction: ltr;">=====================================
</div><br>diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c<br>index 8943c93..77b7eca 100644<br>--- a/net/bluetooth/hci_core.c
<br>+++ b/net/bluetooth/hci_core.c<br>@@ -1340,6 +1340,12 @@ static inline void hci_acldata_packet(struct hci_dev *hdev, struct sk_buff *skb)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BT_ERR(&quot;%s ACL packet for unknown connection handle %d&quot;,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hdev-&gt;name, handle);<br>+<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Force the device to reset in the hope that it will then leave us alone.<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // This is needed at least for PS3 sixaxis as the controllers will keep
<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // sending data until they are forcibly terminated. A reboot doesn&#39;t provide<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // enough time for the controller&#39;s bluetooth stack to time out. <br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; hci_reset_req(hdev, 0);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kfree_skb(skb);<br><br>