diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 65cbe2f5eea2..3ba8c239f171 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -589,6 +589,23 @@ qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) | |||
589 | return (return_status); | 589 | return (return_status); |
590 | } | 590 | } |
591 | 591 | ||
592 | static void | ||
593 | qla2x00_block_error_handler(struct scsi_cmnd *cmnd) | ||
594 | { | ||
595 | struct Scsi_Host *shost = cmnd->device->host; | ||
596 | struct fc_rport *rport = starget_to_rport(scsi_target(cmnd->device)); | ||
597 | unsigned long flags; | ||
598 | |||
599 | spin_lock_irqsave(shost->host_lock, flags); | ||
600 | while (rport->port_state == FC_PORTSTATE_BLOCKED) { | ||
601 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
602 | msleep(1000); | ||
603 | spin_lock_irqsave(shost->host_lock, flags); | ||
604 | } | ||
605 | spin_unlock_irqrestore(shost->host_lock, flags); | ||
606 | return; | ||
607 | } | ||
608 | |||
592 | /************************************************************************** | 609 | /************************************************************************** |
593 | * qla2xxx_eh_abort | 610 | * qla2xxx_eh_abort |
594 | * | 611 | * |
@@ -615,6 +632,8 @@ qla2xxx_eh_abort(struct scsi_cmnd *cmd) | |||
615 | unsigned long flags; | 632 | unsigned long flags; |
616 | int wait = 0; | 633 | int wait = 0; |
617 | 634 | ||
635 | qla2x00_block_error_handler(cmd); | ||
636 | |||
618 | if (!CMD_SP(cmd)) | 637 | if (!CMD_SP(cmd)) |
619 | return SUCCESS; | 638 | return SUCCESS; |
620 | 639 | ||
@@ -748,6 +767,8 @@ qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) | |||
748 | unsigned int id, lun; | 767 | unsigned int id, lun; |
749 | unsigned long serial; | 768 | unsigned long serial; |
750 | 769 | ||
770 | qla2x00_block_error_handler(cmd); | ||
771 | |||
751 | ret = FAILED; | 772 | ret = FAILED; |
752 | 773 | ||
753 | id = cmd->device->id; | 774 | id = cmd->device->id; |
@@ -877,6 +898,8 @@ qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) | |||
877 | unsigned int id, lun; | 898 | unsigned int id, lun; |
878 | unsigned long serial; | 899 | unsigned long serial; |
879 | 900 | ||
901 | qla2x00_block_error_handler(cmd); | ||
902 | |||
880 | ret = FAILED; | 903 | ret = FAILED; |
881 | 904 | ||
882 | id = cmd->device->id; | 905 | id = cmd->device->id; |
@@ -936,6 +959,8 @@ qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) | |||
936 | unsigned int id, lun; | 959 | unsigned int id, lun; |
937 | unsigned long serial; | 960 | unsigned long serial; |
938 | 961 | ||
962 | qla2x00_block_error_handler(cmd); | ||
963 | |||
939 | ret = FAILED; | 964 | ret = FAILED; |
940 | 965 | ||
941 | id = cmd->device->id; | 966 | id = cmd->device->id; |
@@ -1385,7 +1410,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1385 | ha->prev_topology = 0; | 1410 | ha->prev_topology = 0; |
1386 | ha->init_cb_size = sizeof(init_cb_t); | 1411 | ha->init_cb_size = sizeof(init_cb_t); |
1387 | ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; | 1412 | ha->mgmt_svr_loop_id = MANAGEMENT_SERVER; |
1388 | ha->link_data_rate = LDR_UNKNOWN; | 1413 | ha->link_data_rate = PORT_SPEED_UNKNOWN; |
1389 | ha->optrom_size = OPTROM_SIZE_2300; | 1414 | ha->optrom_size = OPTROM_SIZE_2300; |
1390 | 1415 | ||
1391 | /* Assign ISP specific operations. */ | 1416 | /* Assign ISP specific operations. */ |
@@ -2564,14 +2589,20 @@ qla2x00_down_timeout(struct semaphore *sema, unsigned long timeout) | |||
2564 | #define FW_ISP2322 3 | 2589 | #define FW_ISP2322 3 |
2565 | #define FW_ISP24XX 4 | 2590 | #define FW_ISP24XX 4 |
2566 | 2591 | ||
2592 | #define FW_FILE_ISP21XX "ql2100_fw.bin" | ||
2593 | #define FW_FILE_ISP22XX "ql2200_fw.bin" | ||
2594 | #define FW_FILE_ISP2300 "ql2300_fw.bin" | ||
2595 | #define FW_FILE_ISP2322 "ql2322_fw.bin" | ||
2596 | #define FW_FILE_ISP24XX "ql2400_fw.bin" | ||
2597 | |||
2567 | static DECLARE_MUTEX(qla_fw_lock); | 2598 | static DECLARE_MUTEX(qla_fw_lock); |
2568 | 2599 | ||
2569 | static struct fw_blob qla_fw_blobs[FW_BLOBS] = { | 2600 | static struct fw_blob qla_fw_blobs[FW_BLOBS] = { |
2570 | { .name = "ql2100_fw.bin", .segs = { 0x1000, 0 }, }, | 2601 | { .name = FW_FILE_ISP21XX, .segs = { 0x1000, 0 }, }, |
2571 | { .name = "ql2200_fw.bin", .segs = { 0x1000, 0 }, }, | 2602 | { .name = FW_FILE_ISP22XX, .segs = { 0x1000, 0 }, }, |
2572 | { .name = "ql2300_fw.bin", .segs = { 0x800, 0 }, }, | 2603 | { .name = FW_FILE_ISP2300, .segs = { 0x800, 0 }, }, |
2573 | { .name = "ql2322_fw.bin", .segs = { 0x800, 0x1c000, 0x1e000, 0 }, }, | 2604 | { .name = FW_FILE_ISP2322, .segs = { 0x800, 0x1c000, 0x1e000, 0 }, }, |
2574 | { .name = "ql2400_fw.bin", }, | 2605 | { .name = FW_FILE_ISP24XX, }, |
2575 | }; | 2606 | }; |
2576 | 2607 | ||
2577 | struct fw_blob * | 2608 | struct fw_blob * |
@@ -2702,3 +2733,8 @@ MODULE_AUTHOR("QLogic Corporation"); | |||
2702 | MODULE_DESCRIPTION("QLogic Fibre Channel HBA Driver"); | 2733 | MODULE_DESCRIPTION("QLogic Fibre Channel HBA Driver"); |
2703 | MODULE_LICENSE("GPL"); | 2734 | MODULE_LICENSE("GPL"); |
2704 | MODULE_VERSION(QLA2XXX_VERSION); | 2735 | MODULE_VERSION(QLA2XXX_VERSION); |
2736 | MODULE_FIRMWARE(FW_FILE_ISP21XX); | ||
2737 | MODULE_FIRMWARE(FW_FILE_ISP22XX); | ||
2738 | MODULE_FIRMWARE(FW_FILE_ISP2300); | ||
2739 | MODULE_FIRMWARE(FW_FILE_ISP2322); | ||
2740 | MODULE_FIRMWARE(FW_FILE_ISP24XX); | ||