Commit Graph

30 Commits (e546f485e1d7520ca0200502cdcc11b503f4805c)

Author SHA1 Message Date
Julia Lawall 324148788b Staging: Drop memory allocation cast
Drop cast on the result of kmalloc and similar functions.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
type T;
@@

- (T *)
  (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
   kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 16:06:48 -07:00
Alan Cox 69ea5fcb5e Staging: et131x: Collapse all the function definitions into one place
We have lots of tiny files right now that could be one

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:51 -08:00
Alan Cox 060a78a07a Staging: et131x: Kill off TXDMA_t
All the contents are clean so kill off the top level typedefs

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-03-03 16:42:49 -08:00
Alan Cox 42a03e98d1 Staging: et131x: kill TX_PR_NUM_DES_t
Yes folks it another unused typedef.. This completes the clean up of the
TX DMA typedefs

Signed-off-by: Alan Cox <alan@linux.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:21 -08:00
Alan Cox 1458d82b45 Staging: et131x: Bring tx into coding style
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox fb034f841d Staging: et131x: kill unused tcb fields
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox c78732ad75 Staging: et131x: Clean up tx naming
Clean up the names to be Linux like
Remove the unused pad buffer

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox 9251d71a4e Staging: et131x: Clean up the tx ring init
Keep this small change separate for bisectability

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox c1996fc2ee Staging: et131x: tidy up a bit further
Clean up the minor uglies left from the previous work

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox 116badfe08 Staging: et131x: Remove old SendWaitQueue code
The Linux driver doesn't keep a pending queue as the old one did. so we can
remove all the code related to it.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:07 -08:00
Alan Cox 9c60684b72 Staging: et131x: pci_alloc_consistent DMA alignment is guaranteed
So we can remove this alignment work.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:06 -08:00
Alan Cox b711b2e0fa Staging: et131x: tidy up names for the TX structures
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:06 -08:00
Alan Cox fb70ed6710 Staging: et131x: clean up WORD2 usage
A little more complex but again move the structure and typedef into into the
documentation

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:06 -08:00
Alan Cox b44207ab43 Staging: et131x: clean up word 3 definition
This is basically not really used so turn it into a u32 and comment the
format for reference

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:06 -08:00
Alan Cox 5f1377d42b Staging: et131x: PHY loopback cannot be set (and isn't useful for us anyway)
Remove the stuff that falls out from this always being zero.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:06 -08:00
Alan Cox 7f2bf9488d Staging: et131x: Kill the NoPhyAccess variable
Another write once "variable"

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 12:23:05 -08:00
Alan Cox bcb903fa30 Staging: et131x: kill off the TXDMA CSR type
Go to a u32 and masks

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:29 -07:00
Alan Cox 15700039b1 Staging: et131x: prune all the debug code
We don't need it, we have a perfectly good set of debug tools. For this pass
keep a few debug printks around which are "should not happen" items

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:29 -07:00
Alan Cox f6b35d66cf Staging: et131x: clean up MP_FLAG macros
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:28 -07:00
Alan Cox 356c74b401 Staging: et131x: clean up DMA10/DMA4 types
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:28 -07:00
Alan Cox 9fa8109921 Staging: et131x: de-hungarianise a bit
bOverrideAddress is write only so kill it rather than fix it

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:27 -07:00
Alan Cox c2557177f1 Staging: et131x: clean up constant rx/tx registry fields
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:27 -07:00
Alan Cox 3bc9da3ed4 Staging: et131x: Eliminate RegistryDMA Cache
One writer, of a constant, one user .. it can go.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:27 -07:00
Alan Cox f3f415a3b4 Staging: et131x: CSRAddress to regs
Switch this to a Linux like naming as it occurs all over.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:27 -07:00
Alan Cox 817550815e Staging: et131x: MPSend macros
Most are unused, one is used and can be replaced with the definition

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:27 -07:00
Alan Cox 3762860666 Staging: et131x: spinlocks
Switch to the more normal "flags" naming. Also fix up the nested use of
spin_lock_irqsave

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:26 -07:00
Alan Cox 25ad00bba4 Staging: et1310: kill pAdapter in favour of a sane name
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:02:26 -07:00
Alan Cox 64f930361b Staging: et1310: Fix the coding style
UTF-8 for copyright symbols etc included. Typedefs and anything else which
would cause actual code changes skipped.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:26 -07:00
Johann Felix Soden 4eb0068b06 Staging: et131x: remove unused variable in et1310_tx.c
The 'pPacket' variable is assigned, but never used. Remove it.

Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:08 -08:00
Greg Kroah-Hartman cfb739b459 Staging: add et131x network driver
This is a driver for the ET1310 network device.

Based on the driver found at https://sourceforge.net/projects/et131x/

Cleaned up immensely by Olaf Hartman <o.hartmann@telovital.com> and Christoph
Hellwig <hch@infradead.org>

Note, the powermanagement options were removed from the vendor provided
driver as they did not build properly at the time.

TODO:
	- kernel coding style cleanups
	- forward port for latest network driver changes
	- kill useless typecasts (e.g. in et1310_phy.c)
	- alloc_etherdev is initializing memory with zero?!?
	- add_timer call in et131x_netdev.c is correct?
	- Add power saving functionality (suspend, sleep, resume)
	- Implement a few more kernel Parameter (set mac )

Cc: Olaf Hartmann <o.hartmann@telovital.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dean Adams <dadams1969@gmail.com>
Cc: Victor Soriano <vjsoriano@agere.com>
Cc: Andre-Sebastian Liebe <andre@lianse.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-10 15:31:07 -07:00