summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* wan: convert drivers to netdev_tx_tStephen Hemminger2009-09-0121-46/+57
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tokenring: convert to netdev_tx_tStephen Hemminger2009-09-016-18/+29
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* usbnet: convert to netdev_tx_tStephen Hemminger2009-09-018-13/+19
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* isdn: convert to netdev_tx_tStephen Hemminger2009-09-012-3/+4
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* convert hamradio drivers to netdev_txreturnt_tStephen Hemminger2009-09-016-7/+10
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netdev: convert pseudo-devices to netdev_tx_tStephen Hemminger2009-09-011-10/+4
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io: Generate complete messages using single line DBG_PRINTsJoe Perches2009-08-302-161/+165
| | | | | | | | | | | | | | | | | | | | | Single line log messages should be emitted by a single call where possible. Converted multiple calls to DBG_PRINT to single call form. Removed "s2io:" preface from DBG_PRINTs. The DBG_PRINT macro now emits a log level and is surrounded by a do {...} while (0) All s2io log output is now prefaced with KBUILD_MODNAME ": " via pr_fmt. The DBG_PRINT macro should probably be converted to use the dev_<level> form eventually. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Convert skipped nic->config.tx_cfg[i]. to tx_cfg->Joe Perches2009-08-301-1/+1
| | | | | | | | Missed doing the conversion in earlier patch. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Standardize statistics accessorsJoe Perches2009-08-301-443/+408
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regularize the declaration and uses of struct config_param *config = &sp->config; struct mac_info *mac_control = &sp->mac_control; and use struct stat_block *stats = mac_control->stats_info; struct swStat *swstats = &stats->sw_stat; struct xpakStat *xstats = &stats->xpak_stat; and convert the longish uses like nic->mac_control.stats_info->sw_stat.<foo> to swstats-><foo> etc. This also makes the statistics code marginally smaller and presumably faster. Old: $ size s2io.o text data bss dec hex filename 114289 516 33360 148165 242c5 s2io.o New: $ size s2io.o text data bss dec hex filename 114097 516 33360 147973 24205 s2io.o Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: fix spelling explainationJoe Perches2009-08-301-1/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: convert printks to pr_<level>Joe Perches2009-08-301-10/+7
| | | | | | | | Fixed trivial typo as well Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Make more conforming to normal kernel styleJoe Perches2009-08-301-1108/+1124
| | | | | | | | | | | | | Still has a few long lines. checkpatch was: total: 263 errors, 53 warnings, 8751 lines checked is: total: 4 errors, 35 warnings, 8767 lines checked Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: use kzallocJoe Perches2009-08-301-5/+2
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Use calculated size in kmallocsJoe Perches2009-08-301-35/+28
| | | | | | | | Use consistent style. Don't calculate the kmalloc size multiple times Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Shorten code line length by using intermediate pointersJoe Perches2009-08-301-169/+224
| | | | | | | | | | | | | | Repeated variable use and line wrapping is hard to read. Use temp variables instead of direct references. struct fifo_info *fifo = &mac_control->fifos[i]; struct ring_info *ring = &mac_control->rings[i]; struct tx_fifo_config *tx_cfg = &config->tx_cfg[i]; struct rx_ring_config *rx_cfg = &config->rx_cfg[i]; Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* s2io.c: Use const for stringsJoe Perches2009-08-301-4/+4
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Sreenivasa Honnur <sreenivasa.honnur@neterion.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* WAN: bit and/or confusionroel kluin2009-08-301-4/+4
| | | | | | | Fix the tests that check whether Frame* bits are not set Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Implement suspend/resume and Wake-On-LAN supportAnton Vorontsov2009-08-303-0/+126
| | | | | | | | | | | | | | | This patch implements suspend/resume and WOL support for UCC Ethernet driver. We support two wake up events: wake on PHY/link changes and wake on magic packet. In some CPUs (like MPC8569) QE shuts down during sleep, so magic packet detection is unusable, and also on resume we should fully reinitialize UCC structures. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Remove UGETH_MAGIC_PACKET Kconfig symbol and codeAnton Vorontsov2009-08-302-36/+0
| | | | | | | | | | | This patch removes currently unused UGETH_MAGIC_PACKET Kconfig symbol and code, i.e. magic_packet_detection_{enable,disable} functions. The two functions each contain just two steps that we'll place into suspend/resume code path under CONFIG_PM. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Factor out MAC initialization steps into a callAnton Vorontsov2009-08-301-35/+52
| | | | | | | | This patch factors out MAC initialization into ucc_geth_init_mac() function that we'll use for suspend/resume. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* ucc_geth: Fix NULL pointer dereference in uec_get_ethtool_stats()Anton Vorontsov2009-08-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 3e73fc9a12679a546284d597c1f19165792d0b83 ("ucc_geth: Fix IO memory (un)mapping code") I fixed ug_regs IO memory leak by properly freeing the allocated memory. But ethtool_stats() callback doesn't check for ug_regs being NULL, and that causes following oops if 'ethtool -S' is executed on a closed eth device: Unable to handle kernel paging request for data at address 0x00000180 Faulting instruction address: 0xc0208228 Oops: Kernel access of bad area, sig: 11 [#1] ... NIP [c0208228] uec_get_ethtool_stats+0x38/0x140 LR [c02559a0] ethtool_get_stats+0xf8/0x23c Call Trace: [ef87bcd0] [c025597c] ethtool_get_stats+0xd4/0x23c (unreliable) [ef87bd00] [c025706c] dev_ethtool+0xfe8/0x11bc [ef87be00] [c0252b5c] dev_ioctl+0x454/0x6a8 ... ---[ end trace 77fff1162a9586b0 ]--- Segmentation fault This patch fixes the issue. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-08-309-24/+2514
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
| * Bluetooth: Add USB autosuspend support to btusb driverOliver Neukum2009-08-241-20/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support of USB autosuspend to the btusb driver. If the device doesn't support remote wakeup, simple support based on up/down is provided. If the device supports remote wakeup, additional support for autosuspend while the interface is up is provided. This is done by queueing URBs in an anchor structure and waking the device up from a work queue on sending. Reception triggers remote wakeup. The last busy facility of the USB autosuspend code is used. To close a race between autosuspend and transmission, a counter of ongoing transmissions is maintained. Add #ifdefs for CONFIG_PM as necessary. Signed-off-by: Oliver Neukum <oliver@neukum.org> Tested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix false errors from bcsp_pkt_cull functionWending Weng2009-08-241-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message "Removed only %u out of %u pkts" is printed when multiple to be acked packets are queued. if (i++ >= pkts_to_be_removed) break; This will break out of the loop and increase the counter i when i==pkts_to_be_removed and the loop ends up with i=pkts_to_be_removed+1. The following line if (i != pkts_to_be_removed) { BT_ERR("Removed only %u out of %u pkts", i, pkts_to_be_removed); } will then display the false message. The counter i must not increase on the same statement. Signed-off-by: Wending Weng <wweng@rheinmetall.ca> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add missing kmalloc NULL tests to Marvell driverJulia Lawall2009-08-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check that the result of kmalloc is not NULL before dereferencing it. The patch also replaces kmalloc + memset by kzalloc. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ expression *x; identifier f; constant char *C; @@ x = \(kmalloc\|kcalloc\|kzalloc\)(...); ... when != x == NULL when != x != NULL when != (x || ...) ( kfree(x) | f(...,C,...,x,...) | *f(...,x,...) | *x->f ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix incorrect alignment in Marvell BT-over-SDIO driverBing Zhao2009-08-222-6/+9
| | | | | | | | | | | | | | | | | | The driver uses "u32" for alignment check and calculation which works only on 32-bit system. It will crash the 64-bit system. Replace "u32" with "unsigned long" to fix this issue. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove Enter/Leave debug statements from Marvell driverMarcel Holtmann2009-08-222-219/+23
| | | | | | | | | | | | | | | | | | The Marvell Bluetooth driver is full of Enter/Leave debug statements and all of them are really pointless and only clutter the code. Seems to be some left-overs when they ported the driver from Windows. For the Linux driver lets remove these. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix last few compiler warning within Marvell core driverMarcel Holtmann2009-08-221-4/+4
| | | | | | | | | | | | | | After fixing the driver to use skb_put properly for their HCI commands only a few compiler warnings are left. Add proper casting for them. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Marvell driver to use skb_put and hci_opcode_packMarcel Holtmann2009-08-221-14/+8
| | | | | | | | | | | | | | | | The Marvell driver has some weird quirks on how to construct proper SKBs with Bluetooth HCI commands. Fix it to use skb_put properly and also use hci_opcode_pack instead of self-crafted macro. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove private device name of Marvell SDIO driverMarcel Holtmann2009-08-222-5/+0
| | | | | | | | | | | | | | | | For some reason the btmrvl_device struct has a name field that the SDIO fills in, but then never ever uses again. That is totally pointless and so just remove it. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix module description strings for Marvell driverMarcel Holtmann2009-08-222-2/+2
| | | | | | | | | | | | | | Make the module description entries for the core and also the Marvell SDIO driver match common practive inside the Bluetooth subsystem. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix complicated assignment of firmware for Marvell devicesMarcel Holtmann2009-08-222-53/+38
| | | | | | | | | | | | | | | | | | | | | | The Marvell Bluetooth SDIO driver has a really complicated concept on how firmware names are assigned to specific device ids. Fix that by doing a proper structure and assign it to the module device table. And while at it fix various coding style weirdness that is still present in this driver. Signed-off-by: Marcel Holtman <marcel@holtmann.org>
| * Bluetooth: Some coding style cleanup for Marvell core driverMarcel Holtmann2009-08-221-52/+45
| | | | | | | | | | | | | | | | The Marvell core Bluetooth driver has various weird casting and unneeded braces in its code that makes it hard to read. Remove all of these to make the code a little bit simpler. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove pointless casts from Marvell debugfs supportMarcel Holtmann2009-08-221-143/+106
| | | | | | | | | | | | | | | | The Marvell Bluetooth driver has debugfs support and they are casting like there is no tomorrow. Remove all of them and magically the code becomes more readable. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Remove pointless ifdef protection for Marvell header filesMarcel Holtmann2009-08-222-10/+0
| | | | | | | | | | | | | | | | | | Both header files of the Marvell Bluetooth driver are private anyway and if the driver happens to include them twice or they create a circular dependency then the driver needs fixing. So just remove both pointless ifdefs. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix compilation of Marvell driver without debugfsMarcel Holtmann2009-08-221-1/+3
| | | | | | | | | | | | | | | | | | The Makefile entry for the Marvell driver is broken when it comes to handling the optional DEBUG_FS correctly. That must have been the reason why they were using select in Kconfig in the first place. Fix this and make it really optional. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Fix Kconfig for Marvell Bluetooth driverMarcel Holtmann2009-08-221-2/+1
| | | | | | | | | | | | | | | | | | | | The Marvell driver selects DEBUG_FS and FW_LOADER for its core driver and that is pointless. Don't select DEBUG_FS since it is either enabled or not and it is not for the driver to enable it. Also FW_LOADER is only used within the SDIO driver and so just have that one select the FW_LOADER option. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add debugfs support to btmrvl driverBing Zhao2009-08-225-1/+487
| | | | | | | | | | | | | | | | | | | | | | | | | | | | /debug/btmrvl/config/ /debug/btmrvl/status/ See Documentation/btmrvl.txt for details. This patch incorporates a lot of comments given by Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre. Signed-off-by: Rahul Tank <rahult@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add Marvell BT-over-SDIO driverBing Zhao2009-08-224-0/+1255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver supports Marvell Bluetooth enabled devices with SDIO interface. Currently only SD8688 chip is supported. The helper/firmware images of SD8688 can be downloaded from this tree: git://git.infradead.org/users/dwmw2/linux-firmware.git This patch incorporates a lot of comments given by Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre. Signed-off-by: Rahul Tank <rahult@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Add btmrvl driver for Marvell Bluetooth devicesBing Zhao2009-08-224-0/+867
| | | | | | | | | | | | | | | | | | | | | | | | | | This driver provides basic definitions and library functions to support Marvell Bluetooth enabled devices, such as 88W8688 WLAN/BT combo chip. This patch incorporates a lot of comments given by Nicolas Pitre <nico@marvell.com>. Many thanks to Nicolas Pitre. Signed-off-by: Rahul Tank <rahult@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
| * Bluetooth: Improve USB driver throughput by increasing the frame sizeVikram Kandukuri2009-08-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch increases the receive buffer size to HCI_MAX_FRAME_SIZE which improves the RX throughput considerably. Tested against BRM/Atheros/CSR USB Dongles with PAN profile using iperf and chariot. This gave significant (around 40%) increase in performance (increased from 0.8 to 1.5 Mb/s in Sheld room) Signed-off-by: Vikram Kandukuri <vikram.kandukuri@atheros.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
* | tg3: Update version to 3.101Matt Carlson2009-08-291-2/+2
| | | | | | | | | | | | | | This patch updates the tg3 version to 3.101. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Move per-int tx members to a per-int structMatt Carlson2009-08-292-79/+86
| | | | | | | | | | | | | | | | | | | | This patch moves the tx_prod, tx_cons, tx_pending, tx_ring, and tx_buffers transmit ring device members to a per-interrupt structure. It also adds a new transmit producer mailbox member (prodmbox) and converts the code to use it rather than a preprocessor constant. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Move per-int rx members to per-int structMatt Carlson2009-08-292-29/+37
| | | | | | | | | | | | | | | | | | | | This patch moves the rx_rcb, rx_rcb_mapping, and rx_rcb_ptr return ring device members to a per-interrupt structure. It also adds a new return ring consumer mailbox register member (consmbox) and converts the code to use it rather than a preprocessor constant. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Move general int members to a per-int structMatt Carlson2009-08-292-66/+80
| | | | | | | | | | | | | | | | | | | | This patch moves the last_tag, last_tag_irq, and hw_status device members to a per-interrupt structure. It also adds a new interrupt mailbox member (int_mbox) and converts the code to use it rather than a direct preprocessor constant. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Convert napi handlers to use tnapiMatt Carlson2009-08-291-23/+32
| | | | | | | | | | | | | | | | This patch converts the napi interrupt handler functions to accept and use tg3_napi structures. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Convert ISR parameter to tnapiMatt Carlson2009-08-291-24/+25
| | | | | | | | | | | | | | | | | | | | | | This patch migrates the ISR parameter from struct net_device to struct tg3_napi. Checkpatch complains about the existence of the preexisting IRQF_SAMPLE_RANDOM flag. I've opted to keep this patch conservative and let it continue to exist until the flag gets officially purged from the kernel. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Move napi to per-int structMatt Carlson2009-08-292-23/+25
| | | | | | | | | | | | | | | | This patch creates a per-interrupt data structure, moves the napi member over, and creates a tg3 pointer back to the device structure. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Cleanup interrupt setup / teardownMatt Carlson2009-08-291-48/+46
| | | | | | | | | | | | | | | | | | | | Later patches will be adding MSIX support, which will complicate interrupt initialization. This patch prepares for the integration by breaking out the interrupt setup and teardown code into separate functions and cleaning up the error return paths. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Use ext rx bdsMatt Carlson2009-08-292-9/+10
| | | | | | | | | | | | | | | | | | The 5717 only uses extended buffer descriptors for the jumbo producer ring. Extended buffer descriptors are available on all devices that support a separate jumbo producer ring so make the change universal. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>