WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] pvSCSI: cleanup and fix few bugs

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] pvSCSI: cleanup and fix few bugs
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 08 Jul 2008 22:30:16 -0700
Delivery-date: Tue, 08 Jul 2008 22:30:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1215505884 -3600
# Node ID db4f08203b8a3ecd8a633a3593f5b4fd363ea37c
# Parent  132bae41625ff2bb9f48c65bf643c462093d455d
pvSCSI: cleanup and fix few bugs

Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>
Signed-off-by: Jun Kamada <kama@xxxxxxxxxxxxxx>
---
 drivers/xen/scsiback/scsiback.c   |   20 ++++++++++++--------
 drivers/xen/scsiback/translate.c  |    2 +-
 drivers/xen/scsifront/scsifront.c |    1 -
 3 files changed, 13 insertions(+), 10 deletions(-)

diff -r 132bae41625f -r db4f08203b8a drivers/xen/scsiback/scsiback.c
--- a/drivers/xen/scsiback/scsiback.c   Tue Jul 08 09:30:34 2008 +0100
+++ b/drivers/xen/scsiback/scsiback.c   Tue Jul 08 09:31:24 2008 +0100
@@ -510,7 +510,7 @@ static int prepare_pending_reqs(struct v
                pending_req->sdev = NULL;
                DPRINTK("scsiback: doesn't exist.\n");
                err = -ENODEV;
-               goto invald_value;
+               goto invalid_value;
        }
        pending_req->sdev = sdev;
 
@@ -524,7 +524,7 @@ static int prepare_pending_reqs(struct v
                DPRINTK("scsiback: invalid parameter data_dir = %d\n",
                        pending_req->sc_data_direction);
                err = -EINVAL;
-               goto invald_value;
+               goto invalid_value;
        }
 
        pending_req->nr_segments = ring_req->nr_segments;
@@ -533,7 +533,7 @@ static int prepare_pending_reqs(struct v
                DPRINTK("scsiback: invalid parameter nr_seg = %d\n",
                        pending_req->nr_segments);
                err = -EINVAL;
-               goto invald_value;
+               goto invalid_value;
        }
 
        pending_req->cmd_len = ring_req->cmd_len;
@@ -542,7 +542,7 @@ static int prepare_pending_reqs(struct v
                DPRINTK("scsiback: invalid parameter cmd_len = %d\n",
                        pending_req->cmd_len);
                err = -EINVAL;
-               goto invald_value;
+               goto invalid_value;
        }
        memcpy(pending_req->cmnd, ring_req->cmnd, pending_req->cmd_len);
        
@@ -551,12 +551,12 @@ static int prepare_pending_reqs(struct v
        if(scsiback_gnttab_data_map(ring_req, pending_req)) {
                DPRINTK("scsiback: invalid buffer\n");
                err = -EINVAL;
-               goto invald_value;
+               goto invalid_value;
        }
 
        return 0;
 
-invald_value:
+invalid_value:
        return err;
 }
 
@@ -669,7 +669,7 @@ static int __init scsiback_init(void)
                pending_grant_handles[i] = SCSIBACK_INVALID_HANDLE;
 
        if (scsiback_interface_init() < 0)
-               goto out_of_memory;
+               goto out_of_kmem;
 
        memset(pending_reqs, 0, sizeof(pending_reqs));
        INIT_LIST_HEAD(&pending_free);
@@ -678,12 +678,16 @@ static int __init scsiback_init(void)
                list_add_tail(&pending_reqs[i].free_list, &pending_free);
 
        if (scsiback_xenbus_init())
-               goto out_of_memory;
+               goto out_of_xenbus;
 
        scsiback_emulation_init();
 
        return 0;
 
+out_of_xenbus:
+       scsiback_xenbus_unregister();
+out_of_kmem:
+       scsiback_interface_exit();
 out_of_memory:
        kfree(pending_reqs);
        kfree(pending_grant_handles);
diff -r 132bae41625f -r db4f08203b8a drivers/xen/scsiback/translate.c
--- a/drivers/xen/scsiback/translate.c  Tue Jul 08 09:30:34 2008 +0100
+++ b/drivers/xen/scsiback/translate.c  Tue Jul 08 09:31:24 2008 +0100
@@ -107,7 +107,7 @@ int scsiback_del_translation_entry(struc
        }
 
        spin_unlock_irqrestore(&info->v2p_lock, flags);
-       return 0;
+       return 1;
 
 found:
        /* Delete the translation entry specfied */
diff -r 132bae41625f -r db4f08203b8a drivers/xen/scsifront/scsifront.c
--- a/drivers/xen/scsifront/scsifront.c Tue Jul 08 09:30:34 2008 +0100
+++ b/drivers/xen/scsifront/scsifront.c Tue Jul 08 09:31:24 2008 +0100
@@ -146,7 +146,6 @@ static void scsifront_cdb_cmd_done(struc
        scsifront_gnttab_done(&info->shadow[id], id);
        add_id_to_freelist(info, id);
 
-       rmb();
        if (atomic_read(&info->abort_reset_cond) == VSCSI_IN_RESET) {
                sc->result = (DID_RESET << 16);
        } else {

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] pvSCSI: cleanup and fix few bugs, Xen patchbot-linux-2.6.18-xen <=