ata-all.c (200359) | ata-all.c (200459) |
---|---|
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-all.c 200359 2009-12-10 16:55:16Z takawata $"); | 28__FBSDID("$FreeBSD: head/sys/dev/ata/ata-all.c 200459 2009-12-13 00:13:21Z marius $"); |
29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/ata.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/endian.h> --- 1108 unchanged lines hidden (view full) --- 1145 case 1: return "SATA 1.5Gb/s"; 1146 case 2: return "SATA 3Gb/s"; 1147 case 3: return "SATA 6Gb/s"; 1148 default: return "???"; 1149 } 1150} 1151 1152int | 29 30#include "opt_ata.h" 31#include <sys/param.h> 32#include <sys/systm.h> 33#include <sys/ata.h> 34#include <sys/kernel.h> 35#include <sys/module.h> 36#include <sys/endian.h> --- 1108 unchanged lines hidden (view full) --- 1145 case 1: return "SATA 1.5Gb/s"; 1146 case 2: return "SATA 3Gb/s"; 1147 case 3: return "SATA 6Gb/s"; 1148 default: return "???"; 1149 } 1150} 1151 1152int |
1153ata_atapi(device_t dev) | 1153ata_atapi(device_t dev, int target) |
1154{ | 1154{ |
1155 struct ata_channel *ch = device_get_softc(device_get_parent(dev)); 1156 struct ata_device *atadev = device_get_softc(dev); | 1155 struct ata_channel *ch = device_get_softc(dev); |
1157 | 1156 |
1158 return (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)); | 1157 return (ch->devices & (ATA_ATAPI_MASTER << target)); |
1159} 1160 1161int 1162ata_pmode(struct ata_params *ap) 1163{ 1164 if (ap->atavalid & ATA_FLAG_64_70) { 1165 if (ap->apiomodes & 0x02) 1166 return ATA_PIO4; --- 539 unchanged lines hidden --- | 1158} 1159 1160int 1161ata_pmode(struct ata_params *ap) 1162{ 1163 if (ap->atavalid & ATA_FLAG_64_70) { 1164 if (ap->apiomodes & 0x02) 1165 return ATA_PIO4; --- 539 unchanged lines hidden --- |