Lines Matching defs:scontrol

302 	u32 scontrol, serror;
305 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
314 scontrol = (scontrol & 0x0f0) | 0x300;
315 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
326 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
328 } while ((scontrol & 0xf0f) != 0x300 && --tries);
330 if ((scontrol & 0xf0f) != 0x300) {
332 scontrol);
374 u32 scontrol;
377 rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
384 scontrol |= (0x7 << 8);
387 scontrol |= (0x4 << 12);
393 scontrol &= ~(0x1 << 8);
394 scontrol |= (0x6 << 8);
401 scontrol &= ~(0x7 << 8);
408 scontrol |= (0x1 << 8);
411 scontrol |= (0x2 << 8);
414 scontrol |= (0x4 << 8);
417 scontrol &= ~0xf;
418 scontrol |= (0x1 << 2);
425 rc = sata_scr_write(link, SCR_CONTROL, scontrol);
439 static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol)
458 spd = (*scontrol >> 4) & 0xf;
459 *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4);
481 u32 scontrol;
483 if (sata_scr_read(link, SCR_CONTROL, &scontrol))
486 return __sata_set_spd_needed(link, &scontrol);
504 u32 scontrol;
507 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
510 if (!__sata_set_spd_needed(link, &scontrol))
513 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
548 u32 scontrol;
560 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
563 scontrol = (scontrol & 0x0f0) | 0x304;
565 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
572 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
575 scontrol = (scontrol & 0x0f0) | 0x301;
577 if ((rc = sata_scr_write_flush(link, SCR_CONTROL, scontrol)))