Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8a2950cce6c8fa29bcbf6a3b33a63e0e68337f0e
Commit:     8a2950cce6c8fa29bcbf6a3b33a63e0e68337f0e
Parent:     6160f63518406485c7009cb0f2e1588ea3abccc1
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 17 23:12:20 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Jul 18 01:20:09 2007 -0700

    [SPARC64]: Handle LDC resets properly in domain-services driver.
    
    Reset the handshake and per-capability state so that when the
    link comes back up we'll renegotiate the DS version and then
    reregister all of the services.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 ba01533..fa1f04d 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)
                dp->hs_state = DS_HS_START;
 }
 
+static void ds_reset(struct ds_info *dp)
+{
+       int i;
+
+       dp->hs_state = 0;
+
+       for (i = 0; i < ARRAY_SIZE(ds_states); i++) {
+               struct ds_cap_state *cp = &ds_states[i];
+
+               cp->state = CAP_STATE_UNKNOWN;
+       }
+}
+
 static void ds_event(void *arg, int event)
 {
        struct ds_info *dp = arg;
@@ -1028,6 +1041,12 @@ static void ds_event(void *arg, int event)
                return;
        }
 
+       if (event == LDC_EVENT_RESET) {
+               ds_reset(dp);
+               spin_unlock_irqrestore(&ds_lock, flags);
+               return;
+       }
+
        if (event != LDC_EVENT_DATA_READY) {
                printk(KERN_WARNING PFX "Unexpected LDC event %d\n", event);
                spin_unlock_irqrestore(&ds_lock, flags);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to