Lines Matching +defs:error +defs:target
130 int nseg, int error);
174 int nseg, int error);
180 int bus, int target);
187 static int ciss_name_device(struct ciss_softc *sc, int bus, int target);
450 int error;
502 if ((error = ciss_init_pci(sc)) != 0)
519 if ((error = ciss_init_requests(sc)) != 0)
525 if ((error = ciss_identify_adapter(sc)) != 0)
531 if ((error = ciss_init_physical(sc)) != 0)
537 if ((error = ciss_init_logical(sc)) != 0)
548 if ((error = ciss_cam_init(sc)) != 0)
572 error = 0;
574 if (error != 0) {
579 return(error);
645 int error, sqmask, i;
676 error = ENXIO;
814 if ((error = ciss_wait_adapter(sc)) != 0)
815 return(error);
1062 int error, command_status;
1075 error = ENOMEM;
1078 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_FLUSH_CACHE,
1085 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1086 ciss_printf(sc, "error sending BMIC FLUSH_CACHE command (%d)\n", error);
1098 ciss_printf(sc, "error flushing cache (%s)\n",
1100 error = EIO;
1109 return(error);
1117 int i, error = 0;
1124 if ((error = ciss_get_request(sc, &cr)) != 0)
1127 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_SOFT_RESET,
1134 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0)
1140 if (error)
1141 ciss_printf(sc, "error resetting controller (%d)\n", error);
1214 ciss_command_map_helper(void *arg, bus_dma_segment_t *segs, int nseg, int error)
1229 int error, command_status;
1238 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_ID_CTLR,
1246 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1247 ciss_printf(sc, "error sending BMIC ID_CTLR command (%d)\n", error);
1262 ciss_printf(sc, "error reading adapter information (%s)\n",
1264 error = EIO;
1271 error = ENXIO;
1339 if (error) {
1347 return(error);
1362 int error = 0;
1372 if ((error = ciss_get_request(sc, &cr)) != 0)
1377 error = ENOMEM;
1391 cc->header.address.physical.target = 0;
1408 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1409 ciss_printf(sc, "error sending %d LUN command (%d)\n", opcode, error);
1426 ciss_printf(sc, "error detecting logical drive configuration (%s)\n",
1428 error = EIO;
1437 if (error && cll != NULL) {
1451 int error = 0, i, j;
1459 error = ENXIO;
1468 error = ENXIO;
1484 error = ENXIO;
1494 error = ENXIO;
1505 int bus, target;
1508 target = CISS_LUN_TO_TARGET(cll->lun[i].logical.lun);
1509 ld = &sc->ciss_logical[bus][target];
1526 return(error);
1533 int error = 0, i;
1544 error = ENXIO;
1555 /* Per-controller highest target number seen */
1608 error = ENOMEM;
1624 error = ENOMEM;
1633 ciss_printf(sc, "Could not allocate memory for target map\n");
1634 error = ENOMEM;
1641 ciss_printf(sc, "max physical target id: %d\n", sc->ciss_max_physical_target);
1647 return(error);
1655 int bus, target;
1688 target = CISS_EXTRA_TARGET2(ea);
1689 sc->ciss_physical[bus][target].cp_address = cll->lun[i];
1690 sc->ciss_physical[bus][target].cp_online = 1;
1692 if ((target > sc->ciss_max_physical_target) &&
1694 sc->ciss_max_physical_target = target;
1706 int error;
1713 if ((error = ciss_get_request(sc, &cr)) != 0)
1734 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1735 ciss_printf(sc, "error getting geometry (%d)\n", error);
1756 return(error);
1767 int error, command_status;
1776 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_ID_LDRIVE,
1781 cc->header.address = *ld->cl_controller; /* target controller */
1788 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1789 ciss_printf(sc, "error sending BMIC LDRIVE command (%d)\n", error);
1804 ciss_printf(sc, "error reading logical drive ID (%s)\n",
1806 error = EIO;
1815 if ((error = ciss_get_ldrive_status(sc, ld)) != 0)
1821 if ((error = ciss_inquiry_logical(sc, ld)) != 0)
1838 if (error != 0) {
1853 return(error);
1867 int error, command_status;
1872 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_ID_LSTATUS,
1877 cc->header.address = *ld->cl_controller; /* target controller */
1884 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1885 ciss_printf(sc, "error sending BMIC LSTATUS command (%d)\n", error);
1900 ciss_printf(sc, "error reading logical drive status (%s)\n",
1902 error = EIO;
1917 return(error);
1954 int error = 0, ldrive;
1963 if ((error = ciss_get_bmic_request(sc, &cr, CISS_BMIC_ACCEPT_MEDIA,
1967 cc->header.address = *ld->cl_controller; /* target controller */
1974 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
1975 ciss_printf(sc, "error sending BMIC ACCEPT MEDIA command (%d)\n", error);
1988 ciss_printf(cr->cr_sc, "error accepting media into failed logical drive (%s)\n",
1996 return(error);
2131 int error;
2138 if ((error = ciss_map_request(cr)))
2139 return(error);
2181 (tag & CISS_HDR_HOST_TAG_ERROR) ? " with error" : "");
2213 (tag & CISS_HDR_HOST_TAG_ERROR) ? " with error" : "");
2356 * We don't consider data under/overrun an error for the Report
2367 debug(2, "ignoring irrelevant under/overrun error");
2371 * Check the command's error bit, if clear, there's no status and
2439 int error;
2446 if ((error = ciss_start(cr)) != 0)
2447 return(error);
2471 int error;
2476 if ((error = ciss_start(cr)) != 0)
2477 return(error);
2479 while ((cr->cr_flags & CISS_REQ_SLEEP) && (error != EWOULDBLOCK)) {
2480 error = msleep_sbt(cr, &cr->cr_sc->ciss_mtx, PRIBIO, "cissREQ",
2483 return(error);
2497 int error;
2502 if ((error = ciss_get_request(ar->cr_sc, &cr)) != 0)
2503 return(error);
2508 cc->header.address.physical.target = 0;
2526 error = ciss_synch_request(cr, 35 * 1000);
2527 if (!error)
2528 error = ciss_report_request(cr, NULL, NULL);
2531 return(error);
2610 int error;
2621 if ((error = ciss_get_request(sc, &cr)) != 0)
2631 error = ENOMEM;
2651 cc->header.address.physical.target = 0;
2665 if (error) {
2673 return(error);
2685 int error = 0;
2705 error = ENOMEM;
2708 if ((error = copyin(ioc->buf, cr->cr_data, ioc->buf_size))) {
2726 if ((error = ciss_synch_request(cr, 60 * 1000))) {
2727 debug(0, "request failed - %d", error);
2744 (error = copyout(cr->cr_data, ioc->buf, ioc->buf_size))) {
2750 error = 0;
2760 return(error);
2771 int error = 0;
2788 error = bus_dmamap_load_ccb(sc->ciss_buffer_dmat,
2792 error = bus_dmamap_load(sc->ciss_buffer_dmat, cr->cr_datamap,
2795 if (error != 0)
2796 return (error);
2813 ciss_request_map_helper(void *arg, bus_dma_segment_t *segs, int nseg, int error)
2992 ciss_cam_rescan_target(struct ciss_softc *sc, int bus, int target)
3005 target, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {
3022 int bus, target;
3028 target = csio->ccb_h.target_id;
3048 ld = &sc->ciss_logical[bus][target];
3158 int bus, target;
3161 int error;
3165 target = csio->ccb_h.target_id;
3167 debug(2, "XPT_SCSI_IO %d:%d:%d", bus, target, csio->ccb_h.target_lun);
3190 if ((error = ciss_get_request(sc, &cr)) != 0) {
3194 return(error);
3211 sc->ciss_physical[CISS_CAM_TO_PBUS(bus)][target].cp_address;
3214 sc->ciss_logical[bus][target].cl_address;
3243 if ((error = ciss_start(cr)) != 0) {
3246 if (error == EINPROGRESS) {
3247 error = 0;
3252 return(error);
3264 int bus, target;
3267 target = csio->ccb_h.target_id;
3273 if (sc->ciss_physical[CISS_CAM_TO_PBUS(bus)][target].cp_online != 1) {
3286 if (sc->ciss_logical[bus][target].cl_status != CISS_LD_ONLINE) {
3308 * A CISS target can only ever have one lun per target. REPORT_LUNS requires
3311 * return to shut up warning on console of a CDB error. swb
3417 int bus, target;
3426 target = csio->ccb_h.target_id;
3441 cl = &sc->ciss_logical[bus][target];
3456 * Name the device at (target)
3461 ciss_name_device(struct ciss_softc *sc, int bus, int target)
3471 target, 0);
3479 sprintf(sc->ciss_logical[bus][target].cl_name, "%s%d",
3484 sc->ciss_logical[bus][target].cl_name[0] = 0;
3497 int error = 0;
3524 if (ciss_nop_message_heartbeat != 0 && (error = ciss_get_request(sc, &cr)) == 0) {
3534 if ((error = ciss_start(cr)) != 0) {
3574 * The all requests in completed queue is failed with hardware error.
3638 int error;
3646 if ((error = ciss_get_request(sc, &cr)) != 0) {
3663 error = ENOMEM;
3676 cc->header.address.physical.target = 0;
3699 error = ciss_start(cr);
3702 if (error) {
3735 * Abort the chain on a fatal error.
3742 ciss_printf(sc, "fatal error in Notify Event request (%s)\n",
3801 int error, command_status, scsi_status;
3806 error = 0;
3813 if ((error = ciss_get_request(sc, &cr)))
3819 error = ENOMEM;
3828 cc->header.address.physical.target = 0;
3847 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
3848 ciss_printf(sc, "Abort Notify Event command failed (%d)\n", error);
3864 error = ciss_notify_abort_bmic(sc);
3865 if (error != 0)
3877 error = 0;
3885 error = EIO;
3897 error = msleep(&sc->ciss_periodic_notify, &sc->ciss_mtx, PRIBIO, "cissNEA", hz * 5);
3898 if (error == EWOULDBLOCK) {
3911 if (error == 0)
3913 return(error);
3923 int error, command_status;
3928 error = 0;
3939 if ((error = ciss_get_bmic_request(sc, &cr, CISS_COMMAND_ABORT_NOTIFY,
3946 if ((error = ciss_synch_request(cr, 60 * 1000)) != 0) {
3947 ciss_printf(sc, "error sending BMIC Cancel Notify on Event command (%d)\n", error);
3959 ciss_printf(sc, "error cancelling Notify on Event (%s)\n",
3961 error = EIO;
3968 return(error);
4022 int bus, target;
4025 target = CISS_LUN_TO_TARGET(cll->lun[i].logical.lun);
4026 ld = &sc->ciss_logical[bus][target];
4035 ciss_cam_rescan_target(sc, bus, target);
4052 int ostatus, bus, target;
4057 target = cn->data.logical_status.logical_drive;
4058 ld = &sc->ciss_logical[bus][target];
4064 ciss_name_device(sc, bus, target);
4091 ciss_name_device(sc, bus, target);
4103 ciss_printf(sc, "rebuild of logical drive %d (%s) failed due to %s error\n",
4146 int bus, target;
4152 target =
4160 if ((bus >= 0) && (target >= 0))
4161 sc->ciss_physical[bus][target].cp_online = 0;
4298 ciss_printf(sc, " physical bus %d target %d\n",
4299 cc->header.address.physical.bus, cc->header.address.physical.target);
4320 /* XXX print error info */
4340 int bus, target, i;
4360 target = CISS_BIG_MAP_BUS(sc, ld->cl_lstatus->drive_rebuilding);
4362 bus, target, ld->cl_lstatus->blocks_to_recover);
4388 target = CISS_BIG_MAP_TARGET(sc, ld->cl_lstatus->drive_failure_map[i]);
4391 ciss_printf(sc, "physical drive %d:%d (%x) failed\n", bus, target,
4545 return("target status");
4553 return("protocol error");
4555 return("hardware error");
4625 int error;
4630 error = 0;
4645 error = ENOIOCTL;
4679 error = EINVAL;
4691 error = EIO;
4706 error = EIO;
4748 error = ciss_user_command(sc, ioc);
4766 error = ENOIOCTL;
4771 return(error);