All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Salomon <dilinger@voxel.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, linux-pcmcia@lists.infradead.org,
	jt@hpl.hp.com, corey@world.std.com
Subject: Re: [PATCH 5/7] more CardServices() removals (drivers/net/wireless)
Date: Tue, 23 Dec 2003 21:34:32 -0500	[thread overview]
Message-ID: <1072233272.6295.4.camel@spiral.internal> (raw)
In-Reply-To: <20031223182817.0bd3dd3c.akpm@osdl.org>


[-- Attachment #1.1: Type: text/plain, Size: 1011 bytes --]

Sorry, I'm having issues w/ my dialup (and 5 was definitely the wrong
patch).  I've attached 5 and 7 (I'm not sure if 7 ever made it
through).  I broke the patches up so that I could CC separate
maintainers, but my ISP's not making this easy for me.  My apologies if
anyone's getting these emails twice.




On Tue, 2003-12-23 at 21:28, Andrew Morton wrote:
> Andres Salomon <dilinger@voxel.net> wrote:
> >
> > Part 5 of 7.
> > 
> > 
> > [005-cs_remove.patch  text/x-patch (6824 bytes)]
> >  Revision: linux--mainline--2.6--patch-18
> >  Archive: dilinger@voxel.net--2003-spiral
> >  Creator: Andres Salomon <dilinger@voxel.net>
> >  Date: Sun Dec 21 21:08:50 EST 2003
> >  Standard-date: 2003-12-22 02:08:50 GMT
> >  Modified-files: drivers/net/pcmcia/3c574_cs.c
> 
> hmm, 3c574_cs was done in the other patch series.
> 
> I didn't receive patch 7/7.   Was there one?
> 
> Could you please aggregate these a bit?  One single patch for each driver
> subdir, say.
> 
> Thanks.
> 

[-- Attachment #1.2: 105-cs_remove.patch --]
[-- Type: text/x-patch, Size: 6026 bytes --]

Revision: linux--mainline--2.6--patch-34
Archive: dilinger@voxel.net--2003-spiral
Creator: Andres Salomon <dilinger@voxel.net>
Date: Tue Dec 23 19:04:02 EST 2003
Standard-date: 2003-12-24 00:04:02 GMT
Modified-files: drivers/net/wireless/wavelan_cs.c
New-patches: dilinger@voxel.net--2003-spiral/linux--mainline--2.6--patch-34
Summary: CardServices() removal, act 2, pt. 5.
Keywords: 

Remove calls to CardServices(), act 2, part 5; wavelan_cs.c.

* added files

    {arch}/linux/linux--mainline/linux--mainline--2.6/dilinger@voxel.net--2003-spiral/patch-log/patch-34

* modified files

--- orig/drivers/net/wireless/wavelan_cs.c
+++ mod/drivers/net/wireless/wavelan_cs.c
@@ -3802,7 +3802,7 @@
   printk(KERN_DEBUG "%s: ->wv_pcmcia_reset()\n", dev->name);
 #endif
 
-  i = CardServices(AccessConfigurationRegister, link->handle, &reg);
+  i = pcmcia_access_configuration_register(link->handle, &reg);
   if(i != CS_SUCCESS)
     {
       cs_error(link->handle, AccessConfigurationRegister, i);
@@ -3816,7 +3816,7 @@
 
   reg.Action = CS_WRITE;
   reg.Value = reg.Value | COR_SW_RESET;
-  i = CardServices(AccessConfigurationRegister, link->handle, &reg);
+  i = pcmcia_access_configuration_register(link->handle, &reg);
   if(i != CS_SUCCESS)
     {
       cs_error(link->handle, AccessConfigurationRegister, i);
@@ -3825,7 +3825,7 @@
       
   reg.Action = CS_WRITE;
   reg.Value = COR_LEVEL_IRQ | COR_CONFIG;
-  i = CardServices(AccessConfigurationRegister, link->handle, &reg);
+  i = pcmcia_access_configuration_register(link->handle, &reg);
   if(i != CS_SUCCESS)
     {
       cs_error(link->handle, AccessConfigurationRegister, i);
@@ -4018,16 +4018,16 @@
     {
       tuple.Attributes = 0;
       tuple.DesiredTuple = CISTPL_CONFIG;
-      i = CardServices(GetFirstTuple, handle, &tuple);
+      i = pcmcia_get_first_tuple(handle, &tuple);
       if(i != CS_SUCCESS)
 	break;
       tuple.TupleData = (cisdata_t *)buf;
       tuple.TupleDataMax = 64;
       tuple.TupleOffset = 0;
-      i = CardServices(GetTupleData, handle, &tuple);
+      i = pcmcia_get_tuple_data(handle, &tuple);
       if(i != CS_SUCCESS)
 	break;
-      i = CardServices(ParseTuple, handle, &tuple, &parse);
+      i = pcmcia_parse_tuple(handle, &tuple, &parse);
       if(i != CS_SUCCESS)
 	break;
       link->conf.ConfigBase = parse.config.base;
@@ -4045,7 +4045,7 @@
   link->state |= DEV_CONFIG;
   do
     {
-      i = CardServices(RequestIO, link->handle, &link->io);
+      i = pcmcia_request_io(link->handle, &link->io);
       if(i != CS_SUCCESS)
 	{
 	  cs_error(link->handle, RequestIO, i);
@@ -4056,7 +4056,7 @@
        * Now allocate an interrupt line.  Note that this does not
        * actually assign a handler to the interrupt.
        */
-      i = CardServices(RequestIRQ, link->handle, &link->irq);
+      i = pcmcia_request_irq(link->handle, &link->irq);
       if(i != CS_SUCCESS)
 	{
 	  cs_error(link->handle, RequestIRQ, i);
@@ -4068,7 +4068,7 @@
        * the I/O windows and the interrupt mapping.
        */
       link->conf.ConfigIndex = 1;
-      i = CardServices(RequestConfiguration, link->handle, &link->conf);
+      i = pcmcia_request_configuration(link->handle, &link->conf);
       if(i != CS_SUCCESS)
 	{
 	  cs_error(link->handle, RequestConfiguration, i);
@@ -4084,8 +4084,7 @@
       req.Attributes = WIN_DATA_WIDTH_8|WIN_MEMORY_TYPE_AM|WIN_ENABLE;
       req.Base = req.Size = 0;
       req.AccessSpeed = mem_speed;
-      link->win = (window_handle_t)link->handle;
-      i = CardServices(RequestWindow, &link->win, &req);
+      i = pcmcia_request_window(&link->handle, &req, &link->win);
       if(i != CS_SUCCESS)
 	{
 	  cs_error(link->handle, RequestWindow, i);
@@ -4096,7 +4095,7 @@
       dev->mem_end = dev->mem_start + req.Size;
 
       mem.CardOffset = 0; mem.Page = 0;
-      i = CardServices(MapMemPage, link->win, &mem);
+      i = pcmcia_map_mem_page(link->win, &mem);
       if(i != CS_SUCCESS)
 	{
 	  cs_error(link->handle, MapMemPage, i);
@@ -4170,10 +4169,10 @@
 
   /* Don't bother checking to see if these succeed or not */
   iounmap((u_char *)dev->mem_start);
-  CardServices(ReleaseWindow, link->win);
-  CardServices(ReleaseConfiguration, link->handle);
-  CardServices(ReleaseIO, link->handle, &link->io);
-  CardServices(ReleaseIRQ, link->handle, &link->irq);
+  pcmcia_release_window(link->win);
+  pcmcia_release_configuration(link->handle);
+  pcmcia_release_io(link->handle, &link->io);
+  pcmcia_release_irq(link->handle, &link->irq);
 
   link->state &= ~DEV_CONFIG;
 
@@ -4772,10 +4771,10 @@
   client_reg.event_callback_args.client_data = link;
 
 #ifdef DEBUG_CONFIG_INFO
-  printk(KERN_DEBUG "wavelan_attach(): almost done, calling CardServices\n");
+  printk(KERN_DEBUG "wavelan_attach(): almost done, calling pcmcia_register_client\n");
 #endif
 
-  ret = CardServices(RegisterClient, &link->handle, &client_reg);
+  ret = pcmcia_register_client(&link->handle, &client_reg);
   if(ret != 0)
     {
       cs_error(link->handle, RegisterClient, ret);
@@ -4826,7 +4825,7 @@
 
   /* Break the link with Card Services */
   if(link->handle)
-    CardServices(DeregisterClient, link->handle);
+    pcmcia_deregister_client(link->handle);
     
   /* Remove the interface data from the linked list */
   if(dev_list == link)
@@ -4955,7 +4954,7 @@
 	  {
       	    if(link->open)
 	      netif_device_detach(dev);
-      	    CardServices(ReleaseConfiguration, link->handle);
+      	    pcmcia_release_configuration(link->handle);
 	  }
 	break;
 
@@ -4965,7 +4964,7 @@
       case CS_EVENT_CARD_RESET:
 	if(link->state & DEV_CONFIG)
 	  {
-      	    CardServices(RequestConfiguration, link->handle, &link->conf);
+      	    pcmcia_request_configuration(link->handle, &link->conf);
       	    if(link->open)	/* If RESET -> True, If RESUME -> False ? */
 	      {
 		wv_hw_reset(dev);




[-- Attachment #1.3: 107-cs_remove.patch --]
[-- Type: text/x-patch, Size: 5466 bytes --]

Revision: linux--mainline--2.6--patch-36
Archive: dilinger@voxel.net--2003-spiral
Creator: Andres Salomon <dilinger@voxel.net>
Date: Tue Dec 23 19:17:46 EST 2003
Standard-date: 2003-12-24 00:17:46 GMT
Modified-files: drivers/net/wireless/ray_cs.c
New-patches: dilinger@voxel.net--2003-spiral/linux--mainline--2.6--patch-36
Summary: CardServices() removal, act 2, pt. 7.
Keywords: 

Ok, this isn't really a CardServices() removal patch; it looks like
someone already took care of this file.  However, the modified CS_CHECK()
macro doesn't fill in 'last_fn'.  This patch fixes that.

* added files

    {arch}/linux/linux--mainline/linux--mainline--2.6/dilinger@voxel.net--2003-spiral/patch-log/patch-36

* modified files

--- orig/drivers/net/wireless/ray_cs.c
+++ mod/drivers/net/wireless/ray_cs.c
@@ -420,7 +420,7 @@
     client_reg.Version = 0x0210;
     client_reg.event_callback_args.client_data = link;
 
-    DEBUG(2,"ray_cs ray_attach calling CardServices(RegisterClient...)\n");
+    DEBUG(2,"ray_cs ray_attach calling pcmcia_register_client(...)\n");
 
     init_timer(&local->timer);
 
@@ -490,8 +490,8 @@
     is received, to configure the PCMCIA socket, and to make the
     ethernet device available to the system.
 =============================================================================*/
-#define CS_CHECK(fn, args...) \
-while ((last_ret=fn(args))!=0) goto cs_failed
+#define CS_CHECK(fn, ret) \
+do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
 #define MAX_TUPLE_SIZE 128
 static void ray_config(dev_link_t *link)
 {
@@ -510,23 +510,23 @@
 
     /* This reads the card's CONFIG tuple to find its configuration regs */
     tuple.DesiredTuple = CISTPL_CONFIG;
-    CS_CHECK(pcmcia_get_first_tuple, handle, &tuple);
+    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
     tuple.TupleData = buf;
     tuple.TupleDataMax = MAX_TUPLE_SIZE;
     tuple.TupleOffset = 0;
-    CS_CHECK(pcmcia_get_tuple_data, handle, &tuple);
-    CS_CHECK(pcmcia_parse_tuple, handle, &tuple, &parse);
+    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
+    CS_CHECK(ParseTuple, pcmcia_parse_tuple(handle, &tuple, &parse));
     link->conf.ConfigBase = parse.config.base;
     link->conf.Present = parse.config.rmask[0];
 
     /* Determine card type and firmware version */
     buf[0] = buf[MAX_TUPLE_SIZE - 1] = 0;
     tuple.DesiredTuple = CISTPL_VERS_1;
-    CS_CHECK(pcmcia_get_first_tuple, handle, &tuple);
+    CS_CHECK(GetFirstTuple, pcmcia_get_first_tuple(handle, &tuple));
     tuple.TupleData = buf;
     tuple.TupleDataMax = MAX_TUPLE_SIZE;
     tuple.TupleOffset = 2;
-    CS_CHECK(pcmcia_get_tuple_data, handle, &tuple);
+    CS_CHECK(GetTupleData, pcmcia_get_tuple_data(handle, &tuple));
 
     for (i=0; i<tuple.TupleDataLen - 4; i++) 
         if (buf[i] == 0) buf[i] = ' ';
@@ -538,22 +538,22 @@
     /* Now allocate an interrupt line.  Note that this does not
        actually assign a handler to the interrupt.
     */
-    CS_CHECK(pcmcia_request_irq, link->handle, &link->irq);
+    CS_CHECK(RequestIRQ, pcmcia_request_irq(link->handle, &link->irq));
     dev->irq = link->irq.AssignedIRQ;
     
     /* This actually configures the PCMCIA socket -- setting up
        the I/O windows and the interrupt mapping.
     */
-    CS_CHECK(pcmcia_request_configuration, link->handle, &link->conf);
+    CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link->handle, &link->conf));
 
 /*** Set up 32k window for shared memory (transmit and control) ************/
     req.Attributes = WIN_DATA_WIDTH_8 | WIN_MEMORY_TYPE_CM | WIN_ENABLE | WIN_USE_WAIT;
     req.Base = 0;
     req.Size = 0x8000;
     req.AccessSpeed = ray_mem_speed;
-    CS_CHECK(pcmcia_request_window, &link->handle, &req, &link->win);
+    CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &link->win));
     mem.CardOffset = 0x0000; mem.Page = 0;
-    CS_CHECK(pcmcia_map_mem_page, link->win, &mem);
+    CS_CHECK(MapMemPage, pcmcia_map_mem_page(link->win, &mem));
     local->sram = (UCHAR *)(ioremap(req.Base,req.Size));
 
 /*** Set up 16k window for shared memory (receive buffer) ***************/
@@ -561,9 +561,9 @@
     req.Base = 0;
     req.Size = 0x4000;
     req.AccessSpeed = ray_mem_speed;
-    CS_CHECK(pcmcia_request_window, &link->handle, &req, &local->rmem_handle);
+    CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->rmem_handle));
     mem.CardOffset = 0x8000; mem.Page = 0;
-    CS_CHECK(pcmcia_map_mem_page, local->rmem_handle, &mem);
+    CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->rmem_handle, &mem));
     local->rmem = (UCHAR *)(ioremap(req.Base,req.Size));
 
 /*** Set up window for attribute memory ***********************************/
@@ -571,9 +571,9 @@
     req.Base = 0;
     req.Size = 0x1000;
     req.AccessSpeed = ray_mem_speed;
-    CS_CHECK(pcmcia_request_window, &link->handle, &req, &local->amem_handle);
+    CS_CHECK(RequestWindow, pcmcia_request_window(&link->handle, &req, &local->amem_handle));
     mem.CardOffset = 0x0000; mem.Page = 0;
-    CS_CHECK(pcmcia_map_mem_page, local->amem_handle, &mem);
+    CS_CHECK(MapMemPage, pcmcia_map_mem_page(local->amem_handle, &mem));
     local->amem = (UCHAR *)(ioremap(req.Base,req.Size));
 
     DEBUG(3,"ray_config sram=%p\n",local->sram);




[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2003-12-24  2:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-24  1:44 [PATCH 5/7] more CardServices() removals (drivers/net/wireless) Andres Salomon
2003-12-24  2:28 ` Andrew Morton
2003-12-24  2:34   ` Andres Salomon [this message]
2003-12-24  2:38   ` Jeff Garzik
2003-12-24  2:48     ` Andrew Morton
2003-12-24  3:04       ` Jeff Garzik
2003-12-24  4:23         ` Andrew Morton
2003-12-24  4:33           ` Matt Mackall
2003-12-25  9:45             ` George Anzinger
2003-12-25  9:55               ` Andrew Morton
2003-12-25 12:36               ` Matt Mackall
2003-12-26 22:29                 ` George Anzinger
2003-12-24  7:49     ` [PATCH] final CardServices() removal patches Andres Salomon
2003-12-24  9:29     ` [PATCH 5/7] more CardServices() removals (drivers/net/wireless) Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1072233272.6295.4.camel@spiral.internal \
    --to=dilinger@voxel.net \
    --cc=akpm@osdl.org \
    --cc=corey@world.std.com \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.