diff options
| -rw-r--r-- | arch/sparc64/kernel/ds.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index ba01533f4e03..fa1f04d756a2 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c | |||
| @@ -1013,6 +1013,19 @@ static void ds_up(struct ds_info *dp) | |||
| 1013 | dp->hs_state = DS_HS_START; | 1013 | dp->hs_state = DS_HS_START; |
| 1014 | } | 1014 | } |
| 1015 | 1015 | ||
| 1016 | static void ds_reset(struct ds_info *dp) | ||
| 1017 | { | ||
| 1018 | int i; | ||
| 1019 | |||
| 1020 | dp->hs_state = 0; | ||
| 1021 | |||
| 1022 | for (i = 0; i < ARRAY_SIZE(ds_states); i++) { | ||
| 1023 | struct ds_cap_state *cp = &ds_states[i]; | ||
| 1024 | |||
| 1025 | cp->state = CAP_STATE_UNKNOWN; | ||
| 1026 | } | ||
| 1027 | } | ||
| 1028 | |||
| 1016 | static void ds_event(void *arg, int event) | 1029 | static void ds_event(void *arg, int event) |
| 1017 | { | 1030 | { |
| 1018 | struct ds_info *dp = arg; | 1031 | struct ds_info *dp = arg; |
| @@ -1028,6 +1041,12 @@ static void ds_event(void *arg, int event) | |||
| 1028 | return; | 1041 | return; |
| 1029 | } | 1042 | } |
| 1030 | 1043 | ||
| 1044 | if (event == LDC_EVENT_RESET) { | ||
| 1045 | ds_reset(dp); | ||
| 1046 | spin_unlock_irqrestore(&ds_lock, flags); | ||
| 1047 | return; | ||
| 1048 | } | ||
| 1049 | |||
| 1031 | if (event != LDC_EVENT_DATA_READY) { | 1050 | if (event != LDC_EVENT_DATA_READY) { |
| 1032 | printk(KERN_WARNING PFX "Unexpected LDC event %d\n", event); | 1051 | printk(KERN_WARNING PFX "Unexpected LDC event %d\n", event); |
| 1033 | spin_unlock_irqrestore(&ds_lock, flags); | 1052 | spin_unlock_irqrestore(&ds_lock, flags); |
