Lines Matching defs:scontrol

300 	u32 scontrol, serror;
303 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
312 scontrol = (scontrol & 0x0f0) | 0x300;
313 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
324 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
326 } while ((scontrol & 0xf0f) != 0x300 && --tries);
328 if ((scontrol & 0xf0f) != 0x300) {
330 scontrol);
372 u32 scontrol;
375 rc = sata_scr_read(link, SCR_CONTROL, &scontrol);
382 scontrol |= (0x7 << 8);
385 scontrol |= (0x4 << 12);
391 scontrol &= ~(0x1 << 8);
392 scontrol |= (0x6 << 8);
399 scontrol &= ~(0x7 << 8);
406 scontrol |= (0x1 << 8);
409 scontrol |= (0x2 << 8);
412 scontrol |= (0x4 << 8);
415 scontrol &= ~0xf;
416 scontrol |= (0x1 << 2);
423 rc = sata_scr_write(link, SCR_CONTROL, scontrol);
437 static int __sata_set_spd_needed(struct ata_link *link, u32 *scontrol)
456 spd = (*scontrol >> 4) & 0xf;
457 *scontrol = (*scontrol & ~0xf0) | ((target & 0xf) << 4);
479 u32 scontrol;
481 if (sata_scr_read(link, SCR_CONTROL, &scontrol))
484 return __sata_set_spd_needed(link, &scontrol);
502 u32 scontrol;
505 if ((rc = sata_scr_read(link, SCR_CONTROL, &scontrol)))
508 if (!__sata_set_spd_needed(link, &scontrol))
511 if ((rc = sata_scr_write(link, SCR_CONTROL, scontrol)))
546 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)))