Automatic merge of rsync://www.parisc-linux.org/~jejb/git/scsi-for-linus-2.6

+14 -11
+13 -11
drivers/scsi/qla2xxx/qla_os.c
··· 507 int ret, i; 508 unsigned int id, lun; 509 unsigned long serial; 510 511 if (!CMD_SP(cmd)) 512 return FAILED; ··· 520 521 /* Check active list for command command. */ 522 spin_unlock_irq(ha->host->host_lock); 523 - spin_lock(&ha->hardware_lock); 524 for (i = 1; i < MAX_OUTSTANDING_COMMANDS; i++) { 525 sp = ha->outstanding_cmds[i]; 526 ··· 535 sp->state)); 536 DEBUG3(qla2x00_print_scsi_cmd(cmd);) 537 538 - spin_unlock(&ha->hardware_lock); 539 if (qla2x00_abort_command(ha, sp)) { 540 DEBUG2(printk("%s(%ld): abort_command " 541 "mbx failed.\n", __func__, ha->host_no)); ··· 544 "mbx success.\n", __func__, ha->host_no)); 545 ret = SUCCESS; 546 } 547 - spin_lock(&ha->hardware_lock); 548 549 break; 550 } 551 552 /* Wait for the command to be returned. */ 553 if (ret == SUCCESS) { 554 - spin_unlock(&ha->hardware_lock); 555 if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { 556 qla_printk(KERN_ERR, ha, 557 "scsi(%ld:%d:%d): Abort handler timed out -- %lx " 558 "%x.\n", ha->host_no, id, lun, serial, ret); 559 } 560 - spin_lock(&ha->hardware_lock); 561 } 562 spin_lock_irq(ha->host->host_lock); 563 ··· 588 int status; 589 srb_t *sp; 590 struct scsi_cmnd *cmd; 591 592 status = 0; 593 ··· 597 * array 598 */ 599 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 600 - spin_lock(&ha->hardware_lock); 601 sp = ha->outstanding_cmds[cnt]; 602 if (sp) { 603 cmd = sp->cmd; 604 - spin_unlock(&ha->hardware_lock); 605 if (cmd->device->id == t) { 606 if (!qla2x00_eh_wait_on_command(ha, cmd)) { 607 status = 1; ··· 609 } 610 } 611 } else { 612 - spin_unlock(&ha->hardware_lock); 613 } 614 } 615 return (status); ··· 741 int status; 742 srb_t *sp; 743 struct scsi_cmnd *cmd; 744 745 status = 1; 746 ··· 750 * array 751 */ 752 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 753 - spin_lock(&ha->hardware_lock); 754 sp = ha->outstanding_cmds[cnt]; 755 if (sp) { 756 cmd = sp->cmd; 757 - spin_unlock(&ha->hardware_lock); 758 status = qla2x00_eh_wait_on_command(ha, cmd); 759 if (status == 0) 760 break; 761 } 762 else { 763 - spin_unlock(&ha->hardware_lock); 764 } 765 } 766 return (status);
··· 507 int ret, i; 508 unsigned int id, lun; 509 unsigned long serial; 510 + unsigned long flags; 511 512 if (!CMD_SP(cmd)) 513 return FAILED; ··· 519 520 /* Check active list for command command. */ 521 spin_unlock_irq(ha->host->host_lock); 522 + spin_lock_irqsave(&ha->hardware_lock, flags); 523 for (i = 1; i < MAX_OUTSTANDING_COMMANDS; i++) { 524 sp = ha->outstanding_cmds[i]; 525 ··· 534 sp->state)); 535 DEBUG3(qla2x00_print_scsi_cmd(cmd);) 536 537 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 538 if (qla2x00_abort_command(ha, sp)) { 539 DEBUG2(printk("%s(%ld): abort_command " 540 "mbx failed.\n", __func__, ha->host_no)); ··· 543 "mbx success.\n", __func__, ha->host_no)); 544 ret = SUCCESS; 545 } 546 + spin_lock_irqsave(&ha->hardware_lock, flags); 547 548 break; 549 } 550 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 551 552 /* Wait for the command to be returned. */ 553 if (ret == SUCCESS) { 554 if (qla2x00_eh_wait_on_command(ha, cmd) != QLA_SUCCESS) { 555 qla_printk(KERN_ERR, ha, 556 "scsi(%ld:%d:%d): Abort handler timed out -- %lx " 557 "%x.\n", ha->host_no, id, lun, serial, ret); 558 } 559 } 560 spin_lock_irq(ha->host->host_lock); 561 ··· 588 int status; 589 srb_t *sp; 590 struct scsi_cmnd *cmd; 591 + unsigned long flags; 592 593 status = 0; 594 ··· 596 * array 597 */ 598 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 599 + spin_lock_irqsave(&ha->hardware_lock, flags); 600 sp = ha->outstanding_cmds[cnt]; 601 if (sp) { 602 cmd = sp->cmd; 603 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 604 if (cmd->device->id == t) { 605 if (!qla2x00_eh_wait_on_command(ha, cmd)) { 606 status = 1; ··· 608 } 609 } 610 } else { 611 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 612 } 613 } 614 return (status); ··· 740 int status; 741 srb_t *sp; 742 struct scsi_cmnd *cmd; 743 + unsigned long flags; 744 745 status = 1; 746 ··· 748 * array 749 */ 750 for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { 751 + spin_lock_irqsave(&ha->hardware_lock, flags); 752 sp = ha->outstanding_cmds[cnt]; 753 if (sp) { 754 cmd = sp->cmd; 755 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 756 status = qla2x00_eh_wait_on_command(ha, cmd); 757 if (status == 0) 758 break; 759 } 760 else { 761 + spin_unlock_irqrestore(&ha->hardware_lock, flags); 762 } 763 } 764 return (status);
+1
drivers/scsi/scsi_scan.c
··· 1197 if (!starget) 1198 return ERR_PTR(-ENOMEM); 1199 1200 down(&shost->scan_mutex); 1201 res = scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); 1202 if (res != SCSI_SCAN_LUN_PRESENT)
··· 1197 if (!starget) 1198 return ERR_PTR(-ENOMEM); 1199 1200 + get_device(&starget->dev); 1201 down(&shost->scan_mutex); 1202 res = scsi_probe_and_add_lun(starget, lun, NULL, &sdev, 1, hostdata); 1203 if (res != SCSI_SCAN_LUN_PRESENT)