[PATCHSET] "pcmcia_device" patchset (formerly pcmcia-b14) re-diffed and updated

Dominik Brodowski linux at dominikbrodowski.de
Sun May 16 19:22:00 EDT 2004


I've just re-diffed my proposal for a patchset formerly named
"14-pcmcia", now named "130-pcmcia_device". It is built on top of
2.6.6-bk-current, "b100-socket-sysfs", "b110-obsolete" and
"b120-nomaster", which are avaliable at
 
http://www.brodo.de/patches/2004-05-16/pcmcia-b100.tar.bz2
http://www.brodo.de/patches/2004-05-16/pcmcia-b110.tar.bz2
http://www.brodo.de/patches/2004-05-16/pcmcia-b120.tar.bz2
         
Changes to previous implementation sent to list
- re-diffed
- adapted so that "b100-socket-syfs" can be first to be merged
- updated two comments


The aim of this patchset is to assert only PCMCIA device drivers are registered
as clients, PCMCIA devices (one PCMCIA device for each function on a PCMCIA
card) are registered with the driver model core, and to remove the special
"bind information" in ds.c.

An example of the (beginning) integration with the driver model core.

sonnenschein root # tree /sys/bus/pcmcia/
/sys/bus/pcmcia/
|-- devices
|   `-- pcmcia0.0 -> ../../../devices/pci0000:00/0000:00:0c.0/pcmcia0.0
`-- drivers
    `-- pcnet_cs
        `-- pcmcia0.0 -> ../../../../devices/pci0000:00/0000:00:0c.0/pcmcia0.0
 
5 directories, 0 files



The patches are available in compressed form
at:
http://www.brodo.de/patches/2004-05-16/pcmcia-b130.tar.bz2
or
http://www.brodo.de/patches/2004-05-16/pcmcia-b130.tar.gz
as single diff at:
http://www.brodo.de/patches/2004-05-16/pcmcia-b130-complete

and as single patches as follows:



http://www.brodo.de/patches/2004-05-16/01-new_ds_registration

Add a new registration function to register the PCMCIA 16-bit subsystem
(ds a.k.a. pcmcia) with the PCMICA core (cs a.k.a. pcmcia_core).

As send_event is only called with skt->sem held, we can use that to safeguard
skt->callback(), too. Note that the class_device_register() call by pccardd()
is done _before_ skt->sem() is held, and the pcmcia_socket_register() doesn't
hold skt->sem() as well, so there is no chance for a deadlock.

 drivers/pcmcia/cs.c          |   56 +++++++++++++++++++++++++++++++++++++++++--
 drivers/pcmcia/cs_internal.h |    8 ++++++
 drivers/pcmcia/ds.c          |   51 +++++++++++----------------------------
 include/pcmcia/ss.h          |    2 +
 4 files changed, 79 insertions(+), 38 deletions(-)


http://www.brodo.de/patches/2004-05-16/02-send_event

Call the PCMCIA 16-bit device drivers from ds.c instead of cs.c. Also,
remove the delayed handling of CS_REMOVAL events, but keep the ordering
the same as it used to be due to the delay.

 drivers/pcmcia/cs.c |   41 ++++++-------------------
 drivers/pcmcia/ds.c |   84 ++++++++++++++++++++++++++++++----------------------
 2 files changed, 60 insertions(+), 65 deletions(-)


http://www.brodo.de/patches/2004-05-16/03-unify_bind_mtd

Unify the pcmcia_bind_mtd and bind_mtd functions.

 drivers/pcmcia/ds.c |   73 ++++++++++++----------------------------------------
 include/pcmcia/cs.h |    7 ----
 2 files changed, 18 insertions(+), 62 deletions(-)


http://www.brodo.de/patches/2004-05-16/04-unify_bind_device

Unify bind_device and pcmcia_bind_device. Also, change bind_device so
that it conforms to CodingStyle.

 drivers/pcmcia/ds.c |  159 +++++++++++++++++++++-------------------------------
 include/pcmcia/cs.h |    9 --
 2 files changed, 68 insertions(+), 100 deletions(-)


http://www.brodo.de/patches/2004-05-16/05-license

As discussed previously, my integration of ds.c with the driver model
can and will only be available under the GPL, as it's too much 
derived of other buses' implementation of integration with the driver model.

 drivers/pcmcia/ds.c |   48 +++++++++++++++---------------------------------
 include/pcmcia/ds.h |   26 ++++++--------------------
 2 files changed, 21 insertions(+), 53 deletions(-)


http://www.brodo.de/patches/2004-05-16/06-pcmcia_device

Add pcmcia_device(s).

 drivers/pcmcia/ds.c |   66 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 include/pcmcia/ds.h |   17 +++++++++++++
 2 files changed, 83 insertions(+)


http://www.brodo.de/patches/2004-05-16/07-remove_bind_t

Remove struct socket_bind_t by moving "dev_link_t *instance" to struct
pcmcia_device, and transforming all users of socket_bind_t to use struct
pcmcia_device instead. Also, CodingStyle updates for
get_device_info and unbind_request.

 drivers/pcmcia/ds.c |  302 +++++++++++++++++++++++++++-------------------------
 include/pcmcia/ds.h |    4
 2 files changed, 163 insertions(+), 143 deletions(-)


http://www.brodo.de/patches/2004-05-16/08-remove_use_count

Remove the internal driver use_count in ds.c, as the reference counting
is done in the module core anyways, and that reference count is available
for cardmgr's usage by a call to module_refcount. And if
!CONFIG_MODULE_UNLOAD, rmmod is useless anyways, so avoid that call by
cardmgr at all.
 
 drivers/pcmcia/ds.c |   13 ++++++++-----
 include/pcmcia/ds.h |    1 -
 2 files changed, 8 insertions(+), 6 deletions(-)



More information about the linux-pcmcia mailing list