From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC8C921CA0D for ; Sun, 16 Nov 2025 17:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763315582; cv=none; b=UsKwzA/OEG36iWPlFQQ9SNAVWXBMwM3eOaVTpBprSQy2cLsf8+w/sxMs8by0PVg3ErEXjZyFB88OVbE+Te6ghKR38j5f94iEqTJns91Il8xL6Kp4yHWR0haaaV24sLIh5Z7GEIJHvR79NCiLCDnslhUw0YhfnRSYPlYD/eNyXoI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763315582; c=relaxed/simple; bh=wqamGJINaNN8u93l6hZi8rnYx9ok2CVYNBMYv/PtLv8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Fn5im5DChicpRhln/YvuXRPnx8o0XyYuOML6iZDNCy7QsZKoJWU0aGi+jeZvoQ9qxb5H+Px80vQQSrCBaiuOmE91y+WG3qiSpFWX7Vqigr54cEf50+vad43bW7sT3RqrY61ibdAd/50qOSdD5WOEvO6ylCj5Q5T/7SEZz9Hj2ak= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ImWa13m8; arc=none smtp.client-ip=209.85.208.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ImWa13m8" Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-640aaa89697so4633950a12.3 for ; Sun, 16 Nov 2025 09:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763315579; x=1763920379; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NwlGwBbpq+uR79Q1dMxLeECsHAi7S2zrYgtJqd6kiGA=; b=ImWa13m8t5/Ns71DIG0hfyO95AmZeIMPMNW6WyuxrOKQP7iZUFGoGSjGGp5K1BlkPH 7GdG8zRnLrNCk5MxaVjUmGDTfJjz9/Ig5jWqzHxzG1WgZgMtgTLkaHXJodcvhQ5Zt40t MPu4oesQBhOrjuyd3wQ8kc5E7j/2+dX6APjC0ZqMFbDmrNeIkpgv0IYKR82jKBolEn1F ktMe+sqUFp1IqFH3BErsuwcqNv5Vn24wxiFTgvMIHQm/rFlUsN6DBMnteV2Fdf/EXdoZ 0RJ7flUysSrSM4XiIsjdux8WB7Xp/T+/5QD5FTFYEUfDDY9TL8ALL/XIu2hZlXqOLXOb 2E3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763315579; x=1763920379; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NwlGwBbpq+uR79Q1dMxLeECsHAi7S2zrYgtJqd6kiGA=; b=WK62V2KkRMOjFzgPG/pC7GSCApOt1F6TgPbnm2Irf70A6mu1cyIXf6PuC8+g86Rkwh fCndbXQFI9FjGHr56obToFSsAoIYK90xcVUZEWqcjQ1qmSk/wGvcn0Sfglk8GJ6iXvOa a5tPwGWFu6X6EzXdVEc/KlxdeV7YSN8ZECvqUKkKc+QY0+tbGNIfoqi+FQhr6pUQiTIt 5fPk8Dy60gXj/dEy14WiMfYHBy6HJsTjKc0IsMDdXgDtFekzbQBE4M72q9muEnzS4NAy stFnuEnlAepYNxs+a7EBq3KDOmgwfx7Rh/dq00eNFrCKNsU0dcaRYCbJ8fgBh9Qz5v4I HO3Q== X-Forwarded-Encrypted: i=1; AJvYcCX02o0t04B5IFivY0/JLJxALsiFmZDPa5ftDIrUHo9JOyt+1odB7L9cMlak52edOPrL/zYV/z67w4Xkmr4=@vger.kernel.org X-Gm-Message-State: AOJu0Yx6OzCbKPXWyfboEk5y/Hs4Wqa0/Hax5lIQKCecYCxSUX3YUO0V c8NL6cR4TUdrv/lroszKctzqW4UVcAjzF4wmwe9zDpEMf/d37SzC6k4= X-Gm-Gg: ASbGncuMN2X65g2XtMW0J0aO3n+/UlKFGDuu/bcLPpqMF+q4Ou7FXJ9UzYVj/XUCwTs aqSqeF0k+iIgT28CmLzVgOymyz/BFeMdHSQPWrT+wiu5127t1SYIVZ3Lj2uRZpOVzbLGkPATs4b fBWMo1xHGpdmgaTJ3WXWVYqXLNcJzErPhOdKbZZxmRo0/A7T6TKOdZxxmg30MMC2fDPHI/ietcJ Y3k2OqXk0DO+a9wzvw1eIGHOyC1T9a3gZ+q9aZiGn6zLfykw+Y0Xamak0jaZLPL8t5GqwtdPkIZ Wd/SjM70c51FNMA1Nrr3NhWcA3Nb6NgzWESItHz3d9qikbdlIufL8aX9F1p9YjkE/FGl1kwnfop x9C/WMGWDa6ceBwJdcExoqoMXk7BV11vk+EkdfwbWImACKgk+06nAsLJ4JEQ/gE4OmrSgx64j3g FVZWc5Ib7C4wQmGxPiKqa8RnLWP13YXlEPmoLaU3OXTqKJ9trN/zDErEhfrfcdFMUb X-Google-Smtp-Source: AGHT+IGGKgYhMd0svVSFAfxWolFuLgdDkC11kJzhIf0QE+33E0NawE2RHkSBmBG+Fqlx4fZkYELcEw== X-Received: by 2002:a05:6402:270e:b0:640:b978:efdb with SMTP id 4fb4d7f45d1cf-64350eab173mr9437892a12.25.1763315578802; Sun, 16 Nov 2025 09:52:58 -0800 (PST) Received: from lithos ([2a02:810d:4a94:b300:b0de:db6e:6107:3313]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6433a3f880fsm8194796a12.11.2025.11.16.09.52.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Nov 2025 09:52:58 -0800 (PST) Date: Sun, 16 Nov 2025 18:52:56 +0100 From: Florian Fuchs To: Artur Rojek Cc: John Paul Adrian Glaubitz , Yoshinori Sato , Rich Felker , linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: Re: [PATCH] sh: maple: fix empty port handling Message-ID: References: <20251112190444.3631533-1-fuchsfl@gmail.com> <4f70a38490b12d13858f45f3e7a531bf5dc2162d.camel@physik.fu-berlin.de> <999e3970e1580def5ddbf1921a9ef4a4@artur-rojek.eu> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On 16 Nov 13:34, Artur Rojek wrote: > On 2025-11-12 23:46, Florian Fuchs wrote: > > Hi Artur, > > thank you so much for fixing the DC boot on linux again! > > Adrian, thank you for looking at it! > > > > On 12 Nov 22:46, Artur Rojek wrote: > > > thanks for the patch! Can this be tested with just regular > > > controllers? > > > > Yes, indeed you can test it with the controller, when you compile with > > joystick support, like: > > > > CONFIG_MAPLE=y > > CONFIG_INPUT=y > > CONFIG_INPUT_JOYDEV=y > > CONFIG_INPUT_EVDEV=y > > CONFIG_INPUT_JOYSTICK=y > > CONFIG_JOYSTICK_MAPLE=y > > > > You should not put a VMU in though, as thats currently broken (I have a > > patch ready). > > > > Then you can directly read from the evdev and listen for the button > > presses: > > bash-5.3# cat /dev/input/event2 | xxd > > > > You need to press a button for 20-30 times, as it seems to buffer the > > events and outputs it in batches. > > > > Then, you should see the following outputs for the buttons: > > > > Button A: > > 00000000: 7800 0000 94c3 0d00 0100 3001 0000 0000 x.........0..... > > Button B: > > 000001e0: 7800 0000 94c3 0d00 0100 3101 0100 0000 x.........1.... > > Button X: > > 000003b0: 7800 0000 94c3 0d00 0100 3301 0100 0000 x.........3..... > > Button Y: > > 00000900: 7800 0000 94c3 0d00 0100 3401 0100 0000 x.........4..... > > > > The Joystick should be detected like this: > > / # dmesg|grep maple > > maple: bus core now registered > > maple (null): detected Dreamcast Controller: function 0x1: at (2, 0) > > maple (null): no driver found > > input: Dreamcast Controller as /devices/maple/2:00.1/input/input2 > > > > Another indicator is the dmesg log for empty ports: > > maple (null): no devices to port 3 > > > > These messages were previously not there, as the empty ports were never > > detected. > > Hey Florian, > > Before applying this patch, no input on a maple port is being registered > until all 4 maple ports are populated (in my case by four controllers). > Once all 4 are plugged in, I can register input on either of them by > cat-ing their respective char devs. > > After applying the patch, I confirm that input can be read immediately > for the present devices, even if the other ports are unpopulated. > > However, this patch also breaks hotplug on maple ports - I can no longer > plug in additional controllers at runtime and have them show up. > > I think we need to hold off on this patch until the hotplug issue is > addressed. > Thank you for taking the time to test it! And sorry for the obvious issue, I think my testing was wrong as I just removed and plugged in an already registered device, and missed it with a new one. Regards, Florian