aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cnic.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-10-02cnic: Fix NETDEV_UP event processing.Michael Chan1-1/+2
This fixes the problem of not handling the NETDEV_UP event properly during hot-plug or modprobe of bnx2 after cnic. The handling was skipped by mistakenly using "else if" to check for the event. Also update version to 2.0.1. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-22cnic: Shutdown iSCSI ring during uio_close.Michael Chan1-2/+2
The iSCSI ring should be shutdown during uio_close instead of uio_open for proper operations. This fixes the problem of the ring getting stuck intermittently. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-02Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller1-39/+104
Conflicts: drivers/net/yellowfin.c
2009-08-28cnic: Put uio init in separate function.Michael Chan1-27/+41
This will allow the 10G iSCSI code to reuse the function. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-28cnic: Put rx/tx ring allocation in separate function.Michael Chan1-11/+22
This will allow the 10G iSCSI code to reuse the function. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-15cnic: Fix locking in init/exit calls.Michael Chan1-9/+39
The slow path ulp_init and ulp_exit calls to the bnx2i driver are sleepable calls and therefore should not be protected using rcu_read_lock. Fix it by using mutex and refcount during these calls. cnic_unregister_driver() will now wait for the refcount to go to zero before completing the call. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-15cnic: Fix locking in start/stop calls.Michael Chan1-16/+28
The slow path ulp_start and ulp_stop calls to the bnx2i driver are sleepable calls and therefore should not be protected using rcu_read_lock. Fix it by using mutex and setting a bit during these calls. cnic_unregister_device() will now wait for the bit to clear before completing the call. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-15cnic: Refine registration with bnx2.Michael Chan1-13/+36
Register and unregister with bnx2 during NETDEV_UP and NETDEV_DOWN events. This simplifies the sequence of events and allows locking fixes in the next patch. Signed-off-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-08-15cnic: Fix symbol_put_addr() panic on ia64.Michael Chan1-1/+1
When the cnic driver tries to grab a symbol from bnx2 when bnx2 is running init code, symbol_get() will succeed but symbol_put_addr() will hit BUG() a moment later. module_text_address() fails because bnx2 is still in init code. This is fixed by using symbol_put() instead which does the exact opposite of symbol_get(). Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-07-27cnic: Fix ISCSI_KEVENT_IF_DOWN message handling.Michael Chan1-2/+21
When a net device goes down or when the bnx2i driver is unloaded, the code was not generating the ISCSI_KEVENT_IF_DOWN message properly and this could cause the userspace driver to crash. This is fixed by sending the message properly in the shutdown path. cnic_uio_stop() is also added to send the message when bnx2i is unregistering. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-21cnic: Fix __symbol_get() build error.Michael Chan1-2/+2
Ingo molnar <mingo@elte.hu> reported the error drivers/net/cnic.c:2520: error: implicit declaration of function ‘__symbol_get’ when CONFIG_MODULES is not defined. Fix by using symbol_get() instead. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-21Revert "[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’"James Bottomley1-2/+0
This reverts commit bc3bf8fd330ce981ce632a1a4a283eee46838f32. All the commit did was add a second #include of <linux/module.h> which is the wrong fix. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-13[SCSI] cnic: fix error: implicit declaration of function ‘__symbol_get’Ingo Molnar1-0/+2
drivers/net/cnic.c: In function ‘init_bnx2_cnic’: drivers/net/cnic.c:2520: error: implicit declaration of function ‘__symbol_get’ drivers/net/cnic.c:2520: warning: assignment makes pointer from integer without a cast make[1]: *** [drivers/net/cnic.o] Error 1 make: *** [drivers/net/cnic.o] Error 2 Caused by not including linux/module.h Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-13[SCSI] cnic: fix undefined reference to `ip6_route_output'Randy Dunlap1-2/+6
Fix cnic build for case of CONFIG_INET=n. Fix cnic build for case of CONFIG_IPV6=m and CONFIG_CNIC=y. Fixes these build errors: cnic.c:(.text+0x236a1d): undefined reference to `ip_route_output_key' cnic.c:(.text+0x15a8e8): undefined reference to `ip6_route_output' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2009-06-09[SCSI] cnic: Add new Broadcom CNIC driver.Michael Chan1-0/+2711
The CNIC driver controls BNX2 hardware rings and resources used by iSCSI. Most hardware resources for iSCSI are separate from those used for ethernet networking. iSCSI uses a separate MAC address and IP address. The CNIC driver creates a UIO interface to handle the non-offloaded packets such as ARP, etc in userspace. Signed-off-by: Michael Chan <mchan@broadcom.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>