Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'counter-fixes-for-6.19' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus

William writes:

Counter fixes for 6.19

A fix for interrupt-cnt dropping the IRQF_NO_THREAD configuration to
allow the IRQ handler to correctly acquire a spinlock_t lock. A fix for
104-quad-8 correcting quad8_irq_handler() to return irqreturn_t enum
values rather than negative errno codes on error.

* tag 'counter-fixes-for-6.19' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: 104-quad-8: Fix incorrect return value in IRQ handler
counter: interrupt-cnt: Drop IRQF_NO_THREAD flag

+15 -8
+14 -6
drivers/counter/104-quad-8.c
··· 1192 1192 { 1193 1193 struct counter_device *counter = private; 1194 1194 struct quad8 *const priv = counter_priv(counter); 1195 + struct device *dev = counter->parent; 1195 1196 unsigned int status; 1196 1197 unsigned long irq_status; 1197 1198 unsigned long channel; ··· 1201 1200 int ret; 1202 1201 1203 1202 ret = regmap_read(priv->map, QUAD8_INTERRUPT_STATUS, &status); 1204 - if (ret) 1205 - return ret; 1203 + if (ret) { 1204 + dev_WARN_ONCE(dev, true, 1205 + "Attempt to read Interrupt Status Register failed: %d\n", ret); 1206 + return IRQ_NONE; 1207 + } 1206 1208 if (!status) 1207 1209 return IRQ_NONE; 1208 1210 ··· 1227 1223 break; 1228 1224 default: 1229 1225 /* should never reach this path */ 1230 - WARN_ONCE(true, "invalid interrupt trigger function %u configured for channel %lu\n", 1231 - flg_pins, channel); 1226 + dev_WARN_ONCE(dev, true, 1227 + "invalid interrupt trigger function %u configured for channel %lu\n", 1228 + flg_pins, channel); 1232 1229 continue; 1233 1230 } 1234 1231 ··· 1237 1232 } 1238 1233 1239 1234 ret = regmap_write(priv->map, QUAD8_CHANNEL_OPERATION, CLEAR_PENDING_INTERRUPTS); 1240 - if (ret) 1241 - return ret; 1235 + if (ret) { 1236 + dev_WARN_ONCE(dev, true, 1237 + "Attempt to clear pending interrupts by writing to Channel Operation Register failed: %d\n", ret); 1238 + return IRQ_HANDLED; 1239 + } 1242 1240 1243 1241 return IRQ_HANDLED; 1244 1242 }
+1 -2
drivers/counter/interrupt-cnt.c
··· 229 229 230 230 irq_set_status_flags(priv->irq, IRQ_NOAUTOEN); 231 231 ret = devm_request_irq(dev, priv->irq, interrupt_cnt_isr, 232 - IRQF_TRIGGER_RISING | IRQF_NO_THREAD, 233 - dev_name(dev), counter); 232 + IRQF_TRIGGER_RISING, dev_name(dev), counter); 234 233 if (ret) 235 234 return ret; 236 235