From: Peter Nelson <rufus-kernel@hackish.org>
To: Eric Piel <Eric.Piel@tremplin-utc.net>
Cc: Vojtech Pavlik <vojtech@suse.cz>,
linux-kernel@vger.kernel.org, decklin@red-bean.com
Subject: Re: [PATCH] Hotplug support for several PSX controlers
Date: Sun, 12 Dec 2004 16:12:00 -0500 [thread overview]
Message-ID: <41BCB420.1080307@hackish.org> (raw)
In-Reply-To: <41BCA915.3030407@tremplin-utc.net>
Eric Piel wrote:
> Since 2.6.9, several PSX controlers in the same time can be supported.
> However, because of a bug, if not all the PSX controlers are pluged in
> then nothing works. Typically, you load gamecon with options saying
> that you have two PSX adapter ports and then you plug and unplug has
> many controllers has you want. There is a bug which prevent keypress
> to be detected when not all the controllers connected.
As I added to the documentation "hot swapping should work (but is not
recomended)." This might make it a bit more likely to work, but still
"not recomended."
> The problem was that when a port didn't have a controler pluged the
> packet length to receive was read as very big, leading to a kind of
> buffer overflow. This patch checks the packet length and if it is
> bigger than the theoritical possible it considers that there is no
> controller pluged on this port.
This seems like a reasonable explination when ports float if
unconnected. Your patch does almost the right thing. First
gc_psx_command should take a data[5] argument, that was a logic error on
my part. Second, you compare the calculated length to PSX_LENGTH, which
is just saying we read in bytes. It should check <= 6, which is the
longest string of packets possible (buttons, buttons, right, right,
left, left, see
<http://www.gamesx.com/controldata/psxcont/psxcont.htm>). Changing to
compare to 6 makes the patch look good to me.
> It probably works on a vanilla 2.6.10-rc3 but I highly recommand to
> use the Vojtech's tree which contains an important fix about PSX DDR
> (cf http://marc.theaimsgroup.com/?l=linux-kernel&m=110118014804716&w=2).
Vojtech already accepted my almost-identical patch when I noticed this
in September. See
http://marc.theaimsgroup.com/?l=linux-kernel&m=109571247127456&w=4
> I've heard that Linus wants 2.6.10 ready for Christmas, this patch
> should definitetly helps ;-)
I'm all for both my previous patch and this one making it into 2.6.10 =)
-Peter
next prev parent reply other threads:[~2004-12-12 21:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-12 20:24 [PATCH] Hotplug support for several PSX controlers Eric Piel
2004-12-12 21:12 ` Peter Nelson [this message]
2004-12-12 21:54 ` Eric Piel
2004-12-14 1:30 ` Peter Nelson
2004-12-15 9:30 ` Eric Piel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41BCB420.1080307@hackish.org \
--to=rufus-kernel@hackish.org \
--cc=Eric.Piel@tremplin-utc.net \
--cc=decklin@red-bean.com \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox