|
From: Anders J. <and...@us...> - 2001-11-15 15:01:57
|
The following file was modified in linux/drivers/char/bluetooth:
Name Old version New version Comment
---- ----------- ----------- -------
bluetooth.c 1.212 1.213=20=20=20=20=20=20=20=20=20=20=20
The accompanying log:
* Added bt_handle_hw_error.
The diff of the modified file(s):
--- bluetooth.c 2001/11/15 11:18:00 1.212
+++ bluetooth.c 2001/11/15 15:01:57 1.213
@@ -258,6 +258,7 @@
/****************** GLOBAL VARIABLE DECLARATION SECTION ******************=
***/
=20
extern hci_controller hci_ctrl;
+static u8 btdm_pid =3D 0;
=20
/****************** LOCAL VARIABLE DECLARATION SECTION *******************=
***/
=20
@@ -1335,6 +1336,8 @@
BT_LDISC(__FUNCTION__ "\n");
DSYS("Setting BT driver to use serial tty\n");
sertty =3D tty;
+ DSYS("Setting btdm_pid (%d)\n", current->pid);
+ btdm_pid =3D current->pid;
return 0;
}
=20
@@ -2524,6 +2527,25 @@
}
return old;
}
+
+void
+bt_handle_hw_error(u8 error)
+{
+ printk(__FUNCTION__ ": Received error with code 0x%02X ", error);
+ switch(error) {
+ case 0xfe:
+ printk(", resetting module\n");
+ if(btdm_pid) {
+ kill_proc(btdm_pid, SIGUSR1, 1);
+ } else {
+ printk(__FUNCTION__ ": No btdm PID found, ignoring\n");
+ }=09
+ break;
+ default:
+ printk(", ignoring\n");
+ }
+}
+
=20
s32
bt_init_stack(void)
|