Linux kernel regressions
 help / color / mirror / Atom feed
* [REGRESSION] pata_pcmcia: ~80 second delay after physically removing PC Card CF device
@ 2026-09-03 20:12 jhon cadena
  2026-09-03 22:09 ` Niklas Cassel
  0 siblings, 1 reply; 2+ messages in thread
From: jhon cadena @ 2026-09-03 20:12 UTC (permalink / raw)
  To: linux-ide@vger.kernel.org
  Cc: regressions@lists.linux.dev, linux-pcmcia@lists.infradead.org

Hello,

I am reporting a possible regression in the PCMCIA/PATA/libata handling of a CompactFlash card used through a PC Card adapter.

The same type of PC Card storage worked normally on Debian 9 on my previous Toughbook. After moving to Debian 11 with a newer kernel, physically removing the card causes an approximately 79-second delay while the kernel continues trying to access the device before finally disabling it.

The problem is reproducible.

Hardware:

-   Laptop: Panasonic Toughbook CF-31
    
-   CardBus controller: Ricoh Co Ltd CardBus bridge [1180:e476], rev 02
    
-   Storage: PQI Industrial CF Card
    
-   CF card capacity reported by the kernel: 245760 sectors (~120 MiB)
    
-   Interface: PC Card/CardBus -> PCMCIA -> PATA -> libata -> SCSI
    

Current software:

-   Debian 11
    
-   Kernel: 5.10.0-46-amd64
    
-   Architecture: amd64
    
-   Desktop: MATE
    

The device is detected as:

ata20: PATA max PIO0 cmd 0x9100 ctl 0x910e irq 19
ata20.00: ATA-4: PQI Industrial CF Card, ra6h.a01, max UDMA/33
ata20.00: 245760 sectors, multi 0: LBA

It then appears as /dev/sdb.

Reproduction:

1.  Insert the CF card into the PC Card slot.
    
2.  Mount the filesystem normally.
    
3.  Use Caja's "Eject" operation to unmount the filesystem.
    
4.  Physically remove the PC Card.
    
5.  The kernel then spends approximately 79 seconds trying to revalidate the ATA device before finally disabling it.
    

The relevant messages are:

pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0
sd 6:0:0:0: [sdb] Stopping disk

Approximately 32 seconds later:

ata20: drained 65536 bytes to clear DRQ

Then:

ata20.00: qc timeout (cmd 0xec)
ata20.00: qc timeout (cmd 0xec)
ata20.00: qc timeout (cmd 0xec)
ata20.00: revalidation failed (errno=-5)
ata20.00: disabled

followed by:

sd 6:0:0:0: [sdb] Start/Stop Unit failed
... Not Ready ...
hard reset required

The total time from physical removal to the device being disabled is approximately 79 seconds.

There is an important workaround which also provides a useful comparison:

If I first unmount the filesystem using Caja and then run:

sudo pccardctl eject 0

before physically removing the card, the problem does not occur. The card can then be physically removed and another card inserted immediately, without the approximately 79-second delay.

This makes me suspect that the physical PCMCIA removal path is not synchronizing correctly with the ATA/libata device removal/revalidation path, although I do not know which component is responsible.

Another important observation is that I previously used Debian 9 on a different Panasonic Toughbook and did not experience this delay with PC Card storage. I do not have the old installation available at the moment, so I cannot currently provide the exact kernel version that worked.

I have also checked:

cat /sys/module/libata/parameters/ata_probe_timeout

which returns:

0

The current kernel command line is:

BOOT_IMAGE=/boot/vmlinuz-5.10.0-46-amd64 root=UUID=f252ab9c-ab0e-4769-b123-4bac307fc566 ro quiet

I would appreciate any advice on whether this is a known issue or regression in pata_pcmcia/libata/PCMCIA handling, and what additional information or testing would be useful.

I can reproduce the problem and run additional tests if needed.

Thank you.



dmesg output:

[58935.824119]  sdb: sdb1[58940.922179] pcmcia_socket pcmcia_socket0: pccard: card ejected from slot 0
[58940.923642] sd 6:0:0:0: [sdb] Stopping disk
[58971.634659] ata22: drained 65536 bytes to clear DRQ
[58976.801978] ata22.00: qc timeout (cmd 0xec)
[58976.801986] ata22.00: failed to IDENTIFY (I/O error, err_mask=0x5)
[58976.801989] ata22.00: revalidation failed (errno=-5)
[58987.041967] ata22.00: qc timeout (cmd 0xec)
[58987.041974] ata22.00: failed to IDENTIFY (I/O error, err_mask=0x5)
[58987.041977] ata22.00: revalidation failed (errno=-5)
[59018.530087] ata22.00: qc timeout (cmd 0xec)
[59018.530094] ata22.00: failed to IDENTIFY (I/O error, err_mask=0x5)
[59018.530096] ata22.00: revalidation failed (errno=-5)
[59018.530102] ata22.00: disabled
[59018.694228] sd 6:0:0:0: [sdb] Start/Stop Unit failed: Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[59018.694239] sd 6:0:0:0: [sdb] Sense Key : Not Ready [current]
[59018.694246] sd 6:0:0:0: [sdb] Add. Sense: Logical unit not ready, hard reset required


J.C. Electric--lifetime warranty--
Jhon Cadena
Cel. 098700-9321
Whatsapp: 0995012430
Av. Víctor Cartagena S6-78 y Argentina
Cayambe-Ecuador

Si al finalizar el día, aún tienes energía...significa que no hiciste todo lo que pudiste haber hecho....

Enviado desde un correo electrónico seguro de Proton Mail.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [REGRESSION] pata_pcmcia: ~80 second delay after physically removing PC Card CF device
  2026-09-03 20:12 [REGRESSION] pata_pcmcia: ~80 second delay after physically removing PC Card CF device jhon cadena
@ 2026-09-03 22:09 ` Niklas Cassel
  0 siblings, 0 replies; 2+ messages in thread
From: Niklas Cassel @ 2026-09-03 22:09 UTC (permalink / raw)
  To: jhon cadena
  Cc: linux-ide@vger.kernel.org, regressions@lists.linux.dev,
	linux-pcmcia@lists.infradead.org

Hello Jhon,

On Thu, Sep 03, 2026 at 08:12:56PM +0000, jhon cadena wrote:
> The same type of PC Card storage worked normally on Debian 9 on my previous Toughbook.
> After moving to Debian 11 with a newer kernel, physically removing the card causes an
> approximately 79-second delay while the kernel continues trying to access the device
> before finally disabling it.

(snip)

> Current software:
> 
> -   Debian 11
>     
> -   Kernel: 5.10.0-46-amd64

Debian 9 uses kernel v4.9, released in 2016.
Debian 11 uses kernel v5.10, released in 2020.

On this mailing list, we only care about the latest kernel version.
At this point in time, v7.3-rc1, released Aug 30 2026.

Please thest on the latest kernel version, or report the problem to the
debian bug tracker.

Normally, we recommend to do a git bisect to find the commit that
introduced the problem. However, you know that v4.9 is good.

You should first see if v7.3-rc1 is good or bad before starting a
git bisect.


Kind regards,
Niklas

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-03 22:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-03 20:12 [REGRESSION] pata_pcmcia: ~80 second delay after physically removing PC Card CF device jhon cadena
2026-09-03 22:09 ` Niklas Cassel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox