aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/if_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas/if_cs.c')
-rw-r--r--drivers/net/wireless/libertas/if_cs.c35
1 files changed, 23 insertions, 12 deletions
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 8712cb213f2f..4dfd48fe8b6e 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -312,7 +312,8 @@ static int if_cs_poll_while_fw_download(struct if_cs_card *card, uint addr, u8 r
312#define CF8385_MANFID 0x02df 312#define CF8385_MANFID 0x02df
313#define CF8385_CARDID 0x8103 313#define CF8385_CARDID 0x8103
314 314
315/* FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when 315/*
316 * FIXME: just use the 'driver_info' field of 'struct pcmcia_device_id' when
316 * that gets fixed. Currently there's no way to access it from the probe hook. 317 * that gets fixed. Currently there's no way to access it from the probe hook.
317 */ 318 */
318static inline u32 get_model(u16 manf_id, u16 card_id) 319static inline u32 get_model(u16 manf_id, u16 card_id)
@@ -621,8 +622,10 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw)
621 if (remain < count) 622 if (remain < count)
622 count = remain; 623 count = remain;
623 624
624 /* "write the number of bytes to be sent to the I/O Command 625 /*
625 * write length register" */ 626 * "write the number of bytes to be sent to the I/O Command
627 * write length register"
628 */
626 if_cs_write16(card, IF_CS_CMD_LEN, count); 629 if_cs_write16(card, IF_CS_CMD_LEN, count);
627 630
628 /* "write this to I/O Command port register as 16 bit writes */ 631 /* "write this to I/O Command port register as 16 bit writes */
@@ -631,16 +634,22 @@ static int if_cs_prog_helper(struct if_cs_card *card, const struct firmware *fw)
631 &fw->data[sent], 634 &fw->data[sent],
632 count >> 1); 635 count >> 1);
633 636
634 /* "Assert the download over interrupt command in the Host 637 /*
635 * status register" */ 638 * "Assert the download over interrupt command in the Host
639 * status register"
640 */
636 if_cs_write8(card, IF_CS_HOST_STATUS, IF_CS_BIT_COMMAND); 641 if_cs_write8(card, IF_CS_HOST_STATUS, IF_CS_BIT_COMMAND);
637 642
638 /* "Assert the download over interrupt command in the Card 643 /*
639 * interrupt case register" */ 644 * "Assert the download over interrupt command in the Card
645 * interrupt case register"
646 */
640 if_cs_write16(card, IF_CS_HOST_INT_CAUSE, IF_CS_BIT_COMMAND); 647 if_cs_write16(card, IF_CS_HOST_INT_CAUSE, IF_CS_BIT_COMMAND);
641 648
642 /* "The host polls the Card Status register ... for 50 ms before 649 /*
643 declaring a failure */ 650 * "The host polls the Card Status register ... for 50 ms before
651 * declaring a failure"
652 */
644 ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS, 653 ret = if_cs_poll_while_fw_download(card, IF_CS_CARD_STATUS,
645 IF_CS_BIT_COMMAND); 654 IF_CS_BIT_COMMAND);
646 if (ret < 0) { 655 if (ret < 0) {
@@ -841,7 +850,7 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
841 850
842 /* 851 /*
843 * Most of the libertas cards can do unaligned register access, but some 852 * Most of the libertas cards can do unaligned register access, but some
844 * weird ones can not. That's especially true for the CF8305 card. 853 * weird ones cannot. That's especially true for the CF8305 card.
845 */ 854 */
846 card->align_regs = 0; 855 card->align_regs = 0;
847 856
@@ -913,8 +922,10 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
913 goto out3; 922 goto out3;
914 } 923 }
915 924
916 /* Clear any interrupt cause that happened while sending 925 /*
917 * firmware/initializing card */ 926 * Clear any interrupt cause that happened while sending
927 * firmware/initializing card
928 */
918 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK); 929 if_cs_write16(card, IF_CS_CARD_INT_CAUSE, IF_CS_BIT_MASK);
919 if_cs_enable_ints(card); 930 if_cs_enable_ints(card);
920 931