ql4_attr.c (f9cd49033b349b8be3bb1f01b39eed837853d880) ql4_attr.c (f8086f4fd462195a5a824c851997bd12ffceae00)
1/*
2 * QLogic iSCSI HBA Driver
3 * Copyright (c) 2003-2011 QLogic Corporation
4 *
5 * See LICENSE.qla4xxx for copyright and licensing details.
6 */
7
8#include "ql4_def.h"

--- 61 unchanged lines hidden (view full) ---

70 set_bit(AF_82XX_DUMP_READING, &ha->flags);
71 DEBUG2(ql4_printk(KERN_INFO, ha,
72 "Raw firmware dump ready for read on (%ld).\n",
73 ha->host_no));
74 }
75 break;
76 case 2:
77 /* Reset HBA */
1/*
2 * QLogic iSCSI HBA Driver
3 * Copyright (c) 2003-2011 QLogic Corporation
4 *
5 * See LICENSE.qla4xxx for copyright and licensing details.
6 */
7
8#include "ql4_def.h"

--- 61 unchanged lines hidden (view full) ---

70 set_bit(AF_82XX_DUMP_READING, &ha->flags);
71 DEBUG2(ql4_printk(KERN_INFO, ha,
72 "Raw firmware dump ready for read on (%ld).\n",
73 ha->host_no));
74 }
75 break;
76 case 2:
77 /* Reset HBA */
78 qla4_8xxx_idc_lock(ha);
79 dev_state = qla4_8xxx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
78 qla4_82xx_idc_lock(ha);
79 dev_state = qla4_82xx_rd_32(ha, QLA82XX_CRB_DEV_STATE);
80 if (dev_state == QLA82XX_DEV_READY) {
81 ql4_printk(KERN_INFO, ha,
82 "%s: Setting Need reset, reset_owner is 0x%x.\n",
83 __func__, ha->func_num);
80 if (dev_state == QLA82XX_DEV_READY) {
81 ql4_printk(KERN_INFO, ha,
82 "%s: Setting Need reset, reset_owner is 0x%x.\n",
83 __func__, ha->func_num);
84 qla4_8xxx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
84 qla4_82xx_wr_32(ha, QLA82XX_CRB_DEV_STATE,
85 QLA82XX_DEV_NEED_RESET);
86 set_bit(AF_82XX_RST_OWNER, &ha->flags);
87 } else
88 ql4_printk(KERN_INFO, ha,
89 "%s: Reset not performed as device state is 0x%x\n",
90 __func__, dev_state);
91
85 QLA82XX_DEV_NEED_RESET);
86 set_bit(AF_82XX_RST_OWNER, &ha->flags);
87 } else
88 ql4_printk(KERN_INFO, ha,
89 "%s: Reset not performed as device state is 0x%x\n",
90 __func__, dev_state);
91
92 qla4_8xxx_idc_unlock(ha);
92 qla4_82xx_idc_unlock(ha);
93 break;
94 default:
95 /* do nothing */
96 break;
97 }
98
99 return count;
100}

--- 179 unchanged lines hidden ---
93 break;
94 default:
95 /* do nothing */
96 break;
97 }
98
99 return count;
100}

--- 179 unchanged lines hidden ---