Deleted Added
full compact
mmcsd.c (302408) mmcsd.c (312399)
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

46 * implication, estoppel or otherwise under any patent or other rights of the
47 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
48 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
49 * or the SD Card Association to disclose or distribute any technical
50 * information, know-how or other confidential information to any third party.
51 */
52
53#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006 Bernd Walter. All rights reserved.
3 * Copyright (c) 2006 M. Warner Losh. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

46 * implication, estoppel or otherwise under any patent or other rights of the
47 * SD Group, SD-3C LLC, the SD Card Association or any third party. Nothing
48 * herein shall be construed as an obligation by the SD Group, the SD-3C LLC
49 * or the SD Card Association to disclose or distribute any technical
50 * information, know-how or other confidential information to any third party.
51 */
52
53#include <sys/cdefs.h>
54__FBSDID("$FreeBSD: stable/11/sys/dev/mmc/mmcsd.c 295707 2016-02-17 17:16:02Z imp $");
54__FBSDID("$FreeBSD: stable/11/sys/dev/mmc/mmcsd.c 312399 2017-01-18 23:25:46Z marius $");
55
56#include <sys/param.h>
57#include <sys/systm.h>
58#include <sys/bio.h>
59#include <sys/bus.h>
60#include <sys/conf.h>
61#include <sys/kernel.h>
62#include <sys/kthread.h>

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

540 } else if (bp->bio_cmd == BIO_DELETE) {
541 block = mmcsd_delete(sc, bp);
542 }
543 MMCBUS_RELEASE_BUS(mmcbr, dev);
544 if (block < end) {
545 bp->bio_error = EIO;
546 bp->bio_resid = (end - block) * sz;
547 bp->bio_flags |= BIO_ERROR;
55
56#include <sys/param.h>
57#include <sys/systm.h>
58#include <sys/bio.h>
59#include <sys/bus.h>
60#include <sys/conf.h>
61#include <sys/kernel.h>
62#include <sys/kthread.h>

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

540 } else if (bp->bio_cmd == BIO_DELETE) {
541 block = mmcsd_delete(sc, bp);
542 }
543 MMCBUS_RELEASE_BUS(mmcbr, dev);
544 if (block < end) {
545 bp->bio_error = EIO;
546 bp->bio_resid = (end - block) * sz;
547 bp->bio_flags |= BIO_ERROR;
548 } else {
549 bp->bio_resid = 0;
548 }
549 biodone(bp);
550 }
551out:
552 /* tell parent we're done */
553 sc->running = -1;
554 MMCSD_UNLOCK(sc);
555 wakeup(sc);

--- 32 unchanged lines hidden ---
550 }
551 biodone(bp);
552 }
553out:
554 /* tell parent we're done */
555 sc->running = -1;
556 MMCSD_UNLOCK(sc);
557 wakeup(sc);

--- 32 unchanged lines hidden ---