diff options
author | andrew.vasquez@qlogic.com <andrew.vasquez@qlogic.com> | 2006-03-09 17:27:13 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2006-03-12 10:38:03 -0500 |
commit | 044cc6c8ec311c4ddeebfcc31c53dea282de70b7 (patch) | |
tree | 891078bdbf9c8673d2408215c80551dc4a015f6d | |
parent | ea5b6382fde00e0dbcd0de2e4aa2fd15705e5fc3 (diff) |
[SCSI] qla2xxx: Add ISP54xx support.
Chip is similar in form to our ISP24xx offering.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r-- | drivers/scsi/qla2xxx/ql2400.c | 27 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 8 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_def.h | 12 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gs.c | 10 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 14 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 2 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_iocb.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 16 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_mbx.c | 42 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 18 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 2 |
11 files changed, 94 insertions, 63 deletions
diff --git a/drivers/scsi/qla2xxx/ql2400.c b/drivers/scsi/qla2xxx/ql2400.c index 6c7165f47e29..77914fcfa2bc 100644 --- a/drivers/scsi/qla2xxx/ql2400.c +++ b/drivers/scsi/qla2xxx/ql2400.c | |||
@@ -49,6 +49,18 @@ static struct qla_board_info qla_board_tbl[] = { | |||
49 | .fw_info = qla_fw_tbl, | 49 | .fw_info = qla_fw_tbl, |
50 | .fw_fname = "ql2400_fw.bin", | 50 | .fw_fname = "ql2400_fw.bin", |
51 | }, | 51 | }, |
52 | { | ||
53 | .drv_name = qla_driver_name, | ||
54 | .isp_name = "ISP5422", | ||
55 | .fw_info = qla_fw_tbl, | ||
56 | .fw_fname = "ql2400_fw.bin", | ||
57 | }, | ||
58 | { | ||
59 | .drv_name = qla_driver_name, | ||
60 | .isp_name = "ISP5432", | ||
61 | .fw_info = qla_fw_tbl, | ||
62 | .fw_fname = "ql2400_fw.bin", | ||
63 | }, | ||
52 | }; | 64 | }; |
53 | 65 | ||
54 | static struct pci_device_id qla24xx_pci_tbl[] = { | 66 | static struct pci_device_id qla24xx_pci_tbl[] = { |
@@ -66,6 +78,21 @@ static struct pci_device_id qla24xx_pci_tbl[] = { | |||
66 | .subdevice = PCI_ANY_ID, | 78 | .subdevice = PCI_ANY_ID, |
67 | .driver_data = (unsigned long)&qla_board_tbl[1], | 79 | .driver_data = (unsigned long)&qla_board_tbl[1], |
68 | }, | 80 | }, |
81 | { | ||
82 | .vendor = PCI_VENDOR_ID_QLOGIC, | ||
83 | .device = PCI_DEVICE_ID_QLOGIC_ISP5422, | ||
84 | .subvendor = PCI_ANY_ID, | ||
85 | .subdevice = PCI_ANY_ID, | ||
86 | .driver_data = (unsigned long)&qla_board_tbl[2], | ||
87 | }, | ||
88 | { | ||
89 | .vendor = PCI_VENDOR_ID_QLOGIC, | ||
90 | .device = PCI_DEVICE_ID_QLOGIC_ISP5432, | ||
91 | .subvendor = PCI_ANY_ID, | ||
92 | .subdevice = PCI_ANY_ID, | ||
93 | .driver_data = (unsigned long)&qla_board_tbl[3], | ||
94 | }, | ||
95 | |||
69 | {0, 0}, | 96 | {0, 0}, |
70 | }; | 97 | }; |
71 | MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl); | 98 | MODULE_DEVICE_TABLE(pci, qla24xx_pci_tbl); |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index 92b3e13e9061..2b9e329a240c 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -50,7 +50,7 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, | |||
50 | ha->host_no); | 50 | ha->host_no); |
51 | 51 | ||
52 | vfree(ha->fw_dump_buffer); | 52 | vfree(ha->fw_dump_buffer); |
53 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) | 53 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
54 | free_pages((unsigned long)ha->fw_dump, | 54 | free_pages((unsigned long)ha->fw_dump, |
55 | ha->fw_dump_order); | 55 | ha->fw_dump_order); |
56 | 56 | ||
@@ -64,7 +64,7 @@ qla2x00_sysfs_write_fw_dump(struct kobject *kobj, char *buf, loff_t off, | |||
64 | if ((ha->fw_dump || ha->fw_dumped) && !ha->fw_dump_reading) { | 64 | if ((ha->fw_dump || ha->fw_dumped) && !ha->fw_dump_reading) { |
65 | ha->fw_dump_reading = 1; | 65 | ha->fw_dump_reading = 1; |
66 | 66 | ||
67 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 67 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
68 | dump_size = FW_DUMP_SIZE_24XX; | 68 | dump_size = FW_DUMP_SIZE_24XX; |
69 | else { | 69 | else { |
70 | dump_size = FW_DUMP_SIZE_1M; | 70 | dump_size = FW_DUMP_SIZE_1M; |
@@ -138,7 +138,7 @@ qla2x00_sysfs_write_nvram(struct kobject *kobj, char *buf, loff_t off, | |||
138 | return 0; | 138 | return 0; |
139 | 139 | ||
140 | /* Checksum NVRAM. */ | 140 | /* Checksum NVRAM. */ |
141 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 141 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
142 | uint32_t *iter; | 142 | uint32_t *iter; |
143 | uint32_t chksum; | 143 | uint32_t chksum; |
144 | 144 | ||
@@ -750,7 +750,7 @@ qla2x00_get_fc_host_stats(struct Scsi_Host *shost) | |||
750 | pfc_host_stat = &ha->fc_host_stat; | 750 | pfc_host_stat = &ha->fc_host_stat; |
751 | memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics)); | 751 | memset(pfc_host_stat, -1, sizeof(struct fc_host_statistics)); |
752 | 752 | ||
753 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 753 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
754 | rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf, | 754 | rval = qla24xx_get_isp_stats(ha, (uint32_t *)&stat_buf, |
755 | sizeof(stat_buf) / 4, mb_stat); | 755 | sizeof(stat_buf) / 4, mb_stat); |
756 | } else { | 756 | } else { |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 00b7e82b99b3..e1a7769008ee 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2234,9 +2234,9 @@ typedef struct scsi_qla_host { | |||
2234 | #define DT_ISP6322 BIT_6 | 2234 | #define DT_ISP6322 BIT_6 |
2235 | #define DT_ISP2422 BIT_7 | 2235 | #define DT_ISP2422 BIT_7 |
2236 | #define DT_ISP2432 BIT_8 | 2236 | #define DT_ISP2432 BIT_8 |
2237 | #define DT_ISP2512 BIT_9 | 2237 | #define DT_ISP5422 BIT_9 |
2238 | #define DT_ISP2522 BIT_10 | 2238 | #define DT_ISP5432 BIT_10 |
2239 | #define DT_ISP_LAST (DT_ISP2522 << 1) | 2239 | #define DT_ISP_LAST (DT_ISP5432 << 1) |
2240 | 2240 | ||
2241 | #define DT_OEM_001 BIT_29 | 2241 | #define DT_OEM_001 BIT_29 |
2242 | #define DT_ISP2200A BIT_30 | 2242 | #define DT_ISP2200A BIT_30 |
@@ -2252,13 +2252,13 @@ typedef struct scsi_qla_host { | |||
2252 | #define IS_QLA6322(ha) (DT_MASK(ha) & DT_ISP6322) | 2252 | #define IS_QLA6322(ha) (DT_MASK(ha) & DT_ISP6322) |
2253 | #define IS_QLA2422(ha) (DT_MASK(ha) & DT_ISP2422) | 2253 | #define IS_QLA2422(ha) (DT_MASK(ha) & DT_ISP2422) |
2254 | #define IS_QLA2432(ha) (DT_MASK(ha) & DT_ISP2432) | 2254 | #define IS_QLA2432(ha) (DT_MASK(ha) & DT_ISP2432) |
2255 | #define IS_QLA2512(ha) (DT_MASK(ha) & DT_ISP2512) | 2255 | #define IS_QLA5422(ha) (DT_MASK(ha) & DT_ISP5422) |
2256 | #define IS_QLA2522(ha) (DT_MASK(ha) & DT_ISP2522) | 2256 | #define IS_QLA5432(ha) (DT_MASK(ha) & DT_ISP5432) |
2257 | 2257 | ||
2258 | #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \ | 2258 | #define IS_QLA23XX(ha) (IS_QLA2300(ha) || IS_QLA2312(ha) || IS_QLA2322(ha) || \ |
2259 | IS_QLA6312(ha) || IS_QLA6322(ha)) | 2259 | IS_QLA6312(ha) || IS_QLA6322(ha)) |
2260 | #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) | 2260 | #define IS_QLA24XX(ha) (IS_QLA2422(ha) || IS_QLA2432(ha)) |
2261 | #define IS_QLA25XX(ha) (IS_QLA2512(ha) || IS_QLA2522(ha)) | 2261 | #define IS_QLA54XX(ha) (IS_QLA5422(ha) || IS_QLA5432(ha)) |
2262 | 2262 | ||
2263 | #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) | 2263 | #define IS_OEM_001(ha) ((ha)->device_type & DT_OEM_001) |
2264 | #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) | 2264 | #define HAS_EXTENDED_IDS(ha) ((ha)->device_type & DT_EXTENDED_IDS) |
diff --git a/drivers/scsi/qla2xxx/qla_gs.c b/drivers/scsi/qla2xxx/qla_gs.c index d620a8e8a614..2ebf259fccb2 100644 --- a/drivers/scsi/qla2xxx/qla_gs.c +++ b/drivers/scsi/qla2xxx/qla_gs.c | |||
@@ -126,7 +126,7 @@ qla2x00_chk_ms_status(scsi_qla_host_t *ha, ms_iocb_entry_t *ms_pkt, | |||
126 | DEBUG2_3(printk("scsi(%ld): %s failed, error status (%x).\n", | 126 | DEBUG2_3(printk("scsi(%ld): %s failed, error status (%x).\n", |
127 | ha->host_no, routine, ms_pkt->entry_status)); | 127 | ha->host_no, routine, ms_pkt->entry_status)); |
128 | } else { | 128 | } else { |
129 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 129 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
130 | comp_status = | 130 | comp_status = |
131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status; | 131 | ((struct ct_entry_24xx *)ms_pkt)->comp_status; |
132 | else | 132 | else |
@@ -1200,7 +1200,7 @@ qla2x00_update_ms_fdmi_iocb(scsi_qla_host_t *ha, uint32_t req_size) | |||
1200 | ms_iocb_entry_t *ms_pkt = ha->ms_iocb; | 1200 | ms_iocb_entry_t *ms_pkt = ha->ms_iocb; |
1201 | struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; | 1201 | struct ct_entry_24xx *ct_pkt = (struct ct_entry_24xx *)ha->ms_iocb; |
1202 | 1202 | ||
1203 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1203 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1204 | ct_pkt->cmd_byte_count = cpu_to_le32(req_size); | 1204 | ct_pkt->cmd_byte_count = cpu_to_le32(req_size); |
1205 | ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count; | 1205 | ct_pkt->dseg_0_len = ct_pkt->cmd_byte_count; |
1206 | } else { | 1206 | } else { |
@@ -1529,9 +1529,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha) | |||
1529 | eiter = (struct ct_fdmi_port_attr *) (entries + size); | 1529 | eiter = (struct ct_fdmi_port_attr *) (entries + size); |
1530 | eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED); | 1530 | eiter->type = __constant_cpu_to_be16(FDMI_PORT_SUPPORT_SPEED); |
1531 | eiter->len = __constant_cpu_to_be16(4 + 4); | 1531 | eiter->len = __constant_cpu_to_be16(4 + 4); |
1532 | if (IS_QLA25XX(ha)) | 1532 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
1533 | eiter->a.sup_speed = __constant_cpu_to_be32(8); | ||
1534 | else if (IS_QLA24XX(ha)) | ||
1535 | eiter->a.sup_speed = __constant_cpu_to_be32(4); | 1533 | eiter->a.sup_speed = __constant_cpu_to_be32(4); |
1536 | else if (IS_QLA23XX(ha)) | 1534 | else if (IS_QLA23XX(ha)) |
1537 | eiter->a.sup_speed = __constant_cpu_to_be32(2); | 1535 | eiter->a.sup_speed = __constant_cpu_to_be32(2); |
@@ -1566,7 +1564,7 @@ qla2x00_fdmi_rpa(scsi_qla_host_t *ha) | |||
1566 | eiter = (struct ct_fdmi_port_attr *) (entries + size); | 1564 | eiter = (struct ct_fdmi_port_attr *) (entries + size); |
1567 | eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE); | 1565 | eiter->type = __constant_cpu_to_be16(FDMI_PORT_MAX_FRAME_SIZE); |
1568 | eiter->len = __constant_cpu_to_be16(4 + 4); | 1566 | eiter->len = __constant_cpu_to_be16(4 + 4); |
1569 | max_frame_size = IS_QLA24XX(ha) || IS_QLA25XX(ha) ? | 1567 | max_frame_size = IS_QLA24XX(ha) || IS_QLA54XX(ha) ? |
1570 | (uint32_t) icb24->frame_payload_size: | 1568 | (uint32_t) icb24->frame_payload_size: |
1571 | (uint32_t) ha->init_cb->frame_payload_size; | 1569 | (uint32_t) ha->init_cb->frame_payload_size; |
1572 | eiter->a.max_frame_size = cpu_to_be32(max_frame_size); | 1570 | eiter->a.max_frame_size = cpu_to_be32(max_frame_size); |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f49eb06d0dbd..e6a2292a2892 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -387,7 +387,7 @@ qla2x00_isp_firmware(scsi_qla_host_t *ha) | |||
387 | 387 | ||
388 | /* Verify checksum of loaded RISC code. */ | 388 | /* Verify checksum of loaded RISC code. */ |
389 | rval = qla2x00_verify_checksum(ha, | 389 | rval = qla2x00_verify_checksum(ha, |
390 | IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RISC_SADDRESS : | 390 | IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RISC_SADDRESS : |
391 | *ha->brd_info->fw_info[0].fwstart); | 391 | *ha->brd_info->fw_info[0].fwstart); |
392 | } | 392 | } |
393 | 393 | ||
@@ -822,7 +822,7 @@ qla2x00_resize_request_q(scsi_qla_host_t *ha) | |||
822 | if (IS_QLA2100(ha) || IS_QLA2200(ha)) | 822 | if (IS_QLA2100(ha) || IS_QLA2200(ha)) |
823 | return; | 823 | return; |
824 | 824 | ||
825 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 825 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
826 | qla2x00_alloc_fw_dump(ha); | 826 | qla2x00_alloc_fw_dump(ha); |
827 | 827 | ||
828 | /* Retrieve IOCB counts available to the firmware. */ | 828 | /* Retrieve IOCB counts available to the firmware. */ |
@@ -2123,7 +2123,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2123 | LIST_HEAD(new_fcports); | 2123 | LIST_HEAD(new_fcports); |
2124 | 2124 | ||
2125 | /* If FL port exists, then SNS is present */ | 2125 | /* If FL port exists, then SNS is present */ |
2126 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 2126 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
2127 | loop_id = NPH_F_PORT; | 2127 | loop_id = NPH_F_PORT; |
2128 | else | 2128 | else |
2129 | loop_id = SNS_FL_PORT; | 2129 | loop_id = SNS_FL_PORT; |
@@ -2149,7 +2149,7 @@ qla2x00_configure_fabric(scsi_qla_host_t *ha) | |||
2149 | qla2x00_fdmi_register(ha); | 2149 | qla2x00_fdmi_register(ha); |
2150 | 2150 | ||
2151 | /* Ensure we are logged into the SNS. */ | 2151 | /* Ensure we are logged into the SNS. */ |
2152 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 2152 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
2153 | loop_id = NPH_SNS; | 2153 | loop_id = NPH_SNS; |
2154 | else | 2154 | else |
2155 | loop_id = SIMPLE_NAME_SERVER; | 2155 | loop_id = SIMPLE_NAME_SERVER; |
@@ -2640,7 +2640,7 @@ qla2x00_device_resync(scsi_qla_host_t *ha) | |||
2640 | if (ql2xprocessrscn && | 2640 | if (ql2xprocessrscn && |
2641 | !IS_QLA2100(ha) && !IS_QLA2200(ha) && | 2641 | !IS_QLA2100(ha) && !IS_QLA2200(ha) && |
2642 | !IS_QLA6312(ha) && !IS_QLA6322(ha) && | 2642 | !IS_QLA6312(ha) && !IS_QLA6322(ha) && |
2643 | !IS_QLA24XX(ha) && !IS_QLA25XX(ha) && | 2643 | !IS_QLA24XX(ha) && !IS_QLA54XX(ha) && |
2644 | ha->flags.init_done) { | 2644 | ha->flags.init_done) { |
2645 | /* Handle port RSCN via asyncronous IOCBs */ | 2645 | /* Handle port RSCN via asyncronous IOCBs */ |
2646 | rval2 = qla2x00_handle_port_rscn(ha, rscn_entry, | 2646 | rval2 = qla2x00_handle_port_rscn(ha, rscn_entry, |
@@ -3130,7 +3130,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3130 | 3130 | ||
3131 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3131 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3132 | 3132 | ||
3133 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { | 3133 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { |
3134 | /* | 3134 | /* |
3135 | * Disable SRAM, Instruction RAM and GP RAM | 3135 | * Disable SRAM, Instruction RAM and GP RAM |
3136 | * parity. | 3136 | * parity. |
@@ -3146,7 +3146,7 @@ qla2x00_restart_isp(scsi_qla_host_t *ha) | |||
3146 | 3146 | ||
3147 | spin_lock_irqsave(&ha->hardware_lock, flags); | 3147 | spin_lock_irqsave(&ha->hardware_lock, flags); |
3148 | 3148 | ||
3149 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) { | 3149 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) { |
3150 | /* Enable proper parity */ | 3150 | /* Enable proper parity */ |
3151 | if (IS_QLA2300(ha)) | 3151 | if (IS_QLA2300(ha)) |
3152 | /* SRAM parity */ | 3152 | /* SRAM parity */ |
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index ecc3741a452e..45007ee58067 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h | |||
@@ -163,7 +163,7 @@ static inline int qla2x00_is_reserved_id(scsi_qla_host_t *, uint16_t); | |||
163 | static inline int | 163 | static inline int |
164 | qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id) | 164 | qla2x00_is_reserved_id(scsi_qla_host_t *ha, uint16_t loop_id) |
165 | { | 165 | { |
166 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 166 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
167 | return (loop_id > NPH_LAST_HANDLE); | 167 | return (loop_id > NPH_LAST_HANDLE); |
168 | 168 | ||
169 | return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) || | 169 | return ((loop_id > ha->last_loop_id && loop_id < SNS_FIRST_LOOP_ID) || |
diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 6544b6d0891d..8f0f4a298357 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c | |||
@@ -466,7 +466,7 @@ __qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, | |||
466 | mrk->entry_type = MARKER_TYPE; | 466 | mrk->entry_type = MARKER_TYPE; |
467 | mrk->modifier = type; | 467 | mrk->modifier = type; |
468 | if (type != MK_SYNC_ALL) { | 468 | if (type != MK_SYNC_ALL) { |
469 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 469 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
470 | mrk24 = (struct mrk_entry_24xx *) mrk; | 470 | mrk24 = (struct mrk_entry_24xx *) mrk; |
471 | mrk24->nport_handle = cpu_to_le16(loop_id); | 471 | mrk24->nport_handle = cpu_to_le16(loop_id); |
472 | mrk24->lun[1] = LSB(lun); | 472 | mrk24->lun[1] = LSB(lun); |
@@ -519,7 +519,7 @@ qla2x00_req_pkt(scsi_qla_host_t *ha) | |||
519 | for (timer = HZ; timer; timer--) { | 519 | for (timer = HZ; timer; timer--) { |
520 | if ((req_cnt + 2) >= ha->req_q_cnt) { | 520 | if ((req_cnt + 2) >= ha->req_q_cnt) { |
521 | /* Calculate number of free request entries. */ | 521 | /* Calculate number of free request entries. */ |
522 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 522 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
523 | cnt = (uint16_t)RD_REG_DWORD( | 523 | cnt = (uint16_t)RD_REG_DWORD( |
524 | ®->isp24.req_q_out); | 524 | ®->isp24.req_q_out); |
525 | else | 525 | else |
@@ -593,7 +593,7 @@ qla2x00_isp_cmd(scsi_qla_host_t *ha) | |||
593 | ha->request_ring_ptr++; | 593 | ha->request_ring_ptr++; |
594 | 594 | ||
595 | /* Set chip new ring index. */ | 595 | /* Set chip new ring index. */ |
596 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 596 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
597 | WRT_REG_DWORD(®->isp24.req_q_in, ha->req_ring_index); | 597 | WRT_REG_DWORD(®->isp24.req_q_in, ha->req_ring_index); |
598 | RD_REG_DWORD_RELAXED(®->isp24.req_q_in); | 598 | RD_REG_DWORD_RELAXED(®->isp24.req_q_in); |
599 | } else { | 599 | } else { |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index c15458c2bf32..2003dbb70579 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -343,7 +343,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
343 | 343 | ||
344 | ha->isp_ops.fw_dump(ha, 1); | 344 | ha->isp_ops.fw_dump(ha, 1); |
345 | 345 | ||
346 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 346 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
347 | if (mb[1] == 0 && mb[2] == 0) { | 347 | if (mb[1] == 0 && mb[2] == 0) { |
348 | qla_printk(KERN_ERR, ha, | 348 | qla_printk(KERN_ERR, ha, |
349 | "Unrecoverable Hardware Error: adapter " | 349 | "Unrecoverable Hardware Error: adapter " |
@@ -521,7 +521,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
521 | */ | 521 | */ |
522 | if (ql2xprocessrscn && | 522 | if (ql2xprocessrscn && |
523 | !IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) && | 523 | !IS_QLA2100(ha) && !IS_QLA2200(ha) && !IS_QLA6312(ha) && |
524 | !IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA25XX(ha) && | 524 | !IS_QLA6322(ha) && !IS_QLA24XX(ha) && !IS_QLA54XX(ha) && |
525 | ha->flags.init_done && mb[1] != 0xffff && | 525 | ha->flags.init_done && mb[1] != 0xffff && |
526 | ((ha->operating_mode == P2P && mb[1] != 0) || | 526 | ((ha->operating_mode == P2P && mb[1] != 0) || |
527 | (ha->operating_mode != P2P && mb[1] != | 527 | (ha->operating_mode != P2P && mb[1] != |
@@ -638,7 +638,7 @@ qla2x00_async_event(scsi_qla_host_t *ha, uint16_t *mb) | |||
638 | "scsi(%ld): [R|Z]IO update completion.\n", | 638 | "scsi(%ld): [R|Z]IO update completion.\n", |
639 | ha->host_no)); | 639 | ha->host_no)); |
640 | 640 | ||
641 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 641 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
642 | qla24xx_process_response_queue(ha); | 642 | qla24xx_process_response_queue(ha); |
643 | else | 643 | else |
644 | qla2x00_process_response_queue(ha); | 644 | qla2x00_process_response_queue(ha); |
@@ -810,7 +810,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
810 | 810 | ||
811 | sts = (sts_entry_t *) pkt; | 811 | sts = (sts_entry_t *) pkt; |
812 | sts24 = (struct sts_entry_24xx *) pkt; | 812 | sts24 = (struct sts_entry_24xx *) pkt; |
813 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 813 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
814 | comp_status = le16_to_cpu(sts24->comp_status); | 814 | comp_status = le16_to_cpu(sts24->comp_status); |
815 | scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; | 815 | scsi_status = le16_to_cpu(sts24->scsi_status) & SS_MASK; |
816 | } else { | 816 | } else { |
@@ -860,7 +860,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
860 | fcport = sp->fcport; | 860 | fcport = sp->fcport; |
861 | 861 | ||
862 | sense_len = rsp_info_len = resid_len = 0; | 862 | sense_len = rsp_info_len = resid_len = 0; |
863 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 863 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
864 | sense_len = le32_to_cpu(sts24->sense_len); | 864 | sense_len = le32_to_cpu(sts24->sense_len); |
865 | rsp_info_len = le32_to_cpu(sts24->rsp_data_len); | 865 | rsp_info_len = le32_to_cpu(sts24->rsp_data_len); |
866 | resid_len = le32_to_cpu(sts24->rsp_residual_count); | 866 | resid_len = le32_to_cpu(sts24->rsp_residual_count); |
@@ -878,7 +878,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
878 | /* Check for any FCP transport errors. */ | 878 | /* Check for any FCP transport errors. */ |
879 | if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { | 879 | if (scsi_status & SS_RESPONSE_INFO_LEN_VALID) { |
880 | /* Sense data lies beyond any FCP RESPONSE data. */ | 880 | /* Sense data lies beyond any FCP RESPONSE data. */ |
881 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 881 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
882 | sense_data += rsp_info_len; | 882 | sense_data += rsp_info_len; |
883 | if (rsp_info_len > 3 && rsp_info[3]) { | 883 | if (rsp_info_len > 3 && rsp_info[3]) { |
884 | DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " | 884 | DEBUG2(printk("scsi(%ld:%d:%d:%d) FCP I/O protocol " |
@@ -1117,7 +1117,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1117 | case CS_TIMEOUT: | 1117 | case CS_TIMEOUT: |
1118 | cp->result = DID_BUS_BUSY << 16; | 1118 | cp->result = DID_BUS_BUSY << 16; |
1119 | 1119 | ||
1120 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1120 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1121 | DEBUG2(printk(KERN_INFO | 1121 | DEBUG2(printk(KERN_INFO |
1122 | "scsi(%ld:%d:%d:%d): TIMEOUT status detected " | 1122 | "scsi(%ld:%d:%d:%d): TIMEOUT status detected " |
1123 | "0x%x-0x%x\n", ha->host_no, cp->device->channel, | 1123 | "0x%x-0x%x\n", ha->host_no, cp->device->channel, |
@@ -1197,7 +1197,7 @@ qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt) | |||
1197 | } | 1197 | } |
1198 | 1198 | ||
1199 | /* Move sense data. */ | 1199 | /* Move sense data. */ |
1200 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 1200 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
1201 | host_to_fcp_swap(pkt->data, sizeof(pkt->data)); | 1201 | host_to_fcp_swap(pkt->data, sizeof(pkt->data)); |
1202 | memcpy(sp->request_sense_ptr, pkt->data, sense_sz); | 1202 | memcpy(sp->request_sense_ptr, pkt->data, sense_sz); |
1203 | DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); | 1203 | DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 584cc2f6dd35..267435f17482 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -91,7 +91,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
91 | spin_lock_irqsave(&ha->hardware_lock, flags); | 91 | spin_lock_irqsave(&ha->hardware_lock, flags); |
92 | 92 | ||
93 | /* Load mailbox registers. */ | 93 | /* Load mailbox registers. */ |
94 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 94 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
95 | optr = (uint16_t __iomem *)®->isp24.mailbox0; | 95 | optr = (uint16_t __iomem *)®->isp24.mailbox0; |
96 | else | 96 | else |
97 | optr = (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 0); | 97 | optr = (uint16_t __iomem *)MAILBOX_REG(ha, ®->isp, 0); |
@@ -155,7 +155,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
155 | 155 | ||
156 | set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); | 156 | set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); |
157 | 157 | ||
158 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 158 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
159 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_SET_HOST_INT); | 159 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_SET_HOST_INT); |
160 | else | 160 | else |
161 | WRT_REG_WORD(®->isp.hccr, HCCR_SET_HOST_INT); | 161 | WRT_REG_WORD(®->isp.hccr, HCCR_SET_HOST_INT); |
@@ -179,7 +179,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
179 | DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, | 179 | DEBUG3_11(printk("%s(%ld): cmd=%x POLLING MODE.\n", __func__, |
180 | ha->host_no, command);) | 180 | ha->host_no, command);) |
181 | 181 | ||
182 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) | 182 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) |
183 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_SET_HOST_INT); | 183 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_SET_HOST_INT); |
184 | else | 184 | else |
185 | WRT_REG_WORD(®->isp.hccr, HCCR_SET_HOST_INT); | 185 | WRT_REG_WORD(®->isp.hccr, HCCR_SET_HOST_INT); |
@@ -237,7 +237,7 @@ qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) | |||
237 | uint16_t mb0; | 237 | uint16_t mb0; |
238 | uint32_t ictrl; | 238 | uint32_t ictrl; |
239 | 239 | ||
240 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 240 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
241 | mb0 = RD_REG_WORD(®->isp24.mailbox0); | 241 | mb0 = RD_REG_WORD(®->isp24.mailbox0); |
242 | ictrl = RD_REG_DWORD(®->isp24.ictrl); | 242 | ictrl = RD_REG_DWORD(®->isp24.ictrl); |
243 | } else { | 243 | } else { |
@@ -334,7 +334,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr, | |||
334 | 334 | ||
335 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); | 335 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); |
336 | 336 | ||
337 | if (MSW(risc_addr) || IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 337 | if (MSW(risc_addr) || IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
338 | mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; | 338 | mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; |
339 | mcp->mb[8] = MSW(risc_addr); | 339 | mcp->mb[8] = MSW(risc_addr); |
340 | mcp->out_mb = MBX_8|MBX_0; | 340 | mcp->out_mb = MBX_8|MBX_0; |
@@ -348,7 +348,7 @@ qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint32_t risc_addr, | |||
348 | mcp->mb[6] = MSW(MSD(req_dma)); | 348 | mcp->mb[6] = MSW(MSD(req_dma)); |
349 | mcp->mb[7] = LSW(MSD(req_dma)); | 349 | mcp->mb[7] = LSW(MSD(req_dma)); |
350 | mcp->out_mb |= MBX_7|MBX_6|MBX_3|MBX_2|MBX_1; | 350 | mcp->out_mb |= MBX_7|MBX_6|MBX_3|MBX_2|MBX_1; |
351 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 351 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
352 | mcp->mb[4] = MSW(risc_code_size); | 352 | mcp->mb[4] = MSW(risc_code_size); |
353 | mcp->mb[5] = LSW(risc_code_size); | 353 | mcp->mb[5] = LSW(risc_code_size); |
354 | mcp->out_mb |= MBX_5|MBX_4; | 354 | mcp->out_mb |= MBX_5|MBX_4; |
@@ -399,7 +399,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) | |||
399 | mcp->mb[0] = MBC_EXECUTE_FIRMWARE; | 399 | mcp->mb[0] = MBC_EXECUTE_FIRMWARE; |
400 | mcp->out_mb = MBX_0; | 400 | mcp->out_mb = MBX_0; |
401 | mcp->in_mb = MBX_0; | 401 | mcp->in_mb = MBX_0; |
402 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 402 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
403 | mcp->mb[1] = MSW(risc_addr); | 403 | mcp->mb[1] = MSW(risc_addr); |
404 | mcp->mb[2] = LSW(risc_addr); | 404 | mcp->mb[2] = LSW(risc_addr); |
405 | mcp->mb[3] = 0; | 405 | mcp->mb[3] = 0; |
@@ -422,7 +422,7 @@ qla2x00_execute_fw(scsi_qla_host_t *ha, uint32_t risc_addr) | |||
422 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, | 422 | DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", __func__, |
423 | ha->host_no, rval, mcp->mb[0])); | 423 | ha->host_no, rval, mcp->mb[0])); |
424 | } else { | 424 | } else { |
425 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 425 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
426 | DEBUG11(printk("%s(%ld): done exchanges=%x.\n", | 426 | DEBUG11(printk("%s(%ld): done exchanges=%x.\n", |
427 | __func__, ha->host_no, mcp->mb[1]);) | 427 | __func__, ha->host_no, mcp->mb[1]);) |
428 | } else { | 428 | } else { |
@@ -563,7 +563,7 @@ qla2x00_set_fw_options(scsi_qla_host_t *ha, uint16_t *fwopts) | |||
563 | mcp->mb[3] = fwopts[3]; | 563 | mcp->mb[3] = fwopts[3]; |
564 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; | 564 | mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; |
565 | mcp->in_mb = MBX_0; | 565 | mcp->in_mb = MBX_0; |
566 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 566 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
567 | mcp->in_mb |= MBX_1; | 567 | mcp->in_mb |= MBX_1; |
568 | } else { | 568 | } else { |
569 | mcp->mb[10] = fwopts[10]; | 569 | mcp->mb[10] = fwopts[10]; |
@@ -676,7 +676,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) | |||
676 | mcp->mb[0] = MBC_VERIFY_CHECKSUM; | 676 | mcp->mb[0] = MBC_VERIFY_CHECKSUM; |
677 | mcp->out_mb = MBX_0; | 677 | mcp->out_mb = MBX_0; |
678 | mcp->in_mb = MBX_0; | 678 | mcp->in_mb = MBX_0; |
679 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 679 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
680 | mcp->mb[1] = MSW(risc_addr); | 680 | mcp->mb[1] = MSW(risc_addr); |
681 | mcp->mb[2] = LSW(risc_addr); | 681 | mcp->mb[2] = LSW(risc_addr); |
682 | mcp->out_mb |= MBX_2|MBX_1; | 682 | mcp->out_mb |= MBX_2|MBX_1; |
@@ -693,7 +693,7 @@ qla2x00_verify_checksum(scsi_qla_host_t *ha, uint32_t risc_addr) | |||
693 | 693 | ||
694 | if (rval != QLA_SUCCESS) { | 694 | if (rval != QLA_SUCCESS) { |
695 | DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, | 695 | DEBUG2_3_11(printk("%s(%ld): failed=%x chk sum=%x.\n", __func__, |
696 | ha->host_no, rval, (IS_QLA24XX(ha) || IS_QLA25XX(ha) ? | 696 | ha->host_no, rval, (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? |
697 | (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]));) | 697 | (mcp->mb[2] << 16) | mcp->mb[1]: mcp->mb[1]));) |
698 | } else { | 698 | } else { |
699 | DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) | 699 | DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) |
@@ -751,7 +751,7 @@ qla2x00_issue_iocb(scsi_qla_host_t *ha, void* buffer, dma_addr_t phys_addr, | |||
751 | 751 | ||
752 | /* Mask reserved bits. */ | 752 | /* Mask reserved bits. */ |
753 | sts_entry->entry_status &= | 753 | sts_entry->entry_status &= |
754 | IS_QLA24XX(ha) || IS_QLA25XX(ha) ? RF_MASK_24XX :RF_MASK; | 754 | IS_QLA24XX(ha) || IS_QLA54XX(ha) ? RF_MASK_24XX :RF_MASK; |
755 | } | 755 | } |
756 | 756 | ||
757 | return rval; | 757 | return rval; |
@@ -1091,7 +1091,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) | |||
1091 | memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); | 1091 | memset(pd, 0, max(PORT_DATABASE_SIZE, PORT_DATABASE_24XX_SIZE)); |
1092 | 1092 | ||
1093 | mcp->mb[0] = MBC_GET_PORT_DATABASE; | 1093 | mcp->mb[0] = MBC_GET_PORT_DATABASE; |
1094 | if (opt != 0 && !IS_QLA24XX(ha) && !IS_QLA25XX(ha)) | 1094 | if (opt != 0 && !IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
1095 | mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; | 1095 | mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; |
1096 | mcp->mb[2] = MSW(pd_dma); | 1096 | mcp->mb[2] = MSW(pd_dma); |
1097 | mcp->mb[3] = LSW(pd_dma); | 1097 | mcp->mb[3] = LSW(pd_dma); |
@@ -1099,7 +1099,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) | |||
1099 | mcp->mb[7] = LSW(MSD(pd_dma)); | 1099 | mcp->mb[7] = LSW(MSD(pd_dma)); |
1100 | mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; | 1100 | mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; |
1101 | mcp->in_mb = MBX_0; | 1101 | mcp->in_mb = MBX_0; |
1102 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1102 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1103 | mcp->mb[1] = fcport->loop_id; | 1103 | mcp->mb[1] = fcport->loop_id; |
1104 | mcp->mb[10] = opt; | 1104 | mcp->mb[10] = opt; |
1105 | mcp->out_mb |= MBX_10|MBX_1; | 1105 | mcp->out_mb |= MBX_10|MBX_1; |
@@ -1112,7 +1112,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) | |||
1112 | mcp->mb[1] = fcport->loop_id << 8 | opt; | 1112 | mcp->mb[1] = fcport->loop_id << 8 | opt; |
1113 | mcp->out_mb |= MBX_1; | 1113 | mcp->out_mb |= MBX_1; |
1114 | } | 1114 | } |
1115 | mcp->buf_size = (IS_QLA24XX(ha) || IS_QLA25XX(ha) ? | 1115 | mcp->buf_size = (IS_QLA24XX(ha) || IS_QLA54XX(ha) ? |
1116 | PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE); | 1116 | PORT_DATABASE_24XX_SIZE : PORT_DATABASE_SIZE); |
1117 | mcp->flags = MBX_DMA_IN; | 1117 | mcp->flags = MBX_DMA_IN; |
1118 | mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); | 1118 | mcp->tov = (ha->login_timeout * 2) + (ha->login_timeout / 2); |
@@ -1120,7 +1120,7 @@ qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) | |||
1120 | if (rval != QLA_SUCCESS) | 1120 | if (rval != QLA_SUCCESS) |
1121 | goto gpd_error_out; | 1121 | goto gpd_error_out; |
1122 | 1122 | ||
1123 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1123 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1124 | pd24 = (struct port_database_24xx *) pd; | 1124 | pd24 = (struct port_database_24xx *) pd; |
1125 | 1125 | ||
1126 | /* Check for logged in state. */ | 1126 | /* Check for logged in state. */ |
@@ -1337,7 +1337,7 @@ qla2x00_lip_reset(scsi_qla_host_t *ha) | |||
1337 | 1337 | ||
1338 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) | 1338 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no);) |
1339 | 1339 | ||
1340 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1340 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1341 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; | 1341 | mcp->mb[0] = MBC_LIP_FULL_LOGIN; |
1342 | mcp->mb[1] = BIT_0; | 1342 | mcp->mb[1] = BIT_0; |
1343 | mcp->mb[2] = 0xff; | 1343 | mcp->mb[2] = 0xff; |
@@ -1866,7 +1866,7 @@ qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, | |||
1866 | 1866 | ||
1867 | mcp->mb[0] = MBC_GET_ID_LIST; | 1867 | mcp->mb[0] = MBC_GET_ID_LIST; |
1868 | mcp->out_mb = MBX_0; | 1868 | mcp->out_mb = MBX_0; |
1869 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1869 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1870 | mcp->mb[2] = MSW(id_list_dma); | 1870 | mcp->mb[2] = MSW(id_list_dma); |
1871 | mcp->mb[3] = LSW(id_list_dma); | 1871 | mcp->mb[3] = LSW(id_list_dma); |
1872 | mcp->mb[6] = MSW(MSD(id_list_dma)); | 1872 | mcp->mb[6] = MSW(MSD(id_list_dma)); |
@@ -2057,7 +2057,7 @@ qla2x00_get_link_status(scsi_qla_host_t *ha, uint16_t loop_id, | |||
2057 | mcp->mb[7] = LSW(MSD(stat_buf_dma)); | 2057 | mcp->mb[7] = LSW(MSD(stat_buf_dma)); |
2058 | mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; | 2058 | mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; |
2059 | mcp->in_mb = MBX_0; | 2059 | mcp->in_mb = MBX_0; |
2060 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 2060 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
2061 | mcp->mb[1] = loop_id; | 2061 | mcp->mb[1] = loop_id; |
2062 | mcp->mb[4] = 0; | 2062 | mcp->mb[4] = 0; |
2063 | mcp->mb[10] = 0; | 2063 | mcp->mb[10] = 0; |
@@ -2324,7 +2324,7 @@ qla2x00_system_error(scsi_qla_host_t *ha) | |||
2324 | mbx_cmd_t mc; | 2324 | mbx_cmd_t mc; |
2325 | mbx_cmd_t *mcp = &mc; | 2325 | mbx_cmd_t *mcp = &mc; |
2326 | 2326 | ||
2327 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) | 2327 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
2328 | return QLA_FUNCTION_FAILED; | 2328 | return QLA_FUNCTION_FAILED; |
2329 | 2329 | ||
2330 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); | 2330 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); |
@@ -2434,7 +2434,7 @@ qla2x00_stop_firmware(scsi_qla_host_t *ha) | |||
2434 | mbx_cmd_t mc; | 2434 | mbx_cmd_t mc; |
2435 | mbx_cmd_t *mcp = &mc; | 2435 | mbx_cmd_t *mcp = &mc; |
2436 | 2436 | ||
2437 | if (!IS_QLA24XX(ha) && !IS_QLA25XX(ha)) | 2437 | if (!IS_QLA24XX(ha) && !IS_QLA54XX(ha)) |
2438 | return QLA_FUNCTION_FAILED; | 2438 | return QLA_FUNCTION_FAILED; |
2439 | 2439 | ||
2440 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); | 2440 | DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); |
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 757c4c43c453..131614751196 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -1183,11 +1183,11 @@ qla2x00_set_isp_flags(scsi_qla_host_t *ha) | |||
1183 | case PCI_DEVICE_ID_QLOGIC_ISP2432: | 1183 | case PCI_DEVICE_ID_QLOGIC_ISP2432: |
1184 | ha->device_type |= DT_ISP2432; | 1184 | ha->device_type |= DT_ISP2432; |
1185 | break; | 1185 | break; |
1186 | case PCI_DEVICE_ID_QLOGIC_ISP2512: | 1186 | case PCI_DEVICE_ID_QLOGIC_ISP5422: |
1187 | ha->device_type |= DT_ISP2512; | 1187 | ha->device_type |= DT_ISP5422; |
1188 | break; | 1188 | break; |
1189 | case PCI_DEVICE_ID_QLOGIC_ISP2522: | 1189 | case PCI_DEVICE_ID_QLOGIC_ISP5432: |
1190 | ha->device_type |= DT_ISP2522; | 1190 | ha->device_type |= DT_ISP5432; |
1191 | break; | 1191 | break; |
1192 | } | 1192 | } |
1193 | } | 1193 | } |
@@ -1433,7 +1433,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1433 | ha->gid_list_info_size = 6; | 1433 | ha->gid_list_info_size = 6; |
1434 | if (IS_QLA2322(ha) || IS_QLA6322(ha)) | 1434 | if (IS_QLA2322(ha) || IS_QLA6322(ha)) |
1435 | ha->optrom_size = OPTROM_SIZE_2322; | 1435 | ha->optrom_size = OPTROM_SIZE_2322; |
1436 | } else if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1436 | } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1437 | host->max_id = MAX_TARGETS_2200; | 1437 | host->max_id = MAX_TARGETS_2200; |
1438 | ha->mbx_count = MAILBOX_REGISTER_COUNT; | 1438 | ha->mbx_count = MAILBOX_REGISTER_COUNT; |
1439 | ha->request_q_length = REQUEST_ENTRY_CNT_24XX; | 1439 | ha->request_q_length = REQUEST_ENTRY_CNT_24XX; |
@@ -1559,7 +1559,7 @@ int qla2x00_probe_one(struct pci_dev *pdev, struct qla_board_info *brd_info) | |||
1559 | 1559 | ||
1560 | spin_lock_irqsave(&ha->hardware_lock, flags); | 1560 | spin_lock_irqsave(&ha->hardware_lock, flags); |
1561 | reg = ha->iobase; | 1561 | reg = ha->iobase; |
1562 | if (IS_QLA24XX(ha) || IS_QLA25XX(ha)) { | 1562 | if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
1563 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); | 1563 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_HOST_INT); |
1564 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_RISC_INT); | 1564 | WRT_REG_DWORD(®->isp24.hccr, HCCRX_CLR_RISC_INT); |
1565 | } else { | 1565 | } else { |
@@ -2631,7 +2631,7 @@ qla2x00_request_firmware(scsi_qla_host_t *ha) | |||
2631 | blob = &qla_fw_blobs[FW_ISP2322]; | 2631 | blob = &qla_fw_blobs[FW_ISP2322]; |
2632 | } else if (IS_QLA6312(ha) || IS_QLA6322(ha)) { | 2632 | } else if (IS_QLA6312(ha) || IS_QLA6322(ha)) { |
2633 | blob = &qla_fw_blobs[FW_ISP63XX]; | 2633 | blob = &qla_fw_blobs[FW_ISP63XX]; |
2634 | } else if (IS_QLA24XX(ha)) { | 2634 | } else if (IS_QLA24XX(ha) || IS_QLA54XX(ha)) { |
2635 | blob = &qla_fw_blobs[FW_ISP24XX]; | 2635 | blob = &qla_fw_blobs[FW_ISP24XX]; |
2636 | } | 2636 | } |
2637 | 2637 | ||
@@ -2687,6 +2687,10 @@ static struct pci_device_id qla2xxx_pci_tbl[] = { | |||
2687 | PCI_ANY_ID, PCI_ANY_ID, }, | 2687 | PCI_ANY_ID, PCI_ANY_ID, }, |
2688 | { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2432, | 2688 | { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP2432, |
2689 | PCI_ANY_ID, PCI_ANY_ID, }, | 2689 | PCI_ANY_ID, PCI_ANY_ID, }, |
2690 | { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5422, | ||
2691 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
2692 | { PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_QLOGIC_ISP5432, | ||
2693 | PCI_ANY_ID, PCI_ANY_ID, }, | ||
2690 | { 0 }, | 2694 | { 0 }, |
2691 | }; | 2695 | }; |
2692 | MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl); | 2696 | MODULE_DEVICE_TABLE(pci, qla2xxx_pci_tbl); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 82b83da25d77..1afac931351e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -852,6 +852,8 @@ | |||
852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 | 852 | #define PCI_DEVICE_ID_QLOGIC_ISP2432 0x2432 |
853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 | 853 | #define PCI_DEVICE_ID_QLOGIC_ISP2512 0x2512 |
854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 | 854 | #define PCI_DEVICE_ID_QLOGIC_ISP2522 0x2522 |
855 | #define PCI_DEVICE_ID_QLOGIC_ISP5422 0x5422 | ||
856 | #define PCI_DEVICE_ID_QLOGIC_ISP5432 0x5432 | ||
855 | 857 | ||
856 | #define PCI_VENDOR_ID_CYRIX 0x1078 | 858 | #define PCI_VENDOR_ID_CYRIX 0x1078 |
857 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 | 859 | #define PCI_DEVICE_ID_CYRIX_5510 0x0000 |