summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic
Commit message (Collapse)AuthorAgeFilesLines
...
* | qlcnic: device state management fixes for virtual funcAmit Kumar Salecha2010-08-172-34/+51
| | | | | | | | | | | | | | | | | | o NPAR state should be set to operationl by Mangement function only. o NPAR state should be set to non operational before device reset. o VF function should wait for NPAR state to be operational. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlcnic: fix aer for virtual funcAmit Kumar Salecha2010-08-171-1/+1
|/ | | | | | | Virtual function are not privilge to initialize firmware. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: using too much stackDan Carpenter2010-08-101-6/+21
| | | | | | | | | qlcnic_pci_info structs are 128 bytes so an array of 8 uses 1024 bytes. That's a lot if you run with 4K stacks. I allocated them with kcalloc() instead. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: clean up qlcnic_init_pci_info()Dan Carpenter2010-08-101-22/+23
| | | | | | | | | | | | | | In the original code we allocated memory conditionally and freed it in the error handling unconditionally. It turns out that this function is only called during initialization and "adapter->npars" and "adapter->eswitch" are always NULL at the start of the function. I removed those checks. Also since I was cleaning things, I changed the error handling for qlcnic_get_pci_info() and pulled everything in an indent level. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix diag resource allocationSony Chacko2010-07-251-0/+1
| | | | | | | | netif_device_attach missing from error path in qlcnic_diag_alloc_res Signed-off-by: Sony Chacko <sony.chacko@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix loopback testAmit Kumar Salecha2010-07-253-22/+8
| | | | | | | o Loopback not supported for virtual function. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix bandwidth checkRajesh Borundia2010-07-241-4/+3
| | | | | | | | Fix maximum and minmum bandwith value. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix pci resource leakAmit Kumar Salecha2010-07-181-1/+6
| | | | | | | | pci_get_domain_bus_and_slot: caller must decrement the reference count by calling pci_dev_put(). Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: restore NPAR config data after recoveryAnirban Chakraborty2010-07-143-23/+72
| | | | | | | | | | | o NPAR configuration which is programmed in fw, need to restore after fw recovery. o Update version to 5.0.7 Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: aer supportSucheta Chakraborty2010-07-142-1/+137
| | | | | | | | Pci error recovery support added. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix netdev notifier in error pathAmit Kumar Salecha2010-07-141-1/+9
| | | | | | | netdev notifier are not unregistered if pci_register_driver fails. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: disable tx timeout recoveryAmit Kumar Salecha2010-07-141-2/+4
| | | | | | | Disable tx timeout recovery, if auto_fw_reset is disable Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix pause params settingRajesh Borundia2010-07-141-0/+4
| | | | | | | | | Turning off rx pause param and autoneg param is not supported so return error in that case. Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Disable admin tools interface for VF driver modeAnirban Chakraborty2010-07-091-1/+4
| | | | | | | | Non privileged (VF) driver will not be able to carry out any of the FW update, etc. operations. Disable the tools interface by not creating the sysfs nodes. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Check FW capability for TSOAnirban Chakraborty2010-07-093-6/+14
| | | | | | | Driver checks TSO capability from FW before enabling it. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: Make ethtool_ops::set_flags() return -EINVAL for unsupported flagsBen Hutchings2010-06-301-1/+1
| | | | | | | | | The documented error code for attempts to set unsupported flags (or to clear flags that cannot be disabled) is EINVAL, not EOPNOTSUPP. Signed-off-by: Ben Hutchings <bhutchings@solarflare.com> Acked-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Add support for configuring eswitch and nparsRajesh K Borundia2010-06-293-75/+542
| | | | | | | | | | | | Following changes are made: 1.Obtain capabilities of Nic partition. 2.Configure tx bandwidth of particular Nic partition. 3.Configure the eswitch for setting port mirroring, enable mac learning, promiscous mode. Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Remove obsolete codeAnirban Chakraborty2010-06-294-57/+13
| | | | | | | | Current driver uses FW API version 2 and thus code corresponding to FW API version 1 has become obsolete. Clean up this from the driver. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fail when try to setup unsupported featuresStanislaw Gruszka2010-06-291-3/+10
| | | | | Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: update version to 5.0.6Amit Kumar Salecha2010-06-231-2/+2
| | | | | Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: mark context state freed after destroyAmit Kumar Salecha2010-06-232-1/+3
| | | | | | | | After destroying recv ctx, context state remain same. Fix it by marking as FREED. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: offload tx timeout recoveryAmit Kumar Salecha2010-06-232-36/+32
| | | | | | | | | Offload tx timeout recovery to fw recovery func(check_health). In check_health, first check health of device, if it its ok, then do tx timeout recovery otherwise device recovery. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: dont free host resources during fw recoveryAmit Kumar Salecha2010-06-231-29/+3
| | | | | | | | There is no need to free/alloc host resources during firmware recovery. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: release device resources during interface downAmit Kumar Salecha2010-06-236-37/+114
| | | | | | | | | | | Previously we were allocating device resources during probe and release them during remove. Now alloc during interface up and release in interface down. This helps in device performance, as it doesn't need to keep track of inactive resources. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix mac address mgmtAmit Kumar Salecha2010-06-231-3/+8
| | | | | | | | | | | | We first add mac address in driver local list and then send command to fw to add same. There are checks in driver to ensure send command doesn't fail before adding mac address in local list. But instead fix should be: Add mac address in fw and if it succeeds, add it in driver local list. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: handshake with card after fw loadAmit Kumar Salecha2010-06-233-7/+9
| | | | | | | | Instead of delaying rcv handshake till interface comes up, do it just after fw load. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: cleanup skb allocationAmit Kumar Salecha2010-06-233-21/+13
| | | | | | | | No need to maintian separate state for alloced and freed skb. This can be done by null check. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix register accessAmit Kumar Salecha2010-06-171-7/+14
| | | | | | | | | For certain set of register, base window addresses are not defined. In such cases window should not set. Return with error for such cases to avoid NMI. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix race in tx stop queueRajesh K Borundia2010-06-174-19/+26
| | | | | | | | | | There is a race between netif_stop_queue and netif_stopped_queue check. So check once again if buffers are available to avoid race. With above logic we can also get rid of tx lock in process_cmd_ring. Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: seperate interrupt for TXschacko2010-06-174-19/+72
| | | | | | | | | | | | Earlier all poll routine can process rx and tx, But now one poll routine to process rx + tx and other for rx only. Last msix vector will be used for separate tx interrupt. o This is supported from fw version 4.4.2. o Bump version 5.0.5 Signed-off-by: Sony Chacko <schacko@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: change driver descriptionSritej Velaga2010-06-172-7/+6
| | | | | | | | | o Remove extra printing of mac address o This driver also supports NIC only Qlogic adapters. Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix device soft resetSucheta Chakraborty2010-06-171-1/+1
| | | | | | | | | During device soft reset, don't halt every device block. Access to some blocks is required during recovery. Signed-off-by: Sucheta Chakraborty <sucheta@dut4145.unminc.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Bumped up version numberAnirban Chakraborty2010-06-161-2/+2
| | | | | | | Changed the driver version number to 5.0.4 Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix a bug in setting up NIC partitioning modeAnirban Chakraborty2010-06-163-52/+37
| | | | | | | | | The driver was not detecting the presence of NIC partitioning capability of the firmware properly. Now, it checks the eswitch set bit in the FW capabilities register and accordingly sets the driver mode as NPAR capable or not. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: Fix Compilation Issue when CONFIG_INET was not setAnirban Chakraborty2010-06-031-41/+40
| | | | | | | | | | Original code was placed incorrectly inside a block of code marked with CONFIG_INET directive. Fix by moving it outside. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Tested-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: NIC Partitioning - Add non privileged mode supportAnirban Chakraborty2010-06-023-23/+128
| | | | | | | | | | Added support for NIC functions that work in non privileged mode where these functions are privileged to do IO only, the control operations are handled via privileged functions. Bumped up version number to 5.0.3. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: NIC Partitioning - Add basic infrastructure supportAnirban Chakraborty2010-06-027-74/+890
| | | | | | | | | | | | | | | | | | | | | | | Following changes have been added to enable the adapter to work in NIC partitioning mode where multiple PCI functions of an adapter port can be configured to work as NIC functions. The first function that is enumerated on the PCI bus assumes the role of management function which, besides being able to do all the NIC functionality, can configure other NIC partitions. Other NIC functions can be configured as privileged or non privileged functions. Privileged function can not configure other NIC functions but can do all the NIC functionality including any firmware initialization, chip reset etc. Non privileged functions can do only basic IO. For chip reset etc, it depends on the privilege or management function. 1. Added code to determine PCI function number independent of kernel API. 2. Added Driver - FW version 2.0 support. 3. Changed producer and consumer register offset calculation. 4. Added management and privileged operation modes for npar functions. A module parameter has been added to control it. 5. Added support for configuring the eswitch in the adapter. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* sysfs: add struct file* to bin_attr callbacksChris Wright2010-05-211-4/+8
| | | | | | | | | This allows bin_attr->read,write,mmap callbacks to check file specific data (such as inode owner) as part of any privilege validation. Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* qlcnic: mark device state failAmit Kumar Salecha2010-05-171-2/+8
| | | | | | | Device state need to be mark as FAILED, if fail to start firmware. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: remove unused registerAmit Kumar Salecha2010-05-174-21/+0
| | | | | | | Removing register defines which are not used by Qlgoic CNA device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix internal loopback testSucheta Chakraborty2010-05-171-0/+2
| | | | | | | | Reset/set DEV_UP bit during allocation and deallocation of resources. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: module param for firmware load optionAmit Kumar Salecha2010-05-171-1/+8
| | | | | | | | By default fw is loaded from flash, user can change this priority using load_fw_file module param. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix rx bytes statisticsSucheta Chakraborty2010-05-171-1/+1
| | | | | | | | Added lrobytes to it. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: change adapter name displaySucheta Chakraborty2010-05-171-1/+6
| | | | | | | | Append mac address to adapter name. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: fix memory leaksAnirban Chakraborty2010-05-172-3/+4
| | | | | | | | | Fixes memory leak in error path when memory allocation for adapter data structures fails. Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: add idc debug registersSucheta Chakraborty2010-05-142-0/+23
| | | | | | | | | When ever driver changes the device state, it should write pci-func number and timestamp in debug registers. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: support quisce modeSucheta Chakraborty2010-05-141-2/+26
| | | | | | | | | Device can go to quiescent state, during which drivers should refrain from using the device. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: check device classSucheta Chakraborty2010-05-143-8/+18
| | | | | | | | pci-func class can be other than ethernet in Qlogic CNA device. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: check IDC versionSucheta Chakraborty2010-05-142-2/+19
| | | | | | | | Warn user if IDC version mismatch with different class of drivers. Signed-off-by: Sucheta Chakraborty <sucheta.chakraborty@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlcnic: cleanup unused codeAmit Kumar Salecha2010-05-144-61/+10
| | | | | | | | LRO ring, cut-thru mode and specific fw version are not valid to Qlogic CNA device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
OpenPOWER on IntegriCloud