ata-pci.c (233282) | ata-pci.c (249083) |
---|---|
1/*- 2 * Copyright (c) 1998 - 2008 S��ren Schmidt <sos@FreeBSD.org> 3 * 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 --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1998 - 2008 S��ren Schmidt <sos@FreeBSD.org> 3 * 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 --- 11 unchanged lines hidden (view full) --- 20 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/ata/ata-pci.c 233282 2012-03-21 16:59:39Z marius $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ata/ata-pci.c 249083 2013-04-04 07:12:24Z mav $"); |
29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/ata.h> 36#include <sys/bus.h> --- 656 unchanged lines hidden (view full) --- 693 return (0); 694 695 if (ctlr->ch_resume != NULL && (error = ctlr->ch_resume(dev))) 696 return (error); 697 698 return ata_resume(dev); 699} 700 | 29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/ata.h> 36#include <sys/bus.h> --- 656 unchanged lines hidden (view full) --- 693 return (0); 694 695 if (ctlr->ch_resume != NULL && (error = ctlr->ch_resume(dev))) 696 return (error); 697 698 return ata_resume(dev); 699} 700 |
701 702#ifndef ATA_CAM 703static int 704ata_pcichannel_locking(device_t dev, int mode) 705{ 706 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); 707 struct ata_channel *ch = device_get_softc(dev); 708 709 if (ctlr->locking) 710 return ctlr->locking(dev, mode); 711 else 712 return ch->unit; 713} 714#endif 715 | |
716static void 717ata_pcichannel_reset(device_t dev) 718{ 719 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); 720 struct ata_channel *ch = device_get_softc(dev); 721 722 /* if DMA engine present reset it */ 723 if (ch->dma.reset) --- 39 unchanged lines hidden (view full) --- 763 DEVMETHOD(device_detach, ata_pcichannel_detach), 764 DEVMETHOD(device_shutdown, bus_generic_shutdown), 765 DEVMETHOD(device_suspend, ata_pcichannel_suspend), 766 DEVMETHOD(device_resume, ata_pcichannel_resume), 767 768 /* ATA methods */ 769 DEVMETHOD(ata_setmode, ata_pcichannel_setmode), 770 DEVMETHOD(ata_getrev, ata_pcichannel_getrev), | 701static void 702ata_pcichannel_reset(device_t dev) 703{ 704 struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); 705 struct ata_channel *ch = device_get_softc(dev); 706 707 /* if DMA engine present reset it */ 708 if (ch->dma.reset) --- 39 unchanged lines hidden (view full) --- 748 DEVMETHOD(device_detach, ata_pcichannel_detach), 749 DEVMETHOD(device_shutdown, bus_generic_shutdown), 750 DEVMETHOD(device_suspend, ata_pcichannel_suspend), 751 DEVMETHOD(device_resume, ata_pcichannel_resume), 752 753 /* ATA methods */ 754 DEVMETHOD(ata_setmode, ata_pcichannel_setmode), 755 DEVMETHOD(ata_getrev, ata_pcichannel_getrev), |
771#ifndef ATA_CAM 772 DEVMETHOD(ata_locking, ata_pcichannel_locking), 773#endif | |
774 DEVMETHOD(ata_reset, ata_pcichannel_reset), 775 776 DEVMETHOD_END 777}; 778 779driver_t ata_pcichannel_driver = { 780 "ata", 781 ata_pcichannel_methods, --- 165 unchanged lines hidden --- | 756 DEVMETHOD(ata_reset, ata_pcichannel_reset), 757 758 DEVMETHOD_END 759}; 760 761driver_t ata_pcichannel_driver = { 762 "ata", 763 ata_pcichannel_methods, --- 165 unchanged lines hidden --- |