mbox series

[0/4] esp-pci: fixes for Linux and MS-DOS

Message ID 20240112131529.515642-1-mark.cave-ayland@ilande.co.uk
Headers show
Series esp-pci: fixes for Linux and MS-DOS | expand

Message

Mark Cave-Ayland Jan. 12, 2024, 1:15 p.m. UTC
This series contains fixes for the esp-pci device (am53c974 or dc390) for a
few issues spotted whilst testing the previous ESP series.

Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the
hppa C3700 machine with the amd53c974/dc390 devices under Linux, whilst patch
4 fixes an issue that was exposed by testing MS-DOS and Windows drivers.

With this series applied on top of the reworked ESP device, it is possible to
boot Linux under qemu-system-hppa without any errors and also boot and install
Win98SE from a DC390 PCI SCSI controller (no IDE!) using an MS-DOS boot floppy.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Based-on: 20240112125420.514425-1-mark.cave-ayland@ilande.co.uk


Mark Cave-Ayland (4):
  esp-pci.c: use correct address register for PCI DMA transfers
  esp-pci.c: generate PCI interrupt from separate ESP and PCI sources
  esp-pci.c: synchronise setting of DMA_STAT_DONE with ESP completion
    interrupt
  esp-pci.c: set DMA_STAT_BCMBLT when BLAST command issued

 hw/scsi/esp-pci.c | 61 +++++++++++++++++++++++++++++++----------------
 1 file changed, 41 insertions(+), 20 deletions(-)

Comments

Philippe Mathieu-Daudé Jan. 16, 2024, 4:10 p.m. UTC | #1
On 12/1/24 14:15, Mark Cave-Ayland wrote:
> This series contains fixes for the esp-pci device (am53c974 or dc390) for a
> few issues spotted whilst testing the previous ESP series.
> 
> Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the
> hppa C3700 machine with the amd53c974/dc390 devices under Linux, whilst patch
> 4 fixes an issue that was exposed by testing MS-DOS and Windows drivers.
> 
> With this series applied on top of the reworked ESP device, it is possible to
> boot Linux under qemu-system-hppa without any errors and also boot and install
> Win98SE from a DC390 PCI SCSI controller (no IDE!) using an MS-DOS boot floppy.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Based-on: 20240112125420.514425-1-mark.cave-ayland@ilande.co.uk
> 
> 
> Mark Cave-Ayland (4):
>    esp-pci.c: use correct address register for PCI DMA transfers
>    esp-pci.c: generate PCI interrupt from separate ESP and PCI sources
>    esp-pci.c: synchronise setting of DMA_STAT_DONE with ESP completion
>      interrupt
>    esp-pci.c: set DMA_STAT_BCMBLT when BLAST command issued
> 
>   hw/scsi/esp-pci.c | 61 +++++++++++++++++++++++++++++++----------------
>   1 file changed, 41 insertions(+), 20 deletions(-)

Series queued to my hw-misc tree, thanks!
Michael Tokarev Jan. 20, 2024, 1:09 p.m. UTC | #2
12.01.2024 16:15, Mark Cave-Ayland:
> This series contains fixes for the esp-pci device (am53c974 or dc390) for a
> few issues spotted whilst testing the previous ESP series.
> 
> Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the
> hppa C3700 machine with the amd53c974/dc390 devices under Linux, whilst patch
> 4 fixes an issue that was exposed by testing MS-DOS and Windows drivers.
> 
> With this series applied on top of the reworked ESP device, it is possible to
> boot Linux under qemu-system-hppa without any errors and also boot and install
> Win98SE from a DC390 PCI SCSI controller (no IDE!) using an MS-DOS boot floppy.
> 
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Based-on: 20240112125420.514425-1-mark.cave-ayland@ilande.co.uk
> 
> 
> Mark Cave-Ayland (4):
>    esp-pci.c: use correct address register for PCI DMA transfers
>    esp-pci.c: generate PCI interrupt from separate ESP and PCI sources
>    esp-pci.c: synchronise setting of DMA_STAT_DONE with ESP completion
>      interrupt
>    esp-pci.c: set DMA_STAT_BCMBLT when BLAST command issued

Is it worth to pick up for stable?  Especially the first one.
It's interesting this bug is here for a very long time.. :)

Thanks,

/mjt
Guenter Roeck Jan. 20, 2024, 3:23 p.m. UTC | #3
On 1/20/24 05:09, Michael Tokarev wrote:
> 12.01.2024 16:15, Mark Cave-Ayland:
>> This series contains fixes for the esp-pci device (am53c974 or dc390) for a
>> few issues spotted whilst testing the previous ESP series.
>>
>> Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the
>> hppa C3700 machine with the amd53c974/dc390 devices under Linux, whilst patch
>> 4 fixes an issue that was exposed by testing MS-DOS and Windows drivers.
>>
>> With this series applied on top of the reworked ESP device, it is possible to
>> boot Linux under qemu-system-hppa without any errors and also boot and install
>> Win98SE from a DC390 PCI SCSI controller (no IDE!) using an MS-DOS boot floppy.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> Based-on: 20240112125420.514425-1-mark.cave-ayland@ilande.co.uk
>>
>>
>> Mark Cave-Ayland (4):
>>    esp-pci.c: use correct address register for PCI DMA transfers
>>    esp-pci.c: generate PCI interrupt from separate ESP and PCI sources
>>    esp-pci.c: synchronise setting of DMA_STAT_DONE with ESP completion
>>      interrupt
>>    esp-pci.c: set DMA_STAT_BCMBLT when BLAST command issued
> 
> Is it worth to pick up for stable?  Especially the first one.
> It's interesting this bug is here for a very long time.. :)
> 

FWIW, I never observed the first one with Linux. I had carried variants
of the other three in my tree for a long time, but they were never
in a shape to be sent upstream and I never bothered trying to find
the root cause. All those _can_ be observed when booting Linux. So,
if anything, I'd argue that they should all be taken into stable
releases.

Thanks,
Guenter
Mark Cave-Ayland Jan. 21, 2024, 12:28 p.m. UTC | #4
On 20/01/2024 13:09, Michael Tokarev wrote:

> 12.01.2024 16:15, Mark Cave-Ayland:
>> This series contains fixes for the esp-pci device (am53c974 or dc390) for a
>> few issues spotted whilst testing the previous ESP series.
>>
>> Patches 1-3 are fixes for issues found by Helge/Guenter whilst testing the
>> hppa C3700 machine with the amd53c974/dc390 devices under Linux, whilst patch
>> 4 fixes an issue that was exposed by testing MS-DOS and Windows drivers.
>>
>> With this series applied on top of the reworked ESP device, it is possible to
>> boot Linux under qemu-system-hppa without any errors and also boot and install
>> Win98SE from a DC390 PCI SCSI controller (no IDE!) using an MS-DOS boot floppy.
>>
>> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>> Based-on: 20240112125420.514425-1-mark.cave-ayland@ilande.co.uk
>>
>>
>> Mark Cave-Ayland (4):
>>    esp-pci.c: use correct address register for PCI DMA transfers
>>    esp-pci.c: generate PCI interrupt from separate ESP and PCI sources
>>    esp-pci.c: synchronise setting of DMA_STAT_DONE with ESP completion
>>      interrupt
>>    esp-pci.c: set DMA_STAT_BCMBLT when BLAST command issued
> 
> Is it worth to pick up for stable?  Especially the first one.
> It's interesting this bug is here for a very long time.. :)

Good question! I did my comprehensive boot tests with this series on top of the core 
ESP series so I can't say that I've tested this series on its own. Then again other 
than the DMA_STAT_DONE patch which is a timing change, the rest of the patches are 
fixing specific edge cases which were already broken so I would be surprised if 
anything broke.


ATB,

Mark.