Skip to content

Commit 0d12f09

Browse files
committed
firewire: ohci: add bus-reset event for initial set of handled irq
In the former commits, the spurious interrupt events are suppressed as possible, by unset bus-reset event from the set of handled irq. The change was written with the less-intrusive style, thus it firstly works at the second time to handle the event. But it is slightly inconvenient. This commit adds the event for the initial set of irq to handle. As a result, the event can be handled even if it is the first time. The change has a benefit that the OHCI_PARAM_DEBUG_BUSRESETS bit in debug module parameter is always effective. Tested-by: Adam Goldman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent eec045c commit 0d12f09

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/firewire/ohci.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ MODULE_PARM_DESC(quirks, "Chip quirks (default = 0"
394394
#define OHCI_PARAM_DEBUG_AT_AR 1
395395
#define OHCI_PARAM_DEBUG_SELFIDS 2
396396
#define OHCI_PARAM_DEBUG_IRQS 4
397-
#define OHCI_PARAM_DEBUG_BUSRESETS 8 /* only effective before chip init */
397+
#define OHCI_PARAM_DEBUG_BUSRESETS 8
398398

399399
static int param_debug;
400400
module_param_named(debug, param_debug, int, 0644);
@@ -2066,8 +2066,7 @@ static void bus_reset_work(struct work_struct *work)
20662066

20672067
ohci->generation = generation;
20682068
reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
2069-
if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS)
2070-
reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
2069+
reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);
20712070

20722071
if (ohci->quirks & QUIRK_RESET_PACKET)
20732072
ohci->request_generation = generation;
@@ -2139,6 +2138,7 @@ static irqreturn_t irq_handler(int irq, void *data)
21392138
reg_write(ohci, OHCI1394_IntEventClear,
21402139
event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr));
21412140
log_irqs(ohci, event);
2141+
// The flag is masked again at bus_reset_work() scheduled by selfID event.
21422142
if (event & OHCI1394_busReset)
21432143
reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);
21442144

@@ -2478,9 +2478,8 @@ static int ohci_enable(struct fw_card *card,
24782478
OHCI1394_cycleInconsistent |
24792479
OHCI1394_unrecoverableError |
24802480
OHCI1394_cycleTooLong |
2481-
OHCI1394_masterIntEnable;
2482-
if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS)
2483-
irqs |= OHCI1394_busReset;
2481+
OHCI1394_masterIntEnable |
2482+
OHCI1394_busReset;
24842483
reg_write(ohci, OHCI1394_IntMaskSet, irqs);
24852484

24862485
reg_write(ohci, OHCI1394_HCControlSet,

0 commit comments

Comments
 (0)