<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/net/wan/farsync.c, branch v4.1.14</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use</title>
<updated>2014-08-12T18:15:14+00:00</updated>
<author>
<name>Benoit Taine</name>
<email>benoit.taine@lip6.fr</email>
</author>
<published>2014-08-08T13:56:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1'/>
<id>9baa3c34ac4e27f7e062f266f50cc5dbea26a6c1</id>
<content type='text'>
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines.  This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// &lt;smpl&gt;

@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@

- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;

// &lt;/smpl&gt;

[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine &lt;benoit.taine@lip6.fr&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We should prefer `struct pci_device_id` over `DEFINE_PCI_DEVICE_TABLE` to
meet kernel coding style guidelines.  This issue was reported by checkpatch.

A simplified version of the semantic patch that makes this change is as
follows (http://coccinelle.lip6.fr/):

// &lt;smpl&gt;

@@
identifier i;
declarer name DEFINE_PCI_DEVICE_TABLE;
initializer z;
@@

- DEFINE_PCI_DEVICE_TABLE(i)
+ const struct pci_device_id i[]
= z;

// &lt;/smpl&gt;

[bhelgaas: add semantic patch]
Signed-off-by: Benoit Taine &lt;benoit.taine@lip6.fr&gt;
Signed-off-by: Bjorn Helgaas &lt;bhelgaas@google.com&gt;</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: fix invalid memory accesses in fst_add_one() and fst_init_card()</title>
<updated>2014-07-11T20:34:48+00:00</updated>
<author>
<name>Alexey Khoroshilov</name>
<email>khoroshilov@ispras.ru</email>
</author>
<published>2014-07-10T22:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=19eeb2f9e750f47c805f66e3b0e889b12557d80f'/>
<id>19eeb2f9e750f47c805f66e3b0e889b12557d80f</id>
<content type='text'>
There are several issues in fst_add_one() and fst_init_card():
- invalid pointer dereference at card-&gt;ports[card-&gt;nports - 1] if
  register_hdlc_device() fails for the first port in fst_init_card();
- fst_card_array overflow at fst_card_array[no_of_cards_added]
  because there is no checks for array overflow;
- use after free because pointer to deallocated card is left in fst_card_array
  if something fails after fst_card_array[no_of_cards_added] = card;
- several leaks on failure paths in fst_add_one().

The patch fixes all the issues and makes code more readable.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several issues in fst_add_one() and fst_init_card():
- invalid pointer dereference at card-&gt;ports[card-&gt;nports - 1] if
  register_hdlc_device() fails for the first port in fst_init_card();
- fst_card_array overflow at fst_card_array[no_of_cards_added]
  because there is no checks for array overflow;
- use after free because pointer to deallocated card is left in fst_card_array
  if something fails after fst_card_array[no_of_cards_added] = card;
- several leaks on failure paths in fst_add_one().

The patch fixes all the issues and makes code more readable.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov &lt;khoroshilov@ispras.ru&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: Fix confusion about DMA address and buffer offset types</title>
<updated>2014-06-11T07:45:29+00:00</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2014-06-08T22:49:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=581d9baa21dbd69b5b02cd654d858d064c400769'/>
<id>581d9baa21dbd69b5b02cd654d858d064c400769</id>
<content type='text'>
Use dma_addr_t for DMA address parameters and u32 for shared memory
offset parameters.

Do not assume that dma_addr_t is the same as unsigned long; it will
not be in PAE configurations.  Truncate DMA addresses to 32 bits when
printing them.  This is OK because the DMA mask for this device is
32-bit (per default).

Also rename the DMA address parameters from 'skb' to 'dma'.

Compile-tested only.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use dma_addr_t for DMA address parameters and u32 for shared memory
offset parameters.

Do not assume that dma_addr_t is the same as unsigned long; it will
not be in PAE configurations.  Truncate DMA addresses to 32 bits when
printing them.  This is OK because the DMA mask for this device is
32-bit (per default).

Also rename the DMA address parameters from 'skb' to 'dma'.

Compile-tested only.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wan: Use usleep_range()</title>
<updated>2014-06-03T00:01:33+00:00</updated>
<author>
<name>Manuel Schölling</name>
<email>manuel.schoelling@gmx.de</email>
</author>
<published>2014-05-31T15:07:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8db4ec6641db69f59314894bad6ed7b609e691f6'/>
<id>8db4ec6641db69f59314894bad6ed7b609e691f6</id>
<content type='text'>
Instead of using a jiffies hack we can use the standard api for delays.

Signed-off-by: Manuel Schölling &lt;manuel.schoelling@gmx.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using a jiffies hack we can use the standard api for delays.

Signed-off-by: Manuel Schölling &lt;manuel.schoelling@gmx.de&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: fix info leak in ioctl</title>
<updated>2013-10-11T21:50:59+00:00</updated>
<author>
<name>Salva Peiró</name>
<email>speiro@ai2.upv.es</email>
</author>
<published>2013-10-11T09:50:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=96b340406724d87e4621284ebac5e059d67b2194'/>
<id>96b340406724d87e4621284ebac5e059d67b2194</id>
<content type='text'>
The fst_get_iface() code fails to initialize the two padding bytes of
struct sync_serial_settings after the -&gt;loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fst_get_iface() code fails to initialize the two padding bytes of
struct sync_serial_settings after the -&gt;loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>wan: Remove unnecessary alloc/OOM messages</title>
<updated>2013-02-04T18:22:34+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2013-02-03T17:28:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=1d5d1fdc52b879d8d2bb40546472b4dcfd99f118'/>
<id>1d5d1fdc52b879d8d2bb40546472b4dcfd99f118</id>
<content type='text'>
alloc failures already get standardized OOM
messages and a dump_stack.

Hoist assigns from if tests.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
alloc failures already get standardized OOM
messages and a dump_stack.

Hoist assigns from if tests.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: remove __dev* attributes</title>
<updated>2012-12-03T19:17:06+00:00</updated>
<author>
<name>Bill Pemberton</name>
<email>wfp5p@virginia.edu</email>
</author>
<published>2012-12-03T14:24:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5a37931ff0be06b4c774aa604f86ed4566a0ede7'/>
<id>5a37931ff0be06b4c774aa604f86ed4566a0ede7</id>
<content type='text'>
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Cc: Kevin Curtis &lt;kevin.curtis@farsite.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CONFIG_HOTPLUG is going away as an option.  As result the __dev*
markings will be going away.

Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst,
and __devexit.

Signed-off-by: Bill Pemberton &lt;wfp5p@virginia.edu&gt;
Cc: Kevin Curtis &lt;kevin.curtis@farsite.co.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: fix support for over 30 cards</title>
<updated>2012-10-09T17:54:59+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-10-08T21:20:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=50fb47ae4d812d5eabc57539701dc0fd6404495e'/>
<id>50fb47ae4d812d5eabc57539701dc0fd6404495e</id>
<content type='text'>
We're trying to fill a 64 bit bitmap but only the lower 30 shifts work
because the shift wraps around.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We're trying to fill a 64 bit bitmap but only the lower 30 shifts work
because the shift wraps around.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers/net/wan/farsync.c: add missing iounmap</title>
<updated>2012-04-18T02:31:59+00:00</updated>
<author>
<name>Julia Lawall</name>
<email>Julia.Lawall@lip6.fr</email>
</author>
<published>2012-04-16T05:22:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=48159f009f5f92ef5962e7c278ac615d74242fa5'/>
<id>48159f009f5f92ef5962e7c278ac615d74242fa5</id>
<content type='text'>
Free card-&gt;mem in the error-handling code since it was successfully
allocated just above.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Free card-&gt;mem in the error-handling code since it was successfully
allocated just above.

Signed-off-by: Julia Lawall &lt;Julia.Lawall@lip6.fr&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>farsync: Update to current logging forms</title>
<updated>2011-06-27T07:09:47+00:00</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2011-06-26T19:01:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e8c122f450d0b83d7a15535ba49e55ad21a9e63f'/>
<id>e8c122f450d0b83d7a15535ba49e55ad21a9e63f</id>
<content type='text'>
Use pr_fmt, pr_&lt;level&gt; and netdev_&lt;level&gt; as appropriate.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use pr_fmt, pr_&lt;level&gt; and netdev_&lt;level&gt; as appropriate.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
