Deleted Added
full compact
pccard.c (106362) pccard.c (106896)
1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */
1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */
2/* $FreeBSD: head/sys/dev/pccard/pccard.c 106362 2002-11-02 23:00:28Z imp $ */
2/* $FreeBSD: head/sys/dev/pccard/pccard.c 106896 2002-11-14 05:13:52Z imp $ */
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

--- 261 unchanged lines hidden (view full) ---

272 STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
273 int state = device_get_state(pf->dev);
274
275 if (state == DS_ATTACHED || state == DS_BUSY)
276 device_detach(pf->dev);
277 if (pf->cfe != NULL)
278 pccard_function_disable(pf);
279 pccard_function_free(pf);
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

--- 261 unchanged lines hidden (view full) ---

272 STAILQ_FOREACH(pf, &sc->card.pf_head, pf_list) {
273 int state = device_get_state(pf->dev);
274
275 if (state == DS_ATTACHED || state == DS_BUSY)
276 device_detach(pf->dev);
277 if (pf->cfe != NULL)
278 pccard_function_disable(pf);
279 pccard_function_free(pf);
280 if (pf->dev != NULL)
281 device_delete_child(dev, pf->dev);
280 device_delete_child(dev, pf->dev);
282 }
283 if (sc->sc_enabled_count == 0)
284 POWER_DISABLE_SOCKET(device_get_parent(dev), dev);
285
286 while (NULL != (pf = STAILQ_FIRST(&sc->card.pf_head))) {
287 while (NULL != (cfe = STAILQ_FIRST(&pf->cfe_head))) {
288 STAILQ_REMOVE_HEAD(&pf->cfe_head, cfe_list);
289 free(cfe, M_DEVBUF);

--- 1015 unchanged lines hidden ---
281 }
282 if (sc->sc_enabled_count == 0)
283 POWER_DISABLE_SOCKET(device_get_parent(dev), dev);
284
285 while (NULL != (pf = STAILQ_FIRST(&sc->card.pf_head))) {
286 while (NULL != (cfe = STAILQ_FIRST(&pf->cfe_head))) {
287 STAILQ_REMOVE_HEAD(&pf->cfe_head, cfe_list);
288 free(cfe, M_DEVBUF);

--- 1015 unchanged lines hidden ---