* Re: [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
@ 2025-05-21 20:14 Ioannis Barkas
2025-05-22 7:39 ` Niklas Cassel
0 siblings, 1 reply; 7+ messages in thread
From: Ioannis Barkas @ 2025-05-21 20:14 UTC (permalink / raw)
To: linux-ide
Hello guys!
cdrecord -vvv -atip produces an error using my AD-7200A on VT6415
controller at my installation as you can see below:
cdrecord -vvv -atip
TOC Type: 1 = CD-ROM
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/sr0
Using /dev/cdrom of unknown capabilities
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Error trying to open /dev/cdrom exclusively (Device or resource
busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource
busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource
busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource
busy)... retrying in 1 second.
Error trying to open /dev/cdrom exclusively (Device or resource
busy)... giving up.
scsidev: '-1'
devname: '-1'
scsibus: -2 target: -2 lun: -2
wodim: No such file or directory.
Cannot open SCSI driver!
For possible targets try 'wodim --devices' or 'wodim -scanbus'.
For possible transport specifiers try 'wodim dev=help'.
For IDE/ATAPI devices configuration, see the file README.ATAPI.setup from
the wodim documentation.
But if I use wodim it works:
wodim --devices
wodim: Overview of accessible drives (1 found) :
-------------------------------------------------------------------------
0 dev='/dev/sg0' rwrw-- : 'Optiarc' 'DVD RW AD-7200A'
-------------------------------------------------------------------------
wodim dev=/dev/sg0 -atip
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-7200A '
Revision : '1.09'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, high Beta category (A+) (3)
ATIP start of lead in: -11849 (97:24/01)
ATIP start of lead out: 336076 (74:43/01)
Disk type: Long strategy type (Cyanine, AZO or similar)
Manuf. index: 25
Manufacturer: Taiyo Yuden Company Limited
This is the output from an ancient TDK CD using 80 conductor cable to
connect AD-7200A on VT6415. Device is getting UDMA 4. Testing was
performed at 32bit MX Linux with kernel 6.1 at P4i945GC. Old good
Pentium 4 with 1 core powering 20 PCIe lanes. 20+ years later and most
PCs are stuck to 20 or 24 PCIe lanes while there are 64 or even 128
cores now plus NPUs. Something feels awfully wrong here...
The same command works when cable is attached to the IDE port of ICH7:
cdrecord -vvv -atip
Device was not specified. Trying to find an appropriate drive...
Detected CD-R drive: /dev/sr0
Using /dev/cdrom of unknown capabilities
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Linux sg driver version: 3.5.27
Wodim version: 1.1.11
Using libusal version 'Cdrkit-1.1.11'.
SCSI buffer size: 64512
Beginning DMA speed test. Set CDR_NODMATEST environment variable if device
communication breaks or freezes immediately after that.
01 00 00 01 00 00 00 00
01 AA 01 01 00 00 00 00
01 00 A0 00 00 00 00 01 00 00 00 00
01 00 A1 00 00 00 00 00 00 00 00 00
01 00 A2 00 00 00 00 00 00 00 00 00
Also this works:
sudo wodim dev=/dev/sg0 -atip
Device type : Removable CD-ROM
Version : 5
Response Format: 2
Capabilities :
Vendor_info : 'Optiarc '
Identification : 'DVD RW AD-7200A '
Revision : '1.09'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96R RAW/R96R
ATIP info from disk:
Indicated writing power: 4
Is not unrestricted
Is not erasable
Disk sub type: Medium Type A, high Beta category (A+) (3)
ATIP start of lead in: -11849 (97:24/01)
ATIP start of lead out: 336076 (74:43/01)
Disk type: Long strategy type (Cyanine, AZO or similar)
Manuf. index: 25
Manufacturer: Taiyo Yuden Company Limited
Taso you can update your drive to version 1.09 and retest. Also please
share a dmesg to identify the errors you get and the kernel in use.
Output from IDE controller PCI config could be handy:
sudo lspci -nnnnvvvvxxxxks 05:00.1
Guys cable detect seems broken. With a 40 conductor cable in Linux I get:
ata3.00: ATAPI: Optiarc DVD RW AD-7200A, 1.09, max UDMA/66
also UDMA 4 is selected in hdparm while BIOS says UDMA 2
Finally cdrecord -vvv -atip command is not working properly with 40
conductor cable. I get wrong results but no hang was observed at all
during the tests.
Best regards,
Ioannis
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
2025-05-21 20:14 [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330 Ioannis Barkas
@ 2025-05-22 7:39 ` Niklas Cassel
[not found] ` <CADUzMVY2_DHqko-863=2f8sU1EtQJXgFeN-_BccnajsYWTpuQA@mail.gmail.com>
0 siblings, 1 reply; 7+ messages in thread
From: Niklas Cassel @ 2025-05-22 7:39 UTC (permalink / raw)
To: Ioannis Barkas; +Cc: linux-ide, dlemoal
Hello Ioannis,
Please always CC maintainers.
On Wed, May 21, 2025 at 11:14:47PM +0300, Ioannis Barkas wrote:
> Hello guys!
>
> cdrecord -vvv -atip produces an error using my AD-7200A on VT6415
> controller at my installation as you can see below:
Do you get this after applying the VT6415 patch in $subject?
Or does this command work on latest kernel without the patch in $subject?
(snip)
> Taso you can update your drive to version 1.09 and retest. Also please
> share a dmesg to identify the errors you get and the kernel in use.
> Output from IDE controller PCI config could be handy:
> sudo lspci -nnnnvvvvxxxxks 05:00.1
>
> Guys cable detect seems broken. With a 40 conductor cable in Linux I get:
> ata3.00: ATAPI: Optiarc DVD RW AD-7200A, 1.09, max UDMA/66
> also UDMA 4 is selected in hdparm while BIOS says UDMA 2
>
> Finally cdrecord -vvv -atip command is not working properly with 40
> conductor cable. I get wrong results but no hang was observed at all
> during the tests.
There was a different patch from Tasos WRT 40 wire cable recently:
https://lore.kernel.org/linux-ide/20250519085945.1399466-1-tasos@tasossah.com/
Did you include this patch when testing or not?
Kind regards,
Niklas
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
@ 2025-05-19 8:49 Tasos Sahanidis
2025-05-20 9:30 ` Damien Le Moal
2025-06-10 12:33 ` Niklas Cassel
0 siblings, 2 replies; 7+ messages in thread
From: Tasos Sahanidis @ 2025-05-19 8:49 UTC (permalink / raw)
To: linux-ide; +Cc: Damien Le Moal, Niklas Cassel, Tasos Sahanidis
The controller has a hardware bug that can hard hang the system when
doing ATAPI DMAs without any trace of what happened. Depending on the
device attached, it can also prevent the system from booting.
In this case, the system hangs when reading the ATIP from optical media
with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an
Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4,
running at UDMA/33.
The issue can be reproduced by running the same command with a cygwin
build of cdrecord on WinXP, although it requires more attempts to cause
it. The hang in that case is also resolved by forcing PIO. It doesn't
appear that VIA has produced any drivers for that OS, thus no known
workaround exists.
HDDs attached to the controller do not suffer from any DMA issues.
Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/916677
Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
---
v1 -> v2: Wrap long line
drivers/ata/pata_via.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index 696b99720dcb..d82728a01832 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -368,7 +368,8 @@ static unsigned int via_mode_filter(struct ata_device *dev, unsigned int mask)
}
if (dev->class == ATA_DEV_ATAPI &&
- dmi_check_system(no_atapi_dma_dmi_table)) {
+ (dmi_check_system(no_atapi_dma_dmi_table) ||
+ config->id == PCI_DEVICE_ID_VIA_6415)) {
ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
mask &= ATA_MASK_PIO;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
2025-05-19 8:49 Tasos Sahanidis
@ 2025-05-20 9:30 ` Damien Le Moal
2025-05-21 8:38 ` Tasos Sahanidis
2025-06-10 12:33 ` Niklas Cassel
1 sibling, 1 reply; 7+ messages in thread
From: Damien Le Moal @ 2025-05-20 9:30 UTC (permalink / raw)
To: Tasos Sahanidis, linux-ide; +Cc: Niklas Cassel
On 2025/05/19 10:49, Tasos Sahanidis wrote:
> The controller has a hardware bug that can hard hang the system when
> doing ATAPI DMAs without any trace of what happened. Depending on the
> device attached, it can also prevent the system from booting.
>
> In this case, the system hangs when reading the ATIP from optical media
> with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an
> Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4,
> running at UDMA/33.
>
> The issue can be reproduced by running the same command with a cygwin
> build of cdrecord on WinXP, although it requires more attempts to cause
> it. The hang in that case is also resolved by forcing PIO. It doesn't
> appear that VIA has produced any drivers for that OS, thus no known
> workaround exists.
>
> HDDs attached to the controller do not suffer from any DMA issues.
>
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/916677
> Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
Doesn't this need a Cc: stable tag ? I can add it when applying.
> ---
> v1 -> v2: Wrap long line
>
> drivers/ata/pata_via.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
> index 696b99720dcb..d82728a01832 100644
> --- a/drivers/ata/pata_via.c
> +++ b/drivers/ata/pata_via.c
> @@ -368,7 +368,8 @@ static unsigned int via_mode_filter(struct ata_device *dev, unsigned int mask)
> }
>
> if (dev->class == ATA_DEV_ATAPI &&
> - dmi_check_system(no_atapi_dma_dmi_table)) {
> + (dmi_check_system(no_atapi_dma_dmi_table) ||
> + config->id == PCI_DEVICE_ID_VIA_6415)) {
> ata_dev_warn(dev, "controller locks up on ATAPI DMA, forcing PIO\n");
> mask &= ATA_MASK_PIO;
> }
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
2025-05-20 9:30 ` Damien Le Moal
@ 2025-05-21 8:38 ` Tasos Sahanidis
0 siblings, 0 replies; 7+ messages in thread
From: Tasos Sahanidis @ 2025-05-21 8:38 UTC (permalink / raw)
To: Damien Le Moal, linux-ide; +Cc: Niklas Cassel
On 2025-05-20 12:30, Damien Le Moal wrote:
> On 2025/05/19 10:49, Tasos Sahanidis wrote:
>> The controller has a hardware bug that can hard hang the system when
>> doing ATAPI DMAs without any trace of what happened. Depending on the
>> device attached, it can also prevent the system from booting.
>>
>> In this case, the system hangs when reading the ATIP from optical media
>> with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an
>> Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4,
>> running at UDMA/33.
>>
>> The issue can be reproduced by running the same command with a cygwin
>> build of cdrecord on WinXP, although it requires more attempts to cause
>> it. The hang in that case is also resolved by forcing PIO. It doesn't
>> appear that VIA has produced any drivers for that OS, thus no known
>> workaround exists.
>>
>> HDDs attached to the controller do not suffer from any DMA issues.
>>
>> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/916677
>> Signed-off-by: Tasos Sahanidis <tasos@tasossah.com>
>
> Doesn't this need a Cc: stable tag ? I can add it when applying.
>
Yes, please do so. I forgot about it. Thank you!
--
Tasos
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
2025-05-19 8:49 Tasos Sahanidis
2025-05-20 9:30 ` Damien Le Moal
@ 2025-06-10 12:33 ` Niklas Cassel
1 sibling, 0 replies; 7+ messages in thread
From: Niklas Cassel @ 2025-06-10 12:33 UTC (permalink / raw)
To: linux-ide, Tasos Sahanidis; +Cc: Damien Le Moal
On Mon, 19 May 2025 11:49:45 +0300, Tasos Sahanidis wrote:
> The controller has a hardware bug that can hard hang the system when
> doing ATAPI DMAs without any trace of what happened. Depending on the
> device attached, it can also prevent the system from booting.
>
> In this case, the system hangs when reading the ATIP from optical media
> with cdrecord -vvv -atip on an _NEC DVD_RW ND-4571A 1-01 and an
> Optiarc DVD RW AD-7200A 1.06 attached to an ASRock 990FX Extreme 4,
> running at UDMA/33.
>
> [...]
Applied to libata/linux.git (for-6.16-fixes), thanks!
[1/1] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330
https://git.kernel.org/libata/linux/c/d29fc02c
Kind regards,
Niklas
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-06-10 12:33 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-21 20:14 [PATCH v2] ata: pata_via: Force PIO for ATAPI devices on VT6415/VT6330 Ioannis Barkas
2025-05-22 7:39 ` Niklas Cassel
[not found] ` <CADUzMVY2_DHqko-863=2f8sU1EtQJXgFeN-_BccnajsYWTpuQA@mail.gmail.com>
2025-05-23 7:31 ` Niklas Cassel
-- strict thread matches above, loose matches on Subject: below --
2025-05-19 8:49 Tasos Sahanidis
2025-05-20 9:30 ` Damien Le Moal
2025-05-21 8:38 ` Tasos Sahanidis
2025-06-10 12:33 ` Niklas Cassel
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).