* [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function
@ 2010-09-02 13:37 Bernhard Kohl
2010-09-02 14:45 ` Kevin Wolf
0 siblings, 1 reply; 3+ messages in thread
From: Bernhard Kohl @ 2010-09-02 13:37 UTC (permalink / raw)
To: qemu-devel; +Cc: kwolf, 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;
--
1.7.2.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function
2010-09-02 13:37 [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function Bernhard Kohl
@ 2010-09-02 14:45 ` Kevin Wolf
2010-09-06 9:30 ` Bernhard Kohl
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Wolf @ 2010-09-02 14:45 UTC (permalink / raw)
To: Bernhard Kohl; +Cc: qemu-devel
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function
2010-09-02 14:45 ` Kevin Wolf
@ 2010-09-06 9:30 ` Bernhard Kohl
0 siblings, 0 replies; 3+ messages in thread
From: Bernhard Kohl @ 2010-09-06 9:30 UTC (permalink / raw)
To: ext Kevin Wolf; +Cc: qemu-devel
Am 02.09.2010 16:45, schrieb ext Kevin Wolf:
> 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.
>
Yes, I agree. Let's skip this patch. I'll send another one.
Bernhard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-06 9:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-02 13:37 [Qemu-devel] [PATCH] lsi53c895a: avoid calling a NULL function Bernhard Kohl
2010-09-02 14:45 ` Kevin Wolf
2010-09-06 9:30 ` Bernhard Kohl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).