From: Kevin Wolf <kwolf@redhat.com>
To: Bernhard Kohl <bernhard.kohl@nsn.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function
Date: Thu, 02 Sep 2010 16:45:21 +0200 [thread overview]
Message-ID: <4C7FB881.7090502@redhat.com> (raw)
In-Reply-To: <1283434657-12843-1-git-send-email-bernhard.kohl@nsn.com>
Am 02.09.2010 15:37, schrieb Bernhard Kohl:
> In scsi-generic the reset() function is not available.
>
> Signed-off-by: Bernhard Kohl <bernhard.kohl@nsn.com>
> ---
> hw/lsi53c895a.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
> index 5eaf69e..01ff028 100644
> --- a/hw/lsi53c895a.c
> +++ b/hw/lsi53c895a.c
> @@ -1597,7 +1597,9 @@ static void lsi_reg_writeb(LSIState *s, int offset, uint8_t val)
> for (id = 0; id < s->bus.ndev; id++) {
> if (s->bus.devs[id]) {
> dev = &s->bus.devs[id]->qdev;
> - dev->info->reset(dev);
> + if (dev->info->reset) {
> + dev->info->reset(dev);
> + }
> }
> }
> s->sstat0 |= LSI_SSTAT0_RST;
I suspect the real fix is to add a reset handler to scsi-generic. It
should probably remove the requests like it's currently done in
scsi_destroy. The same change was made for scsi-disk in e9447f35.
Kevin
next prev parent reply other threads:[~2010-09-02 14:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-02 13:37 [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function Bernhard Kohl
2010-09-02 14:45 ` Kevin Wolf [this message]
2010-09-06 9:30 ` Bernhard Kohl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C7FB881.7090502@redhat.com \
--to=kwolf@redhat.com \
--cc=bernhard.kohl@nsn.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.