aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/slicoss
AgeCommit message (Collapse)AuthorFilesLines
2016-12-06staging: slicoss: remove the staging driverGreg Kroah-Hartman7-4406/+0
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 <[email protected]> Cc: Christopher Harrer <[email protected]> Cc: David Miller <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-29staging: slicoss: remove UPDATE_STATS_GB macro and inline codeSergio Paracuellos2-32/+25
This patch removes UPDATE_STATS_GB macro in slic.h header file and just inline code. This improve readability. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-29staging: slicoss: remove not used UPDATE_STATS macroSergio Paracuellos1-8/+0
This patch remove UPDATE_STATS macro from header slic.h which is not being used. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-23staging: slicoss: change some macros into inline functionsSergio Paracuellos2-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-21staging: slicoss: fix different address space warningsSergio Paracuellos1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: avoid CamelCases slicoss.cSergio Paracuellos1-14/+14
Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: avoid CamelCases in slichw.hSergio Paracuellos2-117/+117
Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: braces should be used on all arms of this statementSergio Paracuellos1-2/+2
Add braces in if statement to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: logical continuations should be on the previous lineSergio Paracuellos1-2/+2
Move logical or operator to previous line to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: fix parenthesis alignment in slicoss.cSergio Paracuellos1-35/+33
This patch fix open parenthesis alignment matching in slicoss.c file to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-11-19staging: slicoss: avoid CamelCases in slic.hSergio Paracuellos2-40/+40
Replace CamelCases to comply with the standard kernel coding style. Signed-off-by: Sergio Paracuellos <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-10-25staging: slicoss: replace memcpy_fromio with memcpyRyan Swan1-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 <[email protected]> Reviewed-by: Lino Sanfilippo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-27staging: slicoss: cleaning up codestyle warningsGrygorii Maistrenko1-4/+4
This removes checkpatch.pl warnings: WARNING: Block comments should align the * on each line Signed-off-by: Grygorii Maistrenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-22staging: slicoss: Move NULL test closer to assignmentRehas Sachdeva1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-16staging: slicoss: Remove unnecessary braces {}Rehas Sachdeva1-3/+2
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-16staging: slicoss: Remove blank lines before & after bracesRehas Sachdeva1-3/+0
Removes unnecessary blank lines after an opening brace '{' and before a closing brace '}'. Issue detected by checkpatch.pl. Signed-off-by: Rehas Sachdeva <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-16staging: slicoss: Remove unnecessary blank lineRehas Sachdeva1-1/+0
Removes unnecessary blank line detected by checkpatch. Signed-off-by: Rehas Sachdeva <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-13staging: slicoss: add new line after struct declarationGargi Sharma1-0/+1
checkpatch generates a warning for no blank line after struct declaration. Inserted a new line. Signed-off-by: Gargi Sharma <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-09-01staging: slicoss: constify ethtool_ops structuresJulia Lawall1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: simplify struct for statisticsLino Sanfilippo3-120/+47
Merge several structures for statistics to one structure and remove unnecessary union nesting. Signed-off-by: Lino Sanfilippo <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: improve implementation concerning the shared memoryLino Sanfilippo2-149/+136
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: dont use a structure but offsets for register accessesLino Sanfilippo3-423/+120
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: avoid PCI write postingLino Sanfilippo2-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: introduce register accessors that use register offsetsLino Sanfilippo3-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: start tx queue when interface is brought upLino Sanfilippo1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: ensure mapping of io-memory is uncachedLino Sanfilippo1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: notifiy network stack about change in link stateLino Sanfilippo1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-08-21staging: slicoss: handle allocation failure in slic_init_adapterLino Sanfilippo1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-29staging: slicoss: fix missing blank lineClifton Barnes1-0/+1
fix checkpatch.pl warning about 'Missing a blank line after declarations' Signed-off-by: Clifton Barnes <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-04-29staging: slicoss: fix bare use of 'unsigned'Clifton Barnes1-1/+1
fix checkpatch.pl warning about 'Prefer 'unsigned int' to bare use of 'unsigned'' Signed-off-by: Clifton Barnes <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-28staging: slicoss: Add error check for pci_map_singleAmitoj Kaur Chawla1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: changes comparisons to NULL in slicoss.cBen Marsh1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: removes unnecessary blank lines in slicoss.cBen Marsh1-2/+0
This is a patch to slicoss.c to remove unnecessary blank lines as found by checkpatch.pl Signed-off-by: Ben Marsh <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: change memory allocation style in slicoss.cBen Marsh1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: changes the style of memory allocation in slicoss.cBen Marsh1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: changes memory allocation style in slicoss.cBen Marsh1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11Staging: slicoss: memory allocation style change in slicoss.cBen Marsh1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-03-11staging: slicoss: Eliminate commented out codeJanani Ravichandran1-16/+1
Remove commented out code to reduce code clutter. Signed-off-by: Janani Ravichandran <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-11staging: slicoss: Align #define constantsJanani Ravichandran1-3/+3
Aligning the constants in the macros improves code readability. Signed-off-by: Janani Ravichandran <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06staging/slicoss: Use ethtool_ops instead of module_param.Kevin Wern2-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-27staging: slicoss: Fixes block comment styleAmarjargal Gundjalam3-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-27staging: slicoss: Adds space around operatorsAmarjargal Gundjalam2-3/+3
This patch fixes the checkpatch.pl check: CHECK: spaces preferred around that ‘’ Signed-off-by: Amarjargal Gundjalam <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-27staging: slicoss: Removes unnecessary space after a castAmarjargal Gundjalam1-18/+18
This patch fixes the checkpatch.pl check: CHECK: No space is necessary after a cast Signed-off-by: Amarjargal Gundjalam <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-27staging: slicoss: Removes multiple blank linesAmarjargal Gundjalam2-7/+0
This patch fixes the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Amarjargal Gundjalam <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-10-16Staging: slicoss: Remove unnecessary cast on void pointerShraddha Barke1-5/+4
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-18staging: slicoss: use status in isrSudip Mukherjee1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-18staging: slicoss: use status in slic_ioctlSudip Mukherjee1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-18staging: slicoss: use status in slic_if_initSudip Mukherjee1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-09-18staging: slicoss: return status of slic_link_event_handlerSudip Mukherjee1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-07-31staging: slicoss: Add blank line after variable declarations.Ciprian Manea1-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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>