08 Nov, 2011

1 commit

  • Make all bluetooth drivers ignore the return value of hci_unregister_dev as it
    always returns 0. In the next step, hci_unregister_dev can be modified to return
    void.
    Some of the drivers already ignore the return value (including btusb), hence,
    this will increase consitency in the bluetooth drivers.

    Signed-off-by: David Herrmann
    Acked-by: Marcel Holtmann
    Signed-off-by: Gustavo F. Padovan

    David Herrmann
     

06 May, 2011

1 commit

  • Saves about 50KB of data.

    Old/new size of all objects:
    text data bss dec hex filename
    563015 80096 130684 773795 bcea3 (TOTALS)
    610916 32256 130632 773804 bceac (TOTALS)

    Signed-off-by: Joe Perches
    Acked-by: Kurt Van Dijck (for drivers/net/can/softing/softing_cs.c)
    Signed-off-by: Dominik Brodowski

    Joe Perches
     

29 Sep, 2010

6 commits

  • Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • When CONF_AUTO_SET_IO or CONF_AUTO_SET_IOMEM are set, the corresponding
    fields in struct pcmcia_device *p_dev->resource[0,1,2] are set
    accordinly. Drivers wishing to override certain settings may do so in
    the callback function, but they no longer need to parse the CIS entries
    stored in cistpl_cftable_entry_t themselves.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: linux-bluetooth@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Introduce an autoconfiguration feature to set certain values in
    pcmcia_loop_config(), instead of copying the same code over and over
    in each PCMCIA driver. At first, introduce the following options:

    CONF_AUTO_CHECK_VCC check or matching Vcc entry
    CONF_AUTO_SET_VPP set Vpp
    CONF_AUTO_AUDIO enable the speaker line

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • pcmcia_enable_device() now replaces pcmcia_request_configuration().
    Instead of config_req_t, all necessary flags are either passed as
    a parameter to pcmcia_enable_device(), or (in rare circumstances)
    set in struct pcmcia_device -> flags.

    With the last remaining user of include/pcmcia/cs.h gone, remove
    all references.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • IntType was only set to INT_MEMORY (driver pcmciamtd) or INT_MEMORY_AND_IO
    (all other drivers). As this flags seems to relate to ioport access, make
    it conditional to the driver having requested IO port access. There are two
    drivers which do not request IO ports, but did set INT_MEMORY_AND_IO:
    ray_cs and b43. For those, we consistently only set INT_MEMORY in future.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Jiri Kosina
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Some drivers prefer to explicitly set Vpp. Instead of passing the
    voltage inside config_req_t, store it in struct pcmcia_device.

    CC: linux-ide@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-mtd@lists.infradead.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: linux-scsi@vger.kernel.org
    Acked-by: Gustavo F. Padovan (for drivers/bluetooth)
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

03 Aug, 2010

2 commits

  • Instead of io_req_t, drivers are now requested to fill out
    struct pcmcia_device *p_dev->resource[0,1] for up to two ioport
    ranges. After a call to pcmcia_request_io(), the ports found there
    are reserved, after calling pcmcia_request_configuration(), they may
    be used.

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    CC: Michael Buesch
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • After pcmcia_request_io(), do not make use of the values stored in
    io_req_t, but instead use those found in struct pcmcia_device->resource[].

    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

31 Jul, 2010

1 commit

  • Remove cs_types.h which is no longer needed: Most definitions aren't
    used at all, a few can be made away with, and two remaining definitions
    (typedefs, unfortunatley) may be moved to more specific places.

    CC: linux-ide@vger.kernel.org
    CC: linux-usb@vger.kernel.org
    CC: laforge@gnumonks.org
    CC: linux-mtd@lists.infradead.org
    CC: alsa-devel@alsa-project.org
    CC: linux-serial@vger.kernel.org
    Acked-by: Marcel Holtmann (for drivers/bluetooth/)
    Acked-by: David S. Miller
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

10 May, 2010

2 commits

  • dev_node_t was only used to transport some minor/major numbers
    from the PCMCIA device drivers to deprecated userspace helpers.
    However, only a few drivers made use of it, and the userspace
    helpers are deprecated anyways. Therefore, get rid of dev_node_t .

    As a first step, remove any usage of dev_node_t from drivers which
    only wrote to this typedef/struct, but did not make use of it.

    CC: linux-bluetooth@vger.kernel.org
    CC: Harald Welte
    CC: linux-mtd@lists.infradead.org
    CC: linux-wireless@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Instead of the old pcmcia_request_irq() interface, drivers may now
    choose between:

    - calling request_irq/free_irq directly. Use the IRQ from *p_dev->irq.

    - use pcmcia_request_irq(p_dev, handler_t); the PCMCIA core will
    clean up automatically on calls to pcmcia_disable_device() or
    device ejection.

    - drivers still not capable of IRQF_SHARED (or not telling us so) may
    use the deprecated pcmcia_request_exclusive_irq() for the time
    being; they might receive a shared IRQ nonetheless.

    CC: linux-bluetooth@vger.kernel.org
    CC: netdev@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-serial@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: linux-usb@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

27 Feb, 2010

1 commit


30 Jan, 2010

1 commit

  • Commit ac019360fe3 changed the irq handler logic to BUG_ON rather than
    returning IRQ_NONE when the incoming argument is invalid. While this
    works in most cases, it doesn't work when the IRQ is shared with other
    devices (or when DEBUG_SHIRQ is enabled).

    So revert the previous change and replace the warning message with a
    comment explaining that we want this behavior.

    Signed-off-by: Michael Hennerich
    Signed-off-by: Mike Frysinger
    Signed-off-by: Marcel Holtmann

    Mike Frysinger
     

29 Nov, 2009

1 commit

  • Most of the irq_req_t typedef'd struct can be re-worked quite
    easily:

    (1) IRQInfo2 was unused in any case, so drop it.

    (2) IRQInfo1 was used write-only, so drop it.

    (3) Instance (private data to be passed to the IRQ handler):
    Most PCMCIA drivers using pcmcia_request_irq() to actually
    register an IRQ handler set the "dev_id" to the same pointer
    as the "priv" pointer in struct pcmcia_device. Modify the two
    exceptions (ipwireless, ibmtr_cs) to also work this waym and
    set the IRQ handler's "dev_id" to p_dev->priv unconditionally.

    (4) Handler is to be of type irq_handler_t.

    (5) Handler != NULL already tells whether an IRQ handler is present.
    Therefore, we do not need the IRQ_HANDLER_PRESENT flag in
    irq_req_t.Attributes.

    CC: netdev@vger.kernel.org
    CC: linux-bluetooth@vger.kernel.org
    CC: linux-ide@vger.kernel.org
    CC: linux-wireless@vger.kernel.org
    CC: linux-scsi@vger.kernel.org
    CC: alsa-devel@alsa-project.org
    CC: Jaroslav Kysela
    CC: Jiri Kosina
    CC: Karsten Keil
    for the Bluetooth parts: Acked-by: Marcel Holtmann
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

09 Nov, 2009

1 commit

  • Remove all usages of the CS_CHECK macro and replace them with proper
    Linux style calling and return value checking. The extra error reporting may
    be dropped, as the PCMCIA core already complains about any (non-driver-author)
    errors.

    CC: linux-bluetooth@vger.kernel.org
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

18 Oct, 2008

1 commit


23 Aug, 2008

5 commits


06 Feb, 2008

1 commit

  • Remove kio_addr_t, and replace it with unsigned int. No known architecture
    needs more than 32 bits for IO addresses and ports and having a separate type
    for it is just messy.

    Signed-off-by: Olof Johansson
    Cc: Christoph Hellwig
    Cc: Matthew Wilcox
    Cc: Alan Cox
    Cc: Dominik Brodowski
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olof Johansson
     

03 Feb, 2008

1 commit


22 Oct, 2007

1 commit


26 Apr, 2007

1 commit


15 Feb, 2007

1 commit

  • After Al Viro (finally) succeeded in removing the sched.h #include in module.h
    recently, it makes sense again to remove other superfluous sched.h includes.
    There are quite a lot of files which include it but don't actually need
    anything defined in there. Presumably these includes were once needed for
    macros that used to live in sched.h, but moved to other header files in the
    course of cleaning it up.

    To ease the pain, this time I did not fiddle with any header files and only
    removed #includes from .c-files, which tend to cause less trouble.

    Compile tested against 2.6.20-rc2 and 2.6.20-rc2-mm2 (with offsets) on alpha,
    arm, i386, ia64, mips, powerpc, and x86_64 with allnoconfig, defconfig,
    allmodconfig, and allyesconfig as well as a few randconfigs on x86_64 and all
    configs in arch/arm/configs on arm. I also checked that no new warnings were
    introduced by the patch (actually, some warnings are removed that were emitted
    by unnecessarily included header files).

    Signed-off-by: Tim Schmielau
    Acked-by: Russell King
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

05 Dec, 2006

1 commit

  • struct pcmcia_device *p_dev->conf.ConfigBase and .Present are set in almost
    all PCMICA driver right at the beginning, using the same calls but slightly
    different implementations. Unfiy this in the PCMCIA core.

    Includes a small bugfix ("drivers/net/pcmcia/xirc2ps_cs.c: remove unused
    label") from and Signed-off-by Adrian Bunk

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

05 Oct, 2006

1 commit

  • 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
    (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)

    David Howells
     

04 Jul, 2006

1 commit


01 Jul, 2006

1 commit


31 Mar, 2006

7 commits


06 Jan, 2006

1 commit

  • Unify the EVENT_CARD_INSERTION and "attach" callbacks to one unified
    probe() callback. As all in-kernel drivers are changed to this new
    callback, there will be no temporary backwards-compatibility. Inside a
    probe() function, each driver _must_ set struct pcmcia_device
    *p_dev->instance and instance->handle correctly.

    With these patches, the basic driver interface for 16-bit PCMCIA drivers
    now has the classic four callbacks known also from other buses:

    int (*probe) (struct pcmcia_device *dev);
    void (*remove) (struct pcmcia_device *dev);

    int (*suspend) (struct pcmcia_device *dev);
    int (*resume) (struct pcmcia_device *dev);

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski