pccard_cis.c (64850) | pccard_cis.c (67897) |
---|---|
1/* $NetBSD: pcmcia_cis.c,v 1.10 1998/12/29 09:03:15 marc Exp $ */ | 1/* $NetBSD: pcmcia_cis.c,v 1.10 1998/12/29 09:03:15 marc Exp $ */ |
2/* $FreeBSD: head/sys/dev/pccard/pccard_cis.c 64850 2000-08-19 19:22:04Z imp $ */ | 2/* $FreeBSD: head/sys/dev/pccard/pccard_cis.c 67897 2000-10-29 16:29:05Z dwmalone $ */ |
3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 740 unchanged lines hidden (view full) --- 751 case PCCARD_CISTPL_FUNCID: 752 if (tuple->length < 1) { 753 DPRINTF(("CISTPL_FUNCID too short %d\n", 754 tuple->length)); 755 break; 756 } 757 if ((state->pf == NULL) || (state->gotmfc == 2)) { 758 state->pf = malloc(sizeof(*state->pf), M_DEVBUF, | 3 4/* 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 1. Redistributions of source code must retain the above copyright --- 740 unchanged lines hidden (view full) --- 751 case PCCARD_CISTPL_FUNCID: 752 if (tuple->length < 1) { 753 DPRINTF(("CISTPL_FUNCID too short %d\n", 754 tuple->length)); 755 break; 756 } 757 if ((state->pf == NULL) || (state->gotmfc == 2)) { 758 state->pf = malloc(sizeof(*state->pf), M_DEVBUF, |
759 M_NOWAIT); 760 bzero(state->pf, sizeof(*state->pf)); | 759 M_NOWAIT | M_ZERO); |
761 state->pf->number = state->count++; 762 state->pf->last_config_index = -1; 763 STAILQ_INIT(&state->pf->cfe_head); 764 765 STAILQ_INSERT_TAIL(&state->card->pf_head, state->pf, 766 pf_list); 767 } 768 state->pf->function = pccard_tuple_read_1(tuple, 0); --- 20 unchanged lines hidden (view full) --- 789 if (tuple->length < (rasz + rmsz + rfsz)) { 790 DPRINTF(("CISTPL_CONFIG (%d,%d,%d) too " 791 "short %d\n", rasz, rmsz, rfsz, 792 tuple->length)); 793 break; 794 } 795 if (state->pf == NULL) { 796 state->pf = malloc(sizeof(*state->pf), | 760 state->pf->number = state->count++; 761 state->pf->last_config_index = -1; 762 STAILQ_INIT(&state->pf->cfe_head); 763 764 STAILQ_INSERT_TAIL(&state->card->pf_head, state->pf, 765 pf_list); 766 } 767 state->pf->function = pccard_tuple_read_1(tuple, 0); --- 20 unchanged lines hidden (view full) --- 788 if (tuple->length < (rasz + rmsz + rfsz)) { 789 DPRINTF(("CISTPL_CONFIG (%d,%d,%d) too " 790 "short %d\n", rasz, rmsz, rfsz, 791 tuple->length)); 792 break; 793 } 794 if (state->pf == NULL) { 795 state->pf = malloc(sizeof(*state->pf), |
797 M_DEVBUF, M_NOWAIT); 798 bzero(state->pf, sizeof(*state->pf)); | 796 M_DEVBUF, M_NOWAIT | M_ZERO); |
799 state->pf->number = state->count++; 800 state->pf->last_config_index = -1; 801 STAILQ_INIT(&state->pf->cfe_head); 802 803 STAILQ_INSERT_TAIL(&state->card->pf_head, 804 state->pf, pf_list); 805 806 state->pf->function = PCCARD_FUNCTION_UNSPEC; --- 403 unchanged lines hidden --- | 797 state->pf->number = state->count++; 798 state->pf->last_config_index = -1; 799 STAILQ_INIT(&state->pf->cfe_head); 800 801 STAILQ_INSERT_TAIL(&state->card->pf_head, 802 state->pf, pf_list); 803 804 state->pf->function = PCCARD_FUNCTION_UNSPEC; --- 403 unchanged lines hidden --- |