You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
41 int eh_state; /* Used for state tracking in error handlr */<br />
42 int eh_eflags; /* Used by error handlr */<br />
43 void (*done) (struct scsi_cmnd *); /* Mid-level done function */<br />
44<br />
45 /*<br />
46 * A SCSI Command is assigned a nonzero serial_number when<br />
internal_cmnd<br />
47 * passes it to the driver's queue command function. The serial_number<br />
48 * is cleared when scsi_done is entered indicating that the command has<br />
49 * been completed. If a timeout occurs, the serial number at the moment<br />
50 * <strong>of</strong> timeout is copied into serial_number_at_timeout. By subsequently<br />
51 * comparing the serial_number and serial_number_at_timeout fields<br />
52 * during abort or reset processing, we can detect whether the command<br />
53 * has already completed. This also detects cases where the command has<br />
54 * completed and the SCSI Command structure has already being reused<br />
55 * for another command, so that we can avoid incorrectly aborting or<br />
56 * resetting the new command.<br />
57 */<br />
58 unsigned long serial_number;<br />
59 unsigned long serial_number_at_timeout;<br />
60<br />
61 int retries;<br />
62 int allowed;<br />
63 int timeout_per_command;<br />
64 int timeout_total;<br />
65 int timeout;<br />
66<br />
67 /*<br />
68 * We handle the timeout differently if it happens when a reset,<br />
69 * abort, etc are in process.<br />
70 */<br />
71 unsigned volatile char internal_timeout;<br />
72<br />
73 unsigned char cmd_len;<br />
74 unsigned char old_cmd_len;<br />
75 enum dma_data_direction sc_data_direction;<br />
76 enum dma_data_direction sc_old_data_direction;<br />
77<br />
78 /* These elements define the operation we are about to perform */<br />
79 #define MAX_COMMAND_SIZE 16<br />
121<br />
80 unsigned char cmnd[MAX_COMMAND_SIZE];<br />
81 unsigned request_bufflen; /* Actual request size */<br />
82