Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118430
b: refs/heads/master
c: 22bece0
h: refs/heads/master
v: v3
  • Loading branch information
Mike Miller authored and Linus Torvalds committed Nov 6, 2008
1 parent 78c7f03 commit b116a7e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 404443081ce5e6f68b5f7eda16c959835ff200c0
refs/heads/master: 22bece00dc1f28dd3374c55e464c9f02eb642876
23 changes: 22 additions & 1 deletion trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3409,7 +3409,8 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
int i;
int j = 0;
int rc;
int dac;
int dac, return_code;
InquiryData_struct *inq_buff = NULL;

i = alloc_cciss_hba();
if (i < 0)
Expand Down Expand Up @@ -3515,6 +3516,25 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
/* Turn the interrupts on so we can service requests */
hba[i]->access.set_intr_mask(hba[i], CCISS_INTR_ON);

/* Get the firmware version */
inq_buff = kzalloc(sizeof(InquiryData_struct), GFP_KERNEL);
if (inq_buff == NULL) {
printk(KERN_ERR "cciss: out of memory\n");
goto clean4;
}

return_code = sendcmd_withirq(CISS_INQUIRY, i, inq_buff,
sizeof(InquiryData_struct), 0, 0 , 0, TYPE_CMD);
if (return_code == IO_OK) {
hba[i]->firm_ver[0] = inq_buff->data_byte[32];
hba[i]->firm_ver[1] = inq_buff->data_byte[33];
hba[i]->firm_ver[2] = inq_buff->data_byte[34];
hba[i]->firm_ver[3] = inq_buff->data_byte[35];
} else { /* send command failed */
printk(KERN_WARNING "cciss: unable to determine firmware"
" version of controller\n");
}

cciss_procinit(i);

hba[i]->cciss_max_sectors = 2048;
Expand All @@ -3525,6 +3545,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
return 1;

clean4:
kfree(inq_buff);
#ifdef CONFIG_CISS_SCSI_TAPE
kfree(hba[i]->scsi_rejects.complete);
#endif
Expand Down

0 comments on commit b116a7e

Please sign in to comment.