diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 23:32:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 23:32:16 -0400 |
commit | 6ec129c3a2f8b38bc37e42348470ccfcb7460146 (patch) | |
tree | 3f11a99b9680728951b371fe12b5e01b6fc545a4 /drivers/scsi/dpt_i2o.c | |
parent | 01e73be3c8f254ef19d787f9b6757468175267eb (diff) | |
parent | b64ddf96456cde17be22bf74cafed381a29d58ba (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (58 commits)
[SCSI] zfcp: clear boxed flag on unit reopen.
[SCSI] zfcp: clear adapter failed flag if an fsf request times out.
[SCSI] zfcp: rework request ID management.
[SCSI] zfcp: Fix deadlock between zfcp ERP and SCSI
[SCSI] zfcp: Locking for req_no and req_seq_no
[SCSI] zfcp: print S_ID and D_ID with 3 bytes
[SCSI] ipr: Use PCI-E reset API for new ipr adapter
[SCSI] qla2xxx: Update version number to 8.01.07-k7.
[SCSI] qla2xxx: Add MSI support.
[SCSI] qla2xxx: Correct pci_set_msi() usage semantics.
[SCSI] qla2xxx: Attempt to stop firmware only if it had been previously executed.
[SCSI] qla2xxx: Honor NVRAM port-down-retry-count settings.
[SCSI] qla2xxx: Error-out during probe() if we're unable to complete HBA initialization.
[SCSI] zfcp: Stop system after memory corruption
[SCSI] mesh: cleanup variable usage in interrupt handler
[SCSI] megaraid: replace yield() with cond_resched()
[SCSI] megaraid: fix warnings when CONFIG_PROC_FS=n
[SCSI] aacraid: correct SUN products to README
[SCSI] aacraid: superfluous adapter reset for IBM 8 series ServeRAID controllers
[SCSI] aacraid: kexec fix (reset interrupt handler)
...
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index fb6433a56989..8c7d2bbf9b1a 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -1308,13 +1308,12 @@ static s32 adpt_i2o_reset_hba(adpt_hba* pHba) | |||
1308 | schedule_timeout_uninterruptible(1); | 1308 | schedule_timeout_uninterruptible(1); |
1309 | } while (m == EMPTY_QUEUE); | 1309 | } while (m == EMPTY_QUEUE); |
1310 | 1310 | ||
1311 | status = kmalloc(4, GFP_KERNEL|ADDR32); | 1311 | status = kzalloc(4, GFP_KERNEL|ADDR32); |
1312 | if(status == NULL) { | 1312 | if(status == NULL) { |
1313 | adpt_send_nop(pHba, m); | 1313 | adpt_send_nop(pHba, m); |
1314 | printk(KERN_ERR"IOP reset failed - no free memory.\n"); | 1314 | printk(KERN_ERR"IOP reset failed - no free memory.\n"); |
1315 | return -ENOMEM; | 1315 | return -ENOMEM; |
1316 | } | 1316 | } |
1317 | memset(status,0,4); | ||
1318 | 1317 | ||
1319 | msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; | 1318 | msg[0]=EIGHT_WORD_MSG_SIZE|SGL_OFFSET_0; |
1320 | msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; | 1319 | msg[1]=I2O_CMD_ADAPTER_RESET<<24|HOST_TID<<12|ADAPTER_TID; |
@@ -1504,21 +1503,19 @@ static int adpt_i2o_parse_lct(adpt_hba* pHba) | |||
1504 | continue; | 1503 | continue; |
1505 | } | 1504 | } |
1506 | if( pHba->channel[bus_no].device[scsi_id] == NULL){ | 1505 | if( pHba->channel[bus_no].device[scsi_id] == NULL){ |
1507 | pDev = kmalloc(sizeof(struct adpt_device),GFP_KERNEL); | 1506 | pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); |
1508 | if(pDev == NULL) { | 1507 | if(pDev == NULL) { |
1509 | return -ENOMEM; | 1508 | return -ENOMEM; |
1510 | } | 1509 | } |
1511 | pHba->channel[bus_no].device[scsi_id] = pDev; | 1510 | pHba->channel[bus_no].device[scsi_id] = pDev; |
1512 | memset(pDev,0,sizeof(struct adpt_device)); | ||
1513 | } else { | 1511 | } else { |
1514 | for( pDev = pHba->channel[bus_no].device[scsi_id]; | 1512 | for( pDev = pHba->channel[bus_no].device[scsi_id]; |
1515 | pDev->next_lun; pDev = pDev->next_lun){ | 1513 | pDev->next_lun; pDev = pDev->next_lun){ |
1516 | } | 1514 | } |
1517 | pDev->next_lun = kmalloc(sizeof(struct adpt_device),GFP_KERNEL); | 1515 | pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); |
1518 | if(pDev->next_lun == NULL) { | 1516 | if(pDev->next_lun == NULL) { |
1519 | return -ENOMEM; | 1517 | return -ENOMEM; |
1520 | } | 1518 | } |
1521 | memset(pDev->next_lun,0,sizeof(struct adpt_device)); | ||
1522 | pDev = pDev->next_lun; | 1519 | pDev = pDev->next_lun; |
1523 | } | 1520 | } |
1524 | pDev->tid = tid; | 1521 | pDev->tid = tid; |
@@ -1667,12 +1664,11 @@ static int adpt_i2o_passthru(adpt_hba* pHba, u32 __user *arg) | |||
1667 | reply_size = REPLY_FRAME_SIZE; | 1664 | reply_size = REPLY_FRAME_SIZE; |
1668 | } | 1665 | } |
1669 | reply_size *= 4; | 1666 | reply_size *= 4; |
1670 | reply = kmalloc(REPLY_FRAME_SIZE*4, GFP_KERNEL); | 1667 | reply = kzalloc(REPLY_FRAME_SIZE*4, GFP_KERNEL); |
1671 | if(reply == NULL) { | 1668 | if(reply == NULL) { |
1672 | printk(KERN_WARNING"%s: Could not allocate reply buffer\n",pHba->name); | 1669 | printk(KERN_WARNING"%s: Could not allocate reply buffer\n",pHba->name); |
1673 | return -ENOMEM; | 1670 | return -ENOMEM; |
1674 | } | 1671 | } |
1675 | memset(reply,0,REPLY_FRAME_SIZE*4); | ||
1676 | sg_offset = (msg[0]>>4)&0xf; | 1672 | sg_offset = (msg[0]>>4)&0xf; |
1677 | msg[2] = 0x40000000; // IOCTL context | 1673 | msg[2] = 0x40000000; // IOCTL context |
1678 | msg[3] = (u32)reply; | 1674 | msg[3] = (u32)reply; |
@@ -2444,7 +2440,7 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba) | |||
2444 | } | 2440 | } |
2445 | pDev = pHba->channel[bus_no].device[scsi_id]; | 2441 | pDev = pHba->channel[bus_no].device[scsi_id]; |
2446 | if( pDev == NULL){ | 2442 | if( pDev == NULL){ |
2447 | pDev = kmalloc(sizeof(struct adpt_device),GFP_KERNEL); | 2443 | pDev = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); |
2448 | if(pDev == NULL) { | 2444 | if(pDev == NULL) { |
2449 | return -ENOMEM; | 2445 | return -ENOMEM; |
2450 | } | 2446 | } |
@@ -2453,12 +2449,11 @@ static s32 adpt_i2o_reparse_lct(adpt_hba* pHba) | |||
2453 | while (pDev->next_lun) { | 2449 | while (pDev->next_lun) { |
2454 | pDev = pDev->next_lun; | 2450 | pDev = pDev->next_lun; |
2455 | } | 2451 | } |
2456 | pDev = pDev->next_lun = kmalloc(sizeof(struct adpt_device),GFP_KERNEL); | 2452 | pDev = pDev->next_lun = kzalloc(sizeof(struct adpt_device),GFP_KERNEL); |
2457 | if(pDev == NULL) { | 2453 | if(pDev == NULL) { |
2458 | return -ENOMEM; | 2454 | return -ENOMEM; |
2459 | } | 2455 | } |
2460 | } | 2456 | } |
2461 | memset(pDev,0,sizeof(struct adpt_device)); | ||
2462 | pDev->tid = d->lct_data.tid; | 2457 | pDev->tid = d->lct_data.tid; |
2463 | pDev->scsi_channel = bus_no; | 2458 | pDev->scsi_channel = bus_no; |
2464 | pDev->scsi_id = scsi_id; | 2459 | pDev->scsi_id = scsi_id; |