Diff for /margi2/margi.c between versions 1.12 and 1.13

version 1.12, 2001/04/06 09:03:54 version 1.13, 2001/04/25 15:31:09
Line 38 Line 38
 #include "video.h"  #include "video.h"
 #include "cvdv.h"  #include "cvdv.h"
   
   
   static char *version = "margi_cs.c 0.5 11/1/2000 (Marcus Metzler)";
   
 //#define USE_BH 1  //#define USE_BH 1
 #ifdef USE_BH  #ifdef USE_BH
 #define MARGI_BH 31  #define MARGI_BH 31
Line 47 Line 50
 MODULE_AUTHOR(AUTHOR);  MODULE_AUTHOR(AUTHOR);
 MODULE_DESCRIPTION(MEDDEVNAME " Driver V." DVERSION);  MODULE_DESCRIPTION(MEDDEVNAME " Driver V." DVERSION);
   
 #ifdef PCMCIA_DEBUG  
 static int pc_debug = PCMCIA_DEBUG;  
 MODULE_PARM(pc_debug, "i");  
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)  
 static char *version = "margi_cs.c 0.42 11/1/2000 (Marcus Metzler)";  
 #else  
 #define DEBUG(n, args...)  
 #endif  
   
 #define MAX_DEV 4  #define MAX_DEV 4
 #define DEVICE_NR(minor)        ((minor)>>4)  #define DEVICE_NR(minor)        ((minor)>>4)
   
Line 197  void DACSetFrequency(struct cvdv_cards * Line 191  void DACSetFrequency(struct cvdv_cards *
   
 int MargiFreeBuffers(struct cvdv_cards *card)  int MargiFreeBuffers(struct cvdv_cards *card)
 {  {
         printk(KERN_DEBUG LOGNAME ": -- MargiFreeBuffers\n");          MDEBUG(1, ": -- MargiFreeBuffers\n");
                   
         ring_destroy(&(card->rbuf));          ring_destroy(&(card->rbufA));
         card->use_ring = 0;          card->use_ringA = 0;
           ring_destroy(&(card->rbufB));
           card->use_ringB = 0;
         return 0;          return 0;
 }  }
   
   
 int MargiSetBuffers(struct cvdv_cards *card, uint32_t size)  int MargiSetABuffers(struct cvdv_cards *card, uint32_t size)
 {  {
         MargiFreeBuffers(card);          MargiFreeBuffers(card);
         printk(KERN_DEBUG LOGNAME ": -- MargiSetBuffers(%d)\n",          MDEBUG(1, ": -- MargiSetABuffers(%d)\n",
                size);                 size);
   
         ring_init(&(card->rbuf),size);          ring_init(&(card->rbufA),size);
         card->use_ring = 1;          card->use_ringA = 1;
         return 0;          return 0;
   }
   
   int MargiSetBBuffers(struct cvdv_cards *card, uint32_t size)
   {
           MargiFreeBuffers(card);
           MDEBUG(1, ": -- MargiSetBBuffers(%d)\n",
                  size);
   
           ring_init(&(card->rbufB),size);
           card->use_ringB = 1;
           return 0;
 }  }
   
 int MargiFlush (struct cvdv_cards *card)  int MargiFlush (struct cvdv_cards *card)
 {  {
         int co = 0;          int co = 0;
         int i;          int i;
         for (i=0;i<100;i++)          for (i=0;i<100;i++){
                 MargiPush(card, 32, FlushPacket);                  MargiPushA(card, 32, FlushPacket);
         while (ring_write_rest(&(card->rbuf))  && co<100) co++;                  MargiPushB(card, 32, FlushPacket);
           }
           while ( (ring_write_rest(&(card->rbufA))|| ring_write_rest(&(card->rbufB)))  && co<100) 
                   co++;
         VideoSetBackground(card, 1, 0, 0, 0);   // black          VideoSetBackground(card, 1, 0, 0, 0);   // black
   
         ring_flush(&(card->rbuf));          if (card->use_ringA) ring_flush(&(card->rbufA));
           if (card->use_ringB) ring_flush(&(card->rbufB));
         card->DMAABusy = 0;          card->DMAABusy = 0;
           card->DMABBusy = 0;
   
   
         DecoderStopChannel(card);          DecoderStopChannel(card);
Line 235  int MargiFlush (struct cvdv_cards *card) Line 246  int MargiFlush (struct cvdv_cards *card)
         DecoderSetupReset(card);          DecoderSetupReset(card);
         card->channelrun = 0;          card->channelrun = 0;
   
         printk(KERN_DEBUG LOGNAME ": Margi Flush \n");          MDEBUG(1, ": Margi Flush \n");
         return 0;          return 0;
 }  }
   
   
 int MargiPush(struct cvdv_cards *card, int count, const char *data)  int MargiPushA(struct cvdv_cards *card, int count, const char *data)
 {  {
         int fill;          int fill;
       
         fill =  ring_read_rest(&(card->rbuf));          fill =  ring_read_rest(&(card->rbufA));
   
         if (!card->use_ring)          if (!card->use_ringA)
                 return 0;                  return 0;
   
         if (fill > 3*card->rbuf.size/4 && !card->channelrun){          if (fill > 3*card->rbufA.size/4 && !card->channelrun){
                 DecoderStartChannel(card);                  DecoderStartChannel(card);
                 card->DMAABusy = 1;                  card->DMAABusy = 1;
         }          }
   
         count = ring_write(&(card->rbuf),data,count);          count = ring_write(&(card->rbufA),data,count);
           
           return count;
   }
   
   int MargiPushB(struct cvdv_cards *card, int count, const char *data)
   {
           int fill;
     
           fill =  ring_read_rest(&(card->rbufB));
   
           if (!card->use_ringB)
                   return 0;
   
           if (fill > 3*card->rbufB.size/4 && !card->channelrun){
                   DecoderStartChannel(card);
                   card->DMABBusy = 1;
           }
   
           count = ring_write(&(card->rbufB),data,count);
                   
         return count;          return count;
 }  }
Line 322  uint32_t DecoderGetBufferSpace(struct cv Line 352  uint32_t DecoderGetBufferSpace(struct cv
         return video;          return video;
 }  }
   
 int MargiWriteDirect(struct cvdv_cards *card, uint32_t count, const char *buf)  
 {  static int ringDMA_PES (struct cvdv_cards *card){
           
         uint32_t size = 0;          uint32_t size = 0;
         u_char stat;          u_char stat;
         dev_link_t *link = &(((margi_info_t *) card->margi)->link);          dev_link_t *link = &(((margi_info_t *) card->margi)->link);
           uint32_t count=0;
         uint8_t data;          uint8_t data;
                   
         stat = read_lsi_status(card);          return 0;
         if (stat & LSI_ARQ) {  }
                 stat = read_lsi_status(card);  
         }  
         printk(KERN_DEBUG LOGNAME ": -- stat: %d \n",stat);  
   
         if (stat & LSI_READY){  
                 data = read_indexed_register(card, IIO_LSI_CONTROL);  
                 data |= RR;  
                 write_indexed_register(card, IIO_LSI_CONTROL, data);  
                 return 0;  
         }  
   
         if ((stat & LSI_ARQ) == 0) {  
                 size = DecoderGetBufferSpace(card);  
                 if (count > size) count = size & 0xfffffffc;  
                 if (count>=2048) count &=0xfffff800;  
                 count &=0xfffffffc;  
                   
                 if (count > size) count = size & 0xfffffffc;  
                 printk(KERN_DEBUG LOGNAME ": -- stat:%d  length:%d size:%d\n",  
                        stat, count, size);  
                 if (count) {  
                         outsl_ns(link->io.BasePort1+DIO_LSI_STATUS,   
                                  buf,count);  
                           
                 }  
         } else {  
                 count = 0;  
         }  
           
         return count;  
 }  
   
 static int ringDMA (struct cvdv_cards *card){  static int ringDMA (struct cvdv_cards *card){
                   
Line 370  static int ringDMA (struct cvdv_cards *c Line 373  static int ringDMA (struct cvdv_cards *c
         dev_link_t *link = &(((margi_info_t *) card->margi)->link);          dev_link_t *link = &(((margi_info_t *) card->margi)->link);
         uint32_t count=0;          uint32_t count=0;
         uint8_t data;          uint8_t data;
           
   
         count = ring_read_rest(&(card->rbuf));          count = ring_read_rest(&(card->rbufA));
         if (count < 2048) {          if (count < 2048) {
                 wake_up_interruptible(&(card->wqA));                  wake_up_interruptible(&(card->wqA));
                 return 0;                  return 0;
Line 380  static int ringDMA (struct cvdv_cards *c Line 382  static int ringDMA (struct cvdv_cards *c
                   
         stat = read_lsi_status(card);          stat = read_lsi_status(card);
                   
 #if 0          MDEBUG( 3, ": -- stat: %d  readpos: %d writepos: %d \n",
         printk(KERN_ERR LOGNAME                  stat,(int) card->rbufA.read_pos,(int) card->rbufA.write_pos);
                ": -- stat: %d  readpos: %d writepos: %d \n",  
                stat,card->rbuf.read_pos,card->rbuf.write_pos);  
 #endif  
         if (stat & LSI_ARQ) {          if (stat & LSI_ARQ) {
                 stat = read_lsi_status(card);                  stat = read_lsi_status(card);
         }          }
Line 412  static int ringDMA (struct cvdv_cards *c Line 411  static int ringDMA (struct cvdv_cards *c
                 }                  }
                                   
                 if (count > size) count = size & 0xfffffffc;                  if (count > size) count = size & 0xfffffffc;
 #if 0                  MDEBUG(3,": -- stat: %d  length: %d size: %d startV: %d startA: %d\n",
                 printk(KERN_ERR LOGNAME   
                        ": -- stat: %d  length: %d size: %d startV: %d startA: %d\n",  
                        stat,count,size, card->startingV, card->startingA);                         stat,count,size, card->startingV, card->startingA);
 #endif  
   
                 if (count) {                  if (count) {
                         ring_read_direct(&(card->rbuf),                          ring_read_direct(&(card->rbufA),
                                          link->io.BasePort1+DIO_LSI_STATUS,                                            link->io.BasePort1+DIO_LSI_STATUS, 
                                          count);                                           count);
                     }                      }
Line 521  static void do_margi(struct cvdv_cards * Line 517  static void do_margi(struct cvdv_cards *
 #endif  #endif
         int countA, countB;          int countA, countB;
         int try;          int try;
           int stype = card->setup.streamtype;
   
         countA = 0;          countA = 0;
         countB = 0;          countB = 0;
Line 529  static void do_margi(struct cvdv_cards * Line 526  static void do_margi(struct cvdv_cards *
         for ( try = 0; try < MAX_COUNT ;try++)          for ( try = 0; try < MAX_COUNT ;try++)
                 if (countA < MAXWRITE){                  if (countA < MAXWRITE){
                         int count = 0;                          int count = 0;
                         count = ringDMA(card);                          switch (stype){
                         countA += count;                          case stream_PES:
                         if (!count)                           case stream_ES:
                                 try=MAX_COUNT;  //                              count = ringDMA_PES(card);
                                   count = ringDMA(card);
                                   countA += count;
                                   if (!count) 
                                           try=MAX_COUNT;                  
                                   break;
                           case stream_PS:
                           case stream_DVD:
                                   count = ringDMA(card);
                                   countA += count;
                                   if (!count) 
                                           try=MAX_COUNT;
                                   break;
                           }
                 } else break;                  } else break;
   
   
 }  }
   
   
Line 546  void L64014Intr_function(struct cvdv_car Line 555  void L64014Intr_function(struct cvdv_car
         uint8_t control,mask,stat;          uint8_t control,mask,stat;
         int try;          int try;
   
   
         control= read_indexed_register(card, IIO_IRQ_CONTROL);          control= read_indexed_register(card, IIO_IRQ_CONTROL);
         if (control & IRQ_EN){          if (control & IRQ_EN){
                 mask = 0;                  mask = 0;
Line 563  void L64014Intr_function(struct cvdv_car Line 573  void L64014Intr_function(struct cvdv_car
                                                        control);                                                         control);
   
   
                                 if (card->DMAABusy){                                  if (card->DMAABusy || card->DMABBusy){
   
 #ifdef USE_BH  #ifdef USE_BH
                                         bh_card = card;                                          bh_card = card;
Line 571  void L64014Intr_function(struct cvdv_car Line 581  void L64014Intr_function(struct cvdv_car
 #else   #else 
                                         do_margi(card);                                          do_margi(card);
 #endif  #endif
                                         if(card->use_ring){                                          if(card->use_ringA || card->use_ringB){
                                           L64021Intr(card);                                            L64021Intr(card);
                                         }                                          }
                                   } else  {
                                           wake_up_interruptible(&(card->wqA));
                                           wake_up_interruptible(&(card->wqB));
                                 }                                  }
                         }                          }
   
Line 583  void L64014Intr_function(struct cvdv_car Line 596  void L64014Intr_function(struct cvdv_car
                                 write_indexed_register(card,IIO_IRQ_CONTROL,                                  write_indexed_register(card,IIO_IRQ_CONTROL,
                                                        control);                                                         control);
                                                                   
                                 if(card->use_ring){                                  if(card->use_ringA || card->use_ringB){
                                         L64021Intr(card);                                          L64021Intr(card);
                                 }                                  }
                         }                          }
Line 606  void Timerfunction(unsigned long data) Line 619  void Timerfunction(unsigned long data)
         card->timer.function = Timerfunction;          card->timer.function = Timerfunction;
         card->timer.data=(unsigned long) card;          card->timer.data=(unsigned long) card;
         card->timer.expires=jiffies+1;          card->timer.expires=jiffies+1;
         if ( card->open )          if ( card->open)
                 add_timer(&card->timer);                  add_timer(&card->timer);
   
 }  }
Line 641  void L64014Intr(int irq, void *dev_id, s Line 654  void L64014Intr(int irq, void *dev_id, s
   
 int L64014RemoveIntr(struct cvdv_cards *card)  int L64014RemoveIntr(struct cvdv_cards *card)
 {  {
         printk(KERN_DEBUG LOGNAME ": -- L64014RemoveIntr\n");          MDEBUG(1, ": -- L64014RemoveIntr\n");
         // Disable the IRQ's          // Disable the IRQ's
         write_indexed_register(card, IIO_IRQ_CONTROL, 0x00);          write_indexed_register(card, IIO_IRQ_CONTROL, 0x00);
         if (!card->IntInstalled)          if (!card->IntInstalled)
Line 700  int L64014Init(struct cvdv_cards *card) Line 713  int L64014Init(struct cvdv_cards *card)
         uint16_t testram[16];          uint16_t testram[16];
         int i, err;          int i, err;
   
         printk(KERN_DEBUG LOGNAME ": -- L64014Init\n");          MDEBUG(1, ": -- L64014Init\n");
         card->videomode = VIDEO_MODE;          card->videomode = VIDEO_MODE;
   
         /* Reset 64020 */          /* Reset 64020 */
Line 720  int L64014Init(struct cvdv_cards *card) Line 733  int L64014Init(struct cvdv_cards *card)
         write_indexed_register(card, CSS_COMMAND, 0x01);          write_indexed_register(card, CSS_COMMAND, 0x01);
   
   
         printk("CSID: %02x\n", I2CRead(card, 0, 0x3d));          MDEBUG(0, "CSID: %02x\n", I2CRead(card, 0, 0x3d));
         card->i2c_addr = I2CRead(card, 0, 0x0f);          card->i2c_addr = I2CRead(card, 0, 0x0f);
         printk("I2CADDR: %02x\n", card->i2c_addr);          MDEBUG(0, "I2CADDR: %02x\n", card->i2c_addr);
   
         I2CWrite(card, card->i2c_addr, CS_CONTROL0, 0x4a);          I2CWrite(card, card->i2c_addr, CS_CONTROL0, 0x4a);
         I2CWrite(card, card->i2c_addr, CS_CONTROL1, 0x04);          I2CWrite(card, card->i2c_addr, CS_CONTROL1, 0x04);
Line 735  int L64014Init(struct cvdv_cards *card) Line 748  int L64014Init(struct cvdv_cards *card)
         I2CWrite(card, card->i2c_addr, CS_DAC, 0x87);          I2CWrite(card, card->i2c_addr, CS_DAC, 0x87);
         I2CWrite(card, card->i2c_addr, CS_BKG_COL, 0x03);          I2CWrite(card, card->i2c_addr, CS_BKG_COL, 0x03);
   
         printk("Decoder Status: %d\n", read_lsi_status(card));          MDEBUG(0,"Decoder Status: %d\n", read_lsi_status(card));
         printk("lsi stat %d\n", DecoderReadByte(card, 0x005));          MDEBUG(0,"lsi stat %d\n", DecoderReadByte(card, 0x005));
   
 #ifdef USE_ZV  #ifdef USE_ZV
         ZV_init(card);          ZV_init(card);
Line 746  int L64014Init(struct cvdv_cards *card) Line 759  int L64014Init(struct cvdv_cards *card)
         // Find out how much DRAM we have          // Find out how much DRAM we have
         card->DRAMSize = 0x00100000;    // maximum size          card->DRAMSize = 0x00100000;    // maximum size
         do {          do {
                 printk(KERN_DEBUG LOGNAME                  MDEBUG(0,
                        ": Probing DRAM Size: 0x%08X (%d kByte) ... ",                         ": Probing DRAM Size: 0x%08X (%d kByte) ... ",
                        card->DRAMSize, card->DRAMSize / 512);                         card->DRAMSize, card->DRAMSize / 512);
                 for (i = 0; i < 8; i++)                  for (i = 0; i < 8; i++)
                         testram[i] = rnd(0x100) | (rnd(0x100) << 8);                          testram[i] = rnd(0x100) | (rnd(0x100) << 8);
                 if (DRAMWriteWord(card, 0, 4, &testram[0], 0))                  if (DRAMWriteWord(card, 0, 4, &testram[0], 0))
                         printk(KERN_DEBUG LOGNAME ": DRAM Write error.\n");                          MDEBUG(0, ": DRAM Write error.\n");
                 if (DRAMWriteWord                  if (DRAMWriteWord
                     (card, card->DRAMSize - 4, 4, &testram[4],                      (card, card->DRAMSize - 4, 4, &testram[4],
                      0)) printk(KERN_DEBUG LOGNAME                       0)) MDEBUG(0,
                                 ": DRAM Write error.\n");                                  ": DRAM Write error.\n");
                 if (DRAMReadWord(card, 0, 4, &testram[8], 0))                  if (DRAMReadWord(card, 0, 4, &testram[8], 0))
                         printk(KERN_DEBUG LOGNAME ": DRAM Read error.\n");                          MDEBUG(0, ": DRAM Read error.\n");
                 if (DRAMReadWord                  if (DRAMReadWord
                     (card, card->DRAMSize - 4, 4, &testram[12],                      (card, card->DRAMSize - 4, 4, &testram[12],
                      0)) printk(KERN_DEBUG LOGNAME ": DRAM Read error.\n");                       0)) MDEBUG(0, ": DRAM Read error.\n");
                 err = 0;                  err = 0;
                 for (i = 0; (!err) && (i < 8); i++)                  for (i = 0; (!err) && (i < 8); i++)
                         if (testram[i] != testram[i + 8])                          if (testram[i] != testram[i + 8])
                                 err = i + 1;                                  err = i + 1;
                 if (err) printk(" failed\n");                  if (err) {
                 else printk(" ok\n");                          MDEBUG(0," failed\n");
                 /*                  } else {
                           MDEBUG(0," ok\n");
                   }
                 if (err)                  if (err)
                         printk(KERN_DEBUG LOGNAME                          MDEBUG(2,": DRAM compare error at cell %d: 0x%04X %04X %04X %04X->0x%04X %04X %04X %04X / 0x%04X %04X %04X %04X->0x%04X %04X %04X %04X\n",
                                ": DRAM compare error at cell %d: 0x%04X %04X %04X %04X->0x%04X %04X %04X %04X / 0x%04X %04X %04X %04X->0x%04X %04X %04X %04X\n",  
                                err, testram[0], testram[1], testram[2],                                 err, testram[0], testram[1], testram[2],
                                testram[3], testram[8], testram[9],                                 testram[3], testram[8], testram[9],
                                testram[10], testram[11], testram[4],                                 testram[10], testram[11], testram[4],
                                testram[5], testram[6], testram[7],                                 testram[5], testram[6], testram[7],
                                testram[12], testram[13], testram[14],                                 testram[12], testram[13], testram[14],
                                testram[15]);                                 testram[15]);
                 */  
                 if (err)                  if (err)
                         card->DRAMSize >>= 1;                          card->DRAMSize >>= 1;
         } while (err && (card->DRAMSize >= 0x00100000));          } while (err && (card->DRAMSize >= 0x00100000));
Line 838  static dev_link_t *margi_attach(void) Line 851  static dev_link_t *margi_attach(void)
         client_reg_t client_reg;          client_reg_t client_reg;
         int ret, i;          int ret, i;
   
         DEBUG(0, "margi_attach()\n");          MDEBUG(0, "margi_attach()\n");
   
         for (i = 0; i < MAX_DEV; i++)          for (i = 0; i < MAX_DEV; i++)
                 if (dev_table[i] == NULL)                  if (dev_table[i] == NULL)
Line 925  static void margi_detach(dev_link_t * li Line 938  static void margi_detach(dev_link_t * li
   
         int nd;          int nd;
   
         DEBUG(0, "margi_detach(0x%p)\n", link);          MDEBUG(0, "margi_detach(0x%p)\n", link);
   
         for (nd = 0; nd < MAX_DEV; nd++)          for (nd = 0; nd < MAX_DEV; nd++)
                 if (dev_table[nd] == link)                  if (dev_table[nd] == link)
Line 947  static void margi_detach(dev_link_t * li Line 960  static void margi_detach(dev_link_t * li
            detach().             detach().
          */           */
         if (link->state & DEV_CONFIG) {          if (link->state & DEV_CONFIG) {
 #ifdef PCMCIA_DEBUG                  MDEBUG(2, "margi_cs: detach postponed, '%s' "
                 printk(KERN_DEBUG "margi_cs: detach postponed, '%s' "  
                        "still locked\n", link->dev->dev_name);                         "still locked\n", link->dev->dev_name);
 #endif  
                 link->state |= DEV_STALE_LINK;                  link->state |= DEV_STALE_LINK;
                 return;                  return;
         }          }
Line 996  static void margi_config(dev_link_t * li Line 1007  static void margi_config(dev_link_t * li
         memreq_t map;          memreq_t map;
         int minor = 0;          int minor = 0;
   
         DEBUG(0, "margi_config(0x%p)\n", link);          MDEBUG(0, "margi_config(0x%p)\n", link);
   
         /*          /*
            This reads the card's CONFIG tuple to find its configuration             This reads the card's CONFIG tuple to find its configuration
Line 1264  static void margi_release(u_long arg) Line 1275  static void margi_release(u_long arg)
         margi_info_t *dev = link->priv;          margi_info_t *dev = link->priv;
         struct cvdv_cards *card = &(dev->card);          struct cvdv_cards *card = &(dev->card);
   
         DEBUG(0, "margi_release(0x%p)\n", link);          MDEBUG(0, "margi_release(0x%p)\n", link);
         /*          /*
            If the device is currently in use, we won't release until it             If the device is currently in use, we won't release until it
            is actually closed, because until then, we can't be sure that             is actually closed, because until then, we can't be sure that
            no one will try to access the device or its data structures.             no one will try to access the device or its data structures.
          */           */
         if (link->open) {          if (link->open) {
                 DEBUG(1, "margi_cs: release postponed, '%s' still open\n",                  MDEBUG(1, "margi_cs: release postponed, '%s' still open\n",
                       link->dev->dev_name);                        link->dev->dev_name);
                 link->state |= DEV_STALE_CONFIG;                  link->state |= DEV_STALE_CONFIG;
                 return;                  return;
Line 1285  static void margi_release(u_long arg) Line 1296  static void margi_release(u_long arg)
            other kernel data structures associated with this device.              other kernel data structures associated with this device. 
          */           */
   
         printk(KERN_INFO LOGNAME ": Unloading device driver\n");          MDEBUG(1,": Unloading device driver\n");
         if (major_device_number)          if (major_device_number)
                 unregister_chrdev(major_device_number, CVDV_PROCNAME);                  unregister_chrdev(major_device_number, CVDV_PROCNAME);
         CardDeInit(card);          CardDeInit(card);
Line 1335  static int margi_event(event_t event, in Line 1346  static int margi_event(event_t event, in
         dev_link_t *link = args->client_data;          dev_link_t *link = args->client_data;
         margi_info_t *dev = link->priv;          margi_info_t *dev = link->priv;
   
         DEBUG(1, "margi_event(0x%06x)\n", event);          MDEBUG(1, "margi_event(0x%06x)\n", event);
   
         switch (event) {          switch (event) {
         case CS_EVENT_CARD_REMOVAL:          case CS_EVENT_CARD_REMOVAL:
Line 1382  static int margi_event(event_t event, in Line 1393  static int margi_event(event_t event, in
 static int __init init_margi_cs(void)  static int __init init_margi_cs(void)
 {  {
         servinfo_t serv;          servinfo_t serv;
         DEBUG(0, "%s\n", version);          MDEBUG(0, "%s\n", version);
         CardServices(GetCardServicesInfo, &serv);          CardServices(GetCardServicesInfo, &serv);
         if (serv.Revision != CS_RELEASE_CODE) {          if (serv.Revision != CS_RELEASE_CODE) {
                 printk(KERN_NOTICE "margi_cs: Card Services release "                  printk(KERN_NOTICE "margi_cs: Card Services release "
Line 1395  static int __init init_margi_cs(void) Line 1406  static int __init init_margi_cs(void)
   
 static void __exit exit_margi_cs(void)  static void __exit exit_margi_cs(void)
 {  {
         DEBUG(0, "margi_cs: unloading\n");          MDEBUG(0, "margi_cs: unloading\n");
         unregister_pccard_driver(&dev_info);          unregister_pccard_driver(&dev_info);
         while (dev_list != NULL) {          while (dev_list != NULL) {
                 if (dev_list->state & DEV_CONFIG)                  if (dev_list->state & DEV_CONFIG)

Removed from v.1.12  
changed lines
  Added in v.1.13


LinuxTV legacy CVS <linuxtv.org/cvs>