[PATCH 0/8] ncr710: cleanups and fixes for request lifetime

Paolo Bonzini posted 8 patches 1 week, 3 days ago
hw/scsi/ncr53c710.h |   3 +-
hw/scsi/ncr53c710.c | 167 ++++++++++++++++++++------------------------
2 files changed, 76 insertions(+), 94 deletions(-)
[PATCH 0/8] ncr710: cleanups and fixes for request lifetime
Posted by Paolo Bonzini 1 week, 3 days ago
The ncr710 HBA code is similar to lsi53c895a, but it can be simplified
due to lack of support for tagged command queuing.  Perform a bunch
of cleanups and copy over the fixes from commits up to
d459131ff590c517bc89fa5867d4878b5eacbc30.

Paolo Bonzini (8):
  ncr710: simplify ncr710_clear_pending_irq
  ncr710: reuse ncr710_clear_pending_irq in ncr10_do_command
  ncr710: remove weird p->req == NULL case
  ncr710: clean up ncr710_transfer_data
  ncr710: do not load s->current in advance
  ncr710: remove dead message in actions
  ncr710: copy reference counting fixes over from lsi53c895a
  ncr710: unify two conditionals

 hw/scsi/ncr53c710.h |   3 +-
 hw/scsi/ncr53c710.c | 167 ++++++++++++++++++++------------------------
 2 files changed, 76 insertions(+), 94 deletions(-)

-- 
2.55.0
Re: [PATCH 0/8] ncr710: cleanups and fixes for request lifetime
Posted by Helge Deller 1 week, 3 days ago
Hello Paolo,

On 9/16/26 15:21, Paolo Bonzini wrote:
> The ncr710 HBA code is similar to lsi53c895a, but it can be simplified
> due to lack of support for tagged command queuing.  Perform a bunch
> of cleanups and copy over the fixes from commits up to
> d459131ff590c517bc89fa5867d4878b5eacbc30.

I haven't tested your patches yet, but the current version of the ncr710
driver hangs on HP-UX and *BSD guests (works only with Linux guests).
I assume your cleanups will not fix this?

In addition, Keith Monahan posted two weeks ago a patch which replaces
this driver by a new version which is based on top of the lsi53c895a
code base and which I tested successfully with Linux, HP-UX and *BSD guests.
There were some discussions about it here:
https://patchew.org/QEMU/20260701213359.1855870-1-keith@techtravels.org/

Isn't there a chance to use his driver instead of trying to clean up
the existing driver?

Helge

> 
> Paolo Bonzini (8):
>    ncr710: simplify ncr710_clear_pending_irq
>    ncr710: reuse ncr710_clear_pending_irq in ncr10_do_command
>    ncr710: remove weird p->req == NULL case
>    ncr710: clean up ncr710_transfer_data
>    ncr710: do not load s->current in advance
>    ncr710: remove dead message in actions
>    ncr710: copy reference counting fixes over from lsi53c895a
>    ncr710: unify two conditionals
> 
>   hw/scsi/ncr53c710.h |   3 +-
>   hw/scsi/ncr53c710.c | 167 ++++++++++++++++++++------------------------
>   2 files changed, 76 insertions(+), 94 deletions(-)
> 
Re: [PATCH 0/8] ncr710: cleanups and fixes for request lifetime
Posted by Paolo Bonzini 1 week, 3 days ago
Il mer 16 set 2026, 16:49 Helge Deller <deller@gmx.de> ha scritto:

> Hello Paolo,
>
> On 9/16/26 15:21, Paolo Bonzini wrote:
> > The ncr710 HBA code is similar to lsi53c895a, but it can be simplified
> > due to lack of support for tagged command queuing.  Perform a bunch
> > of cleanups and copy over the fixes from commits up to
> > d459131ff590c517bc89fa5867d4878b5eacbc30.
>
> I haven't tested your patches yet, but the current version of the ncr710
> driver hangs on HP-UX and *BSD guests (works only with Linux guests).
> I assume your cleanups will not fix this?
>

It's not intended to have any functional changes, except for fixing crashes.

In addition, Keith Monahan posted two weeks ago a patch which replaces
> this driver by a new version which is based on top of the lsi53c895a
> code base and which I tested successfully with Linux, HP-UX and *BSD
> guests.
> There were some discussions about it here:
> https://patchew.org/QEMU/20260701213359.1855870-1-keith@techtravels.org/
>
> Isn't there a chance to use his driver instead of trying to clean up
> the existing driver?
>

I didn't know about it and I wrote these patches long ago (right after
fixing the lsi53c895a reference counting).

Weirdly enough it removes more lines than it adds, so I guess it's fine??
:) It also includes some of the same fixes, since it copies the fixed code
from lsi53c895a. If his work is accepted, I can rebase on top of it and see
if there are any cleanups that survive.

Paolo


Helge
>
> >
> > Paolo Bonzini (8):
> >    ncr710: simplify ncr710_clear_pending_irq
> >    ncr710: reuse ncr710_clear_pending_irq in ncr10_do_command
> >    ncr710: remove weird p->req == NULL case
> >    ncr710: clean up ncr710_transfer_data
> >    ncr710: do not load s->current in advance
> >    ncr710: remove dead message in actions
> >    ncr710: copy reference counting fixes over from lsi53c895a
> >    ncr710: unify two conditionals
> >
> >   hw/scsi/ncr53c710.h |   3 +-
> >   hw/scsi/ncr53c710.c | 167 ++++++++++++++++++++------------------------
> >   2 files changed, 76 insertions(+), 94 deletions(-)
> >
>
>