blkfront.c (e4808c4b2dbab579f0c22efa2e05d7c463b1260e) blkfront.c (a4660d594f0f1d4687fd71750af95bd7b61c679e)
1/*
2 * XenBSD block device driver
3 *
4 * Copyright (c) 2009 Scott Long, Yahoo!
5 * Copyright (c) 2009 Frank Suchomel, Citrix
6 * Copyright (c) 2009 Doug F. Rabson, Citrix
7 * Copyright (c) 2005 Kip Macy
8 * Copyright (c) 2003-2004, Keir Fraser & Steve Hand

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

445 xb_initq_free(sc);
446 xb_initq_busy(sc);
447 xb_initq_ready(sc);
448 xb_initq_complete(sc);
449 xb_initq_bio(sc);
450
451 /* Allocate parent DMA tag */
452 if (bus_dma_tag_create( NULL, /* parent */
1/*
2 * XenBSD block device driver
3 *
4 * Copyright (c) 2009 Scott Long, Yahoo!
5 * Copyright (c) 2009 Frank Suchomel, Citrix
6 * Copyright (c) 2009 Doug F. Rabson, Citrix
7 * Copyright (c) 2005 Kip Macy
8 * Copyright (c) 2003-2004, Keir Fraser & Steve Hand

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

445 xb_initq_free(sc);
446 xb_initq_busy(sc);
447 xb_initq_ready(sc);
448 xb_initq_complete(sc);
449 xb_initq_bio(sc);
450
451 /* Allocate parent DMA tag */
452 if (bus_dma_tag_create( NULL, /* parent */
453 4096, 0, /* algnmnt, boundary */
453 512, 4096, /* algnmnt, boundary */
454 BUS_SPACE_MAXADDR, /* lowaddr */
455 BUS_SPACE_MAXADDR, /* highaddr */
456 NULL, NULL, /* filter, filterarg */
457 BLKIF_MAXIO, /* maxsize */
458 BLKIF_MAX_SEGMENTS_PER_REQUEST, /* nsegments */
459 PAGE_SIZE, /* maxsegsize */
460 BUS_DMA_ALLOCNOW, /* flags */
461 busdma_lock_mutex, /* lockfunc */

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

728 sc->xb_flags |= XB_READY;
729 mtx_unlock(&sc->xb_io_lock);
730
731}
732
733/**
734 * Handle the change of state of the backend to Closing. We must delete our
735 * device-layer structures now, to ensure that writes are flushed through to
454 BUS_SPACE_MAXADDR, /* lowaddr */
455 BUS_SPACE_MAXADDR, /* highaddr */
456 NULL, NULL, /* filter, filterarg */
457 BLKIF_MAXIO, /* maxsize */
458 BLKIF_MAX_SEGMENTS_PER_REQUEST, /* nsegments */
459 PAGE_SIZE, /* maxsegsize */
460 BUS_DMA_ALLOCNOW, /* flags */
461 busdma_lock_mutex, /* lockfunc */

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

728 sc->xb_flags |= XB_READY;
729 mtx_unlock(&sc->xb_io_lock);
730
731}
732
733/**
734 * Handle the change of state of the backend to Closing. We must delete our
735 * device-layer structures now, to ensure that writes are flushed through to
736 * the backend. Once is this done, we can switch to Closed in
736 * the backend. Once this is done, we can switch to Closed in
737 * acknowledgement.
738 */
739static void
740blkfront_closing(device_t dev)
741{
742 struct xb_softc *sc = device_get_softc(dev);
743
744 DPRINTK("blkfront_closing: %s removed\n", xenbus_get_node(dev));

--- 440 unchanged lines hidden ---
737 * acknowledgement.
738 */
739static void
740blkfront_closing(device_t dev)
741{
742 struct xb_softc *sc = device_get_softc(dev);
743
744 DPRINTK("blkfront_closing: %s removed\n", xenbus_get_node(dev));

--- 440 unchanged lines hidden ---