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
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
29 Sep, 2010
4 commits
-
Tested-by: Wolfram Sang
Signed-off-by: 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 -
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 -
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
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 -
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
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
02 Jul, 2010
1 commit
-
Fixed include error, changed to linux/io.h
Signed-off-by: Cody Rester
Acked-by: Gustavo F. Padovan
Signed-off-by: David S. Miller
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 -
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
27 Feb, 2010
1 commit
-
The hdev->type is misnamed and should be actually hdev->bus instead. So
convert it now.Signed-off-by: Marcel Holtmann
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
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
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
18 Oct, 2008
1 commit
-
Switch more drivers to dynamic sharing after checking their IRQ handlers
use dev_id and are robustSigned-off-by: Alan Cox
Acked-by: Marcel Holtmann
Signed-off-by: Dominik Brodowski
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
22 Oct, 2007
1 commit
-
Our info structure and info->hdev is always passed to the IRQ handler,
so we don't have to worry about these checks in every interrupt.Leave a BUG_ON() just to help unwary programmers, but these could
probably be removed as well.Signed-off-by: Jeff Garzik
Signed-off-by: Marcel Holtmann
26 Apr, 2007
1 commit
-
For consistency with other skb data accessors, reducing the number of direct
accesses to skb->data.Signed-off-by: Arnaldo Carvalho de Melo
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 BunkSigned-off-by: 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/0xbAnother 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
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)
04 Jul, 2006
1 commit
-
This patch adds a generic Bluetooth platform device that can be used
as parent device by virtual and serial devices.Signed-off-by: Marcel Holtmann
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
31 Mar, 2006
7 commits
-
Instead of the two status values struct pcmcia_device->p_state and state,
use descriptive bitfields. Most value-checking in drivers was invalid, as
the core now only calls the ->remove() (a.k.a. detach) function in case the
attachement _and_ configuration was successful.Signed-off-by: Dominik Brodowski
-
Most of the driver initialization isn't done in the .probe function, but in
the internal _config() functions. Make them return a value, so that .probe
can properly report whether the probing of the device succeeded or not.Signed-off-by: Dominik Brodowski
-
dev_link_t * and client_handle_t both mean struct pcmcai_device * by now.
Therefore, remove all such indirections.Signed-off-by: Dominik Brodowski
-
Embed dev_link_t into struct pcmcia_device(), as they basically address the
same entity. The actual contents of dev_link_t will be cleaned up step by step.
This patch includes a bugfix from and signed-off-by Andrew Morton.Signed-off-by: Dominik Brodowski
-
As we do not allow setting Vcc in the pcmcia core, and Vpp1 and
Vpp2 can only be set to the same value, a lot of code can be
streamlined.Signed-off-by: Dominik Brodowski
-
In all but one case, the suspend and resume functions of PCMCIA drivers
contain mostly of calls to pcmcia_release_configuration() and
pcmcia_request_configuration(). Therefore, move this code out of the
drivers and into the core.Signed-off-by: Dominik Brodowski
-
pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary
cleanups upon device or driver removal: it calls the appropriate
pcmcia_release_* functions, and can replace (most) of the current drivers'
_release() functions.Signed-off-by: Dominik Brodowski
06 Jan, 2006
4 commits
-
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
-
The linked list of devices managed by each PCMCIA driver is, in very most
cases, unused. Therefore, remove it from many drivers.Signed-off-by: Dominik Brodowski
-
Unify the "detach" and REMOVAL_EVENT handlers to one "remove" function.
Old functionality is preserved, for the moment.Signed-off-by: Dominik Brodowski
-
Move the suspend and resume methods out of the event handler, and into
special functions. Also use these functions for pre- and post-reset, as
almost all drivers already do, and the remaining ones can easily be
converted.Bugfix to include/pcmcia/ds.c
Signed-off-by: Andrew MortonSigned-off-by: Dominik Brodowski
07 Nov, 2005
1 commit
-
Signed-off-by: Deepak Saxena
Cc: Marcel Holtmann
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Aug, 2005
1 commit
-
This patch moves the usage of packet type into the SKB control
buffer. After this patch it is now possible to shrink the sk_buff
structure and redefine its pkt_type.Signed-off-by: Marcel Holtmann
Signed-off-by: David S. Miller
08 Jul, 2005
2 commits
-
As a follow-up, remove the inclusion of pcmcia/version.h in many files.
Signed-off-by: Dominik Brodowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Move the "event handler" to struct pcmcia_driver -- the unified event handler
will disappear really soon, but switching it to struct pcmcia_driver in the
meantime allows for better "step-by-step" patches.Signed-off-by: Dominik Brodowski
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds