[go: nahoru, domu]

History log of /drivers/net/caif/caif_hsi.c
Revision Date Author Comments
c002090cfaad91859ae25bb7ee24dac8ec1f3188 23-Apr-2013 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif: Update Dmitry's email address.

Dmitry's address will start bouncing in a few days,
update to his new mail address.

Cc: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Cc: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
c2cd0a560c129d5f01be1df62bfc412d3aff6953 23-Apr-2013 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif: Remove bouncing address for Daniel Martensson

cc: Daniel Martensson <Daniel.Martensson@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
26ee65e680f4a2291f6258e11beceae0ad4eeba3 23-Apr-2013 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif: Remove my bouncing email address.

Remove my soon bouncing email address.
Also remove the "Contact:" line in file header.
The MAINTAINERS file is a better place to find the
contact person anyway.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7fa8ad6df71f4778b23e17b0106aaef02b518684 28-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Fix merge issues.

Fix the failing merge in net-next by reverting the last
net-next merge for caif_hsi.c and then merge in the commit:
"caif-hsi: Bugfix - Piggyback'ed embedded CAIF frame lost"
from the net repository.

The commit:"caif-hsi: Add missing return in error path" from
net repository was dropped, as it changed code previously removed in the
net-next repository.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
91fa0cbc0c47930f771bf5425109956cc99c6b0b 25-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Remove use of module parameters

Remove use of module parameters on caif hsi device, as
rtnl configuration parameters are already supported.

All caif hsi configuration data is put in cfhsi_config,
and default values in hsi_default_config.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1c385f1fdf6f9c66d982802cd74349c040980b50 25-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Replace platform device with ops structure.

Remove use of struct platform_device, and replace it with
struct cfhsi_ops. Updated variable names in the same
spirit:
cfhsi_get_dev to cfhsi_get_ops,
cfhsi->dev to cfhsi->ops and,
cfhsi->dev.drv to cfhsi->ops->cb_ops.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
c41254006377842013922fb1e407391f24c59522 25-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Add rtnl support

Add RTNL support for managing the caif hsi interface.
The HSI HW interface is no longer registering as a device,
instead we use symbol_get to get hold of the HSI API.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
b42f7b5cfda6f7dac298da2d9a8855f6364e35d9 25-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Remove uncecessary assignments

Remove assignment at declaration when not needed.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
90de9bab9123d7fe905cb885c1e3ed32dc516f18 25-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Use netdev_X instead of dev_X for printing

Replace dev_X with the corresponding netdev_X print
function when applicable.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericssion.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
a5c96b518c373fba35a8dc2e4e5fead24aeefb1c 25-Jun-2012 Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com> caif-hsi: changed test on aggregation_timeout

Aggregation_timeout is an unsigned long,
a test for less than zero can never become true,
compare with zero instead.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4e7bb59d49fb00d4cf13484386d0400783f2c826 25-Jun-2012 Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com> caif-hsi: Removed dead code

Simplify logic and remove dead code.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1fdc7630b2cba4a5aeb5fc3834c7189716fdbcb0 24-Jun-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Add missing return in error path

Fix a missing return, causing access to freed memory.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
3935600a7f341c00b0def2ed8870669ab2c05493 24-Jun-2012 Per Ellefsen <Per.Ellefsen@stericsson.com> caif-hsi: Bugfix - Piggyback'ed embedded CAIF frame lost

When receiving a piggyback'ed descriptor containing an
embedded frame, but no payload, the embedded frame was
lost.

Signed-off-by: Per Ellefsen <per.ellefsen@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
39abbaef19cd0a30be93794aa4773c779c3eb1f3 12-Apr-2012 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif-hsi: Postpone init of HSI until open()

Do the initialization of the HSI interface when the
interface is opened, instead of upon registration.
When the interface is closed the HSI interface is
de-initialized, allowing other modules to use the
HSI interface.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2df1fe7f1006f3c1d9ecbe9311701833c63c14cc 12-Apr-2012 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif-hsi: Remove stop/start of queue.

CAIF HSI is currently a virtual device. Stopping/starting the
queues is wrong on a virtual device.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ece367d53a5bf46cc357163c7074a6546a0ec01c 12-Apr-2012 Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> caif-hsi: robust frame aggregation for HSI

Implement aggregation algorithm, combining more data into a single
HSI transfer. 4 different traffic categories are supported:
1. TC_PRIO_CONTROL .. TC_PRIO_MAX (CTL)
2. TC_PRIO_INTERACTIVE (VO)
3. TC_PRIO_INTERACTIVE_BULK (VI)
4. TC_PRIO_BESTEFFORT, TC_PRIO_BULK, TC_PRIO_FILLER (BEBK)

Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
d62f8dbb5b7771910f7c4657345df8ac93acb832 12-Apr-2012 Kim Lilliestierna XX <kim.xx.lilliestierna@stericsson.com> caif_hsi: use dev_dbg not dev_err for reporting

Use dev_dbg instead of dev_err for reporting in cfhsi_wakeup_cb.

Signed-off-by: Kim Lilliestierna <kim.xx.lilliestierna@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5f614e6b7005685b3e34da0742f79389c858c7e1 12-Apr-2012 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif-hsi: Free flip_buffer at shutdown

Fix memory leak of RX flip-buffer.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
34efc283a56adaef5756ac93065f46608674ea7d 04-Mar-2012 Sjur Brændeland <sjur.brandeland@stericsson.com> caif-hsi: Set default MTU to 4096

Default MTU for CAIF HSI was wrongly set to 15 * 4092 bytes.
The patch sets default MTU size to 4096.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
332ad43f19848ed653a5e44afa8e2f4a7d34ed44 03-Feb-2012 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif-hsi: Add RX flip buffer

Implement RX flip buffer in the cfhsi_rx_done function,
piggy-backed frames is also supported.
This gives a significant performance gain for CAIF over HSI.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
f84ea779c25dabc90956f1c329e5e5c501ea96cc 06-Dec-2011 Roar Førde <roar.forde@stericsson.com> caif: Replace BUG_ON with WARN_ON.

BUG_ON is too strict in a number of circumstances,
use WARN_ON instead. Protocol errors should not halt the system.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
1e226773c7e79051aa8a48258fe6ae61d20332bf 06-Dec-2011 Christian Auby <christian.auby@stericsson.com> caif-hsi: Remove wake line modification when flushing FIFO

Raising wake before flushing FIFO and lowering it after caused a
spike on AC wake that were sometimes detected and acted upon by the
modem. Fixed this by remove wake line modification when flushing FIFO.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5ea2ef5f8b006ff9e970327e7fea78f1f5841c44 13-Oct-2011 Daniel Martensson <daniel.martensson@stericsson.com> caif-hsi: Added recovery check of CA wake status.

Added recovery check of CA wake status in case of wake up timeout.
Added check of CA wake status in case of wake down timeout.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
5bbed92d3d8dab1f28945eec9fb15b6f50bf8669 13-Oct-2011 Daniel Martensson <daniel.martensson@stericsson.com> caif-hsi: Added sanity check for length of CAIF frames

Added sanity check for length of CAIF frames, and tear down of
CAIF link-layer device upon protocol error.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
28bd2049428202cb3bc982536ed3de3c69ae120a 13-Oct-2011 Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> caif-hsi: Make inactivity timeout configurable.

CAIF HSI uses a timer for inactivity. Upon timeout HSI-wake signaling
is initiated to allow power-down of the HSI block.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
ca63f8c7512acbd1171bbabefc7a7765ce117939 13-Oct-2011 Daniel Martensson <daniel.martensson@stericsson.com> caif-hsi: HSI-Platform device register and unregisters itself

Platform device is no longer removed from caif_hsi at shutdown.
The HSI-platform device must do it's own registration and unregistration.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
687b13e98addc99644002703944ec89e94287cb6 13-Oct-2011 Daniel Martensson <daniel.martensson@stericsson.com> caif-hsi: Making read and writes asynchronous.

Some platforms do not allow to put HSI block into low-power
mode when FIFO is not empty. The patch flushes (by reading)
FIFO at wake down sequence. Asynchronous read and write is
implemented for that. As a side effect this will also greatly
improve performance.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
73033c987a8bd0b080509063bb7c130b8941ad73 13-Oct-2011 Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> caif-hsi: Fix for wakeup condition problem

Under stressed conditions a race could happen when del_timer_sync() was called
from softirq context at the same time when mod_timer_pending() for the same
timer was called from the workqueue. This leaded to a state mismatch in the
CAIF HSI driver and following unexpected link wakeup procedure.

The fix puts del_timer_sync() and mod_timer_pending() calls under a spin lock
to protect against the race condition.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fe47f1250805438fa06580c9ce6d37bc4bc595d2 13-Oct-2011 Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> caif-hsi: Fixing a race condition in the caif_hsi code

cfhsi->tx_state was not protected by a spin lock. TX soft-irq could interrupt
cfhsi_tx_done_work work leading to inconsistent state of the driver.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
94230febe47f82331f9493c4fd61085e2a6bf756 13-Oct-2011 sjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com> caif-hsi: HSI Fix uninitialized data in HSI header

CAIF HSI header may be uninitialized and cause last message to
be repeated if transmit size is ~86 bytes long.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
7ac2ed0ceeafa130f85aa947b271b571c68b9e75 25-Aug-2011 Joe Perches <joe@perches.com> caif: Remove OOM messages, use kzalloc

Remove per site OOM messages because they duplicate
the generic mm subsystem OOM message.

Use kzalloc instead of kmalloc/memset
when next to the OOM message removals.

Reduces object size (allyesconfig ~2%)

$ size -t drivers/net/caif/built-in.o.old net/caif/built-in.o.old
text data bss dec hex filename
32297 700 8224 41221 a105 drivers/net/caif/built-in.o.old
72159 1317 20552 94028 16f4c net/caif/built-in.o.old
104456 2017 28776 135249 21051 (TOTALS)
$ size -t drivers/net/caif/built-in.o.new net/caif/built-in.o.new
text data bss dec hex filename
31975 700 8184 40859 9f9b drivers/net/caif/built-in.o.new
70748 1317 20152 92217 16839 net/caif/built-in.o.new
102723 2017 28336 133076 207d4 (TOTALS)

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
fa917ff739eace9e1e1c214bd067a7a0f7bc264b 07-Jul-2011 Shan Wei <shanwei@cn.fujitsu.com> net: fix warning of versioncheck

net-next-2.6/drivers/net/bnx2x/bnx2x_sp.c: 19 linux/version.h not needed.
net-next-2.6/drivers/net/caif/caif_hsi.c: 9 linux/version.h not needed.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
864834f935b5311004ebbf0c485dbfd10aa9a546 29-Jun-2011 Joe Perches <joe@perches.com> caif: Fix recieve/receive typo

Just spelling fixes.

Actually, a twofer with vaiables/variables as well.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
40d69043fce579378eb185d31445b6ff66abbd93 01-Jun-2011 Dmitry.Tarnyagin <Dmitry.Tarnyagin@stericsson.com> caif: Add CAIF HSI Link layer driver

This patch introduces the CAIF HSI Protocol Driver for the
CAIF Link Layer.

This driver implements a platform driver to accommodate for a
platform specific HSI devices. A general platform driver is not
possible as there are no HSI side Kernel API defined.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>