diff options
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 85387099aab2..71f1cad9b5f0 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -287,7 +287,6 @@ return_fib: | |||
287 | kfree(fib->hw_fib); | 287 | kfree(fib->hw_fib); |
288 | kfree(fib); | 288 | kfree(fib); |
289 | status = 0; | 289 | status = 0; |
290 | fibctx->jiffies = jiffies/HZ; | ||
291 | } else { | 290 | } else { |
292 | spin_unlock_irqrestore(&dev->fib_lock, flags); | 291 | spin_unlock_irqrestore(&dev->fib_lock, flags); |
293 | if (f.wait) { | 292 | if (f.wait) { |
@@ -302,6 +301,7 @@ return_fib: | |||
302 | status = -EAGAIN; | 301 | status = -EAGAIN; |
303 | } | 302 | } |
304 | } | 303 | } |
304 | fibctx->jiffies = jiffies/HZ; | ||
305 | return status; | 305 | return status; |
306 | } | 306 | } |
307 | 307 | ||
@@ -405,10 +405,20 @@ static int close_getadapter_fib(struct aac_dev * dev, void __user *arg) | |||
405 | static int check_revision(struct aac_dev *dev, void __user *arg) | 405 | static int check_revision(struct aac_dev *dev, void __user *arg) |
406 | { | 406 | { |
407 | struct revision response; | 407 | struct revision response; |
408 | 408 | char *driver_version = aac_driver_version; | |
409 | response.compat = 1; | 409 | u32 version; |
410 | response.version = le32_to_cpu(dev->adapter_info.kernelrev); | 410 | |
411 | response.build = le32_to_cpu(dev->adapter_info.kernelbuild); | 411 | response.compat = cpu_to_le32(1); |
412 | version = (simple_strtol(driver_version, | ||
413 | &driver_version, 10) << 24) | 0x00000400; | ||
414 | version += simple_strtol(driver_version + 1, &driver_version, 10) << 16; | ||
415 | version += simple_strtol(driver_version + 1, NULL, 10); | ||
416 | response.version = cpu_to_le32(version); | ||
417 | # if (defined(AAC_DRIVER_BUILD)) | ||
418 | response.build = cpu_to_le32(AAC_DRIVER_BUILD); | ||
419 | # else | ||
420 | response.build = cpu_to_le32(9999); | ||
421 | # endif | ||
412 | 422 | ||
413 | if (copy_to_user(arg, &response, sizeof(response))) | 423 | if (copy_to_user(arg, &response, sizeof(response))) |
414 | return -EFAULT; | 424 | return -EFAULT; |