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

4 commits

  • 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
     
  • Several drivers prefer to explicitly set config_{base,index,regs},
    formerly known as ConfigBase, ConfigIndex and Present. Instead of
    passing these values inside config_req_t, store it in struct
    pcmcia_device.

    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
     

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
     

02 Jul, 2010

1 commit


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

1 commit

  • Instead of using own error or success codes, the PCMCIA code should rely on
    the generic return values. Therefore, replace all occurrences of CS_SUCCESS
    with 0.

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

    Dominik Brodowski
     

22 Oct, 2007

1 commit


26 Apr, 2007

1 commit


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
     

31 Oct, 2006

1 commit

  • kernel: INFO: trying to register non-static key.
    kernel: the code is fine but needs lockdep annotation.
    kernel: turning off the locking correctness validator.
    kernel: [] show_trace_log_lvl+0x58/0x16a
    kernel: [] show_trace+0xd/0x10
    kernel: [] dump_stack+0x19/0x1b
    kernel: [] __lock_acquire+0xf0/0x90d
    kernel: [] lock_acquire+0x4b/0x6b
    kernel: [] _spin_lock_irqsave+0x22/0x32
    kernel: [] prepare_to_wait+0x17/0x4b
    kernel: [] lpfc_do_work+0xdd/0xcc2 [lpfc]
    kernel: [] kthread+0xc3/0xf2
    kernel: [] kernel_thread_helper+0x5/0xb

    Another case of non-static lockdep keys; duplicate the paradigm set by
    DECLARE_COMPLETION_ONSTACK and introduce DECLARE_WAIT_QUEUE_HEAD_ONSTACK.

    Signed-off-by: Peter Zijlstra
    Cc: Greg KH
    Cc: Markus Lidel
    Acked-by: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: James Bottomley
    Cc: Marcel Holtmann
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     

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

4 commits


07 Nov, 2005

1 commit


30 Aug, 2005

1 commit


08 Jul, 2005

2 commits