aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r--drivers/block/cciss.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index dc38368435aa..12de1fdaa6c6 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -3409,7 +3409,8 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3409 int i; 3409 int i;
3410 int j = 0; 3410 int j = 0;
3411 int rc; 3411 int rc;
3412 int dac; 3412 int dac, return_code;
3413 InquiryData_struct *inq_buff = NULL;
3413 3414
3414 i = alloc_cciss_hba(); 3415 i = alloc_cciss_hba();
3415 if (i < 0) 3416 if (i < 0)
@@ -3515,6 +3516,25 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3515 /* Turn the interrupts on so we can service requests */ 3516 /* Turn the interrupts on so we can service requests */
3516 hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON); 3517 hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON);
3517 3518
3519 /* Get the firmware version */
3520 inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
3521 if (inq_buff == NULL) {
3522 printk(KERN_ERR "cciss: out of memory\n");
3523 goto clean4;
3524 }
3525
3526 return_code = sendcmd_withirq(CISS_INQUIRY, i, inq_buff,
3527 sizeof(InquiryData_struct), 0, 0 , 0, TYPE_CMD);
3528 if (return_code == IO_OK) {
3529 hba[i]->firm_ver[0] = inq_buff->data_byte[32];
3530 hba[i]->firm_ver[1] = inq_buff->data_byte[33];
3531 hba[i]->firm_ver[2] = inq_buff->data_byte[34];
3532 hba[i]->firm_ver[3] = inq_buff->data_byte[35];
3533 } else { /* send command failed */
3534 printk(KERN_WARNING "cciss: unable to determine firmware"
3535 " version of controller\n");
3536 }
3537
3518 cciss_procinit(i); 3538 cciss_procinit(i);
3519 3539
3520 hba[i]->cciss_max_sectors = 2048; 3540 hba[i]->cciss_max_sectors = 2048;
@@ -3525,6 +3545,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
3525 return 1; 3545 return 1;
3526 3546
3527clean4: 3547clean4:
3548 kfree(inq_buff);
3528#ifdef CONFIG_CISS_SCSI_TAPE 3549#ifdef CONFIG_CISS_SCSI_TAPE
3529 kfree(hba[i]->scsi_rejects.complete); 3550 kfree(hba[i]->scsi_rejects.complete);
3530#endif 3551#endif