summaryrefslogtreecommitdiffstats
path: root/drivers/net/qlge/qlge_main.c
Commit message (Collapse)AuthorAgeFilesLines
* qlge: Fix sizeof usage.Ron Mercer2009-07-041-7/+7
| | | | | | | Some usage was only sizing a pointer rather than the data type. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Add/use function for link up/down.Ron Mercer2009-07-041-5/+21
| | | | | | | | | | | We need to set/clear the mac address register when the link goes up/down respectively. Without this both ports of a 2-port device can end up with the same mac address in a bonding scenario. The new ql_link_on() and ql_link_off() will also be used in handling certain firmware events. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix MAC address bonding issue.Ron Mercer2009-07-041-7/+43
| | | | | | | | | | | | | | | | This addes functionality to set/clear the MAC address in the hardware when the link goes up/down. The MAC address register is persistent across function resets. In bonding the same address can bounce from one port to the other. This can cause packets to be delivered to the wrong port. This patch clears the MAC address in the hardware when the link is down and sets it when the link comes up. It was found that pulling/pushing the cable from one port to another causes the same MAC address to be in both ports. The next patch in this series will use this functionality as well. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix tx byte counter.Ron Mercer2009-07-041-1/+1
| | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix redundant call to free resources.Ron Mercer2009-07-041-5/+0Star
| | | | | | | The caller will free acquired resouces if a failure occurs. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Fix carrier on condition.Ron Mercer2009-07-041-1/+5
| | | | | | | | | We were turning on the carrier without verifying the link was up. This adds link up to the link initialize check before turning carrier on. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Clear frame to queue routing before reset.Ron Mercer2009-07-041-9/+32
| | | | | | | | Not clearing the routing bits can cause frames to erroneously get routed to management processor. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* qlge: Expand coverage of hw lock for config register.Ron Mercer2009-07-041-4/+5
| | | | | | | | | | | | The hardware semaphore covers the configuration register as well as the ICB registers. The ICB high and low regs contain the address of the initialization control block and the config register is used to signal the hardware that a block is ready to be downloaded. Currently we were only protecting the ICB regs. This changes expands to cover the config register as well. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-06-151-1/+1
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: Documentation/feature-removal-schedule.txt drivers/scsi/fcoe/fcoe.c net/core/drop_monitor.c net/core/net-traces.c
| * trivial: fix ETIMEOUT -> ETIMEDOUT typosJean Delvare2009-06-121-1/+1
| | | | | | | | | | | | | | fix ETIMEOUT -> ETIMEDOUT typos Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | qlge: Allow RX buf rings to be > than 4096 bytes.Ron Mercer2009-06-111-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | RX buffer rings can be comprised of non-contiguous fixed size chunks of memory. The ring is given to the hardware as a pointer to a location that stores the location of the queue. If the queue is greater than 4096 bytes then the hardware gets a list of said pointers. This patch addes the necessary logic to generate the list if the queue size exceeds 4096. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Relax alignment on TX harware queue.Ron Mercer2009-06-111-1/+1
| | | | | | | | | | | | | | | | The alignment was on size of queue boundary, but the hardware only requires 4-byte alignment. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: bugfix: Get rid of errant spin_unlock().Ron Mercer2009-06-101-1/+0Star
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for varied pcie function numbers.Ron Mercer2009-06-101-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently we support only PCIe NIC functions zero and one, and FCoE functions as 3 and 4. Future configurations can mix these up in any fashion. This patch removes the 0-1 dependancy and allows usage of any of the 4 functions. We also find the alternate NIC function (if exist) and determine our port number based on the comparison of the two functions: Lower function number gets first port, higher function gets second port. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for using alternate MAC address.Ron Mercer2009-06-101-2/+15
| | | | | | | | | | | | | | | | | | | | | | Extract either manufacturer or Bladecenter Open Fabric Manager (BOFM) MAC address. BOFM may indicate an alternate MAC address. This patch honors that request by extracting the MAC address from a different flash location if a flag is set. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Drop inbound frames > MTU.Ron Mercer2009-06-101-0/+9
| | | | | | | | | | | | | | | | The max frame size register is set higher than the MTU to accomodate FCoE frames. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Drop inbound error frames.Ron Mercer2009-06-101-1/+7
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Remove netif_set_gso_max_size() call.Ron Mercer2009-06-101-1/+0Star
| | | | | | | | | | | | | | Not necessary if hardware supports 65536 as it's the default setting. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for retrieving firmware version.Ron Mercer2009-06-101-0/+7
| | | | | | | | | | | | | | This is used by driver banner and ethtool info. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | net: dont update dev->trans_start in 10GB driversEric Dumazet2009-05-291-1/+0Star
|/ | | | | | | | | | | | | | | | | Followup of commits 9d21493b4beb8f918ba248032fefa393074a5e2b and 08baf561083bc27a953aa087dd8a664bb2b88e8e (net: tx scalability works : trans_start) (net: txq_trans_update() helper) Now that core network takes care of trans_start updates, dont do it in drivers themselves, if possible. Multi queue drivers can avoid one cache miss (on dev->trans_start) in their start_xmit() handler. Exceptions are NETIF_F_LLTX drivers (vxge & tehuti) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)Yang Hongyang2009-04-071-2/+2
| | | | | | | | Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64)Yang Hongyang2009-04-071-2/+2
| | | | | | | | Replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'master' of ↵David S. Miller2009-03-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/igb/igb_main.c drivers/net/qlge/qlge_main.c drivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/core.h drivers/net/wireless/ath9k/hw.c
| * qlge: bugfix: Pad outbound frames smaller than 60 bytes.Ron Mercer2009-03-131-0/+3
| | | | | | | | | | | | | | | | With some asic configurations xmit of frames smaller than 60 bytes may fail. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlge: bugfix: Move netif_napi_del() to common call point.Ron Mercer2009-03-131-4/+6
| | | | | | | | | | | | | | | | Moving netif_napi_del() up the call chain so it will get called from all exit points. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlge: bugfix: Tell hw to strip vlan header.Ron Mercer2009-03-131-3/+3
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| * qlge: bugfix: Increase filter on inbound csum.Ron Mercer2009-03-131-12/+26
| | | | | | | | | | | | | | Chip does not do UDP checksum when fragmentation occurs. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: bugfix: Fix endian issue related to rx buffers.Ron Mercer2009-03-101-3/+6
| | | | | | | | | | | | | | This was introduced in an earlier net-next patch. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: bugfix: Pad outbound frames smaller than 60 bytes.Ron Mercer2009-03-101-0/+3
| | | | | | | | | | | | | | | | With some asic configurations xmit of frames smaller than 60 bytes may fail. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: bugfix: Move netif_napi_del() to common call point.Ron Mercer2009-03-101-4/+6
| | | | | | | | | | | | | | | | Moving netif_napi_del() up the call chain so it will get called from all exit points. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Remove spinlock from asic init path.Ron Mercer2009-03-101-2/+0Star
| | | | | | | | | | | | | | There is nothing to contend with it. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Clear shadow registers before use.Ron Mercer2009-03-101-0/+2
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Get rid of irqsave/restore in intr disable.Ron Mercer2009-03-101-3/+2Star
| | | | | | | | | | | | | | | | The completion interrupt disable routine is only called from the ISR, so there is no need for irqsave/restore. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: bugfix: Tell hw to strip vlan header.Ron Mercer2009-03-101-3/+3
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add tx multiqueue support.Ron Mercer2009-03-101-17/+14Star
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for GRO.Ron Mercer2009-03-101-10/+20
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Increase filtering for inbound csum settings.Ron Mercer2009-03-101-13/+28
| | | | | | | | | | | | | | Chip does not do UDP checksum when fragmentation occurs. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Remove debug junk from asic reset logic.Ron Mercer2009-03-101-19/+6Star
| | | | | | | | | | Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Move reset logic into asic_reset_worker func.Ron Mercer2009-03-101-23/+18Star
| | | | | | | | | | | | | | | | Get rid of extraneous ql_cycle_adapter. It's only called from the one place. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add worker-handler for firmware events.Ron Mercer2009-03-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This worker and it's supporting routines are used for IDC 'inter-device-communication' events that require an ACK mailbox command be sent to allow completion of the request. These requests are originated by another function wanting to change some common port paramters. Typical example would be: 1) Change max TX/RX frame size allowed. 2) Change pause parameters. 3) Change loopback mode. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for getting/setting port config.Ron Mercer2009-03-031-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds functionality to get and set port parameters. Currently it is used to set maximum TX/RX frame sizes. This process is also capable of setting: 1) Pause type: Standard or Priority based. 2) Loop back mode. 3) Enable Jumbo frame mode (included here...) Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Add support for device ID 8000.Ron Mercer2009-03-031-0/+64
| | | | | | | | | | | | | | | | This device has more firmware support for link management, setting TX and RX maximum frame sizes. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Reduce debug print output.Ron Mercer2009-02-271-12/+12
| | | | | | | | | | | | | | Get rid of some noise that is for debug only. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Prepare to add new device.Ron Mercer2009-02-271-16/+64
| | | | | | | | | | | | | | | | This organizes a few calls into a function table to enable adding new devices. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Move firmware event handler.Ron Mercer2009-02-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | This is not a logical change but rather a move of the inbound firmware event handler into it's own function as it will later be called by the outbound path. The addition of the mutex is to create exclusive access to the mailbox commands between inbound and outbound handling. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Use one path to (re)fill rx buffers.Ron Mercer2009-02-251-111/+59Star
| | | | | | | | | | | | | | | | | | | | | | Currently there are two paths for filling rx buffer queues. One is used during initialization and the other during runtime. This patch removes ql_alloc_sbq_buffers() and ql_alloc_lbq_buffers() and replaces them with a call to the runtime functions ql_update_lbq() and ql_update_sbq(). Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Optimize rx buffer refill process.Ron Mercer2009-02-251-5/+12
| | | | | | | | | | | | | | | | | | | | RX Buffers are refilled in chunks of 16 at a time before notifying the hardware with a register write. This can cause several writes to take place in a given napi poll call. This change causes the write to take place only once at the end of the call. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Change frame route hw semaphore granularity.Ron Mercer2009-02-251-18/+13Star
| | | | | | | | | | | | | | | | | | | | Instead of taking/giving the hw semaphore repeatedly when iterating over several frame to queue route settings, we have the caller hold it until all are done. This reduces PCI bus chatter and possible waits. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Increase MAC addr hw sem granularity.Ron Mercer2009-02-251-17/+34
| | | | | | | | | | | | | | | | | | Instead of taking/giving the semaphore repeatedly when iterating over several adderesses, we have the caller hold it until all are done. This reduces PCI bus chatter and possible waits. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | qlge: Clean up mac address and frame route settings.Ron Mercer2009-02-251-9/+22
| | | | | | | | | | | | | | | | | | | | Setting MAC addresses and routing frames to various queues will need to be done in response to firmware events as well as during initialization. This change encapsulates the facilities into a single call that can later me made from other places. Signed-off-by: Ron Mercer <ron.mercer@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>