summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* firewire: fw-ohci: don't append to AT context when it's not activeJarod Wilson2008-04-181-2/+13
| | | | | | | | | | | | | | | | | | | | | | I finally tracked down the issues with this JMicron PCI-e card in my possession to a failure to comply with section 7.2.3.2 of the OHCI 1.1 specification (thanks to Kristian for the pointer to illustrate that it is indeed a flaw in this card, not the driver). The controller should simply flush the packets we've appended to its AT queue if a bus reset occurs before they've been transmitted and we'll try again, but something goes wrong and the controller winds up hung. However, we can avoid the problem by simply checking if the IntEvent.busReset register had been set before we try appending to the AT context. When busReset is set, the AT context is completely halted until busReset is cleared, so there's no point in appending AT packets until the register is cleared. So at_context_queue_packet() now checks for busReset being set, and bails with an RCODE_GENERATION packet ack, which results in us trying to append the packet again after recognizing the fact there has been a bus reset, and clearing busReset. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: log regAccessFail eventsJarod Wilson2008-04-182-3/+11
| | | | | | | | | | While trying to debug this piece of crap JMicron PCI-e controller in my possession, one thought was that perhaps I was encountering register access failures. I'm not, but logging them would be good, so we can see if they are a real problem we should be taking into account anywhere in the code. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (added list contact)
* firewire: fw-ohci: make sure HCControl register LPS bit is setJarod Wilson2008-04-181-2/+15
| | | | | | | | | | | | | | | I've now witnessed multiple occasions where one of my controllers (a very poorly working JMicron PCIe card) fails to get its registers properly set up in ohci_enable(), apparently due to an occasionally very slow to initiate SClk. The easy fix for this problem is to add a tiny while loop to try again a time or three after initially enabling LPS before we move on (or give up). Of course, the card still isn't fully functional yet, but this gets it at least one tiny step closer... Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: missing PPC PMac feature calls in failure pathStefan Richter2008-04-181-2/+3
| | | | | | Balance ohci_pmac_on and ohci_pmac_off if pci_driver.probe fails. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: untangle a mixed unsigned/signed expressionStefan Richter2008-04-181-3/+5
| | | | | | and make another expression more readable. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: debug interrupt eventsStefan Richter2008-04-182-0/+187
| | | | | | | | | | | | | | | | | | | | This adds debug printks for asynchronous transmission and reception and for self ID reception. They can be enabled at module load time, and at runtime via /sys/module/firewire_ohci/parameters/debug. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Also added: Logging of interrupt event codes and of cancelled AT packets. The code now depends on a Kconfig variable. This makes it easier to build firewire-ohci without the feature or to make it an option in the future. The variable is currently hidden and always on. This feature inflates firewire-ohci.ko by 7 kB = 27% on x86-64 and by 4 kB = 23% on i686. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: catch self_id_count == 0Stefan Richter2008-04-181-0/+4
| | | | | | | | | | | | | fw_core_handle_bus_reset() incorrectly relied on the assumption that self_id_count > 0. We check early in fw-ohci and discard the self ID complete event if self_id_count == 0 because a valid event always has at least one self ID packet in it (the one of the local node). Hence treat self_id_count == 0 like any other kind of invalid self ID buffer. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
* firewire: fw-ohci: add self ID error checkStefan Richter2008-04-182-4/+11
| | | | | | | | | Discard self ID buffer contents if - the selfIDError flag is set, - any of the self ID packets has bit errors. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
* firewire: fw-ohci: refactor probe, remove, suspend, resumeStefan Richter2008-04-181-57/+42
| | | | | | Clean up shared code and variable names. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: switch on bus power after resume on PPC PMacStefan Richter2008-04-181-2/+6
| | | | | | | | | | | The platform feature calls in the suspend method switched off cable power, but the calls in the resume method did not switch it back on. Add the necessary feature call to .resume. Also add the corresponding call to .suspend to make .suspend's behavior explicitly the same on all PMacs. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-ohci: add option for remote debuggingStefan Richter2008-04-181-0/+9
| | | | | | | | This way firewire-ohci can be used for remote debugging like ohci1394. Version with amendment from Fri, 11 Apr 2008 00:08:08 +0200. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Acked-by: Bernhard Kaindl <bk@suse.de>
* firewire: fw-sbp2: set dual-phase cycle_limitJarod Wilson2008-04-181-3/+19
| | | | | | | | | | | | | | | | | Try to write dual-phase retry protocol limits to BUSY_TIMEOUT register. - The dual-phase retry protocol is optional to implement, and if not supported, writes to the dual-phase portion of the register will be ignored. We try to write the original 1394-1995 default here. - In the case of devices that are also SBP-3-compliant, all writes are ignored, as the register is read-only, but contains single-phase retry of 15, which is what we're trying to set for all SBP-2 device anyway, so this write attempt is safe and yields more consistent behavior for all devices. See section 8.3.2.3.5 of the 1394-1995 spec, section 6.2 of the SBP-2 spec, and section 6.4 of the SBP-3 spec for further details. Signed-off-by: Jarod Wilson <jwilson@redhat.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: reduce log noiseStefan Richter2008-04-181-6/+2
| | | | | | The block/unblock logic is now sufficiently tested. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: remove unnecessary memsetStefan Richter2008-04-181-3/+0
| | | | | | orb came from kzalloc. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: simplify some macrosStefan Richter2008-04-181-9/+2
| | | | | | How hard can it be to switch on one bit? :-) Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: remove usages of fw_memcpy_to_be32Stefan Richter2008-04-181-51/+43
| | | | | | | | Write directly in big endian instead of byte-swapping after the fact. This saves a few conversions, lets gcc use constant endianess conversions where possible, and enables deeper endianess annotation. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: fw-sbp2: relax SCSI DMA alignmentStefan Richter2008-04-181-5/+2
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* firewire: refactor fw_unit reference countingStefan Richter2008-04-182-12/+19
| | | | | | | | Add wrappers for getting and putting a unit. Remove some line breaks. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
* firewire: fw-sbp2: fix reference countingStefan Richter2008-04-181-2/+1
| | | | | | | | The reference count of the unit dropped too low in an error path in sbp2_probe. Fixed by moving the _get further up. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
* firewire: remove superfluous reference countingStefan Richter2008-04-183-46/+4
| | | | | | | | The card->kref became obsolete since patch "firewire: fix crash in automatic module unloading" added another counter of card users. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jarod Wilson <jwilson@redhat.com>
* ieee1394: limit early node speed to host interface speedPhilippe De Muyter2008-04-181-0/+2
| | | | | | | | | | | | | | | The following patch limits the node speed to the host interface speed, before using it. Signed-off-by: Philippe De Muyter <phdm@macqel.be> It should actually suffice to do this only for the local node's speedcap[]. But there is another bug in the speed calculation: The local node's speed is not correctly propagated to the speeds which are to be used to access remote nodes. http://thread.gmane.org/gmane.linux.kernel.firewire.devel/11772/focus=12024 Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: Remove superfluous calls to kobject_set_name().Robert P. J. Day2008-04-183-3/+0
| | | | | | | | Unless you're adding a kobject to the sysfs hierarchy, there is no point setting its kobject name. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: missing PPC PMac feature calls in failure pathStefan Richter2008-04-181-3/+3
| | | | | | | | The failure path of ohci1394_pci_probe() reuses ohci1394_pci_remove(). Doing so it missed to call ohci1394_pmac_off() in a few unlikely early error cases. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: refactor some printk format stringsStefan Richter2008-04-181-15/+15
| | | | | | to reduce the size of ohci1394.ko. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: unroll a macro with returnStefan Richter2008-04-181-38/+54
| | | | | | | | We don't want to hide something like return in a preprocessor macro. Unroll the macro and use a goto, which also reduces the size of ohci1394.ko. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: Use shorter list_splice_init() for brevity.Robert P. J. Day2008-04-182-6/+3
| | | | | Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: replace remaining __FUNCTION__ occurrencesHarvey Harrison2008-04-185-13/+13
| | | | | | | | __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: refactor probe, remove, suspend, resumeStefan Richter2008-04-181-64/+49
| | | | | | Clean up shared code and variable names. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: ohci1394: switch on bus power after resume on PPC PMacStefan Richter2008-04-181-2/+6
| | | | | | | | | | | The platform feature calls in the suspend method switched off cable power, but the calls in the resume method did not switch it back on. Add the necessary feature call to .resume. Also add the corresponding call to .suspend to make .suspend's behavior explicitly the same on all PMacs. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: prevent device binding of raw1394, video1394, dv1394Stefan Richter2008-04-184-6/+7
| | | | | | | | | | | | These drivers don't need to match any unit_directory type device. They just need the id_table for module autoloading per module alias. Not binding any of these drivers allows special-purpose drivers with similar or same IDs to bind to devices. This currently only benefits out-of-tree drivers; on the other hand it is in no way detrimental to in-tree drivers. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: be*_add_cpu conversionMarcin Slusarz2008-04-181-4/+2
| | | | | | | | | | | | replace all: big_endian_variable = cpu_to_beX(beX_to_cpu(big_endian_variable) + expression_in_cpu_byteorder); with: beX_add_cpu(&big_endian_variable, expression_in_cpu_byteorder); generated with semantic patch Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* ieee1394: sbp2: relax SCSI DMA alignmentStefan Richter2008-04-181-5/+2
| | | | Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6Linus Torvalds2008-04-162-12/+8
|\ | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6: it821x: do not describe noraid parameter with its value Pb1200/DBAu1200: fix bad IDE resource size Au1200: IDE driver build fix Au1200: kill IDE driver function prototypes avr32 mustn't select HAVE_IDE
| * it821x: do not describe noraid parameter with its valuePaul Bolle2008-04-171-1/+1
| | | | | | | | | | | | | | Describe noraid parameter with its name (and not its value). Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * Pb1200/DBAu1200: fix bad IDE resource sizeSergei Shtylyov2008-04-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | The header files for the Pb1200/DBAu1200 boards have wrong definition for the IDE interface's decoded range length -- it should be 512 bytes according to what the IDE driver does. In addition, the IDE platform device claims 1 byte too many for its memory resource -- fix the platform code and the IDE driver in accordance. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * Au1200: IDE driver build fixSergei Shtylyov2008-04-171-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The driver fails to compile with CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA enabled: drivers/ide/mips/au1xxx-ide.c: In function `auide_build_dmatable': drivers/ide/mips/au1xxx-ide.c:256: error: implicit declaration of function `sg_virt' drivers/ide/mips/au1xxx-ide.c:275: error: implicit declaration of function `sg_next' drivers/ide/mips/au1xxx-ide.c:275: warning: assignment makes pointer from integer without a cast Fix this by including <linux/scatterlist.h>. While at it, remove the #include's without which the driver happily builds. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
| * Au1200: kill IDE driver function prototypesSergei Shtylyov2008-04-171-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix these warnings emitted when compiling drivers/ide/mips/au1xxx-ide.c: include/asm/mach-au1x00/au1xxx_ide.h:137: warning: 'auide_tune_drive' declared `static' but never defined include/asm/mach-au1x00/au1xxx_ide.h:138: warning: 'auide_tune_chipset' declared `static' but never defined by wiping out the whole "function prototyping" section from the header file <asm-mips/mach-au1x00/au1xxx_ide.h> as it mostly declared functions that are already dead in the IDE driver; move the only useful prototype into the driver. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2008-04-163-6/+148
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: remove broken usb-serial num_endpoints check USB: option: Add new vendor ID and device ID for AMOI HSDPA modem USB: support more Huawei data card product IDs USB: option.c: add more device IDs USB: Obscure Maxon BP3-USB Device Support 16d8:6280 for option driver
| * | USB: remove broken usb-serial num_endpoints checkGreg Kroah-Hartman2008-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The num_interrupt_in, num_bulk_in, and other checks in the usb-serial code are just wrong, there are too many different devices out there with different numbers of endpoints. We need to just be sticking with the device ids instead of trying to catch this kind of thing. It broke too many different devices. This fixes a large number of usb-serial devices to get them working properly again. Cc: Oliver Neukum <oliver@neukum.org> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: option: Add new vendor ID and device ID for AMOI HSDPA modemtang kai2008-04-151-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | This patch add new vendor ID and device ID for AMOI HSDPA modem. From: tang kai <tangk73@hotmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: support more Huawei data card product IDsfangxiaozhi2008-04-152-4/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - declare the unusal device for Huawei data card devices in unusual_devs.h - disable the product ID matching for Huawei data card devices in usb_match_device function of driver.c - declare the product IDs in option.c. Signed-off-by: fangxiaozhi <huananhu@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: option.c: add more device IDsMatthias Urlichs2008-04-151-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add devices by AMOI and NovatelWireless. Signed-Off-By: Matthias Urlichs <matthias@urlichs.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * | USB: Obscure Maxon BP3-USB Device Support 16d8:6280 for option driverJames Cameron2008-04-151-0/+3
| |/ | | | | | | | | | | | | | | | | | | The modem was detected, the ttyUSB{0,1,2} appeared, a call could be made, and the expected data rate was achieved. Tested for an hour or two, total of 100Mb. I shall do more testing. Signed-off-by: James Cameron <quozl@laptop.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2008-04-168-73/+96
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: [TCP]: Add return value indication to tcp_prune_ofo_queue(). PS3: gelic: fix the oops on the broken IE returned from the hypervisor b43legacy: fix DMA mapping leakage mac80211: remove message on receiving unexpected unencrypted frames Update rt2x00 MAINTAINERS entry Add rfkill to MAINTAINERS file rfkill: Fix device type check when toggling states b43legacy: Fix usage of struct device used for DMAing ssb: Fix usage of struct device used for DMAing MAINTAINERS: move to generic repository for iwlwifi b43legacy: fix initvals loading on bcm4303 rtl8187: Add missing priv->vif assignments netconsole: only set CON_PRINTBUFFER if the user specifies a netconsole [CAN]: Update documentation of struct sockaddr_can MAINTAINERS: isdn4linux@listserv.isdn4linux.de is subscribers-only [TCP]: Fix never pruned tcp out-of-order queue. [NET_SCHED] sch_api: fix qdisc_tree_decrease_qlen() loop
| * Merge branch 'master' of ↵David S. Miller2008-04-157-72/+92
| |\ | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6
| | * PS3: gelic: fix the oops on the broken IE returned from the hypervisorMasakazu Mokuno2008-04-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the bug that the driver would try to over-scan the memory if the sum of the length field of every IEs does not match the length returned from the hypervisor. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43legacy: fix DMA mapping leakageStefano Brivio2008-04-151-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a DMA mapping leakage in the case where we reject a DMA buffer because of its address. The patch by Michael Buesch has been ported to b43legacy. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Cc: Christian Casteyde <casteyde.christian@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43legacy: Fix usage of struct device used for DMAingMichael Buesch2008-04-151-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | This fixes b43legacy for the SSB DMA API change. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * ssb: Fix usage of struct device used for DMAingMichael Buesch2008-04-153-45/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes DMA on architectures where DMA is nontrivial, like PPC64. We must use the host-device's (PCI) struct device for any DMA operation instead of the SSB device. For this we add a new struct device pointer to the SSB device structure that will always point to the right device for DMAing. Without this patch b43 and b44 drivers won't work on complex-DMA architectures, that for example need dev->archdata for DMA operations. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * b43legacy: fix initvals loading on bcm4303Stefano Brivio2008-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for the correct initial values to be uploaded to bcm4303 devices. It should be correct, but I can't reliably test this as I suspect there's something going wrong with an hardware rfkill switch on my laptop. Please test. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud