Patchwork scsi-generic: Add reset handler

login
register
mail settings
Submitter Nicholas A. Bellinger
Date Sept. 30, 2010, 5:07 a.m.
Message ID <1285823246-6680-1-git-send-email-nab@linux-iscsi.org>
Download mbox | patch
Permalink /patch/66112/
State New
Headers show

Comments

Nicholas A. Bellinger - Sept. 30, 2010, 5:07 a.m.
From: Nicholas Bellinger <nab@linux-iscsi.org>

This patch adds NOP scsi_generic_reset() caller to fix an OOPs
which is expected to be set by hw/lsi53895a.c code for both
scsi-disk and scsi-generic operation.

Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
 hw/scsi-generic.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

Patch

diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 1bb26e7..176fcaf 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -379,6 +379,11 @@  static int scsi_generic_initfn(SCSIDevice *dev)
     return 0;
 }
 
+static void scsi_generic_reset(DeviceState *dev)
+{
+    DPRINTF("scsi_generic_reset\n");
+}
+
 static void scsi_generic_unmap(SCSIGenericReq *r)
 {
     int is_write = !scsi_req_is_write(&r->req);
@@ -552,6 +557,7 @@  static SCSIDeviceInfo scsi_generic_info = {
     .qdev.name    = "scsi-generic",
     .qdev.desc    = "pass through generic scsi device (/dev/sg*)",
     .qdev.size    = sizeof(SCSIGenericState),
+    .qdev.reset   = scsi_generic_reset,
     .init         = scsi_generic_initfn,
     .destroy      = scsi_destroy,