Re: [PATCHv2] HID: sony: Send FF commands in non-atomic context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 17 Nov 2013, Sven Eckelmann wrote:

> The ff_memless has a timer running which gets run in an atomic context and
> calls the play_effect callback. The callback function for sony uses the
> hid_output_raw_report (overwritten by sixaxis_usb_output_raw_report) function
> to handle differences in the control message format. It is not safe for an
> atomic context because it may sleep later in usb_start_wait_urb.
> 
> This "scheduling while atomic" can cause the system to lock up. A workaround is
> to make the force feedback state update using work_queues and use the
> play_effect function only to enqueue the work item.
> 
> Reported-by: Simon Wood <simon@xxxxxxxxxxxxx>
> Reported-by: David Herrmann <dh.herrmann@xxxxxxxxx>
> Signed-off-by: Sven Eckelmann <sven@xxxxxxxxxxxxx>
> ---
> This patch can replace
>  'Revert "HID: sony: Add force feedback support for Dualshock3 USB"'
> 
> It doesn't contain the command changes from <2014555.nmU692BQMt@sven-desktop>.
> It would be nice when Simon Wood could test it again with his Intec Wired
> controller. When it doesn't work:
> 
>  * Try to change to usb_interrupt_msg instead of sc->hdev->hid_output_raw_report
>  * Send a interrupt message using buf[10] = 0x02
>    (only when buf[3] != 0 || buf[5] != 0) followed by a message with
>    buf[10] = 0x1e (always)

Now applied for 3.13. Thanks.

-- 
Jiri Kosina
SUSE Labs
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux