cam_xpt.c (199280) | cam_xpt.c (199747) |
---|---|
1/*- 2 * Implementation of the Common Access Method Transport (XPT) layer. 3 * 4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs. 5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Implementation of the Common Access Method Transport (XPT) layer. 3 * 4 * Copyright (c) 1997, 1998, 1999 Justin T. Gibbs. 5 * Copyright (c) 1997, 1998, 1999 Kenneth D. Merry. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 199280 2009-11-14 20:23:20Z mav $"); | 31__FBSDID("$FreeBSD: head/sys/cam/cam_xpt.c 199747 2009-11-24 12:47:58Z mav $"); |
32 33#include <sys/param.h> 34#include <sys/bus.h> 35#include <sys/systm.h> 36#include <sys/types.h> 37#include <sys/malloc.h> 38#include <sys/kernel.h> 39#include <sys/time.h> --- 1095 unchanged lines hidden (view full) --- 1135 } 1136 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SAS) { 1137 struct ccb_trans_settings_sas *sas = 1138 &cts.xport_specific.sas; 1139 1140 if (sas->valid & CTS_SAS_VALID_SPEED) 1141 speed = sas->bitrate; 1142 } | 32 33#include <sys/param.h> 34#include <sys/bus.h> 35#include <sys/systm.h> 36#include <sys/types.h> 37#include <sys/malloc.h> 38#include <sys/kernel.h> 39#include <sys/time.h> --- 1095 unchanged lines hidden (view full) --- 1135 } 1136 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SAS) { 1137 struct ccb_trans_settings_sas *sas = 1138 &cts.xport_specific.sas; 1139 1140 if (sas->valid & CTS_SAS_VALID_SPEED) 1141 speed = sas->bitrate; 1142 } |
1143 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_ATA) { 1144 struct ccb_trans_settings_ata *ata = 1145 &cts.xport_specific.ata; 1146 1147 if (ata->valid & CTS_ATA_VALID_MODE) 1148 speed = ata_mode2speed(ata->mode); 1149 } |
|
1143 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { 1144 struct ccb_trans_settings_sata *sata = 1145 &cts.xport_specific.sata; 1146 | 1150 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { 1151 struct ccb_trans_settings_sata *sata = 1152 &cts.xport_specific.sata; 1153 |
1147 if (sata->valid & CTS_SATA_VALID_SPEED) 1148 speed = sata->bitrate; | 1154 if (sata->valid & CTS_SATA_VALID_REVISION) 1155 speed = ata_revision2speed(sata->revision); |
1149 } 1150 1151 mb = speed / 1000; 1152 if (mb > 0) 1153 printf("%s%d: %d.%03dMB/s transfers", 1154 periph->periph_name, periph->unit_number, 1155 mb, speed % 1000); 1156 else --- 33 unchanged lines hidden (view full) --- 1190 printf(" WWPN 0x%llx", (long long) fc->wwpn); 1191 if (fc->valid & CTS_FC_VALID_PORT) 1192 printf(" PortID 0x%x", fc->port); 1193 } 1194 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_ATA) { 1195 struct ccb_trans_settings_ata *ata = 1196 &cts.xport_specific.ata; 1197 | 1156 } 1157 1158 mb = speed / 1000; 1159 if (mb > 0) 1160 printf("%s%d: %d.%03dMB/s transfers", 1161 periph->periph_name, periph->unit_number, 1162 mb, speed % 1000); 1163 else --- 33 unchanged lines hidden (view full) --- 1197 printf(" WWPN 0x%llx", (long long) fc->wwpn); 1198 if (fc->valid & CTS_FC_VALID_PORT) 1199 printf(" PortID 0x%x", fc->port); 1200 } 1201 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_ATA) { 1202 struct ccb_trans_settings_ata *ata = 1203 &cts.xport_specific.ata; 1204 |
1205 printf(" ("); 1206 if (ata->valid & CTS_ATA_VALID_MODE) 1207 printf("%s, ", ata_mode2string(ata->mode)); |
|
1198 if (ata->valid & CTS_ATA_VALID_BYTECOUNT) | 1208 if (ata->valid & CTS_ATA_VALID_BYTECOUNT) |
1199 printf(" (PIO size %dbytes)", ata->bytecount); | 1209 printf("PIO size %dbytes", ata->bytecount); 1210 printf(")"); |
1200 } 1201 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { 1202 struct ccb_trans_settings_sata *sata = 1203 &cts.xport_specific.sata; 1204 | 1211 } 1212 if (cts.ccb_h.status == CAM_REQ_CMP && cts.transport == XPORT_SATA) { 1213 struct ccb_trans_settings_sata *sata = 1214 &cts.xport_specific.sata; 1215 |
1216 printf(" ("); 1217 if (sata->valid & CTS_SATA_VALID_REVISION) 1218 printf("SATA %d.x, ", sata->revision); 1219 if (sata->valid & CTS_SATA_VALID_MODE) 1220 printf("%s, ", ata_mode2string(sata->mode)); |
|
1205 if (sata->valid & CTS_SATA_VALID_BYTECOUNT) | 1221 if (sata->valid & CTS_SATA_VALID_BYTECOUNT) |
1206 printf(" (PIO size %dbytes)", sata->bytecount); | 1222 printf("PIO size %dbytes", sata->bytecount); 1223 printf(")"); |
1207 } 1208 if (path->device->inq_flags & SID_CmdQue 1209 || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) { 1210 printf("\n%s%d: Command Queueing enabled", 1211 periph->periph_name, periph->unit_number); 1212 } 1213 printf("\n"); 1214 --- 3861 unchanged lines hidden --- | 1224 } 1225 if (path->device->inq_flags & SID_CmdQue 1226 || path->device->flags & CAM_DEV_TAG_AFTER_COUNT) { 1227 printf("\n%s%d: Command Queueing enabled", 1228 periph->periph_name, periph->unit_number); 1229 } 1230 printf("\n"); 1231 --- 3861 unchanged lines hidden --- |