<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/net/can/dev.c, branch v3.0.86</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/net/can/dev.c?h=v3.0.86</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/net/can/dev.c?h=v3.0.86'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-01-11T17:03:50Z</updated>
<entry>
<title>can: Do not call dev_put if restart timer is running upon close</title>
<updated>2013-01-11T17:03:50Z</updated>
<author>
<name>Alexander Stein</name>
<email>alexander.stein@systec-electronic.com</email>
</author>
<published>2012-11-27T07:52:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a0ed2e748abaf7f31e6a2e8129efa461a4181277'/>
<id>urn:sha1:a0ed2e748abaf7f31e6a2e8129efa461a4181277</id>
<content type='text'>
commit ab48b03ec9ae1840a1e427e2375bd0d9d554b4ed upstream.

If the restart timer is running due to BUS-OFF and the device is
disconnected an dev_put will decrease the usage counter to -1 thus
blocking the interface removal, resulting in the following dmesg
lines repeating every 10s:
can: notifier: receive list not found for dev can0
can: notifier: receive list not found for dev can0
can: notifier: receive list not found for dev can0
unregister_netdevice: waiting for can0 to become free. Usage count = -1

Signed-off-by: Alexander Stein &lt;alexander.stein@systec-electronic.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>can: netlink support for bus-error reporting and counters</title>
<updated>2010-02-26T09:48:49Z</updated>
<author>
<name>Wolfgang Grandegger</name>
<email>wg@grandegger.com</email>
</author>
<published>2010-02-22T22:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=52c793f24054f5dc30d228e37e0e19cc8313f086'/>
<id>urn:sha1:52c793f24054f5dc30d228e37e0e19cc8313f086</id>
<content type='text'>
This patch makes the bus-error reporting configurable and allows to
retrieve the CAN TX and RX bus error counters via netlink interface.
I have added support for the SJA1000. The TX and RX bus error counters
are also copied to the data fields 6..7 of error messages when state
changes are reported.

Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: Proper ctrlmode handling for CAN devices</title>
<updated>2010-01-15T09:39:17Z</updated>
<author>
<name>Christian Pellegrin</name>
<email>chripell@fsfe.org</email>
</author>
<published>2010-01-14T07:08:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad72c347e56bf3a0231b9d686e17764157d2961c'/>
<id>urn:sha1:ad72c347e56bf3a0231b9d686e17764157d2961c</id>
<content type='text'>
This patch adds error checking of ctrlmode values for CAN devices. As
an example all availabe bits are implemented in the mcp251x driver.

Signed-off-by: Christian Pellegrin &lt;chripell@fsfe.org&gt;
Acked-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-11-17T08:05:02Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-11-17T08:05:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2bfbc072e279ff81e6b336acff612b9bc2e5281'/>
<id>urn:sha1:a2bfbc072e279ff81e6b336acff612b9bc2e5281</id>
<content type='text'>
Conflicts:
	drivers/net/can/Kconfig
</content>
</entry>
<entry>
<title>can: add the missing netlink get_xstats_size callback</title>
<updated>2009-11-14T03:56:55Z</updated>
<author>
<name>Wolfgang Grandegger</name>
<email>wg@grandegger.com</email>
</author>
<published>2009-11-12T05:34:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=55369c0a6441e95062cfaeef6eefcfb357a31e8c'/>
<id>urn:sha1:55369c0a6441e95062cfaeef6eefcfb357a31e8c</id>
<content type='text'>
This patch adds the missing "get_xstats_size" callback for the
netlink interface, which is required if "fill_xstats" is used,
as pointed out by Patrick McHardy.

Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6</title>
<updated>2009-11-09T07:00:54Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2009-11-09T07:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4'/>
<id>urn:sha1:d0e1e88d6e7dbd8e1661cb6a058ca30f54ee39e4</id>
<content type='text'>
Conflicts:
	drivers/net/can/usb/ems_usb.c
</content>
</entry>
<entry>
<title>net: Support specifying the network namespace upon device creation.</title>
<updated>2009-11-08T08:53:51Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@aristanetworks.com</email>
</author>
<published>2009-11-08T08:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=81adee47dfb608df3ad0b91d230fb3cef75f0060'/>
<id>urn:sha1:81adee47dfb608df3ad0b91d230fb3cef75f0060</id>
<content type='text'>
There is no good reason to not support userspace specifying the
network namespace during device creation, and it makes it easier
to create a network device and pass it to a child network namespace
with a well known name.

We have to be careful to ensure that the target network namespace
for the new device exists through the life of the call.  To keep
that logic clear I have factored out the network namespace grabbing
logic into rtnl_link_get_net.

In addtion we need to continue to pass the source network namespace
to the rtnl_link_ops.newlink method so that we can find the base
device source network namespace.

Signed-off-by: Eric W. Biederman &lt;ebiederm@aristanetworks.com&gt;
Acked-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
</content>
</entry>
<entry>
<title>can: fix WARN_ON dump in net/core/rtnetlink.c:rtmsg_ifinfo()</title>
<updated>2009-11-08T08:45:48Z</updated>
<author>
<name>Wolfgang Grandegger</name>
<email>wg@grandegger.com</email>
</author>
<published>2009-11-06T23:53:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=53a0ef866dc379e577794819d0b8ade5ba338e3a'/>
<id>urn:sha1:53a0ef866dc379e577794819d0b8ade5ba338e3a</id>
<content type='text'>
On older kernels, e.g. 2.6.27, a WARN_ON dump in rtmsg_ifinfo()
is thrown when the CAN device is registered due to insufficient
skb space, as reported by various users. This patch adds the
rtnl_link_ops "get_size" to fix the problem. I think this patch
is required for more recent kernels as well, even if no WARN_ON
dumps are triggered. Maybe we also need "get_xstats_size" for
the CAN xstats.

Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>can: provide library functions for skb allocation</title>
<updated>2009-10-20T07:08:01Z</updated>
<author>
<name>Wolfgang Grandegger</name>
<email>wg@grandegger.com</email>
</author>
<published>2009-10-20T07:08:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7b6856a0296a8f187bb88ba31fa83a08abba7966'/>
<id>urn:sha1:7b6856a0296a8f187bb88ba31fa83a08abba7966</id>
<content type='text'>
This patch makes the private functions alloc_can_skb() and
alloc_can_err_skb() of the at91_can driver public and adapts all
drivers to use these. While making the patch I realized, that
the skb's are *not* setup consistently. It's now done as shown
below:

  skb-&gt;protocol = htons(ETH_P_CAN);
  skb-&gt;pkt_type = PACKET_BROADCAST;
  skb-&gt;ip_summed = CHECKSUM_UNNECESSARY;
  *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
  memset(*cf, 0, sizeof(struct can_frame));

The frame is zeroed out to avoid uninitialized data to be passed to
user space. Some drivers or library code did not set "pkt_type" or
"ip_summed". Also,  "__constant_htons()" should not be used for
runtime invocations, as pointed out by David Miller.

Signed-off-by: Wolfgang Grandegger &lt;wg@grandegger.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
