X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fscsi%2Fqla1280.c;h=1548d42a3b4390781320fde64dddec2ae4316b8b;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=332151e2a0189eb57a529eb4461afc218811a492;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/drivers/scsi/qla1280.c b/drivers/scsi/qla1280.c index 332151e2a..1548d42a3 100644 --- a/drivers/scsi/qla1280.c +++ b/drivers/scsi/qla1280.c @@ -931,11 +931,10 @@ qla1280_error_action(struct scsi_cmnd *cmd, enum action action) case BUS_RESET: if (qla1280_verbose) - printk(KERN_INFO "qla1280(%ld:%d): Issuing BUS " - "DEVICE RESET\n", ha->host_no, bus); - if (qla1280_bus_reset(ha, bus == 0)) + printk(KERN_INFO "qla1280(%ld:%d): Issued bus " + "reset.\n", ha->host_no, bus); + if (qla1280_bus_reset(ha, bus) == 0) result = SUCCESS; - break; case ADAPTER_RESET: @@ -1113,7 +1112,7 @@ qla1280_enable_intrs(struct scsi_qla_host *ha) * Handles the H/W interrupt **************************************************************************/ static irqreturn_t -qla1280_intr_handler(int irq, void *dev_id, struct pt_regs *regs) +qla1280_intr_handler(int irq, void *dev_id) { struct scsi_qla_host *ha; struct device_reg __iomem *reg; @@ -1342,7 +1341,7 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) int host_status = DID_ERROR; uint16_t comp_status = le16_to_cpu(sts->comp_status); uint16_t state_flags = le16_to_cpu(sts->state_flags); - uint16_t residual_length = le32_to_cpu(sts->residual_length); + uint32_t residual_length = le32_to_cpu(sts->residual_length); uint16_t scsi_status = le16_to_cpu(sts->scsi_status); #if DEBUG_QLA1280_INTR static char *reason[] = { @@ -1414,8 +1413,10 @@ qla1280_return_status(struct response * sts, struct scsi_cmnd *cp) "scsi: Underflow detected - retrying " "command.\n"); host_status = DID_ERROR; - } else + } else { + cp->resid = residual_length; host_status = DID_OK; + } break; default: @@ -2862,7 +2863,7 @@ qla1280_64bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8)); /* Set ISP command timeout. */ - pkt->timeout = cpu_to_le16(30); + pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ); /* Set device target ID and LUN */ pkt->lun = SCSI_LUN_32(cmd); @@ -3161,7 +3162,7 @@ qla1280_32bit_start_scsi(struct scsi_qla_host *ha, struct srb * sp) memset(((char *)pkt + 8), 0, (REQUEST_ENTRY_SIZE - 8)); /* Set ISP command timeout. */ - pkt->timeout = cpu_to_le16(30); + pkt->timeout = cpu_to_le16(cmd->timeout_per_command/HZ); /* Set device target ID and LUN */ pkt->lun = SCSI_LUN_32(cmd); @@ -4484,7 +4485,7 @@ qla1280_init(void) qla1280_setup(qla1280); #endif - return pci_module_init(&qla1280_pci_driver); + return pci_register_driver(&qla1280_pci_driver); } static void __exit