aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla2xxx/qla_inline.h
diff options
context:
space:
mode:
authorAndrew Vasquez <andrew.vasquez@qlogic.com>2005-07-06 13:32:07 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-07-14 11:03:15 -0400
commitfa2a1ce53d4b869b74da9a770770c79f9af64914 (patch)
treeda350e79117d3177f51c2788c51aeba425afd4ca /drivers/scsi/qla2xxx/qla_inline.h
parentba5140b48e35aa4e4b57eb6db5cface63d7bd712 (diff)
[SCSI] qla2xxx: Code scrubbing.
Code scrubbing. - Remove trailing whitespace from driver files. - Remove unused #defines and inlines. - Standardize on C comments (// -> /* */) Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_inline.h')
-rw-r--r--drivers/scsi/qla2xxx/qla_inline.h86
1 files changed, 4 insertions, 82 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h
index a4357f0aeea3..98f60bde2d4f 100644
--- a/drivers/scsi/qla2xxx/qla_inline.h
+++ b/drivers/scsi/qla2xxx/qla_inline.h
@@ -30,7 +30,7 @@ static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t __iomem *
30 * register value. 30 * register value.
31 */ 31 */
32static __inline__ uint16_t 32static __inline__ uint16_t
33qla2x00_debounce_register(volatile uint16_t __iomem *addr) 33qla2x00_debounce_register(volatile uint16_t __iomem *addr)
34{ 34{
35 volatile uint16_t first; 35 volatile uint16_t first;
36 volatile uint16_t second; 36 volatile uint16_t second;
@@ -78,7 +78,7 @@ static __inline__ int qla2x00_normalize_dma_addr(
78 * ffffabc1ffffeeee (0x100000000 + e_addr) 78 * ffffabc1ffffeeee (0x100000000 + e_addr)
79 * ffffabc100000000 (0x100000000 + e_addr) & ~(0xffffffff) 79 * ffffabc100000000 (0x100000000 + e_addr) & ~(0xffffffff)
80 * ffffabc100000000 (ne_addr) 80 * ffffabc100000000 (ne_addr)
81 * 81 *
82 * Compute length of second DMA segment: 82 * Compute length of second DMA segment:
83 * 83 *
84 * 00000000ffffeeee (e_addr & 0xffffffff) 84 * 00000000ffffeeee (e_addr & 0xffffffff)
@@ -114,48 +114,18 @@ qla2x00_normalize_dma_addr(
114} 114}
115 115
116static __inline__ void qla2x00_poll(scsi_qla_host_t *); 116static __inline__ void qla2x00_poll(scsi_qla_host_t *);
117static inline void 117static inline void
118qla2x00_poll(scsi_qla_host_t *ha) 118qla2x00_poll(scsi_qla_host_t *ha)
119{ 119{
120 ha->isp_ops.intr_handler(0, ha, NULL); 120 ha->isp_ops.intr_handler(0, ha, NULL);
121} 121}
122 122
123static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
124
125/*
126 * qla2x00_is_wwn_zero - Check for zero node name
127 *
128 * Input:
129 * wwn = Pointer to WW name to check
130 *
131 * Returns:
132 * 1 if name is 0x00 else 0
133 *
134 * Context:
135 * Kernel context.
136 */
137static __inline__ int
138qla2x00_is_wwn_zero(uint8_t *wwn)
139{
140 int cnt;
141
142 for (cnt = 0; cnt < WWN_SIZE ; cnt++, wwn++) {
143 if (*wwn != 0)
144 break;
145 }
146 /* if zero return 1 */
147 if (cnt == WWN_SIZE)
148 return (1);
149 else
150 return (0);
151}
152
153static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *); 123static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *);
154/* 124/*
155 * This routine will wait for fabric devices for 125 * This routine will wait for fabric devices for
156 * the reset delay. 126 * the reset delay.
157 */ 127 */
158static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) 128static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha)
159{ 129{
160 uint16_t fw_state; 130 uint16_t fw_state;
161 131
@@ -188,54 +158,6 @@ qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked)
188 return (QLA_SUCCESS); 158 return (QLA_SUCCESS);
189} 159}
190 160
191static __inline__ void qla2x00_add_timer_to_cmd(srb_t *, int);
192static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *);
193
194/**************************************************************************
195* qla2x00_add_timer_to_cmd
196*
197* Description:
198* Creates a timer for the specified command. The timeout is usually
199* the command time from kernel minus 2 secs.
200*
201* Input:
202* sp - pointer to validate
203*
204* Returns:
205* None.
206**************************************************************************/
207static inline void
208qla2x00_add_timer_to_cmd(srb_t *sp, int timeout)
209{
210 init_timer(&sp->timer);
211 sp->timer.expires = jiffies + timeout * HZ;
212 sp->timer.data = (unsigned long) sp;
213 sp->timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout;
214 add_timer(&sp->timer);
215}
216
217/**************************************************************************
218* qla2x00_delete_timer_from_cmd
219*
220* Description:
221* Delete the timer for the specified command.
222*
223* Input:
224* sp - pointer to validate
225*
226* Returns:
227* None.
228**************************************************************************/
229static inline void
230qla2x00_delete_timer_from_cmd(srb_t *sp)
231{
232 if (sp->timer.function != NULL) {
233 del_timer(&sp->timer);
234 sp->timer.function = NULL;
235 sp->timer.data = (unsigned long) NULL;
236 }
237}
238
239static inline uint8_t *host_to_fcp_swap(uint8_t *, uint32_t); 161static inline uint8_t *host_to_fcp_swap(uint8_t *, uint32_t);
240static inline uint8_t * 162static inline uint8_t *
241host_to_fcp_swap(uint8_t *fcp, uint32_t bsize) 163host_to_fcp_swap(uint8_t *fcp, uint32_t bsize)