Lines Matching refs:rc

185 	int rc;
198 if ((rc = spin_up(sc)) != 0) {
199 print_error(sc, rc);
206 while (loop_count-- > 0 && (rc = read_toc(sc)) != 0) {
207 if (rc == ERR_NOT_SPINNING) {
208 rc = spin_up(sc);
209 if (rc) {
210 print_error(sc, rc);
216 device_printf(sc->dev, "TOC read error 0x%x\n", rc);
427 int rc;
429 if (!(sc->data.flags & SCDTOC) && (rc = read_toc(sc)) != 0) {
430 if (rc == -ERR_NOT_SPINNING) {
433 rc = read_toc(sc);
435 if (rc != 0) {
436 print_error(sc, rc);
476 int i, rc;
483 rc = send_cmd(sc, CMD_PLAY_AUDIO, 7,
487 if (rc == -ERR_NOT_SPINNING) {
491 } else if (rc < 0) {
492 print_error(sc, rc);
608 int rc;
629 rc = send_cmd(sc, CMD_GET_DRIVE_CONFIG, 0);
630 if (rc != sizeof(drive_config)) {
633 if (rc > 0 && loop_count++ == 0)
637 if (get_result(sc, rc, (u_char *)&drive_config) != 0)
669 int rc;
671 rc = send_cmd(sc, CMD_GET_SUBCHANNEL_DATA, 0);
672 if (rc < 0 || rc < sizeof(*scp))
674 if (get_result(sc, rc, (u_char *)scp) != 0)
1048 int rc;
1052 rc = send_cmd(sc, CMD_SPIN_UP, 0, 0, res_reg, &res_size);
1053 if (rc != 0) {
1054 XDEBUG(sc, 2, "CMD_SPIN_UP error 0x%x\n", rc);
1055 return (rc);
1059 rc = send_cmd(sc, CMD_READ_TOC, 0);
1060 if (rc == ERR_NOT_SPINNING) {
1063 return (rc);
1065 if (rc != 0)
1066 return (rc);
1104 int rc, i, j;
1107 rc = send_cmd(sc, CMD_GET_TOC, 1, 1);
1108 if (rc < 0)
1109 return (rc);
1110 if (rc > sizeof(toc)) {
1111 device_printf(sc->dev, "program error: toc too large (%d)\n", rc);
1114 if (get_result(sc, rc, (u_char *)&toc) != 0)
1117 XDEBUG(sc, 1, "toc read. len = %d, sizeof(toc) = %d\n", rc, sizeof(toc));
1119 tl = get_tl(&toc, rc);
1167 int rc;
1169 rc = send_cmd(sc, CMD_SET_DRIVE_PARAM, 2,
1171 if (rc != 0)
1172 device_printf(sc->dev, "Unable to set parameters. Errcode = 0x%x\n", rc);
1204 int rc;
1236 rc = waitfor_status_bits(sc, SBIT_RESULT_READY, SBIT_BUSY);
1237 if (rc)
1241 switch ((rc = SCD_READ(sc, IREG_RESULT)) & 0xf0) {
1243 rc = SCD_READ(sc, IREG_RESULT);
1246 XDEBUG(sc, 1, "DEBUG: send_cmd: drive_error=0x%x\n", rc);
1247 return (-rc);
1250 rc = SCD_READ(sc, IREG_RESULT);
1251 XDEBUG(sc, 1, "DEBUG: send_cmd: result_len=%d\n", rc);
1252 return (rc);
1337 int rc;
1339 if (!(sc->data.flags & SCDTOC) && (rc = read_toc(sc)) != 0) {
1340 print_error(sc, rc);
1355 int rc, i, len = te->data_len;
1357 if (!(sc->data.flags & SCDTOC) && (rc = read_toc(sc)) != 0) {
1358 print_error(sc, rc);
1400 int rc, i;
1402 if (!(sc->data.flags & SCDTOC) && (rc = read_toc(sc)) != 0) {
1403 print_error(sc, rc);