Lines Matching refs:state
833 /* Prevent setting state FL_SYNCING for chip in suspended state. */
837 switch (chip->state) {
889 chip->state = FL_ERASE_SUSPENDING;
908 /* Nobody will touch it while it's in state FL_ERASE_SUSPENDING.
911 chip->state = FL_STATUS;
918 chip->oldstate = chip->state;
919 chip->state = FL_READY;
950 || mode == FL_SHUTDOWN) && chip->state != FL_SYNCING) {
1002 * in FL_SYNCING state. Put contender and retry. */
1003 if (chip->state == FL_SYNCING) {
1084 As the state machine appears to explicitly allow
1091 chip->state = FL_ERASING;
1095 chip->state = chip->oldstate;
1134 if (chip->state != FL_POINT && chip->state != FL_READY) {
1136 chip->state = FL_READY;
1175 ((chip->state == FL_ERASING && (cfip->FeatureSupport&2)) ||
1176 (chip->state == FL_WRITING && (cfip->FeatureSupport&4))) &&
1206 oldstate = chip->state;
1218 chip->state = newstate;
1230 * a suspended erase state. If so let's wait
1234 while (chip->state != newstate) {
1249 chip->state = oldstate;
1294 int chip_state = chip->state;
1309 if (chip->state != chip_state) {
1337 chip->state = FL_STATUS;
1361 chip->state = FL_STATUS;
1387 if (chip->state != FL_POINT && chip->state != FL_READY)
1390 chip->state = FL_POINT;
1410 /* Now lock the chip(s) to POINT state */
1458 /* Now unlock the chip(s) POINT state */
1478 if (chip->state == FL_POINT) {
1481 chip->state = FL_READY;
1516 if (chip->state != FL_POINT && chip->state != FL_READY) {
1519 chip->state = FL_READY;
1599 chip->state = mode;
1763 if (chip->state != FL_STATUS) {
1765 chip->state = FL_STATUS;
1776 chip->state = FL_WRITING_TO_BUFFER;
1783 chip->state = FL_STATUS;
1843 chip->state = FL_WRITING;
1851 chip->state = FL_STATUS;
1930 /* Be nice and reschedule with the chip in a usable state for other
1978 chip->state = FL_ERASING;
1989 chip->state = FL_STATUS;
1997 chip->state = FL_STATUS;
2061 chip->oldstate = chip->state;
2062 chip->state = FL_SYNCING;
2063 /* No need to wake_up() on this state change -
2078 if (chip->state == FL_SYNCING) {
2079 chip->state = chip->oldstate;
2098 chip->state = FL_JEDEC_QUERY;
2142 chip->state = FL_LOCKING;
2145 chip->state = FL_UNLOCKING;
2166 chip->state = FL_STATUS;
2258 if (chip->state != FL_JEDEC_QUERY) {
2260 chip->state = FL_JEDEC_QUERY;
2541 switch (chip->state) {
2547 /* place the chip in a known state before suspend */
2549 chip->oldstate = chip->state;
2550 chip->state = FL_PM_SUSPENDED;
2551 /* No need to wake_up() on this state change -
2566 printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->state);
2582 if (chip->state == FL_PM_SUSPENDED) {
2583 /* No need to force it into a known state here,
2586 chip->state = chip->oldstate;
2631 /* Go to known state. Chip may have been power cycled */
2632 if (chip->state == FL_PM_SUSPENDED) {
2636 chip->oldstate = chip->state = FL_READY;
2664 chip->state = FL_SHUTDOWN;