NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/56403: memory mapped mode of wdc(4) at pcmcia(4) broken after jdolecek-ncq branch merge

>Number:         56403
>Category:       kern
>Synopsis:       memory mapped mode of wdc(4) at pcmcia(4) broken after jdolecek-ncq branch merge
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Sep 15 15:35:00 +0000 2021
>Originator:     Rin Okuyama
>Release:        9.99.88
Department of Physics, Meiji University
NetBSD j690 9.99.88 NetBSD 9.99.88 (J690NE) #10: Wed Sep 15 21:23:22 JST 2021  rin@latipes:/sys/arch/hpcsh/compile/J690NE hpcsh
For -current and netbsd-9, compact flash card in CF slot of Jornada 690
(hpcsh) does not work, whereas the same card works just fine if inserted
to PCMCIA slot.

This card works both for CF and PCMCIA slots for netbsd-8. Diff between
dmesg for two slots is:

CF slot:

PCMCIA slot:

-wdc0 at pcmcia1 function 0: <Kingston, CF_Card, >
-wdc0: memory mapped mode
-atabus0 at wdc0 channel 0
-wd0 at atabus0 drive 0
+wdc1 at pcmcia0 function 0: <Kingston, CF_Card, >
+wdc1: i/o mapped mode
+atabus1 at wdc1 channel 0
+wd0 at atabus1 drive 0

This is because CF slot (pcmcia1) supports only memory mapped mode,
while PCMCIA slot (pcmcia0) supports both memory and I/O mapped modes.

``atactl wd0 identify'' does not change for both slots:

Model: CF_Card, Rev: Ver7.02K, Serial #:     5B5911CD0
Device type: CF-ATA
Capacity 7994 Mbytes, 15613920 sectors, 512 bytes/sector
Cylinders: 15490, heads: 16, sec/track: 63
Device capabilities:
	ATA standby timer values
	IORDY operation
Device supports following standards:
ATA-4 ATA-5 
Command set support:
	NOP command (enabled)
	READ BUFFER command (enabled)
	WRITE BUFFER command (enabled)
	Write cache (enabled)
	Power Management feature set (disabled)
	Security Mode feature set (disabled)
	SMART feature set (disabled)
	FLUSH CACHE command (enabled)
	48-bit Address feature set (enabled)
	CFA feature set (enabled)

I have narrowed down that this failure starts when jdolecek-ncq branch
was merged (8.99.4).

Here is some unorganized console capture for -current with ATADEBUG, when
CF slot is used; NFS root works, disklabel(8) to that card also works, but
mount(8) freezes, and cannot reboot/halt the system.
Try to mount CF cards in CF slot of Jornada 690 or 680.

I've confirmed that there is no alignment faults for
wdc_pcmcia_data{in,out}_memory(). Also, we should enable ATAC_CAP_DATA32
flag also for memory-mapped mode, but this does not improve the situation.

Home | Main Index | Thread Index | Old Index