Subject: port-i386/13480: Freecom pcmcia cdrom doesn't attach properly
To: None <gnats-bugs@gnats.netbsd.org>
From: Bernd Ernesti <bernd@arresum.inka.de>
List: netbsd-bugs
Date: 07/16/2001 08:52:26
>Number:         13480
>Category:       port-i386
>Synopsis:       Freecom pcmcia cdrom doesn't attach properly
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 15 23:50:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Bernd Ernesti
>Release:        NetBSD-current 15-Jul-2001
>Organization:
	
>Environment:
	
System: NetBSD 1.5W
Architecture: i386
Machine: i386
>Description:
	The wdc pcmcia driver doesn't work properly, when you
	try to attach a freecom pcmcia cdrom drive:

cardslot0 at cbb0 slot 0 flags 0
cardbus0 at cardslot0: bus 2 device 0 cacheline 0x0, lattimer 0x20
pcmcia0 at cardslot0
[..]
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: FREECOM, PCCARD-IDE, REV836
pcmcia0: Manufacturer code 0xffffffff, product 0xffffffff
pcmcia0: function 0: unspecified, ccr addr 200 mask f
pcmcia0: function 0, config table entry 1: memory card; irq mask ffff; iomask 4, iospace 0-f; rdybsy
_active wp_active bvd_active io16 irqpulse irqlevel
wdc0 at pcmcia0 function 0: FREECOM PCCARD-IDE
atapibus0 at wdc0 channel 0: 2 targets
sd0 at atapibus0 drive 0: <D\1340002\1340004, , .\134000A> type 0 direct removable
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0
wdc0:0:0: reset failed
sd0: drive offline
wdc0 channel 0: reset failed for drive 0
wdc0:0:0: device busy
sd0(wdc0:0:0): invalid return code from adapter: 3

	As you can see the drive attaches as an sd device, so this cearly
	can't work. And no, adding D\1340002\1340004 to the quirks table
	isn't the correct solution.

Here is the output from another PC, this time with an isa pcmcia adapter:

isapnp0: read port 0x203
pcic0 at isapnp0 port 0x3e0/2
pcic0: SCM SwapBox Plug and Play (ident 0x83 OK): using iomem 0xc8000 iosiz 0x4000 
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has no sockets 
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
[..]
pcmcia0: CIS version PC Card Standard 5.0
pcmcia0: CIS info: FREECOM, PCCARD-IDE, REV836
pcmcia0: Manufacturer code 0xffffffff, product 0xffffffff 
pcmcia0: function 0: unspecified, ccr addr 200 mask f
pcmcia0: function 0, config table entry 1: memory card; irq mask ffff; iomask 4, iospace 0-f; rdybsy_active wp_active bvd_active io16 irqpulse irqlevel
wdc0 at pcmcia0 function 0
 port 0x400-0x40f: FREECOM PCCARD-IDE
atapibus0 at wdc0 channel 0: 2 targets
cd2 at atapibus0 drive 0: <CD-224E, , 1.5A> type 5 cdrom removable
cd2: 32-bit data port
cd2: drive supports PIO mode 4, DMA mode 2  
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0  
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0  
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0
wdc0:0:0: lost interrupt
	type: atapi tc_bcount: 0 tc_skip: 0  

	So, here it finds a cdrom type, but mounting also doesn't work.
>How-To-Repeat:
	Attach a freecom pcmcia cdrom and watch the dmesg output,
	or try to mount it.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: