29 Sep, 2010

1 commit

  • 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
     

03 Aug, 2010

2 commits


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
     

22 May, 2010

1 commit


10 May, 2010

2 commits


17 Apr, 2010

1 commit


03 Mar, 2010

1 commit

  • 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

    Dominik Brodowski
     

18 Feb, 2010

6 commits


18 Jan, 2010

4 commits

  • 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
    CC: Linus Torvalds
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • During a suspend/resume cycle, an user may change the card in the
    PCMCIA/CardBus slot. The pcmcia_core can at least look at the
    socket state to check whether it is the same.

    For PCMCIA devices, move the detection and handling of such a
    change to ds.c.

    For CardBus devices, the PCI hotplug interface doesn't offer a "rescan"
    facility which also _removes_ devices no longer to be found behind a
    bridge. Therefore, remove and re-add all devices unconditionally.

    CC: Jesse Barnes
    CC: Linus Torvalds
    Tested-by: Wolfram Sang
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • Cleanup pccard_validate_cis() and make it return an error code on
    all failures, not merely on some failures.

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

    Dominik Brodowski
     
  • In pccard_validate_cis(), validate the card CIS, not the CIS cache.
    Also, destroy the CIS cache if pccard_validate_cis fails.

    Furthermore, do not remove the fake CIS in destroy_cis_cache() but
    do so explicitely in the code paths where it makes sense.

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

    Dominik Brodowski
     

08 Dec, 2009

1 commit

  • 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

    Dominik Brodowski
     

09 Nov, 2009

2 commits

  • 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

    Dominik Brodowski
     
  • As a replacement to pcmcia_get_{first,next}_tuple() and
    pcmcia_get_tuple_data(), three new -- and easier to use --
    functions are added:

    - pcmcia_get_tuple() to get the very first CIS entry of one
    type.

    - pcmcia_loop_tuple() to loop over all CIS entries of one type.

    - pcmcia_get_mac_from_cis() to read out the hardware MAC address
    from CISTPL_FUNCE.

    Only a handful of drivers need these functions anyway, as most
    CIS access is already handled by pcmcia_loop_config(), which
    now shares the same backed (pccard_loop_tuple()) with
    pcmcia_loop_tuple().

    A pcmcia_get_mac_from_cis() bug noted by Komuro
    has been fixed in this revision.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

19 Oct, 2009

1 commit

  • pccard_read_tuple(), which is only used by the PCMCIA core, should
    handle TUPLE_RETURN_COMMON more sensibly: If a specific function (which
    may be 0) is requested, set tuple.Attributes = 0 as was done in all
    PCMCIA drivers. If, however, BIND_FN_ALL is requested, return the
    "common" tuple. As to the callers of pccard_read_tuple():

    - All calls to pcmcia_validate_cis() had set the "function" parameter to
    BIND_FN_ALL. Therefore, remove the "function" parameter and make the
    parameter to pccard_read_tuple explicit.

    - Calls to CISTPL_VERS_1 and CISTPL_MANFID now set BIND_FN_ALL. This was
    already the case for calls to CISTPL_LONGLINK_MFC.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

03 Nov, 2008

1 commit


31 Aug, 2008

1 commit


23 Aug, 2008

9 commits

  • CS_BAD_TUPLE was used to denote a bad tuple being passed to the parse
    function. Therefore, replace it with -EINVAL and a verbose message.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • CS_NO_MORE_ITEMS is returned by the CIS tuple reading and parsing code if
    the end of a tuple chain is reached. As at least one PCMCIA driver relies
    on matching this return value, replace it with -ENOSPC which is now
    uniquely used for this purpose within the in-kernel pcmcia subsystem.

    CC: Russell King
    CC: linux-serial@vger.kernel.org
    CC: Michael Buesch
    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • CS_BAD_HANDLE means that something went badly wrong: no parameter was passed,
    or the paramater passed wasn't the correct one. Therefore, replace it with
    -EINVAL.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • It means that no card can be detected in the socket, so return -ENODEV

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • CS_UNSUPPORTED_MODE and CS_UNSUPPORTED_FUNCTION were mostly used to denote
    trying to use PCMCIA functions on CardBus cards.

    Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     
  • CS_OUT_OF_RESOURCE was almost only used to note -ENOMEM situations.
    Therefore, use -ENOMEM explicitely, and also print out warnings.

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

    Dominik Brodowski
     
  • 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
     
  • * pcmcia-config-loop:
    pcmcia: pcmcia_config_loop() improvement by passing vcc
    pcmcia: pcmcia_config_loop() default CIS entry handling
    pcmcia: pcmcia_config_loop() ConfigIndex unification
    pcmcia: use pcmcia_loop_config in misc pcmcia drivers
    pcmcia: use pcmcia_loop_config in net pcmcia drivers
    pcmcia: use pcmcia_loop_config in ISDN pcmcia drivers
    pcmcia: use pcmcia_loop_config in scsi pcmcia drivers
    pcmcia: use pcmcia_loop_config in bluetooth drivers
    pcmcia: use pcmcia_loop_config in pata and ide drivers
    pcmcia: add pcmcia_loop_config() helper

    * pcmcia-printk:
    pcmcia: don't add extra DEBUG cflag
    pcmcia: remove unused cs_socket_name() definition
    pcmcia: use dev_printk in module rsrc_nonstatic
    pcmcia: use dev_printk in module pcmcia
    pcmcia: use dev_printk in module pcmcia_core
    pcmcia: use dev_printk and dev_dbg in yenta_socket

    Dominik Brodowski
     
  • Signed-off-by: Dominik Brodowski

    Dominik Brodowski
     

03 Aug, 2008

1 commit


16 Jul, 2008

1 commit

  • The cisinfo_t removal patch (c5081d5f4775b2a3f858f91151bbf9163e473075
    pcmcia: simplify pccard_validate_cis ) introduced a bug that prevented
    card detection, for the (info->Chains == MAX_TUPLES) check was replaced
    by (count), which is always true. Restoring the comparison to MAX_TUPLES
    makes everybody happy...

    [linux@dominikbrodowski.net: update changelog comment]
    Signed-off-by: Marc Zyngier
    Signed-off-by: Dominik Brodowski

    Marc Zyngier
     

24 Jun, 2008

2 commits


29 Apr, 2008

1 commit


17 Oct, 2007

1 commit