mint0x33/drivers/staging
Ian Abbott 411459bb1f comedi: adv_pci1760: Fix PWM instruction handling
commit 2efb6edd52dc50273f5e68ad863dd1b1fb2f2d1c upstream.

(Actually, this is fixing the "Read the Current Status" command sent to
the device's outgoing mailbox, but it is only currently used for the PWM
instructions.)

The PCI-1760 is operated mostly by sending commands to a set of Outgoing
Mailbox registers, waiting for the command to complete, and reading the
result from the Incoming Mailbox registers.  One of these commands is
the "Read the Current Status" command.  The number of this command is
0x07 (see the User's Manual for the PCI-1760 at
<https://advdownload.advantech.com/productfile/Downloadfile2/1-11P6653/PCI-1760.pdf>.
The `PCI1760_CMD_GET_STATUS` macro defined in the driver should expand
to this command number 0x07, but unfortunately it currently expands to
0x03.  (Command number 0x03 is not defined in the User's Manual.)
Correct the definition of the `PCI1760_CMD_GET_STATUS` macro to fix it.

This is used by all the PWM subdevice related instructions handled by
`pci1760_pwm_insn_config()` which are probably all broken.  The effect
of sending the undefined command number 0x03 is not known.

Fixes: 14b93bb6bb ("staging: comedi: adv_pci_dio: separate out PCI-1760 support")
Cc: <stable@vger.kernel.org> # v4.5+
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20230103143754.17564-1-abbotti@mev.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-06 07:46:30 +01:00
..
android staging: ion: Prevent incorrect reference counting behavour 2022-04-27 13:15:31 +02:00
board
ccree
clocking-wizard
comedi comedi: adv_pci1760: Fix PWM instruction handling 2023-02-06 07:46:30 +01:00
dgnc
emxx_udc
fbtft staging: fbtft: fb_st7789v: reset display before initialization 2022-03-28 08:22:26 +02:00
fsl-dpaa2
fsl-mc
fwserial
gdm724x staging: gdm724x: fix use after free in gdm_lte_rx() 2022-03-16 12:57:08 +01:00
goldfish
greybus staging: greybus: codecs: fix type confusion of list iterator variable 2022-06-14 16:53:55 +02:00
gs_fpgaboot
iio staging:iio:adc:ad7280a: Fix handing of device address bit reversing. 2022-04-20 09:08:19 +02:00
irda
ks7010
lustre
media
most
mt29f_spinand
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
rtl8188eu
rtl8192e staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor() 2023-01-18 09:26:25 +01:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2023-01-18 09:26:25 +01:00
rtl8712 staging: rtl8712: fix use after free bugs 2022-09-15 12:23:50 +02:00
rtl8723bs staging: rtl8723bs: prevent ->Ssid overflow in rtw_wx_set_scan() 2022-06-06 08:20:56 +02:00
rtlwifi
rts5208
skein
sm750fb
speakup tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:06:52 +02:00
typec usb: typec: tcpm: Do not disconnect while receiving VBUS off 2022-02-08 18:16:25 +01:00
unisys
vboxvideo
vc04_services
vme
vt6655
vt6656
wilc1000
wlan-ng
xgifb
Kconfig
Makefile