aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/irda/smsc-ircc2.c
AgeCommit message (Collapse)Author
2008-05-05irda: fix !PNP support for drivers/net/irda/smsc-ircc2.cIngo Molnar
x86.git testing found this build bug on v2.6.26-rc1: ERROR: "pnp_get_resource" [drivers/net/irda/smsc-ircc2.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 the driver did not anticipate the case of !CONFIG_PNP which is rare but still possible. Instead of restricting the driver to PNP-only in the Kconfig space, add the (trivial) dummy struct pnp_driver - this is that other drivers use in the !PNP case too. The driver itself can in theory be initialized on !PNP too in certain cases, via smsc_ircc_legacy_probe(). Patch only minimally build tested, i dont have this hardware. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28[netdrvr] irq handler minor cleanups in several driversJeff Garzik
* use irq_handler_t where appropriate * no need to use 'irq' function arg, its already stored in a data struct * rename irq handler 'irq' argument to 'dummy', where the function has been analyzed and proven not to use its first argument. * remove always-false "dev_id == NULL" test from irq handlers * remove pointless casts from void* * declance: irq argument is not const * add KERN_xxx printk prefix * fix minor whitespace weirdness Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2007-10-10[IRDA]: Document the fact that smsc-ircc2 will not use PNP by defaultJonathan Bastien-Filiatrault
This avoids user confusion when they see that their device is not detected. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-07-01smsc-ircc2: bypass PNP detection until we get the quirks worked outBjorn Helgaas
Don't use PNP detection by default yet. We have some PNP and BIOS issues to work out first. Sample problem on a Toshiba Portege 4000: the SMCf010 device is handed off disabled. We assign I/O ports originally assigned to the SMCf010 to a PCMCIA device instead. We enable the SMCf010, configuring it to use disjoint ports, but _SRS doesn't work correctly, so the device doesn't work. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-06-28smsc-ircc2: skip preconfiguration for PNP devicesBjorn Helgaas
If we rely on the device resources from PNPBIOS, we also have to rely on the BIOS to configure any bridges on the way to the device. Using the PNPBIOS resources but changing the configuration of a bridge behind the back of the firmware is likely to make things inconsistent. This patch addresses part of the 2.6.22 regression: "no irda0 interface (2.6.21 was OK), smsc does not find chip" It fixes smsc-ircc2 PNP device detection on HP nx5000 laptops. Other laptops, including HP nc6000, HP nc8000, HP nw8000, and Toshiba Portege 4000, still need PNP quirks to make this work. With "smsc-ircc2.nopnp", we do the legacy device probe, including manual bridge preconfiguration, as before. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Samuel Ortiz <samuel@sortiz.org> Acked-by: "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com> Cc: Andrey Borzenkov <arvidjaar@mail.ru> Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08smsc-ircc2: add PNP supportBjorn Helgaas
Claim devices using PNP, unless the user explicitly specified device addresses. This can be disabled with the "smsc-ircc2.nopnp" option. This removes the need for probing legacy addresses and helps untangle IR devices from serial8250 devices. Sometimes the SMC device is at a legacy COM port address but does not use the legacy COM IRQ. In this case, claiming the device using PNP rather than 8250 legacy probe means we can automatically use the correct IRQ rather than forcing the user to use "setserial" to set the IRQ manually. If the PNP claim doesn't work, make sure you don't have a setserial init script, e.g., /etc/init.d/setserial, configured to poke in legacy COM port resources for the IRDA device. That causes the serial driver to claim resources needed by this driver. Based on this patch by Ville Syrjälä: http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/ir260_smsc_pnp.diff Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Acked-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08smsc-ircc2: tidy up module parameter checkingBjorn Helgaas
To determine whether the user specified a module parameter, use some #defines instead of checking for bare magic numbers. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Keith Owens <kaos@ocs.com.au> Cc: Len Brown <lenb@kernel.org> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Matthieu CASTET <castet.matthieu@free.fr> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Matthew Garrett <mjg59@srcf.ucam.org> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Russell King <rmk+serial@arm.linux.org.uk> Cc: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-25[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}Arnaldo Carvalho de Melo
To clearly state the intent of copying from linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2007-04-25[IrDA]: SMC SuperIO Chip LPC47N227 not identified properlyPeter Kovar
SMC SuperIO Chip LPC47N227 used for IrDA is not detected because its device identification byte can be 0x7A instead of 0x5A. Patch from Peter Kovar <peter.kovar@gmail.com> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SK_BUFF]: Introduce skb_reset_mac_header(skb)Arnaldo Carvalho de Melo
For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple case, next will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-09-28[IrDA] smsc-ircc: More laptops detectedLinus Walleij (LD/EAB
This patch detects the smsc-ircc chipset on the nx1000 (including nx7000 and nx7010) and the nx5000 HP/Compaq laptop series. Patch from "Linus Walleij (LD/EAB)" <linus.walleij@ericsson.com> Signed-off-by: Samuel Ortiz <samuel@sortiz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-07-12[PATCH] smsc-ircc2: fix section reference mismatchesDmitry Torokhov
subsystem_configurations array is only used by an __init function, therefore it should be marked __initdata, not __devinitdata. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-05-09[IRDA]: smsc-ircc: Minimal hotplug support.David Brownell
Minimal PNP hotplug support for the smsc-ircc2 driver. A modular driver will be modprobed via hotplug, but still bypasses driver model probing. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-14[IRDA]: smsc-ircc2, smcinit support for ALi ISA bridgesLinus Walleij
From: Linus Walleij <triad@df.lth.se> This patch enables support for ALi ISA bridges when we run the smcinit code. It is needed to properly configure some Toshiba laptops. Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-09[IRDA]: smcinit merged into smsc-ircc driverLinus Walleij
This patch integrates the smcinit code into the smsc-ircc driver. Some laptops have their smsc-ircc chip not properly configured by the BIOS and needs some preconfiguration. Currently, this can be done from userspace with smcinit, a utility that comes with the irda-utils package. It messes with ioports and PCI settings, from userspace. Now with this patch, if we happen to be on one of the known to be faulty laptops, we preconfigure the chip from the driver. Patch from Linus Walleij <triad@df.lth.se> Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2005-11-09[DRIVER MODEL] Convert platform drivers to use struct platform_driverRussell King
This allows us to eliminate the casts in the drivers, and eventually remove the use of the device_driver function pointer methods for platform device drivers. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-31Merge master.kernel.org:/home/rmk/linux-2.6-drvmodelLinus Torvalds
Manual #include fixups for clashes - there may be some unnecessary
2005-10-30[PATCH] smsc-ircc2: PM cleanup - do not close device when suspendingDmitry Torokhov
smsc-ircc2 - avoid closing network device when suspending; just release interrupt and disable DMA ourselves. Also make sure to reset chip when resuming. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@bougret.hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-10-29Create platform_device.h to contain all the platform device details.Russell King
Convert everyone who uses platform_bus_type to include linux/platform_device.h. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacksRussell King
In PM v1, all devices were called at SUSPEND_DISABLE level. Then all devices were called at SUSPEND_SAVE_STATE level, and finally SUSPEND_POWER_DOWN level. However, with PM v2, to maintain compatibility for platform devices, I arranged for the PM v2 suspend/resume callbacks to call the old PM v1 suspend/resume callbacks three times with each level in order so that existing drivers continued to work. Since this is obsolete infrastructure which is no longer necessary, we can remove it. Here's an (untested) patch to do exactly that. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-09-07[PATCH] Fix smsc_ircc_init return valueBrice Goglin
I noticed a strange return value in smsc_ircc_init in drivers/net/irda/smsc_ircc2.c in rc4-mm1. When reaching the line "if (ircc_fir > 0 && ircc_sir > 0)", ret is 0. So I don't see the point of setting it to 0 in the "else" case. >From what I see in 2.6.12 it should probably be set to -ENODEV at the begining of the "else" case. The attached patch does this. Note that I didn't actually see any breakage caused by this. Signed-off-by: Brice Goglin <Brice.Goglin@ens-lyon.org> Cc: Dmitry Torokhov <dtor_core@ameritech.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: dont use void * where specific type will doDmitry Torokhov
IRDA: smsc-ircc2 - do not over-use void * pointers, use specific types wherever possible. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: use netdev_priv()Dmitry Torokhov
IRDA: smsc-ircc2 - use netdev_priv() instead of accessing pointer directly. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: add to sysfs as platform device, new PMDmitry Torokhov
IRDA: smsc-ircc2 - add sysfs support (platform device and driver) and switch power management to the new scheme. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: dont pass iobase aroundDmitry Torokhov
IRDA: smsc-ircc2 - cleanup - do not pass around iobase, it can be retrieved from smsc_ircc_cb structure. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: remove typedefsDmitry Torokhov
IRDA: smsc-ircc2 - remove excessive typedefs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: drop DIM macro in favor of ARRAY_SIZEDmitry Torokhov
IRDA: smsc-ircc2 - remove home-grown DIM macro, use ARRAY_SIZE intead. Also fix out-of-bound array access. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: formatting fixesDmitry Torokhov
IRDA: smsc-ircc2 - some formatting changes for better readability. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07[PATCH] smsc-ircc2: whitespace fixesDmitry Torokhov
IRDA: smsc-ircc2 - whitespace fixes. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!