Commit Graph

179 Commits

Author SHA1 Message Date
Justin P. Mattock 493b67b73c staging: slicoss: Fix a typo.
The below patch fixes a typo found while reading through staging/slicoss

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:23:52 -07:00
Greg Kroah-Hartman 2140dc9ce7 staging: clean up Greg's email address in some TODO files
My old email address was in some TODO files, so this fixes that issue.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-15 14:45:40 -08:00
Randy Dunlap 07de7a5ecb staging: slicoss depends on NET
The slicoss driver uses network interfaces so it should depend
on NET.  Fixes the following build errors:

ERROR: "eth_change_mtu" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "eth_validate_addr" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "register_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "alloc_etherdev_mqs" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "netif_rx" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "skb_put" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "skb_pull" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "free_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "consume_skb" [drivers/staging/slicoss/slicoss.ko] undefined!
ERROR: "dev_kfree_skb_irq" [drivers/staging/slicoss/slicoss.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-18 15:00:48 -08:00
Linus Torvalds edb34a4dbd Remove stale "depends on NETDEV_1000"in staging drivers
Mark Einon points out that the Kconfig option for NETDEV_1000 no longer
exists, and the merge of the staging drivers should have removed that
for the et131x driver.

And while checking for it, I noticed that slicoss had the same stale
dependency.  Remove that one too.

Reported-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-26 17:21:19 +02:00
Jiri Pirko afc4b13df1 net: remove use of ndo_set_multicast_list in drivers
replace it by ndo_set_rx_mode

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-08-17 20:22:03 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Vasiliy Kulikov 20caa14c59 staging: slicoss: use free_netdev(netdev) instead of kfree()
Freeing netdev without free_netdev() leads to net, tx leaks.
I might lead to dereferencing freed pointer.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

@@
struct net_device* dev;
@@

-kfree(dev)
+free_netdev(dev)

Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
Acked-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-30 04:14:21 -07:00
Denis Kirjanov 1033f1f7ef Staging: slicoss: Remove explicit arch dependencies
Remove explicit arch dependencies

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 11:52:28 -07:00
Denis Kirjanov 9092de6df3 Staging: slicoss: Remove net_device_stats from the driver's private
Remove net_device_stats from the driver's private.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-02 18:25:26 -07:00
Denis Kirjanov 4d6ea9c322 Staging: slicoss: kill functions prototypes and reorder functions
Reorder functions to kill their prototypes.

Signed-off-by: Denis Kirjanov <dkirjanov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-22 11:05:20 -07:00
Kulikov Vasiliy 78af7f826b staging: slicoss: error handling with goto
This patch makes error handling more readable due to 'goto err' pattern.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Cc: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:16:43 -07:00
Kulikov Vasiliy 3746bfd51d staging: slicoss: error handling with goto
This patch makes error handling more readable due to 'goto err' pattern.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Cc: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:16:43 -07:00
Kulikov Vasiliy 9020dea380 staging: slicoss: Remove STATUS_XXX defines.
Remove defines of STATUS_XXX from header file.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Cc: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:16:43 -07:00
Kulikov Vasiliy d19397860a staging: slicoss: Change return codes to -EYYY.
Change defined STATUS_XXX return codes to standard -EYYY.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Cc: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-07-08 13:16:43 -07:00
Jiri Pirko 22bedad3ce net: convert multicast list to list_head
Converts the list and the core manipulating with it to be the same as uc_list.

+uses two functions for adding/removing mc address (normal and "global"
 variant) instead of a function parameter.
+removes dev_mcast.c completely.
+exposes netdev_hw_addr_list_* macros along with __hw_addr_* functions for
 manipulation with lists on a sandbox (used in bonding and 80211 drivers)

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-03 14:22:15 -07:00
Greg Kroah-Hartman f341dddf1d Staging: merge staging patches into Linus's main branch
There were a number of patches that went into Linus's
tree already that conflicted with other changes in the
staging branch.  This merge resolves those merge conflicts.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-04 08:39:02 -08:00
Joe Perches c7e10c9956 Staging: Fix continuation line formats
String constants that are continued on subsequent lines with \
are not good.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:55 -08:00
Ben Hutchings 5d929a7190 staging: declare MODULE_FIRMWARE in various drivers
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:43 -08:00
kirjanov@gmail.com a5c252411f staging: slicoss Use pci_set_consistent_dma_mask.
Use pci_set_consistent_dma_mask() in the case of 64-bit consistent allocations.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com 30ae835f89 staging: slicoss Use compare_ether_addr.
Use compare_ether_addr.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com 5d372900aa staging: slicoss Use PCI_DEVICE_TABLE.
Use PCI_DEVICE_TABLE: defines array as const and puts
it into the __devinitconst section.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com 6c7aeb654d staging: slicoss Use dev->stats rather than adapter->stats.
Use dev->stats rather than adapter->stats.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com d9c057ab0b staging: slicoss No need to check pointer in debugfs_remove()
No need to check pointer expicitly since it has been done in debugfs_remove()

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com f8771fa67d staging: slicoss No need type casting when using netdev_priv
No need type casting when using netdev_priv.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com a71b997881 staging: slicoss Check for valid hw address
Check for valid hw address.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
kirjanov@gmail.com 203fe0d2e9 staging: slicoss Convert to netdev_tx_t
Convert to netdev_tx_t.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:28 -08:00
Jiri Pirko d59079425f staging: convert to use netdev_for_each_mc_addr
removed needless checks in arlan-main.c and slicoss.c
fixed bug in et131x_netdev.c to actually fill addresses in.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-18 14:47:51 -08:00
Jiri Pirko 4cd24eaf0c net: use netdev_mc_count and netdev_mc_empty when appropriate
This patch replaces dev->mc_count in all drivers (hopefully I didn't miss
anything). Used spatch and did small tweaks and conding style changes when
it was suitable.

Jirka

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-02-12 11:38:58 -08:00
Julia Lawall 72c71f4827 Staging: slicoss: remove duplicate structure field initialization
The definition of slic_netdev_ops has initializations of a local function
and eth_mac_addr for its ndo_set_mac_address field.  This change uses only
the local function.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier I, s, fld;
position p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@s@
identifier I, s, r.fld;
position r.p0,p;
expression E;
@@

struct I s =@p0 { ... .fld@p = E, ...};

@script:python@
p0 << r.p0;
fld << r.fld;
ps << s.p;
pr << r.p;
@@

if int(ps[0].line)!=int(pr[0].line) or int(ps[0].column)!=int(pr[0].column):
  cocci.print_main(fld,p0)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:05 -08:00
Stoyan Gaydarov b6ac161364 Staging: ARRAY_SIZE changes
These changes were a direct result of using a semantic patch
More information can be found at http://www.emn.fr/x-info/coccinelle/

Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:06 -07:00
Patrick McHardy 6ed106549d net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functions
This patch is the result of an automatic spatch transformation to convert
all ndo_start_xmit() return values of 0 to NETDEV_TX_OK.

Some occurences are missed by the automatic conversion, those will be
handled in a seperate patch.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-05 19:16:04 -07:00
Greg Kroah-Hartman 04b17c935b Staging: slicoss: fix build warnings
This fixes some build warnings in the slicoss driver.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Jean Delvare b0f434a7e9 Staging: slicoss: Add missing __devexit_p()
The remove function uses __devexit, so the .remove assignment needs
__devexit_p() to fix a build error with hotplug disabled.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:55 -07:00
Stephen Hemminger 1a92e82a86 staging: slicoss: update README
I looked, I gagged, I left

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:31 -07:00
Lior Dotan f7ed550b3e Revert Staging: SLICOSS: use gfp_kernel where possible
Revert commit 2bb347361e

This commit has been reported to cause problems:
  Mar 24 11:50:31 linuxdev kernel: BUG: sleeping function called from invalid context at mm/slub.c:1599 Mar 24 11:50:31 linuxdev kernel: in_atomic(): 1, irqs_disabled(): 0, pid: 3251, name: avahi-daemon

Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:27 -07:00
Alexander Beregalov 79bd1096bb Staging: slicoss: convert to netdev_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-17 11:06:25 -07:00
Yang Hongyang 6a35528a83 dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)
Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)

Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-07 08:31:10 -07:00
Greg Kroah-Hartman 976c032faa Staging: slicoss: slichw.h cleanup
Lots of spaces->tabs cleanups for slichw.h

It's much more sane and "Linux-like" now.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -07:00
Greg Kroah-Hartman a750c1c525 Staging: slicoss: delete slicdbg.h
Move the ASSERT macro into slicoss.c as that's all that is currently
being used.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -07:00
Greg Kroah-Hartman 8665b18474 Staging: slicoss: remove ASSERTMSG macro
No one uses it, so drop it.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -07:00
Greg Kroah-Hartman 4bee4f6034 Staging: slicoss: remove DBG_ERROR macro
Use the dev_err() call instead, it is the standard and provides much
more information.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -07:00
Greg Kroah-Hartman e5bac59803 Staging: slicoss: remove SLICLEVEL and SLIC_DISPLAY macros
They aren't needed or used anymore.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -07:00
Greg Kroah-Hartman e52011e476 Staging: slicoss: remove SLIC_ETHTOOL_SUPPORT
It was always enabled, so just always use it.

Cleaned up the ioctl code a bit as well to make it more readable.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman e8bc9b7a20 Staging: slicoss: remove DBG_MSG
It's not being used for anything, so delete it and all instances of it.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman 47881dd946 Staging: slicoss: remove VALID_ADDRESS macro
It's quite wierd, and doesn't even do anything on x86_64, so just delete
it.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman a0a1cbef86 Staging: slicoss: remove SLIC_PING_TIMER_ENABLED
It was always enabled, so just enable it properly.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman 04ac01caa6 Staging: slicoss: remove LINUX_FREES_ADAPTER_RESOURCES
It was always enabled, so just enable it and take out the one place it
was being used.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman 0fba1a954d Staging: slicoss: remove SLIC_POWER_MANAGEMENT_ENABLED
It was always disabled, so just remove it and the 2 lines of
code it was protecting.

Also remove SLIC_POWER_MANAGEMENT which was also disabled, yet
was never used.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman e9ef456ebc Staging: slicoss: add proper KERN_DEBUG to 2 printks
Added bonus is this fixes a compiler warning on 4.3.3

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman 3467db1078 Staging: slicoss: remove SLIC_GET_STATS_ENABLED
It was always enabled, so just turn on the code that was being always
enabled, and remove the #define.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:07 -07:00
Greg Kroah-Hartman 77faefa330 Staging: slicoss: delete slicinc.h
Putting static function prototypes in a .h file doesn't make much sense.
Move the ones that we need into the .c file and delete the rest.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman c6bc6cd23a Staging: slicoss: remove SLIC_GET_STATS_TIMER_ENABLED
SLIC_GET_STATS_TIMER_ENABLED was never defined, so remove the code that
was bound by it.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman 7f75d4739c Staging: slicoss: clean up SLIC_DUMP_ENABLED
As SLIC_DUMP_ENABLED was disabled, remove the code that it was keeping
from being built as it was not ever used.  This removed a lot.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman e1ecad2794 Staging: slicoss: delete slicbuild.h
It was just duplicating the same #defines already in the .c file
and it wasn't even being #included in any file.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman e397491dca Staging: slicoss: remove unused #defines
There are a number of "config" defines that do nothing, remove them.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman f95739b1bf Staging: slicoss: remove slic_os.h
It's no longer needed, and empty, so remove it.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman 62f691a3b3 Staging: slicoss: remove WRITE_REG wrapper
It's not needed, so just call the function instead of using a define.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:06 -07:00
Greg Kroah-Hartman 28980a3c29 Staging: slicoss: remove WRITE_REG64 wrapper
It's not needed, so just call the function instead of using a define.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Greg Kroah-Hartman 5969ca00a2 Staging: slicoss: remove DEBUG_REGISTER_TRACE
It's not ever defined, so remove it from the code base.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Greg Kroah-Hartman db7a673a66 Staging: slicoss: remove jiffies macros
Use the ones built into the kernel, don't reinvent the wheel.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Greg Kroah-Hartman b574488e42 Staging: slicoss: remove TRUE/FALSE usage
Don't use TRUE and FALSE, we have proper boolean types in the kernel.

Cc: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Lior Dotan 2bb347361e Staging: SLICOSS: use gfp_kernel where possible
Use GFP_KERNEL instead of GFP_ATOMIC where possible.

Signed_off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Lior Dotan 1025744a6c Staging: SLICOSS: free resources on entry_probe error path
Call pci_disable_device() and free_netdev() if slic_entry_probe fails.

Signed_off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Lior Dotan a390c47939 Staging: slicoss: add binary firmware to firmware directory
Adds the firmware to the firmware directory in ihex format so it can be
installed when doing make firmware_install.

Also update the firmware location in the driver code so it can locate
the files in the right place.

This should conclude the move to request_firmware().

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:05 -07:00
Lior Dotan 9d938335fd Staging: SLICOSS: remove the static firmware header files
Remove the static headers with the firmware code, they are no longer needed.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:04 -07:00
Lior Dotan 874073ea29 Staging: slicoss: use request_firmware
This patch uses request_firmware() to download the firmware to the card.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
2009-04-03 14:53:04 -07:00
Lior Dotan 470c5736ff Staging: slicoss: use request_firmware
This should make the driver use request_firmware() instead of a static
firmware.
Some obvious things are missing:
1) The unneeded header files are not removed yet. This is to keep the
   patch size small.
2) The .bin files are missing so the driver doesn't have what to load.
3) Testing. None of this was tested. It does compiles OK though :)

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Lior Dotan 66615321f5 Staging: slicoss: use correct type for memory allcations
Fix sizeof to use the right type

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Lior Dotan 7c7e18790c Staging: slicoss: use kzalloc
This patch uses kzalloc() where really applicable.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Wang Chen 4bcd426796 staging-slicoss: Kill directly reference of netdev->priv
Simply replace netdev->priv with netdev_priv().

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-06 23:59:10 -08:00
Lior Dotan 786ed801ac Staging: SLICOSS: Free multicast list at driver exit
The multicast address list is allocated in slic_mcast_add_list() but
never freed.

Signed-off-by: Lior Dotan <liodot@gmail.com>
2008-10-22 09:56:37 -07:00
Huang Weiyi 58be3fb09b Staging: SLICOSS: remove unused #include <version.h>
The file(s) below do not use LINUX_VERSION_CODE nor KERNEL_VERSION.
  drivers/staging/slicoss/slicoss.c

This patch removes the said #include <version.h>.

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:32 -07:00
Huang Weiyi f39277d761 Staging: SLICOSS: remove duplicated #include's
Removed duplicated #include's in drivers/staging/slicoss/slicoss.c.
  linux/delay.h
  linux/etherdevice.h
  linux/init.h
  linux/netdevice.h
  linux/pci.h
  linux/skbuff.h
  linux/slab.h
  linux/string.h

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:30 -07:00
Mariusz Kozlowski dffe5a5d97 staging: fix potential build error in slicoss driver
This hides under DEBUG_REGISTER_TRACE so probably
not visible to many people.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-22 09:56:29 -07:00
Lior Dotan f25fda728d Staging: SLICOSS: Call pci_release_regions at driver exit
slic_entry_probe() calls pci_request_regions() but there's no matching
pci_release_regions() at driver's exit or if slic_entry_probe() fails.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:14 -07:00
Lior Dotan 68cf95f318 Staging: SLICOSS: Fix remaining type names
Fix the remaining variables that still had '_t' as a postfix and also
a couple of checkpatch warnings.

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:13 -07:00
Lior Dotan 4578ca0fc2 Staging: SLICOSS: Fix warnings due to static usage
Fix a few warning messages that crept in due to conversion of all the
functions to static

Signed-off-by: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:13 -07:00
Lior Dotan e9eff9d6a0 Staging: SLICOSS: lots of checkpatch fixes
Major cleanups of checkpatch warnings from the slicoss driver.

From: Lior Dotan <liodot@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:13 -07:00
Greg Kroah-Hartman 4d6f6af8d6 Staging: add Alacritech slicoss network driver
This adds the Alacritech slicoss driver to the tree.

This driver is supposed to support:

	Mojave cards (single port PCI Gigabit) both copper and fiber
	Oasis cards (single and dual port PCI-x Gigabit) copper and fiber
	Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber

The driver was acutally tested on Oasis and Kalahari cards.

TODO:
	- move firmware loading to request_firmware()
	- remove direct memory access of structures
	- any remaining sparse and checkpatch.pl warnings
	- any netdev recommended changes

Many thanks to Lior Dotan <liodot@gmail.com> for help with the cleanup
of this driver.

Cc: Lior Dotan <liodot@gmail.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:07 -07:00