Re: Multiple errors with DVD drive

Niklas Cassel
2022-09-20T13:35:52Z

On Thu, May 26, 2022 at 02:38:53PM +0200, J.J. Berkhout wrote:
> Firstly, if this is not the right place for this message, I apologize.
> In this case, disregard.
>
> I have a problem which I suspect is a bug in libata, but of course I
> could be wrong.
>
> The problem is:
> After going from Linux Mint 19.3 Cinnamon kernel 5.4.0-97 to Linux Mint
> 20.3 Cinnamon kernel 5.4.0-107 I discovered that I could not (reliably)
> access my optical drive anymore.
> It produces errors like:
> ata1.00: exception Emask 0x10 SAct 0x0 SErr 0x40d0000 action 0xe frozen
> ata1: SError: { PHYRdyChg CommWake 10B8B DevExch }
> ata1.00: cmd a0/00:00:00:00:fc/00:00:00:00:00/a0 tag 0 pio 131072 in
> Read(10) 28 00 00 00 05 61 00 00 40 00res
> 50/00:03:00:00:00/00:00:00:00:00/a0 Emask 0x10 (ATA bus error)
> blk_update_request: I/O error, dev sr0, sector 5508 op 0x0:(READ) flags
> 0x80700 phys_seg 19 prio class 0
> ata1.00: failed to set xfermode (err_mask=0x1)
>

FWIW, there seems to be a bunch of quirks for Pioneer optical drives
related to set xfermode:

/*
* Devices which choke on SETXFER. Applies only if both the
* device and controller are SATA.
*/
{ "PIONEER DVD-RW DVRTD08", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVRTD08A", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-215", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },

Perhaps you could try the following patch:

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 826d41f341e4..263f6a59b2cf 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -3987,6 +3987,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {
{ "PIONEER DVD-RW DVR-215", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-212D", NULL, ATA_HORKAGE_NOSETXFER },
{ "PIONEER DVD-RW DVR-216D", NULL, ATA_HORKAGE_NOSETXFER },
+ { "PIONEER BD-RW BDR-207M", NULL, ATA_HORKAGE_NOSETXFER },

/* Crucial BX100 SSD 500GB has broken LPM support */
{ "CT500BX100SSD1", NULL, ATA_HORKAGE_NOLPM },

Kind regards,
Niklas