summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* netdev: bfin_mac: add support for IEEE 1588 PTPBarry Song2010-05-183-1/+362
| | | | | | | | | Newer on-chip MAC peripherals support IEEE 1588 PTP in the hardware, so extend the driver to support this functionality. Signed-off-by: Barry Song <barry.song@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/usb/asix.c: Fix unaligned accessesNeil Jones2010-05-181-1/+33
| | | | | | | | | | Using this driver can cause unaligned accesses in the IP layer This has been fixed by aligning the skb data correctly using the spare room left over by the 4 byte header inserted between packets by the device. Signed-off-by: Neil Jones <NeilJay@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ibmveth: Add suspend/resume supportBrian King2010-05-181-0/+12
| | | | | | | | | Adds support for resuming from suspend for IBM virtual ethernet devices. We may have lost an interrupt over the suspend, so we just kick the interrupt handler to process anything that is outstanding. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-05-171-1/+6
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: include/linux/if_link.h
| * Merge branch 'net-2.6' of ↵David S. Miller2010-05-141-1/+6
| |\ | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
| | * vhost: fix barrier pairingMichael S. Tsirkin2010-05-121-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to memory-barriers.txt, an smp memory barrier in guest should always be paired with an smp memory barrier in host, and I quote "a lack of appropriate pairing is almost certainly an error". In case of vhost, failure to flush out used index update before looking at the interrupt disable flag could result in missed interrupts, resulting in networking hang under stress. This might happen when flags read bypasses used index write. So we see interrupts disabled and do not interrupt, at the same time guest writes flags value to enable interrupt, reads an old used index value, thinks that used ring is empty and waits for interrupt. Note: the barrier we pair with here is in drivers/virtio/virtio_ring.c, function vring_enable_cb. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com>
* | | qeth: synchronize configuration interfaceFrank Blaschka2010-05-166-168/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | Synchronize access to the drivers configuration interface. Also do not allow configuration changes during online/offline transition. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | qeth: new message if OLM limit is reachedUrsula Braun2010-05-161-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | z/OS may activate Optimized Latency Mode (OLM) for a connection through an OSA Express3 adapter, which reduces the number of allowed concurrent connections, if adapter is used in shared mode. Create a meaningful message, if activation of an OSA-connection fails due to an active OLM-connection on the shared OSA-adapter. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | qeth: exploit HW TX checksummingFrank Blaschka2010-05-162-26/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSA supports HW TX checksumming in layer 3 mode. Enable this feature and remove software fallback used for TSO. Cleanup checksum bits to indicate OSA can do checksumming only for IPv4 TCP and UDP. Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: congestion notifications are not dropped packetsEric Dumazet2010-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vlan/macvlan start_xmit() can inform caller of congestion with NET_XMIT_CN return value. This doesnt mean packet was dropped. Increment normal stat counters instead of tx_dropped. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | net: adjust handle_macvlan to pass port struct to hookJiri Pirko2010-05-161-6/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now there's null check here and also again in the hook. Looking at bridge bits which are simmilar, port structure is rcu_dereferenced right away in handle_bridge and passed to hook. Looks nicer. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | skge: use the DMA state API instead of the pci equivalentsFUJITA Tomonori2010-05-162-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | Merge branch 'master' of ↵David S. Miller2010-05-1610-116/+479
|\ \ \ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/inaky/wimax
| * | | wimax/i2400m: driver defaults to firmware v1.5 for i6x60 devicesInaky Perez-Gonzalez2010-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Firmware is available in the linux-firmware package. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | | wimax/i2400m: driver defaults to firmware v1.5 for i5x50 devicesInaky Perez-Gonzalez2010-05-121-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the i2400m driver to default to firmware versions v1.5 for the Intel Wireless WiMAX Connection 5150 and 5350 devices. Firmware available in linux-firmware. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | | wimax/i2400m: Move module params to other file so they can be staticPrasanna S Panchamukhi2010-05-114-25/+20Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves the module parameters to the file where they can be avoided to be global and allow them to be static. The module param : idle_mode_disabled and power_save_disabled are moved from driver.c to control.c. Also these module parameters are declared to be static as they are not required to be global anymore. The module param : rx_reorder_disabled is moved from driver.c file to rx.c file. Also this parameter is declated as static as it is not required to be global anymore. Signed-off-by: Prasanna S Panchamukhi<prasannax.s.panchamukhi@intel.com>
| * | | wimax: wimax_msg_alloc() returns ERR_PTR not nullDan Carpenter2010-05-111-5/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wimax_msg_alloc() returns an ERR_PTR and not null. I changed it to test for ERR_PTR instead of null. I also added a check in front of the kfree() because kfree() can handle null but not ERR_PTR. Signed-off-by: Dan Carpenter <error27@gmail.com>
| * | | wimax/i2400m: USB specific TX queue's minimum buffer room required for new ↵Prasanna S. Panchamukhi2010-05-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | message This patch specifies the TX queue's buffer room required by the USB bus driver while allocating header space for a new message. Please refer the documentation in the code. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: SDIO specific TX queue's minimum buffer room for new messagePrasanna S. Panchamukhi2010-05-111-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch specifies the TX queue's minimum buffer room required to accommodate one smallest SDIO payload. Please refer the documentation in the code. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: reserve additional space in the TX queue's buffer while ↵Prasanna S. Panchamukhi2010-05-112-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | allocating space for a new message header Increase the possibilities of including at least one payload by reserving some additional space in the TX queue while allocating TX queue's space for new message header. Please refer the documentation in the code for details. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: fix incorrect handling of type 2 and 3 RX messagesPrasanna S. Panchamukhi2010-05-111-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Intel Wimax i3200, i5x50 and i6x60 device specification documents, the host driver must not reset the device if the normalized sequence numbers are greater than 1023 for type 2 and type 3 RX messages. This patch removes the code that incorrectly used to reset the device. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax i2400m: fix race condition while accessing rx_roq by using kref countPrasanna S. Panchamukhi2010-05-112-8/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the race condition when one thread tries to destroy the memory allocated for rx_roq, while another thread still happen to access rx_roq. Such a race condition occurs when i2400m-sdio kernel module gets unloaded, destroying the memory allocated for rx_roq while rx_roq is accessed by i2400m_rx_edata(), as explained below: $thread1 $thread2 $ void i2400m_rx_edata() $ $Access rx_roq[] $ $roq = &i2400m->rx_roq[ro_cin] $ $ i2400m_roq_[reset/queue/update_ws] $ $ $ void i2400m_rx_release(); $ $kfree(rx->roq); $ $rx->roq = NULL; $Oops! rx_roq is NULL This patch fixes the race condition using refcount approach. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: increase tx queue length from 5 to 20 [v1]Prasanna S. Panchamukhi2010-05-111-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch increases the tx_queue_len to 20 so as to minimize the jitter in the throughput. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: fix system freeze caused by an infinite loop [v1]Prasanna S. Panchamukhi2010-05-111-5/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an infinite loop caused by i2400m_tx_fifo_push() due to a corner case where there is no tail space in the TX FIFO. Please refer the documentation in the code for details. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: modify i2400m_tx_fifo_push() to check for head room space in ↵Prasanna S. Panchamukhi2010-05-111-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the TX FIFO [v1] This fixes i2400m_tx_fifo_push(); the check for having enough space in the TX FIFO's tail was obscure and broken in certain corner cases. The new check works in all cases and is way clearer. Please refer the documentation in the code for details. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: fix BUILD_BUG_ON() to use the maximum message size constant [v1]Prasanna S. Panchamukhi2010-05-111-15/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The older method of computing the maximum PDU size relied on a method that doesn't work when we prop the maximum number of payloads up to the physical limit, and thus we kill the whole computation and just verify that the constants are congruent. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: limit the message size upto 16KiB [v1]Prasanna S. Panchamukhi2010-05-111-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Intel Wimax i3200, i5x50 and i6x50 specification documents, the maximum size of each TX message can be upto 16KiB. This patch modifies the i2400m_tx() routine to check that the message size does not exceed the 16KiB limit. Please refer the documentation in the code for details. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: increase the maximum number of payloads per message to 60 [v1]Prasanna S. Panchamukhi2010-05-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to Intel Wimax i3200, i5x50 and i6x50 device specification documents, the maximum number of payloads per message can be up to 60. Increasing the number of payloads to 60 per message helps to accommodate smaller payloads in a single transaction. This patch increases the maximum number of payloads from 12 to 60 per message. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com>
| * | | wimax/i2400m: Reset the TX FIFO indices when allocating the TX FIFO in ↵Cindy H Kao2010-05-111-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tx_setup() This patch makes sure whenever tx_setup() is invoked during driver initialization or device reset where TX FIFO is released and re-allocated, the indices tx_in, tx_out, tx_msg_size, tx_sequence, tx_msg are properly initialized. When a device reset happens and the TX FIFO is released/re-allocated, a new block of memory may be allocated for the TX FIFO, therefore tx_msg should be cleared so that no any TX threads (tx_worker, tx) would access to the out-of-date addresses. Also, the TX threads use tx_in and tx_out to decide where to put the new host-to-device messages and from where to copy them to the device HW FIFO, these indices have to be cleared so after the TX FIFO is re-allocated during the reset, the indices both refer to the head of the FIFO, ie. a new start. The same rational applies to tx_msg_size and tx_sequence. To protect the indices from being accessed by multiple threads simultaneously, the lock tx_lock has to be obtained before the initializations and released afterwards. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: Correct the error path handlers order in i2400m_post_reset()Cindy H Kao2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When bus_setup fails in i2400m_post_reset(), it falls to the error path handler "error_bus_setup:" which includes unlock the mutext. However, we didn't ever try to the obtain the lock when running bus_setup. The patch is to fix the misplaced error path handler "error_bus_setup:". Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: add the error recovery mechanism on TX pathCindy H Kao2010-05-113-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an error recovery mechanism on TX path. The intention is to bring back the device to some known state whenever TX sees -110 (-ETIMEOUT) on copying the data to the HW FIFO. The TX failure could mean a device bus stuck or function stuck, so the current error recovery implementation is to trigger a bus reset and expect this can bring back the device. Since the TX work is done in a thread context, there may be a queue of TX works already that all hit the -ETIMEOUT error condition because the device has somewhat stuck already. We don't want any consecutive bus resets simply because multiple TX works in the queue all hit the same device erratum, the flag "error_recovery" is introduced to denote if we are ready for taking any error recovery. See @error_recovery doc in i2400m.h. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: fix for missed reset events if triggered by dev_reset_handle()Cindy H Kao2010-05-112-16/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is only seen on SDIO interface since on USB, a bus reset would really re-probe the driver, but on SDIO interface, a bus reset will not re-enumerate the SDIO bus, so no driver re-probe is happening. Therefore, on SDIO interface, the reset event should be still detected and handled by dev_reset_handle(). Problem description: Whenever a reboot barker is received during operational mode (i2400m->boot_mode == 0), dev_reset_handle() is invoked to handle that function reset event. dev_reset_handle() then sets the flag i2400m->boot_mode to 1 indicating the device is back to bootmode before proceeding to dev_stop() and dev_start(). If dev_start() returns failure, a bus reset is triggered by dev_reset_handle(). The flag i2400m->boot_mode then remains 1 when the second reboot barker arrives. However the interrupt service routine i2400ms_rx() instead of invoking dev_reset_handle() to handle that reset event, it filters out that boot event to bootmode because it sees the flag i2400m->boot_mode equal to 1. The fix: Maintain the flag i2400m->boot_mode within dev_reset_handle() and set the flag i2400m->boot_mode to 1 when entering dev_reset_handle(). It remains 1 until the dev_reset_handle() issues a bus reset. ie: the bus reset is taking place just like it happens for the first time during operational mode. To denote the actual device state and the state we expect, a flag i2400m->alive is introduced in addition to the existing flag i2400m->updown. It's maintained with the same way for i2400m->updown but instead of reflecting the actual state like i2400m->updown does, i2400m->alive maintains the state we expect. i2400m->alive is set 1 just like whenever i2400m->updown is set 1. Yet i2400m->alive remains 1 since we expect the device to be up all the time until the driver is removed. See the doc for @alive in i2400m.h. An enumeration I2400M_BUS_RESET_RETRIES is added to define the maximum number of bus resets that a device reboot can retry. A counter i2400m->bus_reset_retries is added to track how many bus resets have been retried in one device reboot. If I2400M_BUS_RESET_RETRIES bus resets were retried in this boot, we give up any further retrying so the device would enter low power state. The counter i2400m->bus_reset_retries is incremented whenever dev_reset_handle() is issuing a bus reset and is cleared to 0 when dev_start() is successfully done, ie: a successful reboot. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: correct the error path handlers in dev_start()Cindy H Kao2010-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is to correct order of the handlers in the error path of dev_start(). When i2400m_firmware_check fails, all the works done before it should be released or cleared. Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: fix the race condition for accessing TX queueCindy H Kao2010-05-112-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The race condition happens when the TX queue is accessed by the TX work while the same TX queue is being destroyed because a bus reset is triggered either by debugfs entry or simply by failing waking up the device from WiMAX IDLE mode. This fix is to prevent the TX queue from being accessed by multiple threads Signed-off-by: Cindy H Kao <cindy.h.kao@intel.com>
| * | | wimax/i2400m: fix insufficient size of Tx buffer for 12 payload of 1400 MTU.Prasanna S. Panchamukhi2010-05-111-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch increases the Tx buffer size so as to accommodate 12 payloads of 1408 (1400 MTU 16 bytes aligned). Currently Tx buffer is 32 KiB which is insufficient to accommodate 12 payloads of 1408 size. This patch - increases I2400M_TX_BUF_SIZE from 32KiB to 64KiB - Adds a BUILD_BUG_ON if the calculated buffer size based on the given MTU exceeds the I2400M_TX_BUF_SIZE. Below is how we calculate the size of the Tx buffer. Payload + 4 bytes prefix for each payload (1400 MTU 16 bytes boundary aligned) = (1408 + sizeof(struct i2400m_pl_data_hdr)) * I2400M_TX_PLD_MAX Adding 16 byte message header = + sizeof(struct i2400m_msg_hdr) Aligning to 256 byte boundary Total Tx buffer = (((((1408 + sizeof(struct i2400m_pl_data_hdr)) * I2400M_TX_PLD_MAX )+ sizeof(struct i2400m_msg_hdr)) / 256) + 1) * 256 * 2 Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | | wimax/i2400m: move I2400M_MAX_MTU enum from netdev.c to i2400m.hPrasanna S. Panchamukhi2010-05-112-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch moves I2400M_MAX_MTU enum defined in netdev.c to i2400m.h. Follow up changes will make use of this value in other location, thus requiring it to be moved to a global header file i2400m.h. Signed-off-by: Prasanna S. Panchamukhi <prasannax.s.panchamukhi@intel.com> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
| * | | wimax/i2400m: fix incorrect return -ESHUTDOWN when there is no Tx buffer ↵Prasanna S.Panchamukhi2010-05-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | available i2400m_tx() routine was returning -ESHUTDOWN even when there was no Tx buffer available. This patch fixes the i2400m_tx() to return -ESHUTDOWN only when the device is down(i2400m->tx_buf is NULL) and also to return -ENOSPC when there is no Tx buffer. Error seen in the kernel log. kernel: i2400m_sdio mmc0:0001:1: can't send message 0x5606: -108 kernel: i2400m_sdio mmc0:0001:1: Failed to issue 'Enter power save'command: -108 Signed-off-by: Prasanna S.Panchamukhi <prasannax.s.panchamukhi@intel.com>
* | | | rndis_host: Poll status channel before control channelBen Hutchings2010-05-161-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some RNDIS devices don't respond on the control channel until polled on the status channel. In particular, this was reported to be the case for the 2Wire HomePortal 1000SW. This is roughly based on a patch by John Carr <john.carr@unrouted.co.uk> which is reported to be needed for use with some Windows Mobile devices and which is currently applied by Mandriva. Reported-by: Mark Glassberg <vzeeaxwl@myfairpoint.net> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Tested-by: Mark Glassberg <vzeeaxwl@myfairpoint.net> 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/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | qlcnic: cleanup dma mask settingAmit Kumar Salecha2010-05-142-70/+24Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Device support 64 bit dma mask. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | qlcnic: fix caching window registerAmit Kumar Salecha2010-05-143-18/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Window register is not per pci-func, so caching can result in expected result. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | qlcnic: remove obsolete registerAmit Kumar Salecha2010-05-143-16/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MSI_MODE, CAPABILITIES_FW and SCRATCHPAD registers are obsolete. Driver should not use them. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | qlcnic: fix context cleanupAmit Kumar Salecha2010-05-141-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before going for recovery, every pci-func should check fw state, irrespective of device state. This to avoid unnecssary sending of command for ctx destroy. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | sky2: version 1.28stephen hemminger2010-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Version 1.28 Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | sky2: Avoid allocating memory in sky2_resumeMike McCormack2010-05-141-15/+5Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allocating memory can fail, and since we have the memory we need in sky2_resume when sky2_suspend is called, just stop the hardware without freeing the memory it's using. This avoids the possibility of failing because we can't allocate memory in sky2_resume(), and allows sharing code with sky2_restart(). Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | | | sky2: Refactor down/up code out of sky2_restart()Mike McCormack2010-05-141-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Code to bring down all sky2 interfaces and bring it up again can be reused in sky2_suspend and sky2_resume. Factor the code to bring the interfaces down into sky2_all_down and the up code into sky2_all_up. Signed-off-by: Mike McCormack <mikem@ring3k.org> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>