8 #include <linux/device.h>
11 #include <linux/list.h>
12 #include <linux/module.h>
13 #include <linux/sched.h>
15 #include <linux/wait.h>
22 #define ERROR_RETRIES 3
23 #define ERROR_DELAY_MS 5
24 #define FCP_TIMEOUT_MS 125
70 const void *
command,
unsigned int command_size,
71 void *
response,
unsigned int response_size,
72 unsigned int response_match_bytes)
75 int tcode,
ret, tries = 0;
84 spin_lock_irq(&transactions_lock);
86 spin_unlock_irq(&transactions_lock);
93 (
void *)command, command_size);
106 dev_err(&t.
unit->device,
"FCP command timed out\n");
112 spin_lock_irq(&transactions_lock);
114 spin_unlock_irq(&transactions_lock);
132 spin_lock_irq(&transactions_lock);
134 if (t->
unit == unit &&
140 spin_unlock_irq(&transactions_lock);
149 unsigned int mask,
i;
156 if ((mask & 1) && p1[i] != p2[i])
167 int tcode,
int destination,
int source,
169 void *
data,
size_t length,
void *callback_data)
174 if (length < 1 || (*(
const u8 *)data & 0xf0) !=
CTS_AVC)
180 if (device->
card != card ||
188 is_matching_response(t, data, length)) {
196 spin_unlock_irqrestore(&transactions_lock, flags);
201 .address_callback = fcp_response,
204 static int __init fcp_module_init(
void)
212 &response_register_region);
217 static void __exit fcp_module_exit(
void)
219 WARN_ON(!list_empty(&transactions));