Changeset View
Changeset View
Standalone View
Standalone View
sys/cam/ata/ata_xpt.c
Show All 34 Lines | |||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/time.h> | #include <sys/time.h> | ||||
#include <sys/conf.h> | #include <sys/conf.h> | ||||
#include <sys/fcntl.h> | #include <sys/fcntl.h> | ||||
#include <sys/interrupt.h> | #include <sys/interrupt.h> | ||||
#include <sys/sbuf.h> | #include <sys/sbuf.h> | ||||
#include <sys/eventhandler.h> | |||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/sysctl.h> | #include <sys/sysctl.h> | ||||
#include <cam/cam.h> | #include <cam/cam.h> | ||||
#include <cam/cam_ccb.h> | #include <cam/cam_ccb.h> | ||||
#include <cam/cam_queue.h> | #include <cam/cam_queue.h> | ||||
#include <cam/cam_periph.h> | #include <cam/cam_periph.h> | ||||
▲ Show 20 Lines • Show All 816 Lines • ▼ Show 20 Lines | case PROBE_RESET: | ||||
xpt_release_ccb(done_ccb); | xpt_release_ccb(done_ccb); | ||||
xpt_schedule(periph, priority); | xpt_schedule(periph, priority); | ||||
goto out; | goto out; | ||||
} | } | ||||
case PROBE_IDENTIFY: | case PROBE_IDENTIFY: | ||||
{ | { | ||||
struct ccb_pathinq cpi; | struct ccb_pathinq cpi; | ||||
int16_t *ptr; | int16_t *ptr; | ||||
int veto = 0; | |||||
ident_buf = &softc->ident_data; | ident_buf = &softc->ident_data; | ||||
for (ptr = (int16_t *)ident_buf; | for (ptr = (int16_t *)ident_buf; | ||||
ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { | ptr < (int16_t *)ident_buf + sizeof(struct ata_params)/2; ptr++) { | ||||
*ptr = le16toh(*ptr); | *ptr = le16toh(*ptr); | ||||
} | } | ||||
/* | |||||
* XXX: VM for Hyper-V should ignore ATA | |||||
*/ | |||||
EVENTHANDLER_INVOKE(ada_probe_veto, path, ident_buf, &veto); | |||||
if (veto) { | |||||
goto device_fail; | |||||
} | |||||
if (strncmp(ident_buf->model, "FX", 2) && | if (strncmp(ident_buf->model, "FX", 2) && | ||||
strncmp(ident_buf->model, "NEC", 3) && | strncmp(ident_buf->model, "NEC", 3) && | ||||
strncmp(ident_buf->model, "Pioneer", 7) && | strncmp(ident_buf->model, "Pioneer", 7) && | ||||
strncmp(ident_buf->model, "SHARP", 5)) { | strncmp(ident_buf->model, "SHARP", 5)) { | ||||
ata_bswap(ident_buf->model, sizeof(ident_buf->model)); | ata_bswap(ident_buf->model, sizeof(ident_buf->model)); | ||||
ata_bswap(ident_buf->revision, sizeof(ident_buf->revision)); | ata_bswap(ident_buf->revision, sizeof(ident_buf->revision)); | ||||
ata_bswap(ident_buf->serial, sizeof(ident_buf->serial)); | ata_bswap(ident_buf->serial, sizeof(ident_buf->serial)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 1,287 Lines • Show Last 20 Lines |