aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_os.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_os.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index eb77067533ab..3d290417bfc6 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -1690,6 +1690,8 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
1690 ha->gid_list_info_size = 8; 1690 ha->gid_list_info_size = 8;
1691 ha->optrom_size = OPTROM_SIZE_25XX; 1691 ha->optrom_size = OPTROM_SIZE_25XX;
1692 ha->isp_ops = &qla25xx_isp_ops; 1692 ha->isp_ops = &qla25xx_isp_ops;
1693 ha->hw_event_start = PCI_FUNC(pdev->devfn) ?
1694 FA_HW_EVENT1_ADDR: FA_HW_EVENT0_ADDR;
1693 } 1695 }
1694 host->can_queue = ha->request_q_length + 128; 1696 host->can_queue = ha->request_q_length + 128;
1695 1697
@@ -2244,6 +2246,23 @@ qla2x00_post_aen_work(struct scsi_qla_host *ha, enum fc_host_event_code code,
2244 return qla2x00_post_work(ha, e, 1); 2246 return qla2x00_post_work(ha, e, 1);
2245} 2247}
2246 2248
2249int
2250qla2x00_post_hwe_work(struct scsi_qla_host *ha, uint16_t code, uint16_t d1,
2251 uint16_t d2, uint16_t d3)
2252{
2253 struct qla_work_evt *e;
2254
2255 e = qla2x00_alloc_work(ha, QLA_EVT_HWE_LOG, 1);
2256 if (!e)
2257 return QLA_FUNCTION_FAILED;
2258
2259 e->u.hwe.code = code;
2260 e->u.hwe.d1 = d1;
2261 e->u.hwe.d2 = d2;
2262 e->u.hwe.d3 = d3;
2263 return qla2x00_post_work(ha, e, 1);
2264}
2265
2247static void 2266static void
2248qla2x00_do_work(struct scsi_qla_host *ha) 2267qla2x00_do_work(struct scsi_qla_host *ha)
2249{ 2268{
@@ -2260,6 +2279,10 @@ qla2x00_do_work(struct scsi_qla_host *ha)
2260 fc_host_post_event(ha->host, fc_get_event_number(), 2279 fc_host_post_event(ha->host, fc_get_event_number(),
2261 e->u.aen.code, e->u.aen.data); 2280 e->u.aen.code, e->u.aen.data);
2262 break; 2281 break;
2282 case QLA_EVT_HWE_LOG:
2283 qla2xxx_hw_event_log(ha, e->u.hwe.code, e->u.hwe.d1,
2284 e->u.hwe.d2, e->u.hwe.d3);
2285 break;
2263 } 2286 }
2264 if (e->flags & QLA_EVT_FLAG_FREE) 2287 if (e->flags & QLA_EVT_FLAG_FREE)
2265 kfree(e); 2288 kfree(e);