Hello,
On Tue, 10 Nov 2026, Keith Monahan wrote:
Hi Zoltan,
On 11/8/2026 8:01 AM, BALATON Zoltan wrote:
On Sun, 8 Nov 2026, Helge Deller wrote:
Hello Balaton,
On 11/8/26 12:43, BALATON Zoltan wrote:
On Fri, 6 Nov 2026, Helge Deller wrote:
From: Helge Deller <[email protected]>
This adds a new driver for the NC53C710 chipset. This drover is based on
the
lsi53c895a driver, and thus avoids many issues of the existing ncr53c710
driver, which was written from scratch.
There's a typo "drover" above.
Thanks! I'll fix it the next round.
I asked this before but would it be possible to modify lsi53c895a.c
to also emulate the 53c710 too instead of duplicating code?
Maybe. At least in theory: Probably.
This device model is almost the same as the 53c895a or at least a
large part is shared but it's not easy to see that as it uses
different names for the same structures and functions. It would be
better to at least split the reused struct definitions from 53c895a
into a shared header and use that here. Then compare what are the
differences between the functions and see if the common parts could
either be split into a common super class or if the differences are
small enough to just add conditionals in lsi53c895a.c to also emulate
53c710 with most of the code shared instead of duplicated.
Well, this is a lot of work.
And I'm not sure if you gain that much from that exercise.
OK but at least using a common header should not be that much work and
would reduce the differences and make the two device models more easily
comparable.
If you are a person which really want to know all differences between
those two SCSI chips then this is most likely a very interesting project.
But I fail to see someone who volunteers for this, who has the time and
interest to really do this and who still guarantees he will not break the
lsi53c895a.
I'm not sure what is the state of AI usage discussion but might also be a
project to try an AI agent with.
Looking at the Linux kernel, there are lots of different drivers driving
all various variants of those SCSI chips. The 710 was one of the earlier
SCSI chips (e.g. ISA bus, no PCI,...) while the 53c895a is a newer chip
for PCI.
That's a diference in inteface but if the chip otherwise is the same or
very similar it would be more easily modelled as a super class implementing
the SCSI things and two subclasses embedding it one ISADevice and the other
PCIDevice with the parts that's specific to the interface belonging to
those child classes. That way there would be no code duplication.
In any case if there's code duplication then try not to make it worse by
renaming everthing but keep the names and shared structs at least the same
so it can be more easily compared and to what's different. That might also
come in handy when there's a fix in one device that could be applied to the
other too.
Right now, HP-UX (both 9.05 and 10.20) can't boot at all on the HP 715. The
new model has been tested extensively, so we're keen to get this working for
everyone.
You're right that it's hard to see how the two models relate when the shared
pieces don't line up. Before I start, here is what I understand you'll accept
for this patch series:
I'll move the shared definitions into a common header:
* request struct
* waiting and message-action enums
* SCSI phase constants
* register-bit defines that are common.
Both drivers will include that header. The 710 driver will use the same names
as the 895 for the shared definitions. This enables the two to be compared
Yes, that's what I thought that it's not much additional work and would
reduce code duplication so at least these shared parts could be split in a
common header used by both models instead of duplicating everthing in the
710 model.
You could even keep the same names for static functions and not prefix
them with ncr710_ in the new model. As these are static they don't clash
between different files but keeping the same name helps with comparing.
Although the lsi53c895a.c uses lsi_ prefix and the 710 predates when NCR
became LSI that probably does not matter much so I'd just keep everyting
with lsi_ prefix so the common header could be called lsi_scsi.h or
something like that and note in a comment that NCR chips use the same as
that's the origin of LSI SCSI. The goal is to make the two models as much
similar as possible to be easy to see the differences by comparing them.
side by side, and fixes can be carried between them.
The nice part about this approach is that the generated code on the 895 would
be identical, when compared properly, so there shouldn't be any behavior
changes to test, beyond basic smoke tests.
Yes, just splitting out the common parts to a header and reusing them
should not break the 895 and it's easy to review so that should be easily
doable.
And we'll make sure the MAINTAINERS entry is correct, so we get proper
notification for changes.
This would be the scope of this series: the 710 stays its own device model.
If the header shows the remaining differences are small, I’m open to
revisiting a common base class later.
Trying to unify the two models more can be done later in separate series
if somebody wants to, the above common code reuse should make it easier to
see what would be needed for that and if it's worth going further.
Does this address your concern?
Yes, I think that's all I wanted to say in my review comments. Thank you.
Regards,
BALATON Zoltan