1
0
Fork 0
Commit Graph

97 Commits (4053036580f0423be14e79483a939a4aef48c592)

Author SHA1 Message Date
Bill Pemberton ecb4f3879d staging: slicoss: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:05:11 -08:00
Bill Pemberton a0c2feb180 staging: slicoss: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:05:01 -08:00
Bill Pemberton 2e0d79c522 staging: slicoss: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:04:59 -08:00
Devendra Naga 34ec83f4c1 staging: slicoss: fix a leak when kzalloc fail
slic_card_locate does a kzalloc of physcard, and if it fails,
in my previous patch i returned -ENOMEM, but left the driver leak
the memory if card_hostid == SLIC_HOSTID_DEFAULT,

fix this memory leak if the above condition is true

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-26 09:36:06 -07:00
Devendra Naga bae5c3d142 staging: slicoss: get rid of slic_cmdqmem_init function
this function memset's the cmdqmem, instead do it in  slic_cmdq_init.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-23 20:28:20 -07:00
Devendra Naga 1ffa3b91a2 staging: slicoss: remove default case in irqhandler
this default statement does nothing in the irqhandler, so remove it

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-23 20:28:20 -07:00
Devendra Naga 0608882d01 staging: slicoss: return -ENOMEM if kzalloc fail
this takes up the error path cleanup,
fixes a crash too due to null deref

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-23 20:28:20 -07:00
Devendra Naga 40991e4fa6 staging: slicoss: remove ASSERT macro altogether
remove ASSERT and remove all its callers altogether in the code

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 16:03:26 -07:00
Devendra Naga 670d145aa0 staging: slicoss: fail out if we dont have a valid firmware file
fail instead calling request_firmware with filename as a null string
and return -ENOENT

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-22 16:03:26 -07:00
Devendra Naga b8131fc0e1 staging: slicoss: fix a null deref when pci_alloc_consistent fail
we are dereferencing the pshmem , and the pci_alloc_consistent can fail
returning null,

do a memcpy if we have a valid pshmem

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 11:59:51 -07:00
Devendra Naga 8f6f4c17bb staging: slicoss: remove return statement at the end of slic_mcast_set_list
this function return void, means return at the end of this function
is not needed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 11:59:51 -07:00
Devendra Naga 7132996527 staging: slicoss: clean the spinlock code in slic_entry_open
the locked variable is used for checking whether the function
acquired lock, then unlock. actually with out this we
can achieve the same lock and unlock senario, remove the locked
variable and also cleanup the code around.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 11:59:51 -07:00
Devendra Naga 92adcc8057 staging: slicoss: remove default case after we done with request_firmware
we are returning -ENOENT when there is no firmware file for a matching
device id. then we start calling request_firmware,
after this we do checks on the firmware length of corresponding
device id, since the default case is handled in the begining itself
there is no need of a default case at the firmware length checks

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 11:59:51 -07:00
Devendra Naga 7ee34ab2b3 staging: slicoss: release firmware before returning
we request_firmware in slic_card_download_gbrcv and we return out
with out calling release_firmware, where we compare against a
firmware lengths of certain device ids.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:23:33 -07:00
Devendra Naga 651d4bc7ed staging: slicoss: return early before calling request_firmware with empty firmware filename
when the device id doesn't match in slic_card_download_gbrcv the filename is "",
i.e an empty name, and we try calling request_firmware with that name,
actually we can just fail out at default case before even calling request_firmware

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:23:33 -07:00
Devendra Naga d99b5ac65e staging/slicoss: disable pci device at remove
at probe we enabled the device, and we should disable it at remove.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 17:26:02 -07:00
Devendra Naga 0ab1900539 staging/slicoss: return -ENODEV if no devid matches
if no case matches we are simply asserting and doing break.
and i think we may need to return that -ENODEV , no device is
present, rather assert'ing.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 13:06:21 -07:00
Devendra Naga 2add5f4661 staging/slicoss: remove not-needed ASSERT
As the private pointer is valid at the remove of driver, and remove wont' be called if probe fails, so no point for checking of ASSERT

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-09 13:06:21 -07:00
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