patch-1.3.29 linux/drivers/scsi/scsi.h
Next file: linux/drivers/scsi/st.c
Previous file: linux/drivers/scsi/qlogic.c
Back to the patch index
Back to the overall index
- Lines: 62
- Date:
Fri Sep 22 08:30:32 1995
- Orig file:
v1.3.28/linux/drivers/scsi/scsi.h
- Orig date:
Mon Sep 18 14:54:02 1995
diff -u --recursive --new-file v1.3.28/linux/drivers/scsi/scsi.h linux/drivers/scsi/scsi.h
@@ -510,37 +510,37 @@
* that an interrupt may start another request, so we run this with interrupts
* turned off
*/
-#define INIT_SCSI_REQUEST \
- if (!CURRENT) {\
- CLEAR_INTR; \
+#define INIT_SCSI_REQUEST \
+ if (!CURRENT) { \
+ CLEAR_INTR; \
restore_flags(flags); \
- return; \
- } \
- if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \
- panic(DEVICE_NAME ": request list destroyed"); \
- if (CURRENT->bh) { \
- if (!CURRENT->bh->b_lock) \
- panic(DEVICE_NAME ": block not locked"); \
+ return; \
+ } \
+ if (MAJOR(CURRENT->rq_dev) != MAJOR_NR) \
+ panic(DEVICE_NAME ": request list destroyed");\
+ if (CURRENT->bh) { \
+ if (!CURRENT->bh->b_lock) \
+ panic(DEVICE_NAME ": block not locked"); \
}
#endif
#define SCSI_SLEEP(QUEUE, CONDITION) { \
- if (CONDITION) { \
+ if (CONDITION) { \
struct wait_queue wait = { current, NULL}; \
- add_wait_queue(QUEUE, &wait); \
- for(;;) { \
+ add_wait_queue(QUEUE, &wait); \
+ for(;;) { \
current->state = TASK_UNINTERRUPTIBLE; \
- if (CONDITION) { \
- if (intr_count) \
- panic("scsi: trying to call schedule() in interrupt" \
- ", file %s, line %d.\n", __FILE__, __LINE__); \
- schedule(); \
- } \
- else \
- break; \
- } \
- remove_wait_queue(QUEUE, &wait); \
- current->state = TASK_RUNNING; \
+ if (CONDITION) { \
+ if (intr_count) \
+ panic("scsi: trying to call schedule() in interrupt" \
+ ", file %s, line %d.\n", __FILE__, __LINE__); \
+ schedule(); \
+ } \
+ else \
+ break; \
+ } \
+ remove_wait_queue(QUEUE, &wait);\
+ current->state = TASK_RUNNING; \
}; }
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this