History log of /linux-master/drivers/pcmcia/cardbus.c
Revision Date Author Comments
# 990a1b50 16-Oct-2019 Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>

pcmcia: include cs_internal.h for missing declarations

Include cs_internal.h (and pcmcia/cistpl.h as required by
cs_internal.h) for the declearions of cb_alloc and cb_free
to silence the following sparse warnings:

drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared. Should it be static?
drivers/pcmcia/cardbus.c:103:6: warning: symbol 'cb_free' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# e0c31fdd 16-Oct-2019 Ben Dooks (Codethink) <ben.dooks@codethink.co.uk>

pcmcia: include cs_internal.h for missing declarations

Include cs_internal.h (and pcmcia/cistpl.h as required by
cs_internal.h) for the declearions of cb_alloc and cb_free
to silence the following sparse warnings;

drivers/pcmcia/cardbus.c:64:11: warning: symbol 'cb_alloc' was not declared. Should it be static?
drivers/pcmcia/cardbus.c:103:6: warning: symbol 'cb_free' was not declared. Should it be static?

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Link: https://lore.kernel.org/r/20191017114059.10989-1-ben.dooks@codethink.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# d2912cb1 04-Jun-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500

Based on 2 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license version 2 as
published by the free software foundation #

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 4122 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Enrico Weigelt <info@metux.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Allison Randal <allison@lohutok.net>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.933168790@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 24a0c654 20-Oct-2017 Andy Shevchenko <andriy.shevchenko@linux.intel.com>

PCI: Add for_each_pci_bridge() helper

The following pattern is often used:

list_for_each_entry(dev, &bus->devices, bus_list) {
if (pci_is_bridge(dev)) {
...
}
}

Add a for_each_pci_bridge() helper to make that code easier to write and
read by reducing indentation level. It also saves one or few lines of code
in each occurrence.

Convert PCI core parts here at the same time.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[bhelgaas: fold in http://lkml.kernel.org/r/20171013165352.25550-1-andriy.shevchenko@linux.intel.com]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# 56604fae 03-May-2014 Yijing Wang <wangyijing@huawei.com>

pcmcia: Use pci_is_bridge() to simplify code

Use pci_is_bridge() to simplify code. No functional change.

Requires: 326c1cdae741 PCI: Rename pci_is_bridge() to pci_has_subordinate()
Requires: 1c86438c9423 PCI: Add new pci_is_bridge() interface
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# 5ef68e88 10-Jan-2014 Rafael J. Wysocki <rafael.j.wysocki@intel.com>

pcmcia: Use global PCI rescan-remove locking

Multiple race conditions are possible between the cardbus PCI device
addition and removal and the generic PCI bus rescan and device removal that
can be triggered via sysfs.

To avoid those race conditions make the cardbus code use global PCI
rescan-remove locking.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# 928bea96 22-Jul-2013 Yinghai Lu <yinghai@kernel.org>

PCI: Delay enabling bridges until they're needed

We currently enable PCI bridges after scanning a bus and assigning
resources. This is often done in arch code.

This patch changes this so we don't enable a bridge until necessary, i.e.,
until we enable a PCI device behind the bridge. We do this in the generic
pci_enable_device() path, so this also removes the arch-specific code to
enable bridges.

[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# 0a140577 17-Aug-2012 Bjorn Helgaas <bhelgaas@google.com>

pcmcia: Use common pci_stop_and_remove_bus_device()

Use pci_stop_and_remove_bus_device() like most other hotplug drivers
rather than the special-purpose "behind_bridge" variant. This just
means we have to iterate through all the devices downstream of the
bridge ourselves, which is the same thing pci_stop_behind_bridge()
did.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>


# b918c62e 17-May-2012 Yinghai Lu <yinghai@kernel.org>

PCI: replace struct pci_bus secondary/subordinate with busn_res

Replace the struct pci_bus secondary/subordinate members with the
struct resource busn_res. Later we'll build a resource tree of these
bus numbers.

[bhelgaas: changelog]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>


# 6754b9e9 25-Feb-2012 Yinghai Lu <yinghai@kernel.org>

PCI: Rename pci_remove_behind_bridge to pci_stop_and_remove_behind_bridge

The old pci_remove_behind_bridge actually do stop and remove.

Make the name reflect that to reduce confusion.

Suggested-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# 6f840afb 07-Mar-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: replace struct irq with uint pcmcia_irq in struct pcmcia_socket

As we don't need the "Config" counter any more, we can simplify
struct pcmcia_socket.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 6e83ee07 02-Mar-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: CodingStyle fixes

Fix most of the remaining CodingStyle issues in drivers/pcmcia , which
related to wrong indent -- PCMCIA historically used 4 spaces. Also, remove
a custom min() implementation with the generic one.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 57197b9b 02-Jan-2010 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: CardBus doesn't need CIS access

At least no in-kernel CardBus-capable PCI driver makes use of the CIS
access functions. Therefore, it seems sensible to remove this unused
code, and cleanup cardbus.c a lot.

CC: Jesse Barnes <jbarnes@virtuousgeek.org>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 2d1c8618 08-Dec-2009 Benjamin Herrenschmidt <benh@kernel.crashing.org>

PCI/cardbus: Add a fixup hook and fix powerpc

The cardbus code creates PCI devices without ever going through the
necessary fixup bits and pieces that normal PCI devices go through.

There's in fact a commented out call to pcibios_fixup_bus() in there,
it's commented because ... it doesn't work.

I could make pcibios_fixup_bus() do the right thing on powerpc easily
but I felt it cleaner instead to provide a specific hook pci_fixup_cardbus
for which a weak empty implementation is provided by the PCI core.

This fixes cardbus on powerbooks and probably all other PowerPC
platforms which was broken completely for ever on some platforms and
since 2.6.31 on others such as PowerBooks when we made the DMA ops
mandatory (since those are setup by the fixups).

Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# 9fea84f4 07-Dec-2009 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: CodingStyle fixes

Fix several CodingStyle issues in drivers/pcmcia/ . checkpatch.pl no longer
reports errors in the PCMCIA core. The remaining warnings mostly relate to
wrong indent -- PCMCIA historically used 4 spaces --, to lines over 80
characters and to hundreds of typedefs. The cleanup of those will follow
in the future.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# d50dbec3 22-Oct-2009 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: use dynamic debug instead of custom infrastructure

Use the generic "dynamic debug" infrastructure instead of
CONIG_PCMCIA_DEBUG in the PCMCIA core (pcmcia.ko and pcmcia_core.ko). To
enable debugging, enable CONFIG_DYNAMIC_DEBUG, mount debugfs and

$ echo -n 'module pcmcia_core +p' > /sys/kernel/debug/dynamic_debug/control

for the complete module "pcmcia_core", for example. For more detailled
instructions, please see Documentation/dynamic-debug-howto.txt

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 15ea76d4 22-Sep-2009 Tejun Heo <tj@kernel.org>

pccard: configure CLS on attach

For non hotplug PCI devices, the system firmware usually configures
CLS correctly. For pccard devices system firmware can't do it and
Linux PCI layer doesn't do it either. Unfortunately this leads to
poor performance for certain devices (sata_sil). Unless MWI, which
requires separate configuration, is to be used, CLS doesn't affect
correctness, so the configuration should be harmless.

This patch makes pci_set_cacheline_size() always built and export it
and make pccard call it during attach.

Please note that some other PCI hotplug drivers (shpchp and pciehp)
also configure CLS on hotplug.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Cc: Greg KH <greg@kroah.com>
Cc: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Cc: Axel Birndt <towerlexa@gmx.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>


# 4c89e88b 03-Aug-2008 Dominik Brodowski <linux@dominikbrodowski.net>

pcmcia: deprecate CS_SUCCESS

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 <linux@dominikbrodowski.net>


# 6351a71c 16-Apr-2008 Adrian Bunk <bunk@kernel.org>

pcmcia: kill IN_CARD_SERVICES

IN_CARD_SERVICES was #define'd but not used, so let's remove it.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# ae49ec92 19-Jun-2008 Magnus Damm <damm@opensource.se>

pcmcia: remove unused bulkmem.h

The code in include/pcmcia/bulkmem.h was only kept for compatibility reasons.
Therefore, move the remaining region_info_t definition to ds.h

[linux@dominikbrodowski.net: do not modify the IOCTL, move definition to
ds.h, and update changelog]
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# e772d782 01-May-2008 Sam Ravnborg <sam@ravnborg.org>

pcmcia: annotate cb_alloc with __ref

cb_alloc() uses a function (pci_scan_slot) that will be annotated __devinit.

Annotate cb_alloc() with __ref to tell modpost to ignore this reference.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 1523508d 04-Feb-2008 Julia Lawall <julia@diku.dk>

drivers/pcmcia: add missing pci_dev_get

pci_get_slot does a pci_dev_get, so pci_dev_put needs to be called in an
error case.

An extract of the semantic match used to find the problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type find1.T,T1,T2;
identifier find1.E;
statement find1.S;
expression x1,x2,x3;
expression find1.test;
int ret != 0;
@@

T E;
...
(
* E = pci_get_slot(...);
if (E == NULL) S
|
* if ((E = pci_get_slot(...)) == NULL)
S
)
... when != pci_dev_put(...,(T1)E,...)
when != if (E != NULL) { ... pci_dev_put(...,(T1)E,...); ...}
when != x1 = (T1)E
when != E = x3;
when any
if (test) {
... when != pci_dev_put(...,(T2)E,...)
when != if (E != NULL) { ... pci_dev_put(...,(T2)E,...); ...}
when != x2 = (T2)E
(
* return;
|
* return ret;
)
}
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 728f0bbd 17-Feb-2007 Robert P. J. Day <rpjday@mindspring.com>

Remove useless FIND_FIRST_BIT() macro from cardbus.c.

Delete the definition of the unused FIND_FIRST_BIT() macro.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>


# 74ae3221 01-Oct-2006 Alan Cox <alan@lxorguk.ukuu.org.uk>

[PATCH] cardbus: switch to ref counting/hotplug safe API

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 8c3520d4 21-Aug-2005 Daniel Ritz <daniel.ritz@gmx.ch>

[PATCH] yenta: auto-tune EnE bridges for CardBus cards

Echo Audio cardbus products are known to be incompatible with EnE bridges.
in order to maybe solve the problem a EnE specific test bit has to be set,
another cleared...but other setups have a good chance to break when just
forcing the bits. so do the whole thingy automatically.

The patch adds a hook in cb_alloc() that allows special tuning for the
different chipsets. for ene just match the Echo products and set/clear the
test bits, defaults to do the same thing as w/o the patch to not break
working setups.

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Cc: Linus Torvalds <torvalds@osdl.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>


# 44670d2b 07-Jul-2005 Dominik Brodowski <linux@dominikbrodowski.net>

[PATCH] pcmcia: remove references to pcmcia/version.h

As a follow-up, remove the inclusion of pcmcia/version.h in many files.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>


# 1da177e4 16-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org>

Linux-2.6.12-rc2

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!