All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Pellegrini <mikep86@gmail.com>
To: linux-can@vger.kernel.org
Subject: Re: pch_can: Data transmission stops after dropped packet
Date: Mon, 19 Nov 2012 16:20:47 +0000 (UTC)	[thread overview]
Message-ID: <loom.20121119T171647-35@post.gmane.org> (raw)
In-Reply-To: 50AA4FB3.7070009@grandegger.com

Wolfgang Grandegger <wg <at> grandegger.com> writes:

> 
> On 11/19/2012 04:10 PM, Michael Pellegrini wrote:
> > Wolfgang Grandegger <wg <at> grandegger.com> writes:
> > 
> >>
> >> On 11/15/2012 10:34 PM, Michael Pellegrini wrote:
> >>> Wolfgang Grandegger <wg <at> grandegger.com> writes:
> >>>
> >>>> I need to check first if this driver can be supported with little effort.
> >>>
> >>> Thank you for your consideration.
> >>
> >> For simple out-of-tree build I have now extracted the most recent
> >> version of c_can and c_can_pci driver files, backported it to v3.2 and
> >> added the PCH related code.
> >>
> >> You should be able to build these drivers on your system as shown below:
> >>
> >>   $ tar xf c-can-pci-v1.tar.bz2
> >>   $ cd c-can-pci-v1
> >>   $ CONFIG_CAN_C_CAN_PCI=m \
> >>     make -C /usr/src/linux-headers-`uname -r` SUBDIRS=`pwd` modules
> >>
> >> This requires that you have the kernel header, gcc and fiends installed
> >> on your system.
> >>
> >> Then you can load the modules as shown below, after unloading the
> >> original C_CAN modules:
> >>
> >>   $ sudo modprobe can_dev
> >>   $ rmmod c_can
> >>   $ rmmod c_can_pci
> >>   $ sudo insmod c_can.ko
> >>   $ sudo insmod c_can_pci.ko
> >>
> >> Hope it works as expected. 
> > 
> > I got the modules built, however loading them results in a non-functional 
CAN 
> > interface.  can0 no longer shows up in "ifconfig" or "ip".  Upon loading the 
> > modules, dmesg prints the following:
> > 
> > [ 2786.244341] c_can_pci 0000:02:0c.3: PCI INT C -> GSI 18 (level, low) -> 
IRQ 
> > 18
> > [ 2786.244381] c_can_pci 0000:02:0c.3: setting latency timer to 64
> > [ 2786.244497] c_can_pci 0000:02:0c.3: irq 41 for MSI/MSI-X
> > [ 2786.244523] c_can_pci 0000:02:0c.3: device has no PCI memory resources, 
> > failing adapter
> > [ 2786.244586] c_can_pci 0000:02:0c.3: PCI INT C disabled
> > [ 2786.244611] c_can_pci: probe of 0000:02:0c.3 failed with error -12
> 
> "-ENOMEM", ah, the PCH uses PCI Bar 1 (instead of 0). I missed that.
> Could you please replace:
> 
> 	addr = pci_iomap(pdev, 0, pci_resource_len(pdev, 0));
> 
> with
> 
> 	addr = pci_iomap(pdev, 1, pci_resource_len(pdev, 0));
> 
> in c_can_pci and retry.
> 
> Wolfgang.

I made the change, the module crashes on load now.  Dmesg output is:

[  249.244698] c_can_pci 0000:02:0c.3: PCI INT C -> GSI 18 (level, low) -> IRQ 
18
[  249.244737] c_can_pci 0000:02:0c.3: setting latency timer to 64
[  249.244869] c_can_pci 0000:02:0c.3: irq 41 for MSI/MSI-X
[  249.339061] BUG: unable to handle kernel paging request at f85af538
[  249.339078] IP: [<c12bc410>] iowrite32+0x30/0x40
[  249.339098] *pdpt = 0000000001938001 *pde = 0000000035822067 *pte = 
80000000228cc161
[  249.339113] Oops: 0003 [#1] SMP
[  249.339122] Modules linked in: c_can_pci(O) c_can(O) can_raw can i2c_isch 
snd_hda_codec_realtek snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi 
snd_rawmidi snd_seq_midi_event snd_seq snd_timer ftdi_sio snd_seq_device 
usbserial snd soundcore snd_page_alloc lpc_sch can_dev pch_phub rfcomm gpio_pch 
bnep bluetooth parport_pc ppdev video mac_hid shpchp lp parport sdhci_pci sdhci 
pch_gbe [last unloaded: pch_can]
[  249.339206]
[  249.339214] Pid: 2365, comm: ifconfig Tainted: G           O 3.2.0-23-
generic-pae #36-Ubuntu To be filled by O.E.M. To be filled by O.E.M./To be 
filled by O.E.M.
[  249.339231] EIP: 0060:[<c12bc410>] EFLAGS: 00010296 CPU: 1
[  249.339240] EIP is at iowrite32+0x30/0x40
[  249.339247] EAX: 00000001 EBX: f85af538 ECX: f85af538 EDX: f85af538
[  249.339255] ESI: 00000000 EDI: 00000000 EBP: e290be5c ESP: e290be5c
[  249.339263]  DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
[  249.339271] Process ifconfig (pid: 2365, ti=e290a000 task=e721cbc0 
task.ti=e290a000)
[  249.339278] Stack:
[  249.339282]  e290be68 f85ae0b1 f2640000 e290be88 f85bdbd6 00000080 f2640000 
f2640000
[  249.339304]  f2640000 f85bf220 00000000 e290bea4 c14ad8f3 c15a7e06 e290bea4 
c14ad85e
[  249.339325]  f2640000 000000c1 e290becc c14adb62 000000c1 fffffff3 e290bec4 
00040080
[  249.339346] Call Trace:
[  249.339361]  [<f85ae0b1>] c_can_pci_reset_pch+0x21/0x30 [c_can_pci]
[  249.339374]  [<f85bdbd6>] c_can_open+0xa6/0x100 [c_can]
[  249.339387]  [<c14ad8f3>] __dev_open+0x83/0xd0
[  249.339400]  [<c15a7e06>] ? _raw_spin_unlock_bh+0x16/0x20
[  249.339410]  [<c14ad85e>] ? dev_set_rx_mode+0x2e/0x40
[  249.339421]  [<c14adb62>] __dev_change_flags+0x82/0x150
[  249.339431]  [<c14adcd1>] dev_change_flags+0x21/0x60
[  249.339443]  [<c1504f6c>] devinet_ioctl+0x4dc/0x640
[  249.339453]  [<c14ae26e>] ? dev_ioctl+0x1de/0x2f0
[  249.339463]  [<c150551d>] inet_ioctl+0x8d/0xb0
[  249.339475]  [<c149887d>] sock_ioctl+0x6d/0x290
[  249.339485]  [<c1498810>] ? move_addr_to_user+0x90/0x90
[  249.339497]  [<c1154869>] do_vfs_ioctl+0x79/0x2d0
[  249.339507]  [<c15a8ea0>] ? do_debug+0x180/0x180
[  249.339518]  [<c10197cb>] ? fpu_finit+0x2b/0x70
[  249.339528]  [<c1154b2f>] sys_ioctl+0x6f/0x80
[  249.339539]  [<c1012474>] ? math_state_restore+0x44/0x60
[  249.339551]  [<c15af11f>] sysenter_do_call+0x12/0x28
[  249.339557] Code: 03 00 89 e5 89 d1 77 23 81 fa 00 00 01 00 76 0b 81 e2 ff ff 
00 00 ef 5d c3 66 90 ba d8 94 77 c1 89 c8 e8 44 ff ff ff 5d c3 66 90 <89> 02 5d 
c3 8d b6 00 00 00 00 8d bf 00 00 00 00 55 81 fa ff ff
[  249.339675] EIP: [<c12bc410>] iowrite32+0x30/0x40 SS:ESP 0068:e290be5c
[  249.339688] CR2: 00000000f85af538
[  249.339697] ---[ end trace ee92cde2e8156087 ]---




  reply	other threads:[~2012-11-19 16:21 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 15:39 pch_can: Data transmission stops after dropped packet Michael Pellegrini
2012-11-14 21:40 ` Michael Pellegrini
2012-11-15  7:18 ` Oliver Hartkopp
2012-11-15 13:13   ` Wolfgang Grandegger
2012-11-15 16:23     ` Michael Pellegrini
2012-11-15 21:19       ` Wolfgang Grandegger
2012-11-15 21:34         ` Michael Pellegrini
2012-11-15 21:51           ` Wolfgang Grandegger
2012-11-18 22:22           ` Wolfgang Grandegger
2012-11-19 15:10             ` Michael Pellegrini
2012-11-19 15:26               ` Wolfgang Grandegger
2012-11-19 16:20                 ` Michael Pellegrini [this message]
2012-11-19 16:31                   ` Wolfgang Grandegger
2012-11-19 17:39                     ` Michael Pellegrini
2012-11-19 19:22                       ` Wolfgang Grandegger
2012-11-19 20:19                         ` Michael Pellegrini
2012-11-19 21:46                           ` Wolfgang Grandegger
2012-11-20 14:25                             ` Michael Pellegrini
2012-11-20 16:12                               ` Wolfgang Grandegger
2012-11-20 19:12                                 ` Michael Pellegrini
2012-11-20 21:05                                   ` Wolfgang Grandegger
2012-11-21 10:24                                     ` Wolfgang Grandegger
     [not found]                                       ` <loom.20121121T160744-278@post.gmane.or  g>
2012-11-21 15:15                                       ` Michael Pellegrini
     [not found]                                       ` <loom.20121121T160744-278@post.gmane.or g>
2012-11-21 15:25                                         ` Michael Pellegrini
2012-11-21 15:32                                           ` Marc Kleine-Budde
2012-11-21 16:11                                             ` Michael Pellegrini
2012-11-21 15:41                                           ` Michael Pellegrini
2012-11-21 15:56                                           ` Wolfgang Grandegger
2012-11-21 16:09                                             ` Michael Pellegrini
2012-11-21 16:41                                               ` Wolfgang Grandegger
2012-11-21 16:58                                                 ` Casper Mogensen
2012-11-21 19:48                                                   ` Wolfgang Grandegger
2012-11-21 17:43                                                 ` Michael Pellegrini
2012-11-21 19:55                                                   ` Wolfgang Grandegger
2012-11-21 21:00                                                     ` Michael Pellegrini
2012-11-23 14:27                                                       ` Michael Pellegrini
2012-11-23 14:45                                                         ` Wolfgang Grandegger
2012-11-23 14:47                                                           ` Wolfgang Grandegger
2012-11-23 15:14                                                             ` Michael Pellegrini
2012-11-23 15:04                                                           ` Michael Pellegrini
2012-11-23 17:00                                                             ` Wolfgang Grandegger
2012-11-23 17:18                                                               ` Wolfgang Grandegger
2012-11-23 17:52                                                                 ` Michael Pellegrini
2012-11-25 16:17                                                                   ` Wolfgang Grandegger
2012-11-26 14:54                                                                     ` Michael Pellegrini
2012-11-26 15:30                                                                       ` Wolfgang Grandegger
2012-11-26 17:30                                                                         ` Michael Pellegrini
2012-11-26 18:13                                                                           ` Wolfgang Grandegger
2012-11-29 12:15                                                                             ` Wolfgang Grandegger
2012-11-29 14:15                                                                               ` Michael Pellegrini
2012-12-06 14:20                                                                                 ` Michael Pellegrini
2012-12-06 14:23                                                                                   ` Marc Kleine-Budde
2012-12-06 14:41                                                                                     ` Wolfgang Grandegger
2012-12-06 14:42                                                                                       ` Marc Kleine-Budde
2012-12-06 14:42                                                                                     ` Michael Pellegrini
2012-12-06 14:49                                                                                   ` Wolfgang Grandegger
2012-12-06 17:05                                                                                     ` Alexander Stein
2012-12-06 22:02                                                                                       ` Wolfgang Grandegger
2012-12-06 23:24                                                                                         ` Marc Kleine-Budde
2012-12-10  8:21                                                                                         ` Alexander Stein
2012-12-11 20:24                                                                                           ` Wolfgang Grandegger
2012-12-13 14:04                                                                                             ` Alexander Stein
2012-12-11 14:46                                                                                         ` Michael Pellegrini
2012-12-11 20:21                                                                                           ` Wolfgang Grandegger
2012-12-12 13:35                                                                                           ` Alexander Stein
2012-12-06 22:11                                                                                     ` Michael Pellegrini
2012-12-06 23:23                                                                                       ` Michael Pellegrini
2012-11-24  7:16                                                               ` Wolfgang Grandegger
2012-11-26  3:33                                                                 ` Bhupesh SHARMA
2012-11-21 14:52                                     ` Michael Pellegrini
2012-11-21 15:02                                       ` Wolfgang Grandegger
2012-11-15 16:32     ` Casper Mogensen
2012-11-15 21:16       ` Wolfgang Grandegger
2012-11-16 19:39     ` Wolfgang Grandegger
2012-11-15 16:12   ` Michael Pellegrini
2012-11-20 18:59     ` Wolfgang Grandegger
2012-11-15 12:35 ` Steffen Rose
2012-11-15 18:26   ` Michael Pellegrini
2012-11-16  8:24     ` Steffen Rose

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.20121119T171647-35@post.gmane.org \
    --to=mikep86@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.