From nobody@FreeBSD.org  Fri Dec 18 18:25:09 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E3BF51065670
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Dec 2009 18:25:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id D353A8FC17
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Dec 2009 18:25:09 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id nBIIP9UG021948
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 18 Dec 2009 18:25:09 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id nBIIP9MH021946;
	Fri, 18 Dec 2009 18:25:09 GMT
	(envelope-from nobody)
Message-Id: <200912181825.nBIIP9MH021946@www.freebsd.org>
Date: Fri, 18 Dec 2009 18:25:09 GMT
From: Rupert Stitzinger <stitzinger_rupert@web.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: MMC card attached to <RICOH R5C822> blocks keyboards
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         141756
>Category:       kern
>Synopsis:       [mmc] MMC card attached to <RICOH R5C822> blocks keyboards
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gavin
>State:          feedback
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 18 18:30:04 UTC 2009
>Closed-Date:    
>Last-Modified:  Sun Feb 14 18:54:43 UTC 2010
>Originator:     Rupert Stitzinger
>Release:        8.0
>Organization:
>Environment:
FreeBSD freebsd1 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009     root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The used laptop has a integrated SD Slot with Ricoh chipset. 
After "kldload mmc" "kldload mmcsd""kldload sdhci" reports
sdhci0: <RICOH R5C822 SD> mem 0xc8011800-0xc80118ff at device 9.2 on pci6
sdhci0: 1 slot(s) allocated
sdhci0: [ITHREAD]
SD cards are recognized without problems. 

When a Noname MMC with 14 connector pads is attached keytypes aren't
recognized anymore. This is valid for the internal keyboard and an
external USB keyboard. The mouse i working and also paste is working.
The USB keyboard connected after the MMC is put in is reported in
dmesg, but no keys are recognized in the shell.  Unfort. i have no
other MMCs for testing.

Machine has the kernel from FreeBSD CD1 
>How-To-Repeat:
Put in MMC with 14 connectors
>Fix:
None

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Dec 21 06:49:44 UTC 2009 
Responsible-Changed-Why:  
This might not be i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141756 
State-Changed-From-To: open->feedback 
State-Changed-By: gavin 
State-Changed-When: Sun Feb 7 22:46:34 UTC 2010 
State-Changed-Why:  
To submitter: is there any chance you are seeing this under X?  If so, 
do you see the same under the console without X running? 


Responsible-Changed-From-To: freebsd-bugs->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sun Feb 7 22:46:34 UTC 2010 
Responsible-Changed-Why:  
Track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141756 

From: Rupert Stitzinger <stitzinger_rupert@web.de>
To: gavin@FreeBSD.org
Cc:  
Subject: Re: kern/141756: [mmc] MMC card attached to <RICOH R5C822> blocks
 keyboards
Date: Mon, 8 Feb 2010 20:57:30 +0100

 Hello,
 
 sdhci, mmc are loaded with kldload
 i see it under X11 and syscons with the internal atkbd keyboard. Also a external USB Keyboard shows the behaviour. The mouse is working (PS/2 and USB). Pasting with the mouse is working. With switched on debugging for mmc and sdhci (hw.mmc.debug: 1 and hw.sdhci.debug: 1) i get
 slot0: Card inserted
 mmc0: <MMC/SD Bus> on sdhci0
 mmc0: Probing bus
 mmc0: SD probe failed
 mmc0: MMC probe:OK (OCR: 0x00ff8000)
 mmc0: Current OCR 0x00ff8000
 mmc0 Probing cards
 mmc0 New card detected CID 2c.........
 
 For "debugging" i modified syscons.c in `/usr/src/sys/dev/syscons` with an additional printf - see below
 .
 .
 .
    scp = sc->cur_scp;
     /* first see if there is something in the keyboard port */
     for (;;) {
         c = kbdd_read_char(sc->kbd, !(flags & SCGETC_NONBLOCK));
         if (c == ERRKEY) {
             if (!(flags & SCGETC_CN))
                 sc_bell(scp, bios_value.bell_pitch, BELL_DURATION);
         } else if (c == NOKEY)
             return c;
         else
             break;
     }
 /* Debug von stitz */
 printf("%d",c);		// H E R E  D E B U G
 /* Ende Debug */
  
     /* make screensaver happy */
     if (!(c & RELKEY))
         sc_touch_scrn_saver();
  
 I see each keytype before inserting the MMC after this printf isn't writing anything.  will do further printf s if someone tells me where to set them. Sorry i'm no kernel programmer
 
 Sincerly
 R. Stitzinger
 
 
 On Sun, 7 Feb 2010 22:47:22 GMT
 gavin@FreeBSD.org wrote:
 
 > Synopsis: [mmc] MMC card attached to <RICOH R5C822> blocks keyboards
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: gavin
 > State-Changed-When: Sun Feb 7 22:46:34 UTC 2010
 > State-Changed-Why: 
 > To submitter: is there any chance you are seeing this under X?  If so,
 > do you see the same under the console without X running?
 > 
 > 
 > Responsible-Changed-From-To: freebsd-bugs->gavin
 > Responsible-Changed-By: gavin
 > Responsible-Changed-When: Sun Feb 7 22:46:34 UTC 2010
 > Responsible-Changed-Why: 
 > Track
 > 
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=141756
 
 
 -- 
 Rupert Stitzinger <stitzinger_rupert@web.de>
 
State-Changed-From-To: feedback->feedback  
State-Changed-By: gavin 
State-Changed-When: Sun Feb 14 18:53:40 UTC 2010 
State-Changed-Why:  
To submitter: thanks for the useful feedback. 

Could you please try to narrow down which of the drivers causes the problem? 

What happens if you just load sdhci? 
WHat happens if you load sdhci and mmcsd, but not mmc? 
WHat happens if you load sdhci and mmc, but not mmcsd? 

Thanks! 

Gavin 

http://www.freebsd.org/cgi/query-pr.cgi?pr=141756 
>Unformatted:
