Lines Matching refs:card

147  * Frees the memory allocated for an io card list.
168 * for the "card" argument is assumed to be handled by the caller,
172 insert_io_card(struct io_card *list, struct io_card *card)
177 if (card == NULL)
180 /* Copy the card to be added into new storage */
186 (void) memcpy(newcard, card, sizeof (struct io_card));
192 /* Find the proper place in the list for the new card */
200 /* Insert the new card into the list */
363 struct io_card card;
371 card.display = 1;
372 card.board = board->board_num;
373 (void) sprintf(card.bus_type, BUS_TYPE);
374 card.freq = sys_clk;
395 card.slot = get_id(fb);
398 (void) sprintf(card.name, "%s", label);
402 (void) sprintf(card.name,
405 (void) sprintf(card.name,
412 card.model[0] = '\0';
421 (void) sprintf(card.model, "%s",
428 (void) sprintf(card.model, "%s",
432 card_list = insert_io_card(card_list, &card);
497 struct io_card card;
532 /* Fill in card information */
533 card.display = 1;
534 card.freq = freq;
535 card.board = board->board_num;
536 (void) sprintf(card.bus_type, "SBus");
537 card.slot = card_num;
538 card.status[0] = '\0';
540 /* Try and get card status */
543 (void) strncpy(card.status, (char *)value,
547 if (strstr(card.status, "fail") != NULL)
550 /* Now gather all of the node names for that card */
558 card.name[0] = '\0';
559 card.model[0] = '\0';
568 (void) sprintf(card.name, "%s/%s (%s)",
572 (void) sprintf(card.name, "%s/%s", name,
575 (void) strncpy(card.name, name, MAXSTRLEN);
579 (void) strncpy(card.model, model, MAXSTRLEN);
581 card_list = insert_io_card(card_list, &card);
585 /* We're all done gathering card info, now print it out */
781 struct io_card card;
795 card.display = 1;
796 card.board = board->board_num;
797 (void) sprintf(card.bus_type, "PCI");
833 card.freq = get_card_frequency(pci);
857 /* get dev# and func# for this card. */
858 get_dev_func_num(card_node, &card.dev_no,
859 &card.func_no);
861 /* get class/subclass code for this card. */
866 D_PRINTF("device no [%d] - ", card.dev_no);
888 pci_bridge_dev_no = card.dev_no;
902 card.dev_no = pci_bridge_dev_no;
905 get_slot_number_str(&card, (char **)slot_name_arr,
910 "[%s] slot [%s]", name, card.dev_no,
911 slot_name_arr[card.dev_no],
912 card.slot_str);
915 card.status[0] = '\0';
917 /* Get the model of this card */
918 get_pci_card_model(card_node, (char *)&card.model);
922 * try and get it from the card.
925 if (value != NULL && card.freq == -1)
926 card.freq = ((*(int *)value) + 500000)
932 (char *)&card.name);
934 if (card.freq != -1)
935 card_list = insert_io_card(card_list, &card);
966 get_slot_number_str(struct io_card *card, char **slot_name_arr,
969 if (card->dev_no != -1) {
976 if (slot_name_bits & (1 << card->dev_no)) {
977 /* we are a plug-in card */
978 slot = slot_name_arr[card->dev_no];
980 (void) sprintf(card->slot_str, "%s",
983 (void) sprintf(card->slot_str, "-");
986 sprintf(card->slot_str, "On-Board");
990 (void) sprintf(card->slot_str, "%c", '-');
994 card->slot = PCI_SLOT_IS_STRING;
1003 * if the card needs further processing.
1005 * It can be extended in the future if card types other than QLC have
1010 struct io_card *card)
1016 decode_qlc_card_model_prop(node, card);
1030 decode_qlc_card_model_prop(Prom_node *card_node, struct io_card *card)
1043 (void) snprintf(card->model, MAX_QLC_MODEL_LEN, "%s",
1048 (void) snprintf(card->model, MAX_QLC_MODEL_LEN, "%s",
1060 if (strcmp(card->model, "") == 0) {
1061 (void) snprintf(card->model, MAX_QLC_MODEL_LEN,