aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/broadcom/cnic.c
AgeCommit message (Collapse)AuthorFilesLines
2012-12-07cnic, bnx2x, bnx2: Simplify cnic probing.Michael Chan1-12/+9
Instead of using symbol_get(), cnic can now directly call the cnic_probe functions in struct bnx2x and struct bnx2. symbol_get() is not reliable as it fails when the module is still initializing. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-07cnic: Include bnx2x.hMichael Chan1-30/+20
by removing duplicate symbols and removing some redundant code. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-07bnx2: Add BNX2 prefix to CHIP ID and name macrosMichael Chan1-7/+7
for namespace consistency. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-07bnx2: Add BNX2 prefix to descriptor structures and macrosMichael Chan1-35/+35
for namespace consistency. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-05cnic: Fix rare race condition during iSCSI disconnect.Eddie Wai1-2/+11
If the initiator and target try to close the connection at about the same time, there is a race condition in the termination sequence for bnx2x. Fix the problem by waiting for the remote termination to complete before deleting the Connection ID. This will prevent the firmware assert. Update version to 2.5.15. Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-05cnic: Reset iSCSI EQ during shutdown.Michael Chan1-0/+19
Without the reset, reloading the cnic driver can cause the iSCSI Event Queue to be out of sync with the driver and cause intermittent crash. Signed-off-by: Michael Chan <[email protected]> Acked-by: Ariel Elior <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-12-03net/broadcom: remove __dev* attributesBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option. As result the __dev* markings will be going away. Remove use of __devinit, __devexit_p, __devinitdata, __devinitconst, and __devexit. Signed-off-by: Bill Pemberton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-10-01bnx2x,cnic: use FW 7.8.2Yuval Mintz1-2/+10
This patch moves the bnx2x and cnic drivers into using FW 7.8.2 which was recently submitted into the linux-firmware tree. A short summary of minor bugs fixed by this FW: 1. In switch dependent mode, fix several issues regarding inner vlan vs. DCB priorities. 2. iSCSI - not all packets were completed on a forward channel. 3. DCB - fixed for 4-port devices. 4. Fixed false parity reported in CAM memories when operating near -5% on the 1.0V core supply. 5. ETS default settings are set to fairness between traffic classes (rather than strict priority), and uses the same chip receive buffer configuration for both PFC and pause. For a complete list of fixes made by this FW, see commit 236367db in the linux-firmware git repository. Signed-off-by: Yuval Mintz <[email protected]> Signed-off-by: Dmitry Kravkov <[email protected]> Signed-off-by: Ariel Elior <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10cnic: Allocate UIO resources only on devices that support iSCSI.Michael Chan1-1/+4
Update version to 2.5.13. Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10cnic: Allocate kcq resource only on devices that support FCoE.Michael Chan1-4/+3
To save memory and to exit IRQ loop quicker on devices that don't support FCoE. Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10cnic: Add function pointers to arm IRQ for different devices.Michael Chan1-4/+22
This will make it easier to exit IRQ loop and re-arm IRQ on devices that don't support FCoE. Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10cnic: Free UIO rings when the device is closed.Michael Chan1-0/+7
This will free up unneeded memory. Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-09-10cnic: Add functions to allocate and free UIO ringsMichael Chan1-19/+40
These functions are needed to free up memory when the rings are no longer needed. Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-10Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+2
Conflicts: net/batman-adv/bridge_loop_avoidance.c net/batman-adv/bridge_loop_avoidance.h net/batman-adv/soft-interface.c net/mac80211/mlme.c With merge help from Antonio Quartulli (batman-adv) and Stephen Rothwell (drivers/net/usb/qmi_wwan.c). The net/mac80211/mlme.c conflict seemed easy enough, accounting for a conversion to some new tracing macros. Signed-off-by: David S. Miller <[email protected]>
2012-07-10drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markersBen Hutchings1-3/+1
Convert doxygen (or similar) formatted comments to kernel-doc or unformatted comment. Delete a few that are content-free. Signed-off-by: Ben Hutchings <[email protected]> Acked-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-09drivers/net/ethernet/broadcom/cnic.c: remove invalid reference to list ↵Julia Lawall1-1/+2
iterator variable If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. There does not seem to be a meaningful value to provide to netdev_warn. Replace with pr_warn, since pr_err is used elsewhere. This problem was found using Coccinelle (http://coccinelle.lip6.fr/). Signed-off-by: Julia Lawall <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-09cnic: Don't use netdev->base_addrMichael Chan1-2/+5
commit c0357e975afdbbedab5c662d19bef865f02adc17 bnx2: stop using net_device.{base_addr, irq}. removed netdev->base_addr so we need to update cnic to get the MMIO base address from pci_resource_start(). Otherwise, mmap of the uio device will fail. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-29cnic: Fix mmap regression.Michael Chan1-1/+7
commit 1f85d58cdf15354a7120fc9ccc9bb9c45b53af88 cnic: Remove uio mem[0]. introduced a regression as older versions of userspace app still rely on this mmap. Restore the mmap functionality and get the base address from pci_resource_start() as the nedev->base_addr has been deprecated for PCI devices. Update version to 2.5.12. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-27cnic: Handle RAMROD_CMD_ID_CLOSE error.Eddie Wai1-0/+9
If firmware returns error status, proceed to close the iSCSI connection. Update version to 2.5.11. Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-27cnic: Remove uio mem[0].Michael Chan1-4/+1
This memory region is no longer used. Userspace gets the BAR address directly from sysfs. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-27cnic: Read bnx2x function number from internal registerEddie Wai1-1/+7
so that it will work on any hypervisor. Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-27cnic: Fix occasional NULL pointer dereference during reboot.Michael Chan1-2/+7
We register with bnx2x before we allocate ctx_tbl structure, so it is possible for bnx2x to call cnic_ctl before the structure is allocated. This can sometimes cause NULL pointer dereference of cp->ctx_tbl. We fix this by adding simple checking for valid state before proceeding. The cnic_ctl call is RCU protected so we don't have to deal with race conditions. Because of the additional checking, we need to finish the shutdown before clearing the CNIC_UP flag. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-27bnx2x, bnx2fc, bnx2i, cnic: Add statistics support and FCoE capabilities ↵Barak Witkowski1-2/+9
advertisement 1. When FCoE offload driver is registered, copy its capabilities to the chip scratchpad. 2. Copy FCoE/iSCSI MAC addresses in aligned manner to chip scratchpad. 3. Add FCoE/iSCSI statistics collection support Signed-off-by: Barak Witkowski <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-06-06ethernet: Remove casts to same typeJoe Perches1-6/+6
Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p A function in atl1e_main.c was passed a const pointer when it actually modified elements of the structure. Change the argument to a non-const pointer. A function in stmmac needed a __force to avoid a sparse warning. Added it. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-03-21cnic: Fix parity error code conflictMichael Chan1-5/+7
The recently added parity error handling used an error code that was already defined for a different error. This could lead to bnx2x firmware assert. We need to fix this with new error codes that are defined for parity error only. Signed-off-by: Michael Chan <[email protected]> Reviewed-by: Eddie Wai <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-26Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller1-1/+5
Conflicts: drivers/net/ethernet/sfc/rx.c Overlapping changes in drivers/net/ethernet/sfc/rx.c, one to change the rx_buf->is_page boolean into a set of u16 flags, and another to adjust how ->ip_summed is initialized. Signed-off-by: David S. Miller <[email protected]>
2012-02-22ethernet/broadcom: ip6_route_output() never returns NULL.RongQing.Li1-1/+5
ip6_route_output() never returns NULL, so it is wrong to check if the return value is NULL. Signed-off-by: RongQing.Li <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-09cnic: Update VLAN ID during ISCSI_UEVENT_PATH_UPDATEEddie Wai1-0/+2
This will support the new VLAN attribute in the iSCSI iface file. Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-09cnic: set error flag when iSCSI connection failsJeffrey Huang1-0/+2
to speed up error recovery due to SPQ failures. The error flag will expedite the recovery process by skipping the timeouts. Signed-off-by: Jeffrey Huang <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-05cnic: Add FCoE parity error recoveryMichael Chan1-4/+34
When bnx2x returns error on FCoE SPQ messages, generate an error completion to bnx2fc immediately to speed up error recovery. This will eliminate length timeouts and spped up the reset of the device. Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05cnic: Improve error recovery on bnx2x devicesMichael Chan1-5/+69
When a bnx2x device encounters parity errors, it will not respond to all SPQ messages. As a result, the shutdown sequence before reset can take a long time as the ulp drivers (bnx2i/bnx2fc) have to wait for timeout of all such messages. To improve this scenario, when bnx2x returns error on the SPQ, we'll send an immediate response to the ulp drivers to avoid such lengthy timeouts. Adjust the return code of relevant functions to return error only if the message cannot be sent on the SPQ so that we'll generate an error completion to the ulp drivers. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05cnic: Re-init dev->stats_addr after chip resetMichael Chan1-0/+1
because bnx2x frees the old and allocates new memory during chip reset. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-06bnx2x, cnic: support DRV_INFO upon FW requestBarak Witkowski1-0/+47
Add support to send driver capabilities, settings and statistics to management firmware. [ Redone using many local variables, removed many unnecessary inlines, and put #defines at the left margin suggested by Joe Perches ] Signed-off-by: Barak Witkowski <[email protected]> Signed-off-by: Eilon Greenstein <[email protected]> Signed-off-by: Eddie Wai <[email protected]> Signed-off-by: Michael Chan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-23net: treewide use of RCU_INIT_POINTEREric Dumazet1-3/+3
rcu_assign_pointer(ptr, NULL) can be safely replaced by RCU_INIT_POINTER(ptr, NULL) (old rcu_assign_pointer() macro was testing the NULL value and could omit the smp_wmb(), but this had to be removed because of compiler warnings) Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-11-22net: remove ipv6_addr_copy()Alexey Dobriyan1-1/+1
C assignment can handle struct in6_addr copying. Signed-off-by: Alexey Dobriyan <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-28cnic: Add timeout for ramrod replies.Michael Chan1-7/+10
If the bnx2x device has encountered parity errors, the chip will not DMA any replies. Using wait_event_timeout() will allow us to make forward progress and let bnx2x reset the chip. Signed-off-by: Michael Chan <[email protected]> Reviewed-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-28cnic, bnx2fc: Increase maximum FCoE sessions.Michael Chan1-6/+8
Increase it to NVRAM configured limit or 1024 whichever is less. Signed-off-by: Michael Chan <[email protected]> Signed-off-by: Bhanu Prakash Gollapudi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-10broadcom: Move the Broadcom driversJeff Kirsher1-0/+5487
Moves the drivers for Broadcom devices into drivers/net/ethernet/broadcom/ and the necessary Kconfig and Makefile changes. CC: Eilon Greenstein <[email protected]> CC: Michael Chan <[email protected]> CC: Matt Carlson <[email protected]> CC: Gary Zambrano <[email protected]> CC: "Maciej W. Rozycki" <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>