From: Richard Andrysek <richard.andrysek@rg-mechatronics.com>
To: linux-can@vger.kernel.org
Subject: Re: [PATCH v6] can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value
Date: Fri, 6 Dec 2013 10:32:37 +0000 (UTC) [thread overview]
Message-ID: <loom.20131206T112023-62@post.gmane.org> (raw)
In-Reply-To: ac6a947c7ec842f67e9d23abd877b884@grandegger.com
Wolfgang Grandegger <wg <at> grandegger.com> writes:
>
>...
>
> > I've just studied sja1000.c I do not know yet, if it is healthy.
>
> This is normally due to hardware/electrical problems. It has nothing to do
>
> with software. Well, is there *any* relation to the patch mentioned in the
>
> subject? I mean, does the problem *not* show up without that patch.
Patch solved a problem with unhandled IRQs. The original problem is solved.
CAN arbitration itself is for me a feature, which I as a programmer want to
control and use it as I want. Similar other IRQs.
>
> > May be something in upper levels will be not anymore well handled.
>
> > I've changed a code in a function (see IRQ_ALI part):
>
> >
>
> > static void set_normal_mode(struct net_device *dev)
>
> > {
>
> > ...
>
> > if (priv->can.ctrlmode & CAN_CTRLMODE_BERR_REPORTING)
>
> > priv->write_reg(priv, SJA1000_IER, IRQ_ALL &
>
> ~IRQ_ALI);
>
> > else
>
> > priv->write_reg(priv, SJA1000_IER,
>
> > IRQ_ALL & ~(IRQ_BEI | IRQ_ALI));
>
> > ...
>
> > }
>
> >
>
> > But I prefare to make some kind of "ioctl" support for that. There are
>
> > applications, where it shall not happend. Concurrently I've played with
>
> > taskset and priorities.
>
> >
>
> > $ ps -e -o pid,rtprio,comm | grep "irq/19"
>
> > 56 89 irq/19-uhci_hcd
>
> > 1877 88 irq/19-can0
>
> > 1922 88 irq/19-can1
>
> >
>
> > I do not still understand, what does it mean "irq/19-uhci_hcd". Which is
>
> > also active, even I do not have any USB device. Mouse and keyboard are
>
> > connected through PS2.
>
> Seem that the interrupts are shared. "$ cat /pric/interrupts" provide
>
> further
>
> information.
Yes, it is so.
$ cat /proc/interrupts
CPU0 CPU1
0: 127 0 IO-APIC-edge timer
1: 5582 0 IO-APIC-edge i8042
6: 3 0 IO-APIC-edge floppy
7: 1 0 IO-APIC-edge parport0
8: 1 0 IO-APIC-edge rtc0
9: 0 0 IO-APIC-fasteoi acpi
12: 30627 0 IO-APIC-edge i8042
14: 43351 0 IO-APIC-edge ata_piix
15: 286242 0 IO-APIC-edge ata_piix
16: 0 0 IO-APIC-fasteoi uhci_hcd:usb2, uhci_hcd:usb5
17: 370 0 IO-APIC-fasteoi i801_smbus, snd_intel8x0
18: 102206 0 IO-APIC-fasteoi uhci_hcd:usb4, eth0
19: 397673976 0 IO-APIC-fasteoi uhci_hcd:usb3, can0, can1
23: 0 0 IO-APIC-fasteoi ehci_hcd:usb1
NMI: 1 1 Non-maskable interrupts
LOC: 15370305 11437013 Local timer interrupts
SPU: 0 0 Spurious interrupts
PMI: 0 0 Performance monitoring interrupts
IWI: 0 0 IRQ work interrupts
RTR: 0 0 APIC ICR read retries
RES: 283821 18429091 Rescheduling interrupts
CAL: 9623 3662 Function call interrupts
TLB: 7408 66943 TLB shootdowns
THR: 0 0 Threshold APIC interrupts
MCE: 0 0 Machine check exceptions
MCP: 0 0 Machine check polls
ERR: 0
MIS: 0
I prefer to switch off it from a linux side. I will look for that.
>
> Wolfgang.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo <at> vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
next prev parent reply other threads:[~2013-12-06 10:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-24 23:03 [PATCH v6] can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value Marc Kleine-Budde
2013-11-25 8:54 ` Marc Kleine-Budde
2013-11-25 18:12 ` Oliver Hartkopp
2013-11-25 22:05 ` Austin Schuh
2013-12-09 19:48 ` Austin Schuh
2013-12-09 21:07 ` Marc Kleine-Budde
2013-12-09 23:50 ` Austin Schuh
2013-12-05 15:50 ` Richard Andrysek
2013-12-05 17:50 ` Wolfgang Grandegger
2013-12-05 19:37 ` Richard Andrysek
2013-12-05 20:26 ` Wolfgang Grandegger
2013-12-06 9:27 ` Richard Andrysek
2013-12-06 9:56 ` Wolfgang Grandegger
2013-12-06 10:32 ` Richard Andrysek [this message]
2013-12-06 18:32 ` Wolfgang Grandegger
2013-12-09 9:29 ` Richard Andrysek
2013-12-06 10:12 ` Marc Kleine-Budde
2013-12-06 10:57 ` Richard Andrysek
2013-12-06 11:45 ` arbitration lost error reporting (was: Re: [PATCH v6] can: sja1000: fix {pre,post}_irq() handling and IRQ handler return value) Marc Kleine-Budde
2013-12-06 12:02 ` arbitration lost error reporting Oliver Hartkopp
2013-12-06 12:16 ` Marc Kleine-Budde
2013-12-06 13:21 ` Richard Andrysek
2013-12-06 13:23 ` Marc Kleine-Budde
2013-12-06 17:59 ` Wolfgang Grandegger
2013-12-07 13:13 ` Oliver Hartkopp
2013-12-09 9:01 ` Richard Andrysek
2013-12-09 10:32 ` Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20131206T112023-62@post.gmane.org \
--to=richard.andrysek@rg-mechatronics.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).