summaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea.h
Commit message (Collapse)AuthorAgeFilesLines
* ehea/ibm*: Move the IBM driversJeff Kirsher2011-08-111-504/+0
| | | | | | | | | | | | | | | | | | | Move the IBM drivers into drivers/net/ethernet/ibm/ and make the necessary Kconfig and Makefile changes. - Renamed ibm_new_emac to emac - Cleaned up Makefile and Kconfig options which referred to IBM_NEW_EMAC to IBM_EMAC - ibmlana driver is a National Semiconductor SONIC driver so it was not moved CC: Christoph Raisch <raisch@de.ibm.com> CC: Santiago Leon <santil@linux.vnet.ibm.com> CC: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: David Gibson <dwg@au1.ibm.com> CC: Kyle Lucke <klucke@us.ibm.com> CC: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ehea: do vlan cleanupJiri Pirko2011-07-211-1/+0
| | | | | | | | - unify vlan and nonvlan rx path - kill port->vgrp and ehea_vlan_rx_register Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Increase the skb array usageBreno Leitao2011-01-111-1/+1
| | | | | | | | | | | Currently the skb array is not fully allocated, and the allocation is done as it's requested, which is not the expected way. This patch just allocate the full skb array at driver initialization. Also, this patch increases ehea version to 107. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Use the standard logging functionsJoe Perches2010-12-131-13/+0
| | | | | | | | | | | | Remove ehea_error, ehea_info and ehea_debug macros. Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate. Fix messages to use trailing "\n", some messages had an extra one as the old ehea_<level> macros added a trailing "\n". Coalesced long format strings. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: kill unused ehea_rereg_mr_taskTejun Heo2010-12-121-2/+0
| | | | | | | | | ehea_rereg_mr_task is not used. Remove it and drop @work parameter from ehea_rereg_mrs(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Breno Leitao <leitao@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org
* Revert "ehea: Use the standard logging functions"David S. Miller2010-12-061-0/+13
| | | | | | | | This reverts commit 539995d18649023199986424d140f1d620372ce5. As reported by Stephen Rothwell, this breaks the build. Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Use the standard logging functionsJoe Perches2010-12-061-13/+0
| | | | | | | | | | | | | | Remove ehea_error, ehea_info and ehea_debug macros. Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate. Fix messages to use trailing "\n", some messages had an extra one as the old ehea_<level> macros added a trailing "\n". Coalesced long format strings. Uncompiled/untested. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Breno Leitao<leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Fixing statisticsBreno Leitao2010-10-271-0/+2
| | | | | | | | | | | | | | | | | (Applied over Eric's "ehea: fix use after free" patch) Currently ehea stats are broken. The bytes counters are got from the hardware, while the packets counters are got from the device driver. Also, the device driver counters are resetted during the the down process, and the hardware aren't, causing some weird numbers. This patch just consolidates the packets and bytes on the device driver. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: converting msleeps to waitqueue on check_sqs() functionBreno Leitao2010-10-051-0/+1
| | | | | | | Removing the msleep() call in check_sqs() function, and replacing by a wait queue. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: using wait queues instead of msleep on ehea_flush_sqBreno Leitao2010-10-051-0/+1
| | | | | | | | | This patch just remove a msleep loop and change to wait queue, making the code cleaner. Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-08-211-1/+2
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * ehea: Fix synchronization between HW and SW send queueAndre Detsch2010-08-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ehea: Fix synchronization between HW and SW send queue When memory is added to / removed from a partition via the Memory DLPAR mechanism, the eHEA driver has to do a couple of things to reflect the memory change in its own IO address translation tables. This involves stopping and restarting the HW queues. During this operation, it is possible that HW and SW pointer into these queues get out of sync. This results in a situation where packets that are attached to a send queue are not transmitted immediately, but delayed until further X packets have been put on the queue. This patch detects such loss of synchronization, and resets the ehea port when needed. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Andre Detsch <adetsch@br.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | of/device: Replace struct of_device with struct platform_deviceGrant Likely2010-08-061-2/+2
|/ | | | | | | | | | | | | | | | of_device is just an alias for platform_device, so remove it entirely. Also replace to_of_device() with to_platform_device() and update comment blocks. This patch was initially generated from the following semantic patch, and then edited by hand to pick up the bits that coccinelle didn't catch. @@ @@ -struct of_device +struct platform_device Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: David S. Miller <davem@davemloft.net>
* ehea: Fix kernel deadlock in DLPAR-mem processingJan-Bernd Themann2010-06-161-1/+1
| | | | | | | | | | | Port reset operations and memory add/remove operations need to be serialized to avoid a kernel deadlock. The deadlock is caused by calling the napi_disable() function twice. Therefore we have to employ the dlpar_mem_lock in the ehea_reset_port function as well Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: fix possible DLPAR/mem deadlockThomas Klein2010-04-211-1/+1
| | | | | | | Force serialization of userspace-triggered DLPAR/mem operations Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Fix napi list corruption on ifconfig downHannes Hering2009-08-041-1/+1
| | | | | | | | This patch fixes the napi list handling when an ehea interface is shut down to avoid corruption of the napi list. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* trivial: fix typos s/paramter/parameter/ and s/excute/execute/ in ↵Martin Olsson2009-06-121-1/+1
| | | | | | | documentation and source comments. Signed-off-by: Martin Olsson <martin@minimum.se> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* ehea: fix invalid pointer accessHannes Hering2009-05-041-1/+1
| | | | | | | | | This patch fixes an invalid pointer access in case the receive queue holds no pointer to the next skb when the queue is empty. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: fix circular locking problemJan-Bernd Themann2009-03-131-1/+1
| | | | | | | | This patch fixes the circular locking problem by changing the locking strategy concerning the logging of firmware handles. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Fix memory hotplug handlingThomas Klein2009-02-201-1/+1
| | | | | | | | Added missing set_bit() to disable data transfer when a memchange notification is handled Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Fix: Remove adapter from adapter list in error pathHannes Hering2009-02-111-1/+1
| | | | | | | | Remove adapter from adapter list before freeing data structure in error path. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Use net_device_ops structureThomas Klein2009-01-211-1/+1
| | | | | | | Adapt to lately introduced net_device_ops structure. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net/ehea: bitops work on unsigned longsStephen Rothwell2009-01-051-2/+1
| | | | | | | | | | | | | | | The flags field of struct ehea_port is only used with test_bit(), clear_bit() and set_bit() and these interfaces only work on "unsigned long"s, so change the field to be an "unsigned long". Also, this field only has two bits defined for it (0 and 1) so will still be fine if someone builds this driver for a 32 bit arch (at least as far as this flags field is concerned). Also note that ehea_driver_flags is only used in ehca_main.c, so make it static in there. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Fix some whitespace issuesHannes Hering2008-11-061-1/+1
| | | | | | | This patch removes some trailing whitespaces and spaces before tabs. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: Detect 16GB hugepages for firmware restrictionThomas Klein2008-10-271-1/+1
| | | | | | | | | | | | All kernel memory which is used for kernel/hardware data transfer must be registered with firmware using "memory regions". 16GB hugepages may not be part of a memory region due to firmware restrictions. This patch modifies the walk_memory_resource callback fn to filter hugepages and add only standard memory to the busmap which is later on used for MR registration. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: Fix memory hotplug supportHannes Hering2008-10-221-1/+1
| | | | | | | | | | This patch implements the memory notifier to update the busmap instantly instead of rebuilding the whole map. This is necessary because walk_memory_resource provides different information than required during memory hotplug. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: Enable DLPAR memory removeHannes Hering2008-09-241-2/+2
| | | | | | | | This patch adds the capability flag to the capability list for dynamic LPAR memory remove to enable this feature. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: fix race conditionJan-Bernd Themann2008-07-041-2/+4
| | | | | | | | | | | When ehea_stop is called the function cancel_work_sync(&port->reset_task) is used to ensure that the reset task is not running anymore. We need an additional flag to ensure that it can not be scheduled after this call again for a certain time. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: fix might sleep problemJan-Bernd Themann2008-07-041-1/+1
| | | | | | | | | | A mutex has to be replaced by spinlocks as it can be called from a context which does not allow sleeping. The kzalloc flag GFP_KERNEL has to be replaced by GFP_ATOMIC for the same reason. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* ehea: Add DLPAR memory remove supportHannes Hering2008-05-131-5/+22
| | | | | | | | | The eHEA driver uses the recently modified walk_memory_resource for powerpc functionality to detect the memory layout. It further uses the memory hotplug notifiers to catch memory hotplug events. Signed-off-by: Hannes Hering <hering2@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* Merge branch 'master' of ↵David S. Miller2008-04-141-1/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
| * ehea: Fix DLPAR memory add supportThomas Klein2008-04-121-1/+2
| | | | | | | | | | | | | | | | This patch fixes two weaknesses in send/receive packet handling which may lead to kernel panics during DLPAR memory add operations. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
* | netdev: ehea: port_lock semaphore to mutexDaniel Walker2008-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the port_lock to a mutex. There is also some additional cleanup. The line length inside the ehea_rereg_mrs was getting long so I made some adjustments to shorten them. [akpm@linux-foundation.org: dec99ification] Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | netdev: ehea: bcmc_regs semaphore to mutexDaniel Walker2008-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Convert the ehea_bcmc_regs.lock to a mutex. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* | netdev: ehea: ehea_fw_handles semaphore to mutexDaniel Walker2008-03-281-1/+1
|/ | | | | | | | | | | Converted the ehea_fw_handles.lock to a mutex. Signed-off-by: Daniel Walker <dwalker@mvista.com> Cc: Christoph Raisch <raisch@de.ibm.com> Cc: Jan-Bernd Themann <themann@de.ibm.com> Cc: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: Fix IPv6 supportThomas Klein2008-03-251-1/+1
| | | | | | | Indicate that HEA calculates IPv4 checksums only Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: add kdump supportThomas Klein2008-02-231-1/+33
| | | | | | | | | | | | This patch adds kdump support to the ehea driver. As the firmware doesn't free resource handles automatically, the driver has to run an as simple as possible free resource function in case of a crash shutdown. The function iterates over two arrays freeing all resource handles which are stored there. The arrays are kept up-to-date during normal runtime. The crash handler fn is triggered by the recently introduced PPC crash shutdown reg/unreg functions. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: fix ehea.h checkpatch complaintsDoug Maxey2008-02-031-0/+3
| | | | | | | Cc: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Doug Maxey <dwm@austin.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: Reworked rcv queue handling to log only fatal errorsThomas Klein2007-11-231-1/+1
| | | | | | | Prevent driver from brawly logging packet checksum errors. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: Improve tx packets countingThomas Klein2007-11-231-1/+1
| | | | | | | Using own tx_packets counter instead of firmware counters. Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: add kexec supportJan-Bernd Themann2007-10-291-1/+1
| | | | | | | | | | eHEA resources that are allocated via H_CALLs have a unique identifier each. These identifiers are necessary to free the resources. A reboot notifier is used to free all eHEA resources before the indentifiers get lost, i.e before kexec starts a new kernel. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: fix port_napi_disable/enableJan-Bernd Themann2007-10-251-1/+1
| | | | | | | napi_disable / napi_enable must be applied on all ehea queues. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [POWERPC] ibmebus: Move to of_device and of_platform_driver, match eHCA and ↵Joachim Fenkes2007-10-171-1/+1
| | | | | | | | | | | | | | eHEA drivers Replace struct ibmebus_dev and struct ibmebus_driver with struct of_device and struct of_platform_driver, respectively. Match the external ibmebus interface and drivers using it. Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Roland Dreier <rolandd@cisco.com> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* ehea: use kernel event queueJan-Bernd Themann2007-10-101-2/+1
| | | | | | | | eHEA recovery and DLPAR functions are called seldomly. The eHEA workqueues are replaced by the kernel event queue. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: DLPAR memory add fixJan-Bernd Themann2007-10-101-2/+2
| | | | | | | | | Due to stability issues in high load situations the HW queue handling has to be changed. The HW queues are now stopped and restarted again instead of destroying and allocating new HW queues. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* [EHEA]: Use LRO.Jan-Bernd Themann2007-10-101-0/+7
| | | | | Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Make NAPI polling independent of struct net_device objects.Stephen Hemminger2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several devices have multiple independant RX queues per net device, and some have a single interrupt doorbell for several queues. In either case, it's easier to support layouts like that if the structure representing the poll is independant from the net device itself. The signature of the ->poll() call back goes from: int foo_poll(struct net_device *dev, int *budget) to int foo_poll(struct napi_struct *napi, int budget) The caller is returned the number of RX packets processed (or the number of "NAPI credits" consumed if you want to get abstract). The callee no longer messes around bumping dev->quota, *budget, etc. because that is all handled in the caller upon return. The napi_struct is to be embedded in the device driver private data structures. Furthermore, it is the driver's responsibility to disable all NAPI instances in it's ->stop() device close handler. Since the napi_struct is privatized into the driver's private data structures, only the driver knows how to get at all of the napi_struct instances it may have per-device. With lots of help and suggestions from Rusty Russell, Roland Dreier, Michael Chan, Jeff Garzik, and Jamal Hadi Salim. Bug fixes from Thomas Graf, Roland Dreier, Peter Zijlstra, Joseph Fannin, Scott Wood, Hans J. Koch, and Michael Chan. [ Ported to current tree and all drivers converted. Integrated Stephen's follow-on kerneldoc additions, and restored poll_list handling to the old style to fix mutual exclusion issues. -DaveM ] Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* ehea: propagate physical port stateJan-Bernd Themann2007-09-131-1/+4
| | | | | | | | | | | | Introduces a module parameter to decide whether the physical port link state is propagated to the network stack or not. It makes sense not to take the physical port state into account on machines with more logical partitions that communicate with each other. This is always possible no matter what the physical port state is. Thus eHEA can be considered as a switch there. Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* ehea: Fix workqueue handlingThomas Klein2007-08-071-1/+1
| | | | | | | Fix: Workqueue ehea_driver_wq was not destroyed Signed-off-by: Thomas Klein <tklein@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* eHEA: net_poll supportJan-Bernd Themann2007-07-241-1/+1
| | | | | | | net_poll support for eHEA added Signed-off-by: Jan-Bernd Themann <themann@de.ibm.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>