Lines Matching refs:state
835 /* Prevent setting state FL_SYNCING for chip in suspended state. */
839 switch (chip->state) {
891 chip->state = FL_ERASE_SUSPENDING;
910 /* Nobody will touch it while it's in state FL_ERASE_SUSPENDING.
913 chip->state = FL_STATUS;
920 chip->oldstate = chip->state;
921 chip->state = FL_READY;
952 || mode == FL_SHUTDOWN) && chip->state != FL_SYNCING) {
1004 * in FL_SYNCING state. Put contender and retry. */
1005 if (chip->state == FL_SYNCING) {
1086 As the state machine appears to explicitly allow
1093 chip->state = FL_ERASING;
1097 chip->state = chip->oldstate;
1136 if (chip->state != FL_POINT && chip->state != FL_READY) {
1138 chip->state = FL_READY;
1177 ((chip->state == FL_ERASING && (cfip->FeatureSupport&2)) ||
1178 (chip->state == FL_WRITING && (cfip->FeatureSupport&4))) &&
1208 oldstate = chip->state;
1220 chip->state = newstate;
1232 * a suspended erase state. If so let's wait
1236 while (chip->state != newstate) {
1251 chip->state = oldstate;
1296 int chip_state = chip->state;
1311 if (chip->state != chip_state) {
1339 chip->state = FL_STATUS;
1363 chip->state = FL_STATUS;
1389 if (chip->state != FL_POINT && chip->state != FL_READY)
1392 chip->state = FL_POINT;
1412 /* Now lock the chip(s) to POINT state */
1460 /* Now unlock the chip(s) POINT state */
1480 if (chip->state == FL_POINT) {
1483 chip->state = FL_READY;
1518 if (chip->state != FL_POINT && chip->state != FL_READY) {
1521 chip->state = FL_READY;
1601 chip->state = mode;
1765 if (chip->state != FL_STATUS) {
1767 chip->state = FL_STATUS;
1778 chip->state = FL_WRITING_TO_BUFFER;
1785 chip->state = FL_STATUS;
1845 chip->state = FL_WRITING;
1853 chip->state = FL_STATUS;
1932 /* Be nice and reschedule with the chip in a usable state for other
1980 chip->state = FL_ERASING;
1991 chip->state = FL_STATUS;
1999 chip->state = FL_STATUS;
2063 chip->oldstate = chip->state;
2064 chip->state = FL_SYNCING;
2065 /* No need to wake_up() on this state change -
2080 if (chip->state == FL_SYNCING) {
2081 chip->state = chip->oldstate;
2100 chip->state = FL_JEDEC_QUERY;
2144 chip->state = FL_LOCKING;
2147 chip->state = FL_UNLOCKING;
2168 chip->state = FL_STATUS;
2260 if (chip->state != FL_JEDEC_QUERY) {
2262 chip->state = FL_JEDEC_QUERY;
2543 switch (chip->state) {
2549 /* place the chip in a known state before suspend */
2551 chip->oldstate = chip->state;
2552 chip->state = FL_PM_SUSPENDED;
2553 /* No need to wake_up() on this state change -
2568 printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->state);
2585 if (chip->state == FL_PM_SUSPENDED) {
2586 /* No need to force it into a known state here,
2589 chip->state = chip->oldstate;
2634 /* Go to known state. Chip may have been power cycled */
2635 if (chip->state == FL_PM_SUSPENDED) {
2639 chip->oldstate = chip->state = FL_READY;
2667 chip->state = FL_SHUTDOWN;