From patchwork Thu Sep 30 05:07:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 218662 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8U5EHn4022119 for ; Thu, 30 Sep 2010 05:14:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441Ab0I3FOM (ORCPT ); Thu, 30 Sep 2010 01:14:12 -0400 Received: from smtp104.sbc.mail.mud.yahoo.com ([68.142.198.203]:45296 "HELO smtp104.sbc.mail.mud.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753073Ab0I3FOM (ORCPT ); Thu, 30 Sep 2010 01:14:12 -0400 X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 30 Sep 2010 05:14:17 +0000 (UTC) X-Greylist: delayed 400 seconds by postgrey-1.27 at vger.kernel.org; Thu, 30 Sep 2010 01:14:12 EDT Received: (qmail 55743 invoked from network); 30 Sep 2010 05:07:28 -0000 Received: from localhost.localdomain (nab@70.132.0.32 with login) by smtp104.sbc.mail.mud.yahoo.com with SMTP; 29 Sep 2010 22:07:28 -0700 PDT X-Yahoo-SMTP: fzDSGlOswBCWnIOrNw7KwwK1j9PqyNbe5PtLKiS4dDU.UNl_t6bdEZu9tTLW X-YMail-OSG: _nwCsxYVM1mC183ofESqxoWlBIdygjp4iP0Fp11_LXqHEm. t.jjUnxjQX9xH.kcx.PWMvwirC2Qe_4i0XTfFg.uCJlgf6t8Vlfpm686vJoS TVAY9_MiFI7J_JZ9uT2_ALpVMMdvfuCfL.g47PHs4LgOslM4bVji3KyxOCZP tHR9Z3ajbxt50YEXd4tivy1OWApTrAtXjBKb7O2Iufwgq7Rje8SYwuQFEiNf WTduFrl_Cg9eEE3X2MMEpBe8MLpwCy7PyK9s4E6.lYEYR00m9Cox4es15obs Fr9AGGsFdTERyngf.RzDm2qjRwGmgrW3_9hyHgvbwX1ueQZK5n5Q- X-Yahoo-Newman-Property: ymail-3 From: "Nicholas A. Bellinger" To: Paul Brook , Jan Kiszka , Kevin Wolf , Gerd Hoffmann Cc: Hannes Reinecke , FUJITA Tomonori , Matthew Wilcox , kvm-devel , qemu-devel , Nicholas Bellinger Subject: [PATCH] scsi-generic: Add reset handler Date: Wed, 29 Sep 2010 22:07:25 -0700 Message-Id: <1285823246-6680-1-git-send-email-nab@linux-iscsi.org> X-Mailer: git-send-email 1.5.6.5 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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,