Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 318002 Details for
Bug 464681
[QLogic 5.3 bug] qla2xxx/qla84xxx: Advertise qla84xx firmware rev. fix netlink code
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
[QLogic 5.3 bug] qla2xxx/qla84xxx: Advertise qla84xx firmware rev. fix netlink code
patch.nlk.fixes (text/plain), 3.70 KB, created by
David Somayajulu
on 2008-09-29 21:11:13 UTC
(
hide
)
Description:
[QLogic 5.3 bug] qla2xxx/qla84xxx: Advertise qla84xx firmware rev. fix netlink code
Filename:
MIME Type:
Creator:
David Somayajulu
Created:
2008-09-29 21:11:13 UTC
Size:
3.70 KB
patch
obsolete
>diff -uap /home/davids/RHEL5.3/linux-2.6.18-115.noarch.orig/drivers/scsi/qla2xxx/qla_attr.c /home/davids/RHEL5.3/linux-2.6.18-115.noarch/drivers/scsi/qla2xxx/qla_attr.c >--- /home/davids/RHEL5.3/linux-2.6.18-115.noarch.orig/drivers/scsi/qla2xxx/qla_attr.c 2008-09-16 22:55:13.000000000 -0700 >+++ /home/davids/RHEL5.3/linux-2.6.18-115.noarch/drivers/scsi/qla2xxx/qla_attr.c 2008-09-26 18:57:18.000000000 -0700 >@@ -1076,6 +1076,26 @@ qla2x00_total_isp_aborts_show(struct cla > } > > static ssize_t >+qla24xx_84xx_fw_version_show(struct class_device *cdev, char *buf) >+{ >+ int rval = QLA_SUCCESS; >+ uint16_t status[2] = {0, 0}; >+ scsi_qla_host_t *ha = to_qla_host(class_to_shost(cdev)); >+ >+ if (IS_QLA84XX(ha) && ha->cs84xx) { >+ if (ha->cs84xx->op_fw_version == 0) { >+ rval = qla84xx_verify_chip(ha, status); >+ } >+ >+ if ((rval == QLA_SUCCESS) && (status[0] == 0)) >+ return snprintf(buf, PAGE_SIZE, "%u\n", >+ (uint32_t)ha->cs84xx->op_fw_version); >+ } >+ >+ return snprintf(buf, PAGE_SIZE, "\n"); >+} >+ >+static ssize_t > qla24xx_vport_create(struct class_device *cdev, const char *buf, size_t count) > { > int ret = 0; >@@ -1436,6 +1456,8 @@ static CLASS_DEVICE_ATTR(optrom_fw_versi > qla2x00_optrom_fw_version_show, NULL); > static CLASS_DEVICE_ATTR(total_isp_aborts, S_IRUGO, > qla2x00_total_isp_aborts_show, NULL); >+static CLASS_DEVICE_ATTR(84xx_fw_version, S_IRUGO, >+ qla24xx_84xx_fw_version_show, NULL); > static CLASS_DEVICE_ATTR(vport_create, S_IWUGO, NULL, qla24xx_vport_create); > static CLASS_DEVICE_ATTR(vport_delete, S_IWUGO, NULL, qla24xx_vport_delete); > static CLASS_DEVICE_ATTR(max_npiv_vports, S_IRUGO, >@@ -1490,6 +1512,7 @@ struct class_device_attribute *qla24xx_h > &class_device_attr_zio, > &class_device_attr_zio_timer, > &class_device_attr_beacon, >+ &class_device_attr_84xx_fw_version, > &class_device_attr_vport_create, > &class_device_attr_vport_delete, > &class_device_attr_max_npiv_vports, >diff -uap /home/davids/RHEL5.3/linux-2.6.18-115.noarch.orig/drivers/scsi/qla2xxx/qla_nlnk.c /home/davids/RHEL5.3/linux-2.6.18-115.noarch/drivers/scsi/qla2xxx/qla_nlnk.c >--- /home/davids/RHEL5.3/linux-2.6.18-115.noarch.orig/drivers/scsi/qla2xxx/qla_nlnk.c 2008-09-16 22:55:13.000000000 -0700 >+++ /home/davids/RHEL5.3/linux-2.6.18-115.noarch/drivers/scsi/qla2xxx/qla_nlnk.c 2008-09-26 19:12:54.000000000 -0700 >@@ -64,7 +64,8 @@ static int qla84xx_update_fw(struct scsi > } > qlfw->len = upd_fw->fw_len; > } >- fw_ver = le32_to_cpu(*((uint32_t *)upd_fw->fw_bytes)); >+ fw_ver = le32_to_cpu(*((uint32_t *) >+ ((uint32_t *)upd_fw->fw_bytes + 2))); > if (!fw_ver) { > printk(KERN_ERR "%s(%lu): invalid fw revision 0x%x\n", > __func__, ha->host_no, fw_ver); >@@ -93,7 +94,7 @@ static int qla84xx_update_fw(struct scsi > return -ENOMEM; > } > >- fw_ver = le32_to_cpu(*((uint32_t *)qlfw->fw_buf)); >+ fw_ver = le32_to_cpu(*((uint32_t *)((uint32_t *)qlfw->fw_buf + 2))); > > /* Create iocb and issue it */ > memset(mn, 0, sizeof(*mn)); >@@ -112,9 +113,10 @@ static int qla84xx_update_fw(struct scsi > > mn->dseg_address[0] = cpu_to_le32(LSD(qlfw->fw_dma)); > mn->dseg_address[1] = cpu_to_le32(MSD(qlfw->fw_dma)); >- mn->dseg_length = cpu_to_le16(1); >+ mn->dseg_length = cpu_to_le32(qlfw->len); >+ mn->data_seg_cnt = cpu_to_le16(1); > >- ret = qla2x00_issue_iocb(ha, mn, mn_dma, 0); >+ ret = qla2x00_issue_iocb_timeout(ha, mn, mn_dma, 0, 120); > > if (ret != QLA_SUCCESS) { > printk(KERN_ERR "%s(%lu): failed\n", __func__, ha->host_no); >@@ -331,7 +333,7 @@ ql_fc_proc_nl_rcv_msg(struct sk_buff *sk > > ha = (struct scsi_qla_host *)shost->hostdata; > >- if (!ha || !IS_QLA84XX(ha)) { >+ if (!ha || (!IS_QLA84XX(ha) && (ql_cmd->cmd != QLFC_GET_AEN))) { > printk(KERN_ERR "%s: invalid host ha = %p dtype = 0x%x\n", > __FUNCTION__, ha, (ha ? DT_MASK(ha): ~0)); > err = -ENODEV;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 464681
: 318002 |
321535