summaryrefslogtreecommitdiffstats
path: root/drivers/staging/slicoss
Commit message (Collapse)AuthorAgeFilesLines
* staging: slicoss: remove the staging driverGreg Kroah-Hartman2016-12-067-4406/+0Star
| | | | | | | | | | | | A "real" driver for this hardware has now landed in the networking tree, so remove this old staging driver so that we don't have multiple drivers for the same hardware, and so people don't waste their time trying to clean up this old code. Cc: Lior Dotan <liodot@gmail.com> Cc: Christopher Harrer <charrer@alacritech.com> Cc: David Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: remove UPDATE_STATS_GB macro and inline codeSergio Paracuellos2016-11-292-32/+25Star
| | | | | | | | This patch removes UPDATE_STATS_GB macro in slic.h header file and just inline code. This improve readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: remove not used UPDATE_STATS macroSergio Paracuellos2016-11-291-8/+0Star
| | | | | | | | This patch remove UPDATE_STATS macro from header slic.h which is not being used. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: change some macros into inline functionsSergio Paracuellos2016-11-232-9/+17
| | | | | | | | | | | This patch changes macros into inline functions to avoid this checkpatch check: Macro argument 'x' may be better as '(x)' to avoid precedence issues It also removes two macros because they aren't being used. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: fix different address space warningsSergio Paracuellos2016-11-211-1/+1
| | | | | | | | | | Remove incorrect __iomem annotation. This patch fix the following sparse warnings in slicoss driver: warning: incorrect type in assignment (different address spaces) Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: avoid CamelCases slicoss.cSergio Paracuellos2016-11-191-14/+14
| | | | | | | Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: avoid CamelCases in slichw.hSergio Paracuellos2016-11-192-117/+117
| | | | | | | Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: braces should be used on all arms of this statementSergio Paracuellos2016-11-191-2/+2
| | | | | | | | Add braces in if statement to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: logical continuations should be on the previous lineSergio Paracuellos2016-11-191-2/+2
| | | | | | | | Move logical or operator to previous line to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: fix parenthesis alignment in slicoss.cSergio Paracuellos2016-11-191-35/+33Star
| | | | | | | | This patch fix open parenthesis alignment matching in slicoss.c file to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: avoid CamelCases in slic.hSergio Paracuellos2016-11-192-40/+40
| | | | | | | Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: replace memcpy_fromio with memcpyRyan Swan2016-10-251-1/+1
| | | | | | | | | | As per discusion with Lino Sanfilippo, memcpy is the proper way to copy across dma memory, which also removes sparse warning that triggered inquiry. Signed-off-by: Ryan Swan <ryan@ryanswan.com> Reviewed-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: cleaning up codestyle warningsGrygorii Maistrenko2016-09-271-4/+4
| | | | | | | | | This removes checkpatch.pl warnings: WARNING: Block comments should align the * on each line Signed-off-by: Grygorii Maistrenko <grygoriimkd@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Move NULL test closer to assignmentRehas Sachdeva2016-09-221-3/+3
| | | | | | | | Move the test to check if a variable is NULL, to right after it is being assigned, rather than some statements later. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Remove unnecessary braces {}Rehas Sachdeva2016-09-161-3/+2Star
| | | | | | | | Removes unnecessary braces {} on both arms of an if-else block as they have a single statement each. Issue detected by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Remove blank lines before & after bracesRehas Sachdeva2016-09-161-3/+0Star
| | | | | | | | Removes unnecessary blank lines after an opening brace '{' and before a closing brace '}'. Issue detected by checkpatch.pl. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Remove unnecessary blank lineRehas Sachdeva2016-09-161-1/+0Star
| | | | | | | Removes unnecessary blank line detected by checkpatch. Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: add new line after struct declarationGargi Sharma2016-09-131-0/+1
| | | | | | | | checkpatch generates a warning for no blank line after struct declaration. Inserted a new line. Signed-off-by: Gargi Sharma <gs051095@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: constify ethtool_ops structuresJulia Lawall2016-09-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check for ethtool_ops structures that are only stored in the ethtool_ops field of a net_device structure or passed as the second argument to netdev_set_default_ethtool_ops. These contexts are declared const, so ethtool_ops structures that have these properties can be declared as const also. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct ethtool_ops i@p = { ... }; @ok1@ identifier r.i; struct net_device e; position p; @@ e.ethtool_ops = &i@p; @ok2@ identifier r.i; expression e; position p; @@ netdev_set_default_ethtool_ops(e, &i@p) @bad@ position p != {r.p,ok1.p,ok2.p}; identifier r.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct ethtool_ops i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: simplify struct for statisticsLino Sanfilippo2016-08-213-120/+47Star
| | | | | | | | Merge several structures for statistics to one structure and remove unnecessary union nesting. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: improve implementation concerning the shared memoryLino Sanfilippo2016-08-212-149/+136Star
| | | | | | | | | | Remove the volatile specifiers of struct slic_shmem. Furthermore store the bus addresses for the isr pointer, link status and statistics separately and access the upper and lower word of these addresses by means of [lower|upper]_32_bits(). By doing this take the endianness into account. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: dont use a structure but offsets for register accessesLino Sanfilippo2016-08-213-423/+120Star
| | | | | | | | | Use the new register accessors that use offsets instead of the slic_regs structure to read/write registers. Since not longer needed remove the structure completley. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: avoid PCI write postingLino Sanfilippo2016-08-212-1/+23
| | | | | | | | | Introduce the function slic_flush_write() which reads from the HOSTID register and can be used to avoid PCI write posting. Use the function at several critical places in the code. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: introduce register accessors that use register offsetsLino Sanfilippo2016-08-213-0/+138
| | | | | | | | | | Introduce accessor functions that read and write registers by using a register offset. This is in preparation to replace the register addressing by means of the slic_regs struct with an addressing by means of offsets. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: start tx queue when interface is brought upLino Sanfilippo2016-08-211-2/+3
| | | | | | | | | There is no reason to delay tx queue activation until a link is detected. So start the queue when the interface is brought up and stop it when the interface is brought down. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: ensure mapping of io-memory is uncachedLino Sanfilippo2016-08-211-1/+1
| | | | | | | | Writes to registers should be done uncached for various reasons. Ensure this by replacing ioremap() with ioremap_nocache(). Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: notifiy network stack about change in link stateLino Sanfilippo2016-08-211-0/+8
| | | | | | | | | Notify the network stack about link states via netif_carrier_[off|on](). Also set the link state off initially and when the interface is brought down. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: handle allocation failure in slic_init_adapterLino Sanfilippo2016-08-211-16/+22
| | | | | | | | | | | The memory allocation in slic_init_adapter() can fail. Return an error in this case and unwind properly. Also make sure that the allocated memory is properly freed in case of an error in the calling probe() function. By doing this also replace the alloc() followed by memset to zero the memory with a zalloc() version. Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: fix missing blank lineClifton Barnes2016-04-301-0/+1
| | | | | | | | fix checkpatch.pl warning about 'Missing a blank line after declarations' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: fix bare use of 'unsigned'Clifton Barnes2016-04-301-1/+1
| | | | | | | | fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes <clifton.a.barnes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Add error check for pci_map_singleAmitoj Kaur Chawla2016-03-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, DMA mapping failure is not detected, causing the hardware to attempt a DMA from an invalid address. This patch adds the corresponding error check for pci_map_single i.e. pci_dma_mapping_error. Problem found using the following Coccinelle semantic patch: // <smpl> @@ expression e1; identifier x; @@ x= ( *dma_map_single(...) | *dma_map_page(...) ) ... when != dma_mapping_error(e1,x) @@ expression e1; identifier x; @@ x = ( *pci_map_single(...) | *pci_map_page(...) ) ... when != pci_dma_mapping_error(e1,x) // </smpl> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: changes comparisons to NULL in slicoss.cBen Marsh2016-03-121-3/+3
| | | | | | | | This is a patch to slicoss.c to change the style of NULL comparisons in order to remove checkpatch.pl warnings. Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: removes unnecessary blank lines in slicoss.cBen Marsh2016-03-121-2/+0Star
| | | | | | | | This is a patch to slicoss.c to remove unnecessary blank lines as found by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: change memory allocation style in slicoss.cBen Marsh2016-03-121-1/+1
| | | | | | | | This is a patch to slicoss.c to change the memory allocation style in slicoss.c as found by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: changes the style of memory allocation in slicoss.cBen Marsh2016-03-121-1/+1
| | | | | | | | This is a patch to slicoss.c to change the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: changes memory allocation style in slicoss.cBen Marsh2016-03-121-1/+1
| | | | | | | | This is a patch to slicoss.c that changes the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: memory allocation style change in slicoss.cBen Marsh2016-03-121-1/+1
| | | | | | | | This is a patch to slicoss.c to change the memory allocation style as identified by checkpatch.pl Signed-off-by: Ben Marsh <bmarsh94@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Eliminate commented out codeJanani Ravichandran2016-03-121-16/+1Star
| | | | | | | Remove commented out code to reduce code clutter. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Align #define constantsJanani Ravichandran2016-02-121-3/+3
| | | | | | | Aligning the constants in the macros improves code readability. Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging/slicoss: Use ethtool_ops instead of module_param.Kevin Wern2016-02-072-10/+33
| | | | | | | | | | | | ethtool_ops has attributes in sub struct ethtool_coalesce that correspond to the parameters intagg_delay and dynamic_intagg. It is preferable to set these properties with ethtool rather than module_param, so create these attributes in adapter and set them using ethtool_coalesce's rx_coalesce_usecs and rx_use_adaptive_coalesce. (Outlined in TODO file) Signed-off-by: Kevin Wern <kevin.m.wern@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Fixes block comment styleAmarjargal Gundjalam2015-10-273-73/+113
| | | | | | | | | | This patch fixes the checkpatch.pl warnings: WARNING: Block comments use * on subsequent lines WARNING: Block comments use a trailing */ on a separate line Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Adds space around operatorsAmarjargal Gundjalam2015-10-272-3/+3
| | | | | | | | | This patch fixes the checkpatch.pl check: CHECK: spaces preferred around that ‘’ Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Removes unnecessary space after a castAmarjargal Gundjalam2015-10-271-18/+18
| | | | | | | | | This patch fixes the checkpatch.pl check: CHECK: No space is necessary after a cast Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Removes multiple blank linesAmarjargal Gundjalam2015-10-272-7/+0Star
| | | | | | | | | This patch fixes the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Amarjargal Gundjalam <amarjargal.gundjalam@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Staging: slicoss: Remove unnecessary cast on void pointerShraddha Barke2015-10-171-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | void pointers do not need to be cast to other pointer types. The semantic patch used to find this: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x)[...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: use status in isrSudip Mukherjee2015-09-191-1/+2
| | | | | | | | If we are not able to setup the LINK UP command then don't increment the interrupt count. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: use status in slic_ioctlSudip Mukherjee2015-09-191-1/+2
| | | | | | | | In the ioctl function if we are not able to UP the link after setting the new parameters then return an error code to the userspace. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: use status in slic_if_initSudip Mukherjee2015-09-191-1/+16
| | | | | | | | While initializing the interface if we are not able to setup the command to UP the link then we release everything and return the error code. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: return status of slic_link_event_handlerSudip Mukherjee2015-09-191-2/+3
| | | | | | | | | | slic_link_event_handler() issues command READ_LINK_STATUS to be executed asynchronously, which is followed by UP configuration write command. But it can fail while setting up the command and in that case the link will not be up. Lets check the status and return it. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: slicoss: Add blank line after variable declarations.Ciprian Manea2015-08-011-0/+1
| | | | | | | | | | | This patch fixes the checkpatch.pl warning: WARNING: Missing a blank line after declarations + unsigned long flags; + pshmem = (struct slic_shmem *)(unsigned long) Signed-off-by: Ciprian Manea <ciprian.manea.cm@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>