Bug 34794 - xf86-input-mouse 1.6.99 broken on BSD systems
Summary: xf86-input-mouse 1.6.99 broken on BSD systems
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Input/Mouse (show other bugs)
Version: git
Hardware: x86 (IA32) OpenBSD
: medium blocker
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-27 07:48 UTC by Matthieu Herrb
Modified: 2011-03-09 14:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix patch (457 bytes, patch)
2011-02-27 11:41 UTC, Alexandr Shadchin
no flags Details | Splinter Review
ver 2 (2.45 KB, patch)
2011-03-05 16:40 UTC, Alexandr Shadchin
no flags Details | Splinter Review
ver 3 (2.42 KB, patch)
2011-03-07 01:03 UTC, Alexandr Shadchin
no flags Details | Splinter Review
ver 4 (2.53 KB, patch)
2011-03-08 04:27 UTC, Alexandr Shadchin
no flags Details | Splinter Review
ver 4 (git-formatted patch) (3.00 KB, patch)
2011-03-09 07:17 UTC, Alexandr Shadchin
no flags Details | Splinter Review

Description Matthieu Herrb 2011-02-27 07:48:00 UTC
Until xf86-input-mouse-1.6.0, the MousePreInit() function exited if an 
os specific PreInit function existed. It let the os-specific function finish all initialisations that remained to be done after osInfo->PreInit() was called. 

The code in master now continues, and does things that the bsdMousePreInit() function in bsd_mouse.c doesn't expect.

I don't have time to look at this deeper for now, but please don't release xf86-input-mouse 1.7 before this is fixed.
Comment 1 Alexandr Shadchin 2011-02-27 11:41:41 UTC
Created attachment 43898 [details] [review]
Fix patch

Try this patch, it must fix
Comment 2 Matthieu Herrb 2011-03-05 07:42:13 UTC
(In reply to comment #1)
> Created an attachment (id=43898) [details]
> Fix patch
> 
> Try this patch, it must fix

Yes it fixes the issue. 
However I think that for the long term a better solution is needed:
- treat the wsmouse protocol as a 1st class protocol in mouse.c
- review and remove code duplication between the OS PreInit code and the 
  generic one.
Comment 3 Alexandr Shadchin 2011-03-05 16:40:11 UTC
Created attachment 44158 [details] [review]
ver 2
Comment 4 Peter Hutterer 2011-03-06 18:24:34 UTC
Review of attachment 44158 [details] [review]:

I think the PreInit hunk should be folded into MousePickProtocol.
Comment 5 Alexandr Shadchin 2011-03-07 01:03:21 UTC
Created attachment 44192 [details] [review]
ver 3

Move PreInit in MousePickProtocol
Comment 6 Matthieu Herrb 2011-03-07 13:06:53 UTC
(In reply to comment #5)
> Created an attachment (id=44192) [details]
> ver 3
> 
> Move PreInit in MousePickProtocol

Looks good to me and works. 

Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Comment 7 Peter Hutterer 2011-03-07 14:47:45 UTC
Review of attachment 44192 [details] [review]:

Can we move this into the switch statement? we already have special casing for PROT_UNKNOWN and PROP_UNSUP, so adding another special case there seems to be the better place.
Comment 8 Alexandr Shadchin 2011-03-08 04:27:15 UTC
Created attachment 44226 [details] [review]
ver 4

Move PreInit into the switch statement. Good idea, thanks.
Comment 9 Peter Hutterer 2011-03-08 14:45:36 UTC
ack by me. Matthieu, can you please re-test the latest version and I'll push it. anything else needed before we release the next version?

Alexandr, just noticed this now, can you please attach this as signed-off git-formatted patch. thanks.
http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches
Comment 10 Alexandr Shadchin 2011-03-09 07:17:46 UTC
Created attachment 44276 [details] [review]
ver 4 (git-formatted patch)
Comment 11 Matthieu Herrb 2011-03-09 12:45:47 UTC
Review of attachment 44276 [details] [review]:

Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Comment 12 Matthieu Herrb 2011-03-09 12:49:49 UTC
(In reply to comment #9)
> ack by me. Matthieu, can you please re-test the latest version and I'll push
> it. anything else needed before we release the next version?
> 

No problem with version 4. 
I can't think of anything else blocking a release, although I didn't test any real serial protocol (can't find any old serial mouse around the attic here).

> Alexandr, just noticed this now, can you please attach this as signed-off
> git-formatted patch. thanks.
> http://wiki.x.org/wiki/Development/Documentation/SubmittingPatches
Comment 13 Peter Hutterer 2011-03-09 14:32:05 UTC
commit a22879c6779283684fe4a61543fc95179b4f5d0b
Author: Alexandr Shadchin <Alexandr.Shadchin@gmail.com>
Date:   Wed Mar 9 20:09:59 2011 +0500

    Fix BSD issues with new ABI12 init process.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.