summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* tg3: fix warningsEric Dumazet2011-01-011-1/+9
| | | | | | | | | | | | | | In case CONFIG_PM_SLEEP is disabled, we dont need tg3_suspend() and tg3_resume(). drivers/net/tg3.c:15056: warning: ‘tg3_suspend’ defined but not used drivers/net/tg3.c:15110: warning: ‘tg3_resume’ defined but not used Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Rafael J. Wysocki <rjw@sisk.pl> Cc: Michael Chan <mchan@broadcom.com> Cc: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* skge: Do not use legacy PCI power managementstephen hemminger2010-12-311-30/+16Star
| | | | | | | | | | | | | The skge driver used the legacy PCI power management, and did its own PCI callbacks. Use the same code model as Rafael's changes to sky2. Let the PCI subsystem take care of all the PCI-specific aspects of device handling during system power transitions. Compile tested only (so far). Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* sky2: Do not use legacy PCI power managementRafael J. Wysocki2010-12-311-26/+28
| | | | | | | | | | | | | | | | | | | The sky2 driver uses the legacy PCI power management, so it has to do some PCI-specific things in its ->suspend() and ->resume() callbacks, which isn't necessary and should better be done by the PCI sybsystem-level power management code. Moreover, it uses device_set_wakeup_enable() incorrectly (that function should be used when the WoL setting is changed rather than during suspend). Convert sky2 to the new PCI power management framework and make it let the PCI subsystem take care of all the PCI-specific aspects of device handling during system power transitions. Tested on a desktop machine with a Marvell 88E8056 PCI-E adapter. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Do not use legacy PCI power managementRafael J. Wysocki2010-12-311-58/+43Star
| | | | | | | | | | | | | | | | The tg3 driver uses the legacy PCI power management, so it has to do some PCI-specific things in its ->suspend() and ->resume() callbacks, which isn't necessary and should better be done by the PCI sybsystem-level power management code. Convert tg3 to the new PCI power management framework and make it let the PCI subsystem take care of all the PCI-specific aspects of device handling during system power transitions. Tested on HP nx6325 with a NetXtreme BCM5788 adapter. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* USB: cdc_ether: remove unneeded checkDan Carpenter2010-12-311-3/+1Star
| | | | | | | | | We already verified that "dev->udev->actconfig->extralen" was non-zero so "len" is non-zero here as well. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: Update firmware and versionMichael Chan2010-12-311-4/+4
| | | | | | | | | | Update MIPS firmware to 6.2.1, with improved small packet performance in RSS mode, and iSCSI CID allocation bug fix on 5708. Update driver version to 2.0.21. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2: Free IRQ before freeing status block memoryMichael Chan2010-12-311-1/+12
| | | | | | | | | | | | | When changing ring size, we free all memory including status block memory. If we're in INTA mode and sharing IRQ, the IRQ handler can be called and it will reference the NULL status block pointer. Because of the lockless design of the IRQ handler, there is no simple way to synchronize and prevent this. So we avoid this problem by freeing the IRQ handler before freeing the status block memory. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* netxen: update module descriptionAmit Kumar Salecha2010-12-311-1/+1
| | | | | | | This driver supports only Intelligent Ethernet Adapters. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* bnx2x: adding dcbnl supportShmulik Ravid2010-12-314-26/+677
| | | | | | | | | | | | | | Adding dcbnl implementation to bnx2x allowing users to manage the embedded DCBX engine. This patch is dependent on the following patches: [net-next-2.6 PATCH 1/3] dcbnl: add support for ieee8021Qaz attributes [net-next-2.6 PATCH 2/3] dcbnl: add appliction tlv handlers [net-next-2.6 PATCH 3/3] net_dcb: add application notifiers Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* vxge: remove duplicated part of checkDan Carpenter2010-12-281-1/+1
| | | | | | | | | This is just a cleanup to make the static checkers happy. We don't need to check "own" twice. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Ram Vepa <ram.vepa@exar.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-12-27660-5618/+9936
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/ipv4/fib_frontend.c
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2010-12-2631-120/+256
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits) ipv4: dont create routes on down devices epic100: hamachi: yellowfin: Fix skb allocation size sundance: Fix oopses with corrupted skb_shared_info Revert "ipv4: Allow configuring subnets as local addresses" USB: mcs7830: return negative if auto negotiate fails irda: prevent integer underflow in IRLMP_ENUMDEVICES tcp: fix listening_get_next() atl1c: Do not use legacy PCI power management mac80211: fix mesh forwarding MAINTAINERS: email address change net: Fix range checks in tcf_valid_offset(). net_sched: sch_sfq: fix allot handling hostap: remove netif_stop_queue from init mac80211/rt2x00: add ieee80211_tx_status_ni() typhoon: memory corruption in typhoon_get_drvinfo() net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant net_sched: always clone skbs ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed. netlink: fix gcc -Wconversion compilation warning asix: add USB ID for Logitec LAN-GTJ U2A ...
| | * epic100: hamachi: yellowfin: Fix skb allocation sizeJarek Poplawski2010-12-263-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Joel Soete reported oopses during pppoe over sundance NIC, caused by a bug in skb allocation and dma mapping code, where skb_reserve() bytes weren't taken into account. As a followup to the patch: "sundance: Fix oopses with corrupted skb_shared_info" very similar code is fixed here for three other drivers. Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Cc: Joel Soete <soete.joel@scarlet.be> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * sundance: Fix oopses with corrupted skb_shared_infoJarek Poplawski2010-12-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Joel Soete reported oopses at the beginning of pppoe connections since v2.6.35. After debugging the bug was found in sundance skb allocation and dma mapping code, where skb_reserve() bytes aren't taken into account. This is an old bug, only uncovered by some change in 2.6.35. Initial debugging patch by: Eric Dumazet <eric.dumazet@gmail.com> Reported-by: Joel Soete <soete.joel@scarlet.be> Tested-by: Joel Soete <soete.joel@scarlet.be> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Cc: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * USB: mcs7830: return negative if auto negotiate failsDan Carpenter2010-12-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The original code returns 0 on success and 1 on failure. In fact, at this point, "ret" is already either zero or a negative error code so we can just return it directly. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
| | * Merge branch 'master' of ↵David S. Miller2010-12-234-4/+8
| | |\ | | | | | | | | | | | | ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
| | | * hostap: remove netif_stop_queue from initMeelis Roos2010-12-201-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix runtime warning with backtrace from hostap by removing netif_stop_queue() call before register_netdev. Tested to work fine on hostap_pci Prism 2.5. (This removes a warning about calling netif_stop_queue before register_netdev is called. -- JWL) Signed-off-by: Meelis Roos <mroos@linux.ee> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | | * mac80211/rt2x00: add ieee80211_tx_status_ni()Johannes Stezenbach2010-12-203-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All rt2x00 drivers except rt2800pci call ieee80211_tx_status() from a workqueue, which causes "NOHZ: local_softirq_pending 08" messages. To fix it, add ieee80211_tx_status_ni() similar to ieee80211_rx_ni() which can be called from process context, and call it from rt2x00lib_txdone(). For the rt2800pci special case a driver flag is introduced. https://bugzilla.kernel.org/show_bug.cgi?id=24892 Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| | * | atl1c: Do not use legacy PCI power managementRafael J. Wysocki2010-12-231-24/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The atl1c driver uses the legacy PCI power management, so it has to do some PCI-specific things in its ->suspend() and ->resume() callbacks and they are not done correctly. Convert atl1c to the new PCI power management framework and make it let the PCI subsystem handle all of the PCI-specific aspects of device handling during system power transitions. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | Merge branch 'merge' of git://git.secretlab.ca/git/linux-2.6Linus Torvalds2010-12-243-12/+27
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'merge' of git://git.secretlab.ca/git/linux-2.6: spi/mpc52xx-spi: fix annotation for remove()-pointer spi/fsl_espi: fix wrong setting of the address in the command buffer spi/fsl_espi: change the read behaviour of the SPIRF of/i2c: Fix request module by alias powerpc/mpc5200: include fs.h in mpc52xx_gpt.c
| | * | | spi/mpc52xx-spi: fix annotation for remove()-pointerWolfram Sang2010-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | | spi/fsl_espi: fix wrong setting of the address in the command bufferMingkai Hu2010-12-241-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Or else we can't operate on the right address when the trans length is greater than 65535. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | | spi/fsl_espi: change the read behaviour of the SPIRFMingkai Hu2010-12-241-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user must read N bytes of SPIRF (1 <= N <= 4) that do not exceed the amount of data in the receive FIFO, so read the SPIRF byte by byte when the data in receive FIFO is less than 4 bytes. On Simics, when read N bytes that exceed the amount of data in receive FIFO, we can't read the data out, that is we can't clear the rx FIFO, then the CPU will loop on the espi rx interrupt. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| | * | | of/i2c: Fix request module by aliasDavid Daney2010-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we are registering an i2c device that has a device tree node like this real-world example: rtc@68 { compatible = "dallas,ds1337"; reg = <0x68>; }; of_i2c_register_devices() will try to load a module called ds1337.ko. There is no such module, so it will fail. If we look in modules.alias we will find entries like these: . . . alias i2c:ds1339 rtc_ds1307 alias i2c:ds1338 rtc_ds1307 alias i2c:ds1337 rtc_ds1307 alias i2c:ds1307 rtc_ds1307 alias i2c:ds1374 rtc_ds1374 . . . The module we want is really called rtc_ds1307.ko. If we request a module called "i2c:ds1337", the userspace module loader will do the right thing (unless it is busybox) and load rtc_ds1307.ko. So we add the I2C_MODULE_PREFIX to the request_module() string. Signed-off-by: David Daney <ddaney@caviumnetworks.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
| * | | | Merge branch 'upstream-linus' of ↵Linus Torvalds2010-12-246-34/+56
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev: libata: issue DIPM enable commands with LPM state updated libata: no special completion processing for EH commands pata_mpc52xx: driver needs BMDMA pata_cs5536: Add support for non-X86_32 platforms libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()
| | * | | | libata: issue DIPM enable commands with LPM state updatedTejun Heo2010-12-241-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Low level drivers may behave differently depending on the current link->lpm_policy. During ata_eh_set_lpm(), DIPM enable commands are issued after the successful completion of ap->ops->set_lpm(), which means that the controller is already in the target state. This causes DIPM enable commands to be processed with mismatching controller power state and link->lpm_policy value. In ahci, link->lpm_policy is used to ignore certain PHY events if LPM is enabled; however, as DIPM commands are issued with stale link->lpm_policy, they sometimes end up triggering these conditions and get aborted leading to LPM configuration failure. Fix it by updating link->lpm_policy before issuing DIPM enable commands. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Kyle McMartin <kyle@mcmartin.ca> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * | | | libata: no special completion processing for EH commandsTejun Heo2010-12-241-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ata_qc_complete() contains special handling for certain commands. For example, it schedules EH for device revalidation after certain configurations are changed. These shouldn't be applied to EH commands but they were. In most cases, it doesn't cause an actual problem because EH doesn't issue any command which would trigger special handling; however, ACPI can issue such commands via _GTF which can cause weird interactions. Restructure ata_qc_complete() such that EH commands are always passed on to __ata_qc_complete(). stable: Please apply to -stable only after 2.6.38 is released. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Kyle McMartin <kyle@mcmartin.ca> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * | | | pata_mpc52xx: driver needs BMDMAWolfram Sang2010-12-242-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by this build-error if BMDMA is disabled: drivers/ata/pata_mpc52xx.c: In function 'mpc52xx_ata_init_one': drivers/ata/pata_mpc52xx.c:662: error: 'ata_bmdma_interrupt' undeclared (first use in this function) ... Move the Kconfig entry to the proper location as needed since 9a7780c9acb821fe1c2b6fc53f74cc2556ff5364 (libata-sff: make BMDMA optional) Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * | | | pata_cs5536: Add support for non-X86_32 platformsWu Zhangjin2010-12-242-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pata_cs5536 does work on the other platforms(e.g. Loongson, a MIPS variant), so, remove the dependency of X86_32 and fix the building errors under the other platforms via only reserving the X86_32 specific parts for X86_32. pata_amd also supports cs5536 IDE controller, but this one saves about 33k for the compressed kernel image(vmlinuz for MIPS). Signed-off-by: Zhang Le <r0bertz@gentoo.org> Signed-off-by: Chen Jie <chenj@lemote.com> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| | * | | | libata-sff: fix HSM_ST_ERR handling in __ata_sff_port_intr()Tejun Heo2010-12-241-4/+3Star
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While separating out BMDMA irq handler from SFF, commit c3b28894 (libata-sff: separate out BMDMA irq handler) incorrectly made __ata_sff_port_intr() consider an IRQ to be an idle one if the host state was transitioned to HSM_ST_ERR by ata_bmdma_port_intr(). This makes BMDMA drivers ignore IRQs reporting host bus error which leads to timeouts instead of triggering EH immediately. Fix it by making __ata_sff_port_intr() consider the IRQ to be an idle one iff the state is HSM_ST_IDLE. This is equivalent to adding HSM_ST_ERR to the "break"ing case but less error-prone. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Antonio Toma <antonio.toma@gmail.com> Cc: stable@kernel.org Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
| * | | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6Linus Torvalds2010-12-249-46/+47
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: [SCSI] fix up documentation for change in ->queuecommand to lockless calling [SCSI] bfa: rename log_level to bfa_log_level
| | * | | | [SCSI] bfa: rename log_level to bfa_log_levelJing Huang2010-12-209-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename log_level to bfa_log_level to make the global variable more bfa specific and avoid clashes with other drivers which was causing a build failure. Signed-off-by: Jing Huang <huangj@brocade.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
| * | | | | Merge branch 'v4l_for_linus' of ↵Linus Torvalds2010-12-2411-134/+257
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6 * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (21 commits) [media] mceusb: set a default rx timeout [media] mceusb: fix inverted mask inversion logic [media] mceusb: add another Fintek device ID [media] lirc_dev: fixes in lirc_dev_fop_read() [media] lirc_dev: stray unlock in lirc_dev_fop_poll() [media] rc: fix sysfs entry for mceusb and streamzap [media] streamzap: merge timeout space with trailing space [media] mceusb: fix keybouce issue after parser simplification [media] IR: add tv power scancode to rc6 mce keymap [media] mceusb: buffer parsing fixups for 1st-gen device [media] mceusb: fix up reporting of trailing space [media] nuvoton-cir: improve buffer parsing responsiveness [media] mceusb: add support for Conexant Hybrid TV RDU253S [media] s5p-fimc: Fix output DMA handling in S5PV310 IP revisions [media] s5p-fimc: Use correct fourcc code for 32-bit RGB format [media] s5p-fimc: Convert m2m driver to unlocked_ioctl [media] s5p-fimc: Explicitly add required header file [media] s5p-fimc: Fix vidioc_g_crop/cropcap on camera sensor [media] s5p-fimc: BKL lock removal - compilation fix [media] soc-camera: fix static build of the sh_mobile_csi2.c driver ...
| | * | | | | [media] mceusb: set a default rx timeoutJarod Wilson2010-12-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Its possible for the call to read rx timeout from the hardware to fail, in which case we end up with a bogus rx timeout value. Set a default one when filling in the rc struct, and we'll just overwrite it later w/the value from hardware, but if that read fails, we've at least got a sane rx timeout value to work with (1000ms is the default value I've seen returned on most if not all mceusb hardware). Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: fix inverted mask inversion logicJarod Wilson2010-12-201-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it turns out, somewhere along the way, we managed to invert the meaning of the tx_mask_inverted flag. Looking back over the old lirc driver, tx_mask_inverted was set to 0 if the device was in tx_mask_list. Now we have a tx_mask_inverted flag set to 1 for all the devices that were in the list, and set tx_mask_inverted to that flag value, which is actually the opposite of what we used to set, causing set_tx_mask to use the wrong mask setting option. Since there seem to be more devices with inverted masks than not (using the original device as the baseline for inverted vs. normal), lets just call the ones currently marked as inverted normal instead, and flip the if/else actions that key off of the inverted flag. Note: the problem only cropped up if a call to set_tx_mask was made, if no mask was set, the device would work just fine, which is why this managed to slip though w/o getting noticed until now. Tested successfully by myself and Dennis Gilmore. Reported-by: Dennis Gilmore <dgilmore@redhat.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: add another Fintek device IDJarod Wilson2010-12-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] lirc_dev: fixes in lirc_dev_fop_read()Dan Carpenter2010-12-201-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes several changes but they're in one function and sort of related: "buf" was leaked on error. The leak if we try to read an invalid length is the main concern because it could be triggered over and over. If the copy_to_user() failed, then the original code returned the number of bytes remaining. read() is supposed to be the opposite way, where we return the number of bytes copied. I changed it to just return -EFAULT on errors. Also I changed the debug output from "-EFAULT" to just "<fail>" because it isn't -EFAULT necessarily. And since we go though that path if the length is invalid now, there was another debug print that I removed. Signed-off-by: Dan Carpenter <error27@gmail.com> Reviewed-by: Jarod Wilson <jarod@redhat.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] lirc_dev: stray unlock in lirc_dev_fop_poll()Dan Carpenter2010-12-201-3/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't unlock here. I think this was a cut and paste error. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] rc: fix sysfs entry for mceusb and streamzapPaul Bender2010-12-202-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When trying to create persistent device names for mceusb and streamzap devices, I noticed that their respective drivers are not creating the rc device as a child of the USB device. Rather it creates it as virtual device. As a result, udev cannot use the USB device information to create persistent device names for event and lirc devices associated with the rc device. Not having persistent device names makes it more difficult to make use of the devices in userspace as their names can change. Signed-off-by: Paul Bender <pebender@gmail.com> Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] streamzap: merge timeout space with trailing spaceJarod Wilson2010-12-201-8/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where we get an ending space, and our trailing timeout space then gets sent right after it, which breaks repeat, at least for lirc userspace decoding. Merge the two spaces by way of using ir_raw_event_store_filter, set a timeout value, and we're back to good. Successfully tested with streamzap and windows mce remotes. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: fix keybouce issue after parser simplificationJarod Wilson2010-12-201-10/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Something I failed to notice while testing the mceusb RLE buffer decoding simplification patches was that we were getting an extra event from the previously pressed key. As was pointed out to me on irc by Maxim, this is actually due to using ir_raw_event_store_with_filter without having set up a timeout value. The hardware has a timeout value we're now reading and storing, which properly enables the transition to idle in the raw event storage process, and makes IR decode behave correctly w/o keybounce. Also remove no-longer-used ir_raw_event struct from mceusb_dev struct and add as-yet-unused enable flags for carrier reports and learning mode, which I'll hopefully start wiring up sooner than later. While looking into that, found evidence that 0x9f 0x15 responses are only non-zero when the short-range learning sensor is used, so correct the debug spew message, and then suppress it when using the standard long-range sensor. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] IR: add tv power scancode to rc6 mce keymapJarod Wilson2010-12-201-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And clean up some stray spaces. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: buffer parsing fixups for 1st-gen deviceJarod Wilson2010-12-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we pass in an offset, we shouldn't skip 2 bytes. And the first-gen hardware generates a constant stream of interrupts, always with two header bytes, and if there's been no IR, with nothing else. Bail from ir processing without calling ir_handle_raw_event when we get such a buffer delivered to us. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: fix up reporting of trailing spaceJarod Wilson2010-12-201-32/+13Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were storing a bunch of spaces at the end of each signal, rather than a single long space. The in-kernel decoders were actually okay with this, but lirc isn't. As suggested by David Härdeman, switch to storing samples using ir_raw_event_store_with_filter, which auto-merges the consecutive space samples for us. This also allows us to bypass having to store rawir samples in our device struct, further simplifying the buffer parsing state machine. Both in-kernel decoders and lirc are happy again with this change. Also included in this patch is proper parsing of 0x9f 0x01 commands, the removal of some magic number usage and some printk spew fixups. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] nuvoton-cir: improve buffer parsing responsivenessJarod Wilson2010-12-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than waiting for trigger bits, the formula for which was slightly messy, and apparently, not actually 100% complete for some remotes, just call ir_raw_event_handle whenever we finish parsing a chunk of data from the rx fifo, similar to mceusb, as well as whenever we see an 'end of signal data' 0x80 packet. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] mceusb: add support for Conexant Hybrid TV RDU253SJarod Wilson2010-12-201-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another multi-function Conexant device. Interface 0 is IR, though on this model, TX isn't wired up at all, so I've mixed in support for models without TX (and verified that lircd says TX isn't supported when trying to send w/this device). Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] s5p-fimc: Fix output DMA handling in S5PV310 IP revisionsSylwester Nawrocki2010-12-204-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FIMC IP in S5Pv310 series has extended DMA status registers and some bit fields are marked as reserved comparing to S5PC100/110. Use correct registers for getting DMA write pointer in each SoC variant supported by the driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] s5p-fimc: Use correct fourcc code for 32-bit RGB formatSylwester Nawrocki2010-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace V4L2_PIX_FMT_RGB24 code with V4L2_PIX_FMT_RGB32 since the hardware uses 24-bits for actual pixel data but pixels are 4-byte aligned in memory. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] s5p-fimc: Convert m2m driver to unlocked_ioctlSylwester Nawrocki2010-12-201-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
| | * | | | | [media] s5p-fimc: Explicitly add required header fileSylwester Nawrocki2010-12-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>