aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2006-12-02e1000: increment version to 7.3.15-k2Auke Kok1-1/+1
Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: add dynamic itr modesJesse Brandeburg3-39/+228
Add a new dynamic itr algorithm, with 2 modes, and make it the default operation mode. This greatly reduces latency and increases small packet performance, at the "cost" of some CPU utilization. Bulk traffic throughput is unaffected. The driver can limit the amount of interrupts per second that the adapter will generate for incoming packets. It does this by writing a value to the adapter that is based on the maximum amount of interrupts that the adapter will generate per second. Setting InterruptThrottleRate to a value greater or equal to 100 will program the adapter to send out a maximum of that many interrupts per second, even if more packets have come in. This reduces interrupt load on the system and can lower CPU utilization under heavy load, but will increase latency as packets are not processed as quickly. The default behaviour of the driver previously assumed a static InterruptThrottleRate value of 8000, providing a good fallback value for all traffic types,but lacking in small packet performance and latency. The hardware can handle many more small packets per second however, and for this reason an adaptive interrupt moderation algorithm was implemented. Since 7.3.x, the driver has two adaptive modes (setting 1 or 3) in which it dynamically adjusts the InterruptThrottleRate value based on the traffic that it receives. After determining the type of incoming traffic in the last timeframe, it will adjust the InterruptThrottleRate to an appropriate value for that traffic. The algorithm classifies the incoming traffic every interval into classes. Once the class is determined, the InterruptThrottleRate value is adjusted to suit that traffic type the best. There are three classes defined: "Bulk traffic", for large amounts of packets of normal size; "Low latency", for small amounts of traffic and/or a significant percentage of small packets; and "Lowest latency", for almost completely small packets or minimal traffic. In dynamic conservative mode, the InterruptThrottleRate value is set to 4000 for traffic that falls in class "Bulk traffic". If traffic falls in the "Low latency" or "Lowest latency" class, the InterruptThrottleRate is increased stepwise to 20000. This default mode is suitable for most applications. For situations where low latency is vital such as cluster or grid computing, the algorithm can reduce latency even more when InterruptThrottleRate is set to mode 1. In this mode, which operates the same as mode 3, the InterruptThrottleRate will be increased stepwise to 70000 for traffic in class "Lowest latency". Setting InterruptThrottleRate to 0 turns off any interrupt moderation and may improve small packet latency, but is generally not suitable for bulk throughput traffic. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Cc: Rick Jones <rick.jones2@hp.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: add dynamic generic MSI interrupt routineJesse Brandeburg1-2/+88
Add a generic MSI interrupt routine that is IO read-free, speeding up MSI interrupt handling. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: reorder e1000_param.cAuke Kok1-58/+20
This file needs some cleanups and reordering - logically order it so that relevant defines and code are together with properly quoted defaults. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: Only set IDE for tx when we are using TIDV/TADVJesse Brandeburg1-2/+5
Spec fix: don't set IDE unless we are actually setting the tx int delay time. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2006-12-02e1000: rename ICH8 flash macrosJeff Kirsher3-102/+98
ICH8 will soon be followed by newer chipsets bearing the same acronym, thus we remove the '8' and make it independent of the version number in the platform name. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: add queue restart counterJesse Brandeburg3-1/+6
Add a netif_wake/start_queue counter to the ethtool statistics to indicated to the user that their transmit ring could be too small for their workload. Signed-off-by: Jesse brandeburg <jesse.brandeburg@intel.com> Cc: Jamal Hadi <hadi@cyberus.ca> Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: New hardware supportAuke Kok4-0/+11
Add support for a Low Profile quad-port PCI-E adapter and 2 variants of the ICH8 systems' onboard NIC's. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: Remove unneeded and unwanted memsetsJesse Brandeburg1-3/+10
This memsetting was added in a paranoid rage debugging TX hangs, but are no longer of importance. We can beef up the performance quite a bit removing them. Make sure to fill in next_to_watch to allow this. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2006-12-02e1000: simplify skb_put call.Auke Kok1-4/+3
Simplify two calls to skb_put by removing one call to it. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: reorder pci-e infor structJeff Kirsher1-3/+5
Order pci-e capability struct according to bus/pci bus width ordering preserving the hard pci spec numbers. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2006-12-02e1000: fix VR powerdown codeJeff Kirsher2-4/+6
On ich systems during PHY power down to D3, the voltage regulators were left on. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2006-12-02e1000: add mmiowb() for IA64 to sync tail writesJesse Brandeburg1-0/+3
IA64 SMP systems were seeing TX issues with multiple cpu's attempting to write tail registers unordered. This mmiowb() fixes the issue. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2006-12-02e1000: Enble early receive (ERT) on 82573Auke Kok1-0/+6
Enable early receives on 82573 for jumbo frame performance. Jumbo's are only supported on 82573L with ASPM disabled. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: FIX: enable hw TSO for IPV6Auke Kok3-5/+24
Enable TSO for IPV6. All e1000 hardware supports it. This reduces CPU utilizations by 50% when transmitting IPv6 frames. Fix symbol naming enabling ipv6 TSO. Turn off TSO6 for 10/100. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: Remove DISABLE_MULR debug codeAuke Kok1-8/+0
Remove debugging code disabling MULR (multiple reads). It's not usable for a wide audience and there are no known problems with MULR right now. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02e1000: whitespace changes, comments, typosAuke Kok5-68/+72
Small whitespace changes, comment changes, typo fixes. Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
2006-12-02[PATCH] zd1211rw: Add ID for ZyXEL G-220Daniel Drake1-0/+1
Tested by Newsome on IRC zd1211 chip 0586:3401 v4330 high 00-13-49 AL2230_RF pa0 g--- Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02Add NetXen 1G/10G ethernet driver.Amit S. Kale14-0/+7250
Signed-off-by: Amit S. Kale <amitkale@netxen.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] bcm43xx: add PCI-E codeStefano Brivio3-44/+156
The current bcm43xx driver does not contain code to handle PCI-E interfaces such as the BCM4311 and BCM4312. This patch, originally written by Stefano Brivio adds the necessary code to enable these interfaces. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] prism54: use BUILD_BUG_ONAlexey Dobriyan1-8/+8
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] atmel: output signal strength informationHolden Karau1-0/+8
Output signal strength information as part of iwlist scan - before it did not output any signal strength related information. Signed-off-by: Holden Karau <holden@pigscanfly.ca> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] prism54: whitespace cleanupDmitry Torokhov14-102/+89
NET: prism54 - whitespace cleanup Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] prism54: fix potential race in reset schedulingDmitry Torokhov1-10/+13
NET: prism54 - fix potential race in reset scheduling There appears to be a race in reset scheduling logic - thread responsible for reseting the interface should clear "reset pending" flag before restarting the queue, otherwise timeout handler might not schedule another reset even if it is needed. This race is mostly theoretical as far as I can see but a race nonetheless. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] atmel: whitespace cleanupDmitry Torokhov3-45/+45
NET: atmel: whitespace cleanup Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] atmel: use ARRAY_SIZE()Dmitry Torokhov1-10/+10
NET: atmel - switch to using ARRAY_SIZE() Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] atmel: save on array initializationDmitry Torokhov1-1/+1
NET: atmel - do not initialize array over and over again Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] ieee80211: Move IV/ICV stripping into ieee80211_rxDaniel Drake2-19/+1
This patch adds a host_strip_iv_icv flag to ieee80211 which indicates that ieee80211_rx should strip the IV/ICV/other security features from the payload. This saves on some memmove() calls in the driver and seems like something that belongs in the stack as it can be used by bcm43xx, ipw2200, and zd1211rw I will submit the ipw2200 patch separately as it needs testing. This patch also adds some sensible variable reuse (idx vs keyidx) in ieee80211_rx Signed-off-by: Daniel Drake <dsd@gentoo.org> Acked-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] zd1211rw: Add 3 more device IDsDaniel Drake1-0/+3
iNexQ UR055g: Tested by Todor T Zviskov zd1211 chip 1435:0711 v4330 high 00-10-a7 AL2230_RF pa0 g-- ZyXEL AG-225, FCC ID SI5WUB410: Tested by Nathan zd1211 chip 0586:3409 v4810 full 00-13-49 AL7230B_RF pa0 g--- Yakumo QuickWLAN USB: Tested by EdB zd1211 chip 0b3b:1630 v4330 high 00-01-36 RF2959_RF pa0 --- Signed-off-by: Daniel Drake <dsd@gentoo.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] bcm43xx: output proper link quality with scansLarry Finger3-3/+5
The bcm43xx-softmac driver fails to set two quantities needed for iwlist to compute wireless quality when scanning. As a result, userland programs using the quality to determine the best connection fail. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-12-02[PATCH] 8390 fixes - the final chunk (h8300)Al Viro3-13/+16
The rest of 8390 conversions; ifdef cascade in 8390.h is gone now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] 8390 cleanup - etherh iomem annotationsAl Viro1-10/+10
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] 8390 fixes - m68k oddballsAl Viro5-43/+52
more 8390 conversions - mac8390, zorro8390 and hydra got the same treatment as arm etherh; one more case in 8390.h ifdef cascade is gone. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] beginning of 8390 fixes - generic and arm/etherhAl Viro5-1099/+1135
etherh and a handful of other odd drivers use different macros when building 8390.c. Since we generate a single 8390.o and then link with it, in any config with both oddball and normal 8390-based driver we will end up with breakage in at least one of them. Solution: take most of 8390.c into lib8390.c and have 8390.c, etherh.c and the rest of oddballs #include it. Helper macros are taken from 8390.h to whoever includes lib8390.c. That way odd drivers get separate instances of compiled 8390 stuff and stop stepping on each other's toes. 8390.h gets cleaned up - we don't have the cascade of ifdefs in there and are left with the stuff that can be used by any 8390-based driver. Current problems are exactly because of that cascade - we attempt to choose the set of helpers by looking at config and that, of course, doesn't work well when we have several sets needed by various drivers in our config. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sk98lin: MII ioctl supportStephen Hemminger1-0/+54
Add MII ioctl support to the deprecated sk98lin driver. This allows comparison with skge driver's PHY settings. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] sk98lin: ethtool register dumpStephen Hemminger1-0/+26
Add support for dumping the registers in the deprecated sk98lin driver. This is allows for easier comparison with settings in new skge driver. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] pci_module_init() convertion in olympic.cHenrik Kretzschmar1-1/+1
pci_module_init() convertion in olympic.c Signed-off-by: Henrik Kretzschmar <henne@nachtwindheim.de> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] Remove unnecessary check in drivers/net/depca.cEric Sesterhenn1-15/+13
This was spotted by coverity (cid #793). All callers dereference dev before calling this functions, and we dereference it earlier in the function, when initializing lp. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] forcedeth: power management supportFrancois Romieu1-1/+46
Tobias Diedrich <ranma@tdiedrich.de> sayeth: Vanilla forcedeth doesn't seem to support suspend and an ifdown/up-cycle is needed to get it working again after suspend. Francois Romieu's "Awfully experimental" patch is working just fine for me (with message signalled interrupts disabled) and has survived quite a few suspend/resume cycles. So I'd very much like to see (at least partial, with msi disabled) suspend support for forcedeth in mainline. (Addresses http://bugzilla.kernel.org/show_bug.cgi?id=6398) Cc: Francois Romieu <romieu@fr.zoreil.com> Cc; Jeff Garzik <jeff@garzik.org> Cc: Manfred Spraul <manfred@colorfullife.com> Cc: Ayaz Abdulla <aabdulla@nvidia.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] 2.6.18: sb1250-mac: Phylib IRQ handling fixesMaciej W. Rozycki1-6/+26
This patch fixes a couple of problems discovered with interrupt handling in the phylib core, namely: 1. The driver uses timer and workqueue calls, but does not include <linux/timer.h> nor <linux/workqueue.h>. 2. The driver uses schedule_work() for handling interrupts, but does not make sure any pending work scheduled thus has been completed before driver's structures get freed from memory. This is especially important as interrupts may keep arriving if the line is shared with another PHY. The solution is to ignore phy_interrupt() calls if the reported device has already been halted and calling flush_scheduled_work() from phy_stop_interrupts() (but guarded with current_is_keventd() in case the function has been called through keventd from the MAC device's close call to avoid a deadlock on the netlink lock). Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> patch-mips-2.6.18-20060920-phy-irq-16 Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-02[PATCH] 2.6.18: sb1250-mac: Broadcom PHY supportMaciej W. Rozycki3-0/+182
This patch adds support for interrupt-driven operation of the Broadcom Gigabit Ethernet PHYs. I have included device IDs for the parts used on Broadcom SiByte evaluation boards; more can be added as a need arises. They are apparently generally software-compatible with one another. Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> patch-mips-2.6.18-20060920-broadcom-phy-15 Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-12-01Merge branch 'upstream-linus' of ↵Linus Torvalds10-73/+74
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6 * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: [PATCH] Fix an offset error when reading the CS89x0 ADD_PORT register [PATCH] spidernet: poor network performance [PATCH] Spidernet: remove ETH_ZLEN check in earlier patch [PATCH] bonding: fix an oops when slave device does not provide get_stats [PATCH] drivers/net: SAA9730: Fix build error Revert "[PATCH] zd1211rw: Removed unneeded packed attributes" [PATCH] zd1211rw: Fix of a locking bug [PATCH] softmac: remove netif_tx_disable when scanning [PATCH] ieee80211: Fix kernel panic when QoS is enabled
2006-12-01Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdogLinus Torvalds6-4/+1423
* master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog: [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 4 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 3 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 2 [WATCHDOG] MIPS RM9000 on-chip watchdog device - patch 1 [WATCHDOG] MIPS RM9000 on-chip watchdog device [WATCHDOG] Add iTCO vendor specific support [WATCHDOG] sc1200wdt.c pnp unregister fix. [WATCHDOG] config.h removal [WATCHDOG] NS pc87413-wdt Watchdog driver - fixes [WATCHDOG] NS pc87413-wdt Watchdog driver v1.1 [WATCHDOG] NS pc87413-wdt Watchdog driver
2006-12-01Merge branch 'upstream-linus' of ↵Linus Torvalds39-5/+60
master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev: [PATCH] libata: add missing sht->slave_destroy [PATCH] ahci: ignore PORT_IRQ_IF_ERR on JMB controllers
2006-12-01Merge branch 'for-linus' of ↵Linus Torvalds30-186/+281
git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: (25 commits) IB/ucm: Fix deadlock in cleanup IB/cm: Fix automatic path migration support IPoIB: Fix skb leak when freeing neighbour IB/srp: Fix memory leak on reconnect RDMA/addr: list_move() cleanups RDMA/addr: Fix some cancellation problems in process_req() RDMA/amso1100: Prevent deadlock in destroy QP IB/mthca: Fix initial SRQ logsize for mem-free HCAs IB/ehca: Use WQE offset instead of WQE addr for pending work reqs RDMA/iwcm: Fix comment for iwcm_deref_id() to match code RDMA/iwcm: Remove unnecessary function argument RDMA/iwcm: Remove unnecessary initializations RDMA/iwcm: Fix memory leak RDMA/iwcm: Fix memory corruption bug in cm_work_handler() IB: Convert kmem_cache_t -> struct kmem_cache IB/ipath: Fix typo in pma_counter_select subscript RDMA/amso1100: Fix section mismatches IB/mthca: Fix section mismatches IB/srp: Increase supported CDB size RDMA/cm: Remove setting local write as part of QP access flags ...
2006-12-01Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds94-826/+1094
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (103 commits) usbcore: remove unused argument in autosuspend USB: keep count of unsuspended children USB hub: simplify remote-wakeup handling USB: struct usb_device: change flag to bitflag OHCI: make autostop conditional on CONFIG_PM USB: Add autosuspend support to the hub driver EHCI: Fix root-hub and port suspend/resume problems USB: create a new thread for every USB device found during the probe sequence USB: add driver for the USB debug devices USB: added dynamic major number for USB endpoints USB: pegasus error path not resetting task's state USB: endianness fix for asix.c USB: build the appledisplay driver USB serial: replace kmalloc+memset with kzalloc USB: hid-core: canonical defines for Apple USB device IDs USB: idmouse cleanup USB: make drivers/usb/core/driver.c:usb_device_match() static USB: lh7a40x_udc remove double declaration USB: pxa2xx_udc recognizes ixp425 rev b0 chip usbtouchscreen: add support for DMC TSC-10/25 devices ...
2006-12-01Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6Linus Torvalds23-216/+263
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (28 commits) PCI: make arch/i386/pci/common.c:pci_bf_sort static PCI: ibmphp_pci.c: fix NULL dereference pciehp: remove unnecessary pci_disable_msi pciehp: remove unnecessary free_irq PCI: rpaphp: change device tree examination PCI: Change memory allocation for acpiphp slots i2c-i801: SMBus patch for Intel ICH9 PCI: irq: irq and pci_ids patch for Intel ICH9 PCI: pci_{enable,disable}_device() nestable ports PCI: switch pci_{enable,disable}_device() to be nestable PCI: arch/i386/kernel/pci-dma.c: ioremap balanced with iounmap pci/i386: style cleanups PCI: Block on access to temporarily unavailable pci device pci: fix __pci_register_driver error handling pci: clear osc support flags if no _OSC method acpiphp: fix missing acpiphp_glue_exit() acpiphp: fix use of list_for_each macro Altix: Initial ACPI support - ROM shadowing. Altix: SN ACPI hotplug support. Altix: Add initial ACPI IO support ...
2006-12-01Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6Linus Torvalds29-442/+798
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (36 commits) Driver core: show drivers in /sys/module/ Documentation/driver-model/platform.txt update/rewrite Driver core: platform_driver_probe(), can save codespace driver core: Use klist_remove() in device_move() driver core: Introduce device_move(): move a device to a new parent. Driver core: make drivers/base/core.c:setup_parent() static driver core: Introduce device_find_child(). sysfs: sysfs_write_file() writes zero terminated data cpu topology: consider sysfs_create_group return value Driver core: Call platform_notify_remove later ACPI: Change ACPI to use dev_archdata instead of firmware_data Driver core: add dev_archdata to struct device Driver core: convert sound core to use struct device Driver core: change mem class_devices to be real devices Driver core: convert fb code to use struct device Driver core: convert firmware code to use struct device Driver core: convert mmc code to use struct device Driver core: convert ppdev code to use struct device Driver core: convert PPP code to use struct device Driver core: convert cpuid code to use struct device ...
2006-12-01Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds37-71/+69
* git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: Fix typos in drivers/isdn/hisax/isdnl2.c Fix typos in doc and comments BUG_ON conversion for fs/aio.c BUG_ON conversion for drivers/mmc/omap.c BUG_ON conversion for drivers/media/video/pwc/pwc-if.c Fix misc .c/.h comment typos Fix misc Kconfig typos Fix typos in /Documentation : Misc Fix typos in /Documentation : 'U-Z' Fix typos in /Documentation : 'T'' Fix jiffies.h comment tabify MAINTAINERS fix spelling error in include/linux/kernel.h mqueue.h: don't include linux/types.h
2006-12-01Driver core: platform_driver_probe(), can save codespaceDavid Brownell1-0/+48
This defines a new platform_driver_probe() method allowing the driver's probe() method, and its support code+data, to safely live in __init sections for typical system configurations. Many system-on-chip processors could benefit from this API, to the tune of recovering hundreds to thousands of bytes per driver. That's memory which is currently wasted holding code which can never be called after system startup, yet can not be removed. It can't be removed because of the linkage requirement that pointers to init section code (like, ideally, probe support) must not live in other sections (like driver method tables) after those pointers would be invalid. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01driver core: Use klist_remove() in device_move()Cornelia Huck1-2/+2
As pointed out by Alan Stern, device_move needs to use klist_remove which waits until removal is complete. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01driver core: Introduce device_move(): move a device to a new parent.Cornelia Huck1-0/+92
Provide a function device_move() to move a device to a new parent device. Add auxilliary functions kobject_move() and sysfs_move_dir(). kobject_move() generates a new uevent of type KOBJ_MOVE, containing the previous path (DEVPATH_OLD) in addition to the usual values. For this, a new interface kobject_uevent_env() is created that allows to add further environmental data to the uevent at the kobject layer. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: make drivers/base/core.c:setup_parent() staticAdrian Bunk1-2/+2
This patch makes the needlessly global setup_parent() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01driver core: Introduce device_find_child().Cornelia Huck1-0/+33
Introduce device_find_child() to match device_for_each_child(). Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01cpu topology: consider sysfs_create_group return valueHeiko Carstens1-23/+32
Take return value of sysfs_create_group() into account. That function got called in case of CPU_ONLINE notification. Since callbacks are not allowed to fail on CPU_ONLINE notification do the sysfs group creation on CPU_UP_PREPARE notification. Also remember if creation succeeded in a bitmask. So it's possible to know whether it's legal to call sysfs_remove_group or not. In addition some other minor stuff: - since CPU_UP_PREPARE might fail add CPU_UP_CANCELED handling as well. - use hotcpu_notifier instead of register_hotcpu_notifier. - #ifdef code that isn't needed in the !CONFIG_HOTPLUG_CPU case. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: Call platform_notify_remove laterBenjamin Herrenschmidt1-1/+1
Move the call to platform_notify_remove() to after the call to bus_remove_device(), where it belongs. It's bogus to notify the platform of removal while drivers are still attached to the device and possibly still operating since the platform might use this callback to tear down some resources used by the driver (ACPI bits, iommu table, ...) Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01ACPI: Change ACPI to use dev_archdata instead of firmware_dataBenjamin Herrenschmidt1-9/+11
Change ACPI to use dev_archdata instead of firmware_data This patch changes ACPI to use the new dev_archdata on i386, x86_64 and ia64 (is there any other arch using ACPI ?) to store it's acpi_handle. It also removes the firmware_data field from struct device as this was the only user. Only build-tested on x86 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: change mem class_devices to be real devicesGreg Kroah-Hartman1-4/+4
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert fb code to use struct deviceGreg Kroah-Hartman2-80/+99
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert firmware code to use struct deviceGreg Kroah-Hartman1-62/+57
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert mmc code to use struct deviceGreg Kroah-Hartman3-15/+15
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert ppdev code to use struct deviceGreg Kroah-Hartman1-3/+3
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert PPP code to use struct deviceGreg Kroah-Hartman1-2/+2
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01I2C: convert i2c-dev to use struct device instead of struct class_deviceGreg Kroah-Hartman1-13/+13
As class_device is going away eventually... Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert raw device code to use struct deviceGreg Kroah-Hartman1-6/+6
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert tty core to use struct deviceGreg Kroah-Hartman5-25/+27
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Also fixes up the isdn drivers that were putting something in the class device's directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: change misc class_devices to be real devicesGreg Kroah-Hartman4-30/+25
This also ment that some of the misc drivers had to also be fixed up as they were assuming the device was a class_device. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert vc code to use struct deviceGreg Kroah-Hartman1-8/+8
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: convert vt code to use struct deviceGreg Kroah-Hartman1-42/+39
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01CONFIG_SYSFS_DEPRECATED - class symlinksKay Sievers1-51/+98
Turn off class symlinks CONFIG_SYSFS_DEPRECATED is enabled. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01CONFIG_SYSFS_DEPRECATED - PHYSDEV* uevent variablesKay Sievers1-0/+4
Disable the PHYSDEV* uevent variables if CONFIG_SYSFS_DEPRECATED is enabled. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01CONFIG_SYSFS_DEPRECATED - device symlinksKay Sievers1-4/+14
Turn off device symlinks CONFIG_SYSFS_DEPRECATED is enabled. Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01CONFIG_SYSFS_DEPRECATED - bus symlinksKay Sievers1-3/+17
Turn off the bus symlinks if CONFIG_SYSFS_DEPRECATED is enabled Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: make old versions of udev work properlyGreg Kroah-Hartman1-14/+45
If CONFIG_SYSFS_DEPRECATED is enabled, old versions of udev will work properly with devices that are associated with a class. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver Core: Move virtual_device_parent() to core.cGreg Kroah-Hartman2-17/+17
It doesn't need to be global or in device.h Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: fix "driver" symlink timingKay Sievers1-30/+52
Create the "driver" link before the child device may be created by the probing logic. This makes it possible for userspace (udev), to determine the driver property of the parent device, at the time the child device is created. Signed-off-by: Kay Sievers <kay.sievers@novell.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Driver core: add notification of bus eventsBenjamin Herrenschmidt3-0/+36
I finally did as you suggested and added the notifier to the struct bus_type itself. There are still problems to be expected is something attaches to a bus type where the code can hook in different struct device sub-classes (which is imho a big bogosity but I won't even try to argue that case now) but it will solve nicely a number of issues I've had so far. That also means that clients interested in registering for such notifications have to do it before devices are added and after bus types are registered. Fortunately, most bus types that matter for the various usage scenarios I have in mind are registerd at postcore_initcall time, which means I have a really nice spot at arch_initcall time to add my notifiers. There are 4 notifications provided. Device being added (before hooked to the bus) and removed (failure of previous case or after being unhooked from the bus), along with driver being bound to a device and about to be unbound. The usage I have for these are: - The 2 first ones are used to maintain a struct device_ext that is hooked to struct device.firmware_data. This structure contains for now a pointer to the Open Firmware node related to the device (if any), the NUMA node ID (for quick access to it) and the DMA operations pointers & iommu table instance for DMA to/from this device. For bus types I own (like IBM VIO or EBUS), I just maintain that structure directly from the bus code when creating the devices. But for bus types managed by generic code like PCI or platform (actually, of_platform which is a variation of platform linked to Open Firmware device-tree), I need this notifier. - The other two ones have a completely different usage scenario. I have cases where multiple devices and their drivers depend on each other. For example, the IBM EMAC network driver needs to attach to a MAL DMA engine which is a separate device, and a PHY interface which is also a separate device. They are all of_platform_device's (well, about to be with my upcoming patches) but there is no say in what precise order the core will "probe" them and instanciate the various modules. The solution I found for that is to have the drivers for emac to use multithread_probe, and wait for a driver to be bound to the target MAL and PHY control devices (the device-tree contains reference to the MAL and PHY interface nodes, which I can then match to of_platform_devices). Right now, I've been polling, but with that notifier, I can more cleanly wait (with a timeout of course). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: ibmphp_pci.c: fix NULL dereferenceAdrian Bunk1-2/+2
The correct order is: NULL check before dereference Spotted by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01pciehp: remove unnecessary pci_disable_msiKenji Kaneshige1-2/+0
This patch fixes the problem that "irq XX: nobody cared" kernel oops is reported when pciehp is once rmmoded and insmoded again. The cause of this problem is pciehp driver calls pci_disable_msi() at controller release time, even though it must be done by PCI Express Port Bus driver. This patch removes unnecessary pci_disable_msi() call from pciehp driver. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01pciehp: remove unnecessary free_irqKenji Kaneshige1-6/+1
This patch fixes the problem that the following error messages is reported when pciehp driver is rmmoded. Trying to free already-free IRQ XX The cause of this problem is that pciehp driver is doing unknown 2nd free_irq at driver unloading. This patch removes this unknown 2nd free_irq call. Note: The pciehp driver should be adapted to standard device driver mode. Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: rpaphp: change device tree examinationJohn Rose2-2/+2
Change the criterion that RPA PCI Hotplug and RPA DLPAR use when determining the hotplug capabilities of a given device node. The "device_type" property is less consistent than "name" across PCI nodes on newer hardware. Signed-off-by: John Rose <johnrose@austin.ibm.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Change memory allocation for acpiphp slotsRolf Eike Beer2-32/+7
Change memory allocation for acpiphp slots Change the "struct slot" that acpiphp uses for managing it's slots to directly contain the memory for the needed struct hotplug_slot_info and the slot's name. This way we need only two memory allocations per slot instead of four. While we are at it: make_slot_name() is just a wrapper around snprintf() knowing the right arguments to call it. Since the function makes just one function call and is only called from one place I inlined it by hand. Finally this fixes a possible bug waiting for someone to hit it. There were two unused local variables in acpiphp_register_hotplug_slot(). gcc did not find them because they were used in memory allocations with sizeof(*var). They had the same types as the target of the allocation, but nevertheless this was just weird. Signed-off-by: Rolf Eike Beer <eike-hotplug@sf-tec.de> Acked-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01i2c-i801: SMBus patch for Intel ICH9Jason Gaston2-0/+3
This updated patch adds the Intel ICH9 LPC and SMBus Controller DID's. Thi= s patch relies on the irq ICH9 patch to pci_ids.h. Signed-off-by: Jason Gaston <jason.d.gaston@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: pci_{enable,disable}_device() nestable portsInaky Perez-Gonzalez1-9/+6
Change drivers/message/i20 pci driver to simply do a nestable enable()/disable() instead of checking for it. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: switch pci_{enable,disable}_device() to be nestableInaky Perez-Gonzalez4-21/+57
Changes the pci_{enable,disable}_device() functions to work in a nested basis, so that eg, three calls to enable_device() require three calls to disable_device(). The reason for this is to simplify PCI drivers for multi-interface/capability devices. These are devices that cram more than one interface in a single function. A relevant example of that is the Wireless [USB] Host Controller Interface (similar to EHCI) [see http://www.intel.com/technology/comms/wusb/whci.htm]. In these kind of devices, multiple interfaces are accessed through a single bar and IRQ line. For that, the drivers map only the smallest area of the bar to access their register banks and use shared IRQ handlers. However, because the order at which those drivers load cannot be known ahead of time, the sequence in which the calls to pci_enable_device() and pci_disable_device() cannot be predicted. Thus: 1. driverA starts pci_enable_device() 2. driverB starts pci_enable_device() 3. driverA shutdown pci_disable_device() 4. driverB shutdown pci_disable_device() between steps 3 and 4, driver B would loose access to it's device, even if it didn't intend to. By using this modification, the device won't be disabled until all the callers to enable() have called disable(). This is implemented by replacing 'struct pci_dev->is_enabled' from a bitfield to an atomic use count. Each caller to enable increments it, each caller to disable decrements it. When the count increments from 0 to 1, __pci_enable_device() is called to actually enable the device. When it drops to zero, pci_disable_device() actually does the disabling. We keep the backend __pci_enable_device() for pci_default_resume() to use and also change the sysfs method implementation, so that userspace enabling/disabling the device doesn't disable it one time too much. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Block on access to temporarily unavailable pci deviceMatthew Wilcox1-28/+47
The existing implementation of pci_block_user_cfg_access() was recently criticised for providing out of date information and for returning errors on write, which applications won't be expecting. This reimplementation uses a global wait queue and a bit per device. I've open-coded prepare_to_wait() / finish_wait() as I could optimise it significantly by knowing that the pci_lock protected us at all points. It looked a bit funny to be doing a spin_unlock_irqsave(); schedule(), so I used spin_lock_irq() for the _user versions of pci_read_config and pci_write_config. Not carrying a flags pointer around made the code much less nasty. Attempts to block an already blocked device hit a BUG() and attempts to unblock an already unblocked device hit a WARN(). If we need to block access to a device from userspace, it's because it's unsafe for even another bit of the kernel to access the device. An attempt to block a device for a second time means we're about to access the device to perform some other operation, which could provoke undefined behaviour from the device. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Acked-by: Adam Belay <abelay@novell.com> Acked-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01pci: fix __pci_register_driver error handlingAkinobu Mita1-2/+5
__pci_register_driver() error path forgot to unwind. driver_unregister() needs to be called when pci_create_newid_file() failed. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01pci: clear osc support flags if no _OSC methodKristen Carlson Accardi1-1/+9
So it looks like pci aer code will call pci_osc_support_set to tell the firmware about OSC_EXT_PCI_CONFIG_SUPPORT flag. that causes ctrlset_buf[OSC_SUPPORT_TYPE] to evaluate to true when pciehp calls pci_osc_control_set() is called (to attempt to use OSC to gain native pcie control from firmware), regardless of whether or not _OSC was actually successfully executed. That causes this section of code: if (ctrlset_buf[OSC_SUPPORT_TYPE] && ((global_ctrlsets & ctrlset) != ctrlset)) { return AE_SUPPORT; } to be hit. This patch will reset the OSC_SUPPORT_TYPE field if _OSC fails, and then would allow pciehp to go ahead and try to run _OSC again. Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01acpiphp: fix missing acpiphp_glue_exit()Akinobu Mita1-1/+3
acpiphp_glue_exit() needs to be called to unwind when no slots found. (It fixes data corruption when reloading acpiphp driver with no such devices) Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01acpiphp: fix use of list_for_each macroAkinobu Mita1-6/+2
This patch fixes invalid usage of list_for_each() list_for_each (node, &bridge_list) { bridge = (struct acpiphp_bridge *)node; ... } This code works while the member of list node is located at the head of struct acpiphp_bridge. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Altix: Initial ACPI support - ROM shadowing.John Keller1-3/+6
Support a shadowed ROM when running with an ACPI capable PROM. Define a new dev.resource flag IORESOURCE_ROM_BIOS_COPY to describe the case of a BIOS shadowed ROM, which can then be used to avoid pci_map_rom() making an unneeded call to pci_enable_rom(). Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01Altix: SN ACPI hotplug support.John Keller1-22/+13
A few minor changes to the way slot/device fixup is done. No need to be calling sn_pci_controller_fixup(), as a root bus cannot be hotplugged. Signed-off-by: John Keller <jpk@sgi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Replace HAVE_ARCH_PCI_MWI with PCI_DISABLE_MWIMatthew Wilcox1-13/+18
pSeries is the only architecture left using HAVE_ARCH_PCI_MWI and it's really inappropriate for its needs. It really wants to disable MWI altogether. So here are a pair of stub implementations for pci_set_mwi and pci_clear_mwi. Also rename pci_generic_prep_mwi to pci_set_cacheline_size since that better reflects what it does. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Cc: Paul Mackerras <paulus@samba.org> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Use pci_generic_prep_mwi on sparc64Matthew Wilcox1-1/+7
The setting of the CACHE_LINE_SIZE register in sparc64's pci initialisation code isn't quite adequate as the device may have incompatible requirements. The generic code tests for this, so switch sparc64 over to using it. Since sparc64 has different L1 cache line size and PCI cache line size, it would need to override the generic code like i386 and ia64 do. We know what the cache line size is at compile time though, so introduce a new optional constant PCI_CACHE_LINE_BYTES. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: David Miller <davem@davemloft.net> Acked-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: quirks: fix the festering mess that claims to handle IDE quirksAlan Cox2-56/+30
The number of permutations of crap we do is amazing and almost all of it has the wrong effect in 2.6. At the heart of this is the PCI SFF magic which says that compatibility mode PCI IDE controllers use ISA IRQ routing and hard coded addresses not the BAR values. The old quirks variously clears them, sets them, adjusts them and then IDE ignores the result. In order to drive all this garbage out and to do it portably we need to handle the SFF rules directly and properly. Because we know the device BAR 0-3 are not used in compatibility mode we load them with the values that are implied (and indeed which many controllers actually thoughtfully put there in this mode anyway). This removes special cases in the IDE layer and libata which now knows that bar 0/1/2/3 always contain the correct address. It means our resource allocation map is accurate from boot, not "mostly accurate" after ide is loaded, and it shoots lots of code. There is also lots more code and magic constant knowledge to shoot once this is in and settled. Been in my test tree for a while both with drivers/ide and with libata. Wants some -mm shakedown in case I've missed something dumb or there are corner cases lurking. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: save/restore PCI-X stateStephen Hemminger1-0/+44
Shouldn't PCI-X state be saved/restored? No device really needs this right now. qla24xx (fc HBA) and mthca (infiniband) don't do suspend, and sky2 resets its tweaks when links are brought up. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Make some MSI-X #defines genericMichael Ellerman1-8/+0
Move some MSI-X #defines into pci_regs.h so they can be used outside of drivers/pci. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01PCI: Let PCI_MULTITHREAD_PROBE not be brokenGreg Kroah-Hartman1-1/+1
It's not really broken, but people keep running into other problems caused by it. Re-enable it so that the drivers get stress tested. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usbcore: remove unused argument in autosuspendAlan Stern5-62/+71
Thanks to several earlier patches, usb_autosuspend_device() and usb_autoresume_device() are never called with a second argument other than 1. This patch (as819) removes the now-redundant argument. It also consolidates some common code between those two routines, putting it into a new subroutine called usb_autopm_do_device(). And it includes a sizable kerneldoc update for the affected functions. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: keep count of unsuspended childrenAlan Stern2-11/+37
This patch (as818b) simplifies autosuspend processing by keeping track of the number of unsuspended children of each USB hub. This will permit us to avoid a good deal of unnecessary work all the time; we will no longer have to create a bunch of workqueue entries to carry out autosuspend requests, only to have them fail because one of the hub's children isn't suspended. The basic idea is simple. There already is a usage counter in the usb_device structure for preventing autosuspends. The patch just increments that counter for every unsuspended child. There's only one tricky part: When a device disconnects we need to remember whether it was suspended at the time (leave the counter alone) or not (decrement the counter). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB hub: simplify remote-wakeup handlingAlan Stern1-23/+20
This patch (as817) simplifies the remote-wakeup processing in the hub driver. Now instead of using a specialized code path, it relies on the standard USB resume routines. The hub_port_resume() function does an initial get_port_status() to see whether the port has already resumed itself (as it does when a remote-wakeup request is sent). This will slow down handling of other resume events slightly, but not enough to matter. The patch also changes the hub_port_status() routine, making it return an error if a short reply is received. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: struct usb_device: change flag to bitflagAlan Stern1-1/+1
This patch (as816) changes an existing flag in the usb_device structure to a bitflag, preparing the way for more bitflags to come in the future. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01OHCI: make autostop conditional on CONFIG_PMAlan Stern1-54/+79
Unlike UHCI, OHCI does not exert any DMA load on the system when no devices are connected. Consequently there is no advantage to doing an autostop other than the power savings, so we shouldn't compile the necessary code unless CONFIG_PM is enabled. This patch (as820) makes the root-hub suspend and resume routines conditional on CONFIG_PM. It also prevents autostop from activating if the device_may_wakeup flag isn't set; some people use this flag to alert the driver about Resume-Detect bugs in the hardware. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: Add autosuspend support to the hub driverAlan Stern1-19/+26
This patch (as742b) adds autosuspend/autoresume support to the USB hub driver. The largest aspect of the change is that we no longer need a special flag for root hubs that want to be resumed. Now every hub is autoresumed whenever khubd needs to access it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01EHCI: Fix root-hub and port suspend/resume problemsAlan Stern4-53/+61
This patch (as738b) fixes numerous problems in the controller/root-hub suspend/resume/remote-wakeup support in ehci-hcd: The bus_resume() routine should wake up only the ports that were suspended by bus_suspend(). Ports that were already suspended should remain that way. The interrupt mask is used to detect loss of power in the bus_resume() routine (if the mask is 0 then power was lost). However bus_suspend() always sets the mask to 0. Instead the mask should retain its normal value, with port-change-detect interrupts disabled if remote wakeup is turned off. The interrupt mask should be reset to its correct value at the end of bus_resume() regardless of whether power was lost. bus_resume() reinitializes the operational registers if power was lost. However those registers are not in the aux power well, hence they can lose their values whenever the controller is put into D3. They should always be reinitialized. When a port-change interrupt occurs and the root hub is suspended, the interrupt handler should request a root-hub resume instead of starting up the controller all by itself. There's no need for the interrupt handler to request a root-hub resume every time a suspended port sends a remote-wakeup request. The pci_resume() method doesn't need to check for connected ports when deciding whether or not to reset the controller. It can make that decision based on whether Vaux power was maintained. Even when the controller does not need to be reset, pci_resume() must undo the effect of pci_suspend() by re-enabling the interrupt mask. If power was lost, pci_resume() must not call ehci_run(). At this point the root hub is still supposed to be suspended, not running. It's enough to rewrite the command register and set the configured_flag. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: create a new thread for every USB device found during the probe sequenceGreg Kroah-Hartman2-22/+74
Might speed up some systems. If nothing else, a bad driver should not take the whole USB subsystem down with it. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: add driver for the USB debug devicesGreg Kroah-Hartman3-0/+77
It's a simple usb-serial driver that just creates a tty device to read and write from. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: added dynamic major number for USB endpointsSarah Bailey1-13/+85
This patch is an update for Greg K-H's proposed usbfs2: http://sourceforge.net/mailarchive/message.php?msg_id=19295229 It creates a dynamic major for USB endpoints and fixes the endpoint minor calculation. Signed-off-by: Sarah Bailey <saharabeara@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: pegasus error path not resetting task's stateOliver Neukum1-0/+1
there is an error path in the pegasus driver which can leave the task in TASK_UNINTERRUPTIBLE. Depending on when it schedules next, this can be bad. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: endianness fix for asix.cOliver Neukum1-3/+3
the latest update for asix.c reverted some endianness fixes. This reinstates them. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: build the appledisplay driverAdrian Bunk1-0/+1
We do already have both the code and a config option, so why not build this driver? ;-) Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB serial: replace kmalloc+memset with kzallocBurman Yan5-12/+6
Replace kmalloc+memset with kzalloc Signed-off-by: Yan Burman <yan_952@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: hid-core: canonical defines for Apple USB device IDsJulien BLACHE1-11/+26
Use canonical defines for the Apple USB device IDs. Also add the Geyser IV devices missing in my previous patch. Signed-off-by: Julien BLACHE <jb@jblache.org> Acked-by: Dmitry Torokhov <dtor@insightbb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: idmouse cleanupMariusz Kozlowski1-8/+8
Just digging through code and found these needless variable initializations. So here is the patch. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: make drivers/usb/core/driver.c:usb_device_match() staticAdrian Bunk1-1/+1
usb_device_match() can now become static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: lh7a40x_udc remove double declarationDavid Brownell1-1/+0
Remove minor double-declaration goof. Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: pxa2xx_udc recognizes ixp425 rev b0 chipDavid Brownell1-0/+2
Make the pxa2xx_udc driver recognize a newer revision of the IXP425 chip. Signed-off-by: Milan Svoboda <msvoboda@ra.rockwell.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usbtouchscreen: add support for DMC TSC-10/25 devicesHolger Schurig2-1/+101
Adds support for the DMC TSC-10 and TSC-25 usb touchscreen controllers. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: ftdi-elan.c: fixes and cleanupsAdrian Bunk3-14/+6
This patch contains the following possible cleanups: - make the needlessly global ftdi_release_platform_dev() static - remove the unused usb_ftdi_elan_read_reg() - proper prototypes for the following functions: - usb_ftdi_elan_read_pcimem() - usb_ftdi_elan_write_pcimem() Note that the misplaced prototypes for the latter ones in drivers/usb/host/u132-hcd.c were buggy. Depending on the calling convention of the architecture calling one of them could have turned your stack into garbage. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: make drivers/usb/host/u132-hcd.c:u132_hcd_wait staticAdrian Bunk1-1/+1
This patch makes the needlessly global "u132_hcd_wait" static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: cypress_m8 init error path fixMariusz Kozlowski1-5/+4
If at some point cypress_init() fails deregister only the resources that were registered until that point. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: add ehci_hcd.ignore_oc parameterDavid Brownell2-5/+23
Certain boards seem to like to issue false overcurrent notifications, for example on ports that don't have anything connected to them. This looks like a hardware error, at the level of noise to those ports' overcurrent input signals (or non-debounced VBUS comparators). This surfaces to users as truly massive amounts of syslog spam from khubd (which is appropriate for real hardware problems, except for the volume from multiple ports). Using this new "ignore_oc" flag helps such systems work more sanely, by preventing such indications from getting to khubd (and spam syslog). The downside is of course that true overcurrent errors will be masked; they'll appear as spontaneous disconnects, without the diagnostics that will let users troubleshoot issues like short circuited cables. Note that the bulk of these reports seem to be with VIA southbridges, but I think some were with Intel ones. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: EHCI hooks for high speed electrical testsDavid Brownell1-0/+19
EHCI hooks for high speed electrical tests of the root hub ports. The expectation is that a usermode program actually triggers the test, making the same control request it would make for an external hub. Tests for peripheral upstream ports would issue a different request. In all cases, the hardware needs re-initialization before it could be used "normally" again (e.g. unplug/replug, rmmod/modprobe). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: net2280: don't send unwanted zero-length packetsAlan Stern2-3/+8
The net2280 driver is too eager to send zero-length packets when IN tokens are received on ep0. No such packet should be sent (the driver should NAK) before the gadget driver has queued the proper response. Otherwise deferred responses are impossible. This patch (as823) makes net2280 avoid sending ZLPs for IN transfers on ep0 until a response has been submitted, and avoids stalling when an OUT packet is received before a request has been submitted for an OUT transfer on ep0. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: microtek possible memleak fixMariusz Kozlowski1-3/+5
Possible memleak fix on error path. The changes: - out_kfree2 and out_free_urb replaced - missing scsi_host_put() added Here it goes: Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: add Digitech USB-Storage to unusual_devs.hJaco Kroon1-0/+10
The mass storage device from Digitech designed for Flash Cards, as found on (for example) the GNX4 device has issues with residue, similar to the bug report at http://kerneltrap.org/node/6297. This patch adds the faulty storage device to unusual_devs.h, this not only reduces the noise in dmesg but also increases the transfer speeds by a factor of 7x for me (89kB/s -> 637kB/s). T: Bus=02 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=1210 ProdID=0003 Rev= 1.00 S: Manufacturer=DigiTech HMG S: Product=DigiTech Mass Storage C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms Signed-off-by: Jaco Kroon <jaco@kroon.co.za> Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB core: fix compiler warning about usb_autosuspend_workAlan Stern1-8/+8
This patch (as821) fixes a compiler warning when CONFIG_PM isn't on ("usb_autosuspend_work" defined but not used). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: fix aircable.c: inconsequent NULL checkingNaranjo Manuel Francisco1-1/+4
> 2006/11/11, Adrian Bunk <bunk@stusta.de>: > > The Coverity checker spotted the following in > > drivers/usb/serial/aircable.c: > > > > <-- snip --> > > > > ... > > static void aircable_read(void *params) > > { > > ... Hi everyone, Sorry for the long time response but here is the patch, I think this way should work, if anyone has any suggestion let me know. What I do now is, in case I don't have the tty available I reschedule the work, I have tried it and it works with no problem, I even tried removing the device, and didn't find anything strange. Signed-off-by: Naranjo Manuel <naranjo.manuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01OHCI: change priority level of resume log messageAlan Stern1-1/+1
All the other root-hub suspend or resume log messages, in ohci-hcd or any of the other host controller drivers, use the debug priority level. This patch (as815) makes the one single exception behave like all the rest. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: visor kill urb cleanupMariusz Kozlowski1-2/+1
- usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: usb-serial free urb cleanupMariusz Kozlowski1-8/+4
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: navman kill urb cleanupMariusz Kozlowski1-2/+1
- usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: mct_u232 free urb cleanupMariusz Kozlowski1-4/+2
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: kobil_sct kill urb cleanupMariusz Kozlowski1-2/+1
- usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: keyspan free urb cleanupMariusz Kozlowski1-12/+6
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: io_edgeport kill urb cleanupMariusz Kozlowski1-3/+1
- usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: catc free urb cleanupMariusz Kozlowski1-8/+4
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: ftdi_sio kill urb cleanupMariusz Kozlowski1-2/+1
- usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: phidgetmotorcontrol free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: phidgetkit free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: legousbtower free kill urb cleanupMariusz Kozlowski1-13/+5
Hello, - usb_free_urb() cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: auerswald free kill urb cleanupMariusz Kozlowski1-5/+2
- usb_free_urb() cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: usbkbd free urb cleanupMariusz Kozlowski1-4/+2
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: hid-core free urb cleanupMariusz Kozlowski1-9/+4
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: ati_remote2 free urb cleanupMariusz Kozlowski1-2/+1
Hello, - usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: ati_remote free urb cleanupMariusz Kozlowski1-5/+2
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: zd1201 free urb cleanupMariusz Kozlowski1-4/+2
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: irda-usb free urb cleanupMariusz Kozlowski1-4/+2
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: zc0301_core free urb cleanupMariusz Kozlowski1-1/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: quickcam_messenger free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: sn9c102_core free urb cleanupMariusz Kozlowski1-1/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: pwc-if free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: pvrusb2-io free urb cleanupMariusz Kozlowski1-1/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: pvrusb2-hdw free unlink urb cleanupMariusz Kozlowski1-6/+4
- usb_free_urb() cleanup - usb_unlink_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: ttusb_dec free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: cinergyT2 free kill urb cleanupMariusz Kozlowski1-4/+2
- usb_free_urb() cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: usb-gigaset free kill urb cleanupMariusz Kozlowski1-10/+5
- usb_free_urb() cleanup - usb_kill_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: iforce-usb free urb cleanupMariusz Kozlowski1-3/+3
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb: pcwd_usb free urb cleanupMariusz Kozlowski1-2/+1
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: pwc-if loop fixMariusz Kozlowski1-2/+1
We should free urbs starting at [i-1] not [i]. Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb-serial: ti_usb, TI ez430 development tool IDOleg Verych2-0/+3
usb-serial: ti_usb, TI ez430 development tool ID Signed-off-by: Oleg Verych <olecom@flower.upol.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: airprime: New device IDdaniel@centurion.net.nz1-0/+1
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: make drivers/usb/input/wacom_sys.c:wacom_sys_irq() staticAdrian Bunk2-2/+1
This patch makes the needlessly global wacom_sys_irq() static. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: resume_device symbol conflictStephen Hemminger1-10/+10
Several functions in USB core overlap with global functions. The linker appears to do the right thing, but it is bad practice and makes debugging harder. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb/gadget/ether.c minor manycast tweaksDavid Brownell1-2/+2
Minor cleanup/clarification in the ethernet gadget driver, using standard calls to test for Ethernet multicast and broadcast addresses. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: Move private hub declarations out of public header fileAlan Stern2-41/+42
This patch (as809b) moves the declaration of the hub driver's private data structure from hub.h into the hub.c source file. Lots of other files import hub.h; they have no need to know about the details of the hub driver's private data. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: net1080: Fix && typosJean Delvare1-2/+2
Fix STATUS_PACKETS_* macros, where "&&" was mistakenly used where "&" should have. Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: expand autosuspend/autoresume APIAlan Stern1-0/+22
This patch (as814) adds usb_autopm_set_interface() to the autosuspend API. It also provides convenient wrapper routines, usb_autopm_enable() and usb_autopm_disable(), for drivers that want to specify directly whether autosuspend should be allowed. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: autosuspend code consolidationAlan Stern1-45/+67
This patch (as813) gathers together common code for USB interface autosuspend/autoresume. It also adds some simple checking at the time an autosuspend request is made, to see whether the request will fail. This way we don't add a workqueue entry when it would end up doing nothing. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: makes usb_endpoint_* functions inline.Luiz Fernando N. Capitulino1-144/+0
We have no benefits of having the usb_endpoint_* functions as functions, but making them inline saves text and data segment sizes: text data bss dec hex filename 14893634 3108770 1108840 19111244 1239d4c vmlinux.func 14893185 3108566 1108840 19110591 1239abf vmlinux.inline This is the result of a 2.6.19-rc3 kernel compiled with GCC 4.1.1 without CONFIG_MODULES, CONFIG_CC_OPTIMIZE_FOR_SIZE, CONFIG_REGPARM options set. USB support is fully enabled (while most of the other drivers are not), and that kernel has most of the USB code ported to use the endpoint functions. That happens because a call to those functions are expensive (in terms of bytes), while the function's size is smaller or have the same 'size' of the call. Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: yealink: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: storage: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-5/+3
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: usbtest: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-2/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: usbnet: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-2/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: usbmouse: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-3/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: usbkbd: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-3/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: speedtch: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-2/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: phidgetmotorcontrol: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-1/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: phidgetkit: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-1/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: onetouch: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: legousbtower: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-8/+5
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: kobil_sct: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: idmouse: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-5/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: hid-core: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-1/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: ftdi-elan: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-8/+2
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: devices: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+5
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: cdc-acm: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-1/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: cdc_ether: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-2/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: appledisplay: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-4/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: aircable: Use usb_endpoint_* functionsLuiz Fernando N. Capitulino1-3/+1
Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: OHCI: remove stale testing code from root-hub resumeAlan Stern1-12/+1
This patch (as811) removes some stale testing code from the root-hub resume routine in ohci-hcd. It also adds a spin_lock_irq() call that inadvertently got left out of an error pathway. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: kmemdup() cleanup in drivers/usb/Eric Sesterhenn5-15/+7
replace open coded kmemdup() to save some screen space, and allow inlining/not inlining to be triggered by gcc. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: OHCI: disable RHSC inside interrupt handlerAlan Stern2-16/+18
This patch (as808b) moves the Root Hub Status Change interrupt-disable code in ohci-hcd back into the interrupt handler proper, to avoid the chance of adverse interactions with mediocre hardware implementations. It also deletes the root-hub status timer from within the interrupt-enable routine. There's no need to poll for status any more once interrupts are re-enabled. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB: ohci-hcd: fix compiler warningAlan Stern1-2/+4
This patch (as806) fixes a compiler warning when ohci-hcd is built with CONFIG_PM turned off. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB core: don't match interface descriptors for vendor-specific devicesAlan Stern1-1/+21
This patch (as804) makes USB driver matching ignore the interface class, subclass, and protocol if the device class is Vendor Specific. Drivers can override this policy by specifying a Vendor ID as part of the match; then vendor-specific matches are allowed. Linus Walleij has reported a problem this patch fixes. When a particular mass-storage device is switched from mass-storage mode to Media Transfer Protocol, the interface class remains set to mass-storage and usb-storage binds to it erroneously, even though the device class changes to Vendor-Specific. This may cause a problem for some drivers until their match records can be updated to include Vendor IDs. But if it does, then those records were broken to begin with. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01USB HID: Handle STALL on interrupt endpointAlan Stern2-13/+27
The USB HID driver doesn't include any code to handle a STALL on the interrupt endpoint. While this may be uncommon, it does happen sometimes. This patch (as805) adds a fix. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb hub: fix root hub code so it takes more than 15 devices per root hubinaky@linux.intel.com2-2/+9
Wireless USB Host Controllers accept a large number of devices per host, which shows up as a large number of ports in its root hub. When the number of ports in a hub device goes over 16, the activation of the hub fails with the cryptic message in klogd. hub 2-0:1.0: activate --> -22 Following this further, it was seen that: hub_probe() hub_configure() generates pipe number pseudo allocates buffer 'maxp' bytes in size using usb_maxpacket() The endpoint descriptor for a root hub interrupt endpoint is declared in drivers/usb/core/hcd.c:hs_rh_config_descriptor and declares it to be size two (supporting 15 devices max). hub_activate() usb_hcd_submit_urb() rh_urb_enqueue() urb->pipe is neither int nor ctl, so it errors out rh_queue_status() Returns -EINVAL because the buffer length is smaller than the minimum needed to report all the hub port bits as in accordance with USB2.0[11.12.3]. There has to be trunc((PORTS + 1 + 7) / 8) bytes of space at least. Alan Stern confirmed that the reason for reading maxpktsize and not the right amount is because some hubs are known to return more data and thus cause overflow. So this patch simply changes the code to make the interrupt endpoint's max packet size be at least the minimum required by USB_MAXCHILDREN (instead of a fixed magic number) and add documentation for that. This way we are always ahead of the limit. Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01usb/hub: allow hubs up to 31 childreninaky@linux.intel.com1-1/+1
Current Wireless USB host hardware (Intel i1480 for example) allows up to 22 devices to connect, thus bringing up the max number of children in the WUSB Host Controller to 22 'fake' ports. Upcoming hardware might raise that limit. Makes almost no difference to go to 31, as the bit arrays are byte-aligned (plus an extra bit in general), so 22 bits fit in 4 bytes as 31 do. As well, the only other array that depends on USB_MAXCHILDREN is 'struct usb_hub->indicator'. By declaring it 'u8' instead of 'enum hub_led_mode', we reduce the size of each entry from 4 bytes (in i386) to 1, which will add as we when are doubling USB_MAXCHILDREN (with 16 the size of that array is 64 bytes, with 31 would be 128; by using u8 that goes down to 31 bytes). Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01[PATCH] block: support larger block pc requestsMike Christie1-4/+2
This patch modifies blk_rq_map/unmap_user() and the cdrom and scsi_ioctl.c users so that it supports requests larger than bio by chaining them together. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2006-11-30Merge ../linux-2.6-watchdog-mmWim Van Sebroeck6-4/+1423