Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/cam_xpt.c
Context not available. | |||||
} | } | ||||
return (error); | return (error); | ||||
} | } | ||||
static int | static int | ||||
xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) | xptdoioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flag, struct thread *td) | ||||
{ | { | ||||
Context not available. | |||||
else if (path->device->protocol == PROTO_SEMB) | else if (path->device->protocol == PROTO_SEMB) | ||||
semb_print_ident( | semb_print_ident( | ||||
(struct sep_identify_data *)&path->device->ident_data); | (struct sep_identify_data *)&path->device->ident_data); | ||||
else if (path->device->protocol == PROTO_MMCSD) | |||||
mmc_print_ident(&path->device->mmc_ident_data); | |||||
else | else | ||||
printf("Unknown protocol device\n"); | printf("Unknown protocol device\n"); | ||||
if (path->device->serial_num_len > 0) { | if (path->device->serial_num_len > 0) { | ||||
Context not available. | |||||
else if (path->device->protocol == PROTO_SEMB) | else if (path->device->protocol == PROTO_SEMB) | ||||
semb_print_ident_short( | semb_print_ident_short( | ||||
(struct sep_identify_data *)&path->device->ident_data); | (struct sep_identify_data *)&path->device->ident_data); | ||||
else if (path->device->protocol == PROTO_MMCSD) | |||||
mmc_print_ident(&path->device->mmc_ident_data); | |||||
else | else | ||||
printf("Unknown protocol device"); | printf("Unknown protocol device"); | ||||
if (path->device->serial_num_len > 0) | if (path->device->serial_num_len > 0) | ||||
Context not available. | |||||
cur_pattern = &patterns[i].pattern.device_pattern; | cur_pattern = &patterns[i].pattern.device_pattern; | ||||
/* Error out if mutually exclusive options are specified. */ | /* Error out if mutually exclusive options are specified. */ | ||||
if ((cur_pattern->flags & (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID)) | if ((cur_pattern->flags & (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID)) | ||||
== (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID)) | == (DEV_MATCH_INQUIRY|DEV_MATCH_DEVID)) | ||||
return(DM_RET_ERROR); | return(DM_RET_ERROR); | ||||
Context not available. | |||||
if (start_ccb->ccb_h.func_code == XPT_ATA_IO) | if (start_ccb->ccb_h.func_code == XPT_ATA_IO) | ||||
start_ccb->ataio.resid = 0; | start_ccb->ataio.resid = 0; | ||||
/* FALLTHROUGH */ | /* FALLTHROUGH */ | ||||
case XPT_MMC_IO: | |||||
case XPT_RESET_DEV: | case XPT_RESET_DEV: | ||||
case XPT_ENG_EXEC: | case XPT_ENG_EXEC: | ||||
case XPT_SMP_IO: | case XPT_SMP_IO: | ||||
Context not available. | |||||
case XPORT_SATA: | case XPORT_SATA: | ||||
new_bus->xport = ata_get_xport(); | new_bus->xport = ata_get_xport(); | ||||
break; | break; | ||||
case XPORT_MMCSD: | |||||
new_bus->xport = mmc_get_xport(); | |||||
break; | |||||
default: | default: | ||||
new_bus->xport = &xport_default; | new_bus->xport = &xport_default; | ||||
break; | break; | ||||
Context not available. |