Lines Matching defs:rv

235 	int		rv;
247 if ((rv = sda_slot_power_on(slot)) != 0) {
248 return (rv);
261 if ((rv = sda_init_ifcond(slot)) != SDA_EOK) {
265 if (((rv = sda_init_sdio(slot)) != SDA_EOK) ||
266 ((rv = sda_init_sdmem(slot)) != SDA_EOK) ||
267 ((rv = sda_init_mmc(slot)) != SDA_EOK)) {
275 rv = SDA_ENOTSUP;
285 rv = sda_init_cmd(slot, CMD_BCAST_CID, 0, R2, slot->s_rcid);
286 if (rv != SDA_EOK) {
287 sda_slot_err(slot, "Failed getting card CID (%d)", rv);
292 if ((rv = sda_init_rca(slot)) != SDA_EOK) {
310 rv = sda_init_cmd(slot, CMD_SEND_CSD, slot->s_rca << 16, R2,
312 if (rv != 0) {
313 sda_slot_err(slot, "Failed getting card CSD (%d)", rv);
334 if ((rv = sda_init_cmd(slot, CMD_SELECT_CARD, slot->s_rca << 16,
336 sda_slot_err(slot, "Failed selecting card (%d, %x)", rv, resp);
340 if ((rv = sda_init_highspeed(slot)) != SDA_EOK) {
349 if ((rv = sda_init_width(slot)) != SDA_EOK) {
353 if ((rv = sda_init_blocklen(slot)) != SDA_EOK) {
363 rv = SDA_EOK;
373 return (rv);
379 int rv;
389 rv = sda_init_cmd(slot, CMD_SET_BLOCKLEN, 512, R1, &resp);
390 if (rv != SDA_EOK) {
392 rv, resp);
394 return (rv);
400 int rv;
410 if ((rv = sda_setprop(slot, SDA_PROP_CLOCK, hz)) != SDA_EOK) {
412 hz, rv);
417 rv = sda_getprop(slot, SDA_PROP_CLOCK, &act);
419 rv == SDA_EOK ? "Clock set to %u Hz (requested %u Hz)" :
432 int rv;
439 rv = sda_setprop(slot, SDA_PROP_BUSWIDTH, 1);
440 if (rv != SDA_EOK) {
441 sda_slot_err(slot, "Unable to set slot 1-bit mode (%d)", rv);
442 return (rv);
460 rv = sda_init_acmd(slot, ACMD_SET_CLR_CARD_DETECT, 1, R1, &resp);
461 if (rv != SDA_EOK) {
464 rv, resp);
469 rv = sda_init_acmd(slot, ACMD_SET_BUS_WIDTH, 2, R1, &resp);
470 if (rv != SDA_EOK) {
472 rv, resp);
477 rv = sda_setprop(slot, SDA_PROP_BUSWIDTH, 4);
478 if (rv != SDA_EOK) {
484 sda_slot_err(slot, "Unable to set slot 4-bit mode (%d)", rv);
487 return (rv);
493 int rv;
507 rv = sda_init_cmd(slot, CMD_GO_IDLE, 0, R0, NULL);
508 if (rv != SDA_EOK) {
510 return (rv);
513 rv = sda_init_cmd(slot, CMD_SEND_IF_COND, vchk, R7, &resp);
514 if (rv == SDA_EOK) {
520 if (rv != SDA_EOK) {
539 int rv;
555 rv = sda_init_cmd(slot, CMD_SEND_RCA,
557 if (rv == SDA_EOK)
566 rv = sda_init_cmd(slot, CMD_SEND_RCA, 0, R6, &resp);
567 if (rv == SDA_EOK)
570 if ((rv == SDA_EOK) && (slot->s_rca != 0)) {
577 sda_slot_err(slot, "Unable to negotiate a suitable RCA (%d)", rv);
578 return ((rv != SDA_EOK) ? rv : SDA_EINVAL);
617 sda_err_t rv;
630 rv = sda_init_switch(slot, 0, 0, 1, data);
633 if ((rv != SDA_EOK) || ((data[13] & (1 << 1)) == 0)) {
637 rv = sda_init_switch(slot, 1, 0, 1, data);
638 if (rv != SDA_EOK) {
643 rv = sda_setprop(slot, SDA_PROP_HISPEED, 1);
644 if (rv != SDA_EOK) {
651 return (rv);