Commit Graph

140325 Commits

Author SHA1 Message Date
Randy Dunlap
c1f46a001f Staging: sxg: fix napi interface build
Fix staging/sxg napi interface calls:

drivers/staging/sxg/sxg.c:1271: error: implicit declaration of function 'netif_rx_schedule_prep'
linux-next-20090209/drivers/staging/sxg/sxg.c:1272: error: implicit declaration of function '__netif_rx_schedule'
drivers/staging/sxg/sxg.c:1325: error: implicit declaration of function 'netif_rx_complete'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:12 -07:00
Mithlesh Thukral
1782199f96 Staging: sxg: Make SXG driver use MSI-X interrupts if possible
Make Sahara SXG driver use MSI-X interrupts instead of line based interrupts
if possible. In case of problems in getting MSI-X vectors or MSI-X not being
supported, driver will fall back to use previous line based interrupts.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:12 -07:00
Mithlesh Thukral
c5e5cf5a18 Staging: sxg: Removed unnecessary checks while taking Transmit Locks
Fix the locking issue of locks in transmit code path.
There was an unnecessary check for interrupt context in transmit code path.
Removed that.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:12 -07:00
Mithlesh Thukral
7c66b14b6b Staging: sxg: Add Jumbo frames support to Sahara SXG Driver
This patch adds Jumbo frame support to Sahara's SXG Driver.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:12 -07:00
Mithlesh Thukral
559990c688 Staging: sxg: Cleanup the SXG driver of unused space and functions
Miscellaneous cleanups.
* Removed unwanted spaces/lines.
* Removed unused functions.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Mithlesh Thukral
b62a294f97 Staging: sxg: Add NAPI feature to Sahara SXG Driver
* Add NAPI support for SXG driver for Alacritech's 10Gbe products.
  The driver will now work in NAPI mode by default.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Mithlesh Thukral
b040b07bb0 Staging: sxg: Add multicast support for Sahara SXG driver
* Add multicast support for SXG driver for Alacritech's 10Gbe products.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: Michael Miles <mmiles@alacritech.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Greg Kroah-Hartman
96e7088c9a Staging: sxg: fix build warnings in sxg.c
This compiles out some functions that are not being used to keep the
build clean so that we can see the "real" warnings and errors.

Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Greg Kroah-Hartman
5774538441 Staging: sxg: fix build warnings in downloadB firmware files
These variables are never used, so #ifdef them away.

This should probably be fixed up properly from someone who knows why we
are even including these files in the first place, when they do not seem
to be needed at all.

Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Greg Kroah-Hartman
aac6d7bed1 Staging: sxg: remove firmware files from sgx_ethtool.c
They are not needed here and only cause build warnings and bloat the
object file.

Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Greg Kroah-Hartman
a7c0ea6e95 Staging: sxg: fix build warnings in sxg_ethtool
This fixes some build problems with the ethtool support recently added
for the sxg driver.

This is a very good example of why you need to check the build for
warnings and then fix them...

Cc: Mithlesh Thukral <mithlesh@linsyssoft.com>
Cc: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Cc: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Mithlesh Thukral
0d41472746 Staging: sxg: Fix to load card on low memory machines
* Fix problem of crash on 50MB machine.
* Fixed dma_addr_t bug, which resolves issues on x86_32 bit machines.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Mithlesh Thukral
a3915dd88d Staging: sxg: Firmware updates
* Add new firmware and remove all firmware file.
* Add a switch to load either debug or free firmware.

Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:11 -07:00
Mithlesh Thukral
54aed11326 Staging: sxg: Add Ethtool functionality enhancement and misc cleanups
Misc. cleanups in the driver.
* Remove debugging code and variables.
* Fix compile time warnings.
* Remove debugging comments.
* Start cleanup of sxg_stats structure. This structure will eventually become
  very small

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
6a2946baa9 Staging: sxg: Locking related changes. Fix locking levels
* Fix locking related issues like taking locks at right level.
* Convert some variables to atomic, to prevent taking them while
  incrementing or decrementing them.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
d9d578bff7 Staging: sxg: SXG SGL related cleanup in data structures and code
* Cleanup in allocation of SXG_SGLs.
* Locking issues related to SglQLock.
* XmtCmd and XmtZeroLock consistency fixes.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
371d7a9e6f Staging: sxg: Ethtool framework and Receive code path changes
* Add Ethtool framework to driver
* Makefile changes to fix build redundancy.
* Fix ups to error code paths in receieve buffer allocation as well as receive code path.
* Read MAC address from FLASH/EEPROM

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
d0128aa9dc Staging: sxg: Receive code and data structure cleanups
* Cleanup in recevive buffer structure
* Drop receive data buffer as its not needed with use of skbs
* Fix error code paths in receive skb failures

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
cb636fe382 Staging: sxg: Indentation fixes - mostly 80 char lines
Fix up the indentation to Linux style. There was some indentation which was
not as per Linux style specially related to 80 char lines.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
ddd6f0a8c9 Staging: sxg: Commenting style fixes - Pending work
This patch cleans up the comment. Converts the comments to C89 style.
Fixes comment related TODO item.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
942798b462 Staging: sxg: Typedef removal - pending work
This patch removes all typedefs in the code. These were the typedefs
which are still present in driver in staging tree after the cleanup patches.

Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com>
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:10 -07:00
Mithlesh Thukral
1323e5f14a Staging: sxg: New SXG_SGL design and MAC Header changes
* This patch introduces the new SXG_SGL design.
	* Related changes to sxg_scatter_gather structure.
	* Introduced PSXG_X64_SGL changes which are x64 friendly
* Setting the MAC HEADER pointer properly in skb before giving to higher
  layers.

Signed-off-by: Michael Miles <mmiles@alacritech.com>
Signed-off-by: LinSysSoft Sahara Team <saharaproj@linsyssoft.com> 
Signed-off-by: Christopher Harrer <charrer@alacritech.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:08 -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