diff options
author | Mark Haverkamp <markh@osdl.org> | 2005-08-03 18:38:55 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-05 17:50:26 -0400 |
commit | c7f476023f57145357df32346b7de9202ce47d5f (patch) | |
tree | a73d27c245d024ea9e0e0651d3ca524ef74ba9b5 /drivers | |
parent | bed30de47b034b5f28fb7db2fae4860b9d9c0622 (diff) |
[SCSI] aacraid: driver version update
Received from Mark Salyzyn from Adaptec.
Fixes a bug in check_revision. It should return the driver version not
the firmware version.
Update driver version number.
Update driver version string.
Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 8 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 18 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 21 |
3 files changed, 35 insertions, 12 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 3a11a536c0da..ddbbb85b3a7c 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -1512,11 +1512,12 @@ struct fib_ioctl | |||
1512 | 1512 | ||
1513 | struct revision | 1513 | struct revision |
1514 | { | 1514 | { |
1515 | u32 compat; | 1515 | __le32 compat; |
1516 | u32 version; | 1516 | __le32 version; |
1517 | u32 build; | 1517 | __le32 build; |
1518 | }; | 1518 | }; |
1519 | 1519 | ||
1520 | |||
1520 | /* | 1521 | /* |
1521 | * Ugly - non Linux like ioctl coding for back compat. | 1522 | * Ugly - non Linux like ioctl coding for back compat. |
1522 | */ | 1523 | */ |
@@ -1737,3 +1738,4 @@ int aac_get_adapter_info(struct aac_dev* dev); | |||
1737 | int aac_send_shutdown(struct aac_dev *dev); | 1738 | int aac_send_shutdown(struct aac_dev *dev); |
1738 | extern int numacb; | 1739 | extern int numacb; |
1739 | extern int acbsize; | 1740 | extern int acbsize; |
1741 | extern char aac_driver_version[]; | ||
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 85387099aab2..8fceff9be1be 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -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; |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c1a4f978fcba..b6dda99f5083 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -27,8 +27,11 @@ | |||
27 | * Abstract: Linux Driver entry module for Adaptec RAID Array Controller | 27 | * Abstract: Linux Driver entry module for Adaptec RAID Array Controller |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #define AAC_DRIVER_VERSION "1.1.2-lk2" | 30 | #define AAC_DRIVER_VERSION "1.1-4" |
31 | #define AAC_DRIVER_BUILD_DATE __DATE__ | 31 | #ifndef AAC_DRIVER_BRANCH |
32 | #define AAC_DRIVER_BRANCH "" | ||
33 | #endif | ||
34 | #define AAC_DRIVER_BUILD_DATE __DATE__ " " __TIME__ | ||
32 | #define AAC_DRIVERNAME "aacraid" | 35 | #define AAC_DRIVERNAME "aacraid" |
33 | 36 | ||
34 | #include <linux/compat.h> | 37 | #include <linux/compat.h> |
@@ -58,16 +61,24 @@ | |||
58 | 61 | ||
59 | #include "aacraid.h" | 62 | #include "aacraid.h" |
60 | 63 | ||
64 | #ifdef AAC_DRIVER_BUILD | ||
65 | #define _str(x) #x | ||
66 | #define str(x) _str(x) | ||
67 | #define AAC_DRIVER_FULL_VERSION AAC_DRIVER_VERSION "[" str(AAC_DRIVER_BUILD) "]" AAC_DRIVER_BRANCH | ||
68 | #else | ||
69 | #define AAC_DRIVER_FULL_VERSION AAC_DRIVER_VERSION AAC_DRIVER_BRANCH " " AAC_DRIVER_BUILD_DATE | ||
70 | #endif | ||
61 | 71 | ||
62 | MODULE_AUTHOR("Red Hat Inc and Adaptec"); | 72 | MODULE_AUTHOR("Red Hat Inc and Adaptec"); |
63 | MODULE_DESCRIPTION("Dell PERC2, 2/Si, 3/Si, 3/Di, " | 73 | MODULE_DESCRIPTION("Dell PERC2, 2/Si, 3/Si, 3/Di, " |
64 | "Adaptec Advanced Raid Products, " | 74 | "Adaptec Advanced Raid Products, " |
65 | "and HP NetRAID-4M SCSI driver"); | 75 | "and HP NetRAID-4M SCSI driver"); |
66 | MODULE_LICENSE("GPL"); | 76 | MODULE_LICENSE("GPL"); |
67 | MODULE_VERSION(AAC_DRIVER_VERSION); | 77 | MODULE_VERSION(AAC_DRIVER_FULL_VERSION); |
68 | 78 | ||
69 | static LIST_HEAD(aac_devices); | 79 | static LIST_HEAD(aac_devices); |
70 | static int aac_cfg_major = -1; | 80 | static int aac_cfg_major = -1; |
81 | char aac_driver_version[] = AAC_DRIVER_FULL_VERSION; | ||
71 | 82 | ||
72 | /* | 83 | /* |
73 | * Because of the way Linux names scsi devices, the order in this table has | 84 | * Because of the way Linux names scsi devices, the order in this table has |
@@ -896,8 +907,8 @@ static int __init aac_init(void) | |||
896 | { | 907 | { |
897 | int error; | 908 | int error; |
898 | 909 | ||
899 | printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n", | 910 | printk(KERN_INFO "Adaptec %s driver (%s)\n", |
900 | AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE); | 911 | AAC_DRIVERNAME, aac_driver_version); |
901 | 912 | ||
902 | error = pci_module_init(&aac_pci_driver); | 913 | error = pci_module_init(&aac_pci_driver); |
903 | if (error) | 914 | if (error) |