Commit fa2a1ce5 authored by Andrew Vasquez's avatar Andrew Vasquez Committed by James Bottomley

[SCSI] qla2xxx: Code scrubbing.

Code scrubbing.

 - Remove trailing whitespace from driver files.
 - Remove unused #defines and inlines.
 - Standardize on C comments (// -> /* */)
Signed-off-by: default avatarAndrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent ba5140b4
......@@ -21,8 +21,6 @@
#ifndef __QLA_FW_H
#define __QLA_FW_H
// ISP24xx
#define RISC_SADDRESS 0x100000
#define MBS_CHECKSUM_ERROR 0x4010
......@@ -60,7 +58,6 @@ struct port_database_24xx {
#define PDS_PORT_UNAVAILABLE 0x07
#define PDS_PRLO_PENDING 0x09
#define PDS_LOGO_PENDING 0x11
//FIXME
#define PDS_PRLI2_PENDING 0x12
uint8_t hard_address[3];
......
......@@ -120,36 +120,6 @@ qla2x00_poll(scsi_qla_host_t *ha)
ha->isp_ops.intr_handler(0, ha, NULL);
}
static __inline__ int qla2x00_is_wwn_zero(uint8_t *);
/*
* qla2x00_is_wwn_zero - Check for zero node name
*
* Input:
* wwn = Pointer to WW name to check
*
* Returns:
* 1 if name is 0x00 else 0
*
* Context:
* Kernel context.
*/
static __inline__ int
qla2x00_is_wwn_zero(uint8_t *wwn)
{
int cnt;
for (cnt = 0; cnt < WWN_SIZE ; cnt++, wwn++) {
if (*wwn != 0)
break;
}
/* if zero return 1 */
if (cnt == WWN_SIZE)
return (1);
else
return (0);
}
static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *);
/*
* This routine will wait for fabric devices for
......@@ -188,54 +158,6 @@ qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked)
return (QLA_SUCCESS);
}
static __inline__ void qla2x00_add_timer_to_cmd(srb_t *, int);
static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *);
/**************************************************************************
* qla2x00_add_timer_to_cmd
*
* Description:
* Creates a timer for the specified command. The timeout is usually
* the command time from kernel minus 2 secs.
*
* Input:
* sp - pointer to validate
*
* Returns:
* None.
**************************************************************************/
static inline void
qla2x00_add_timer_to_cmd(srb_t *sp, int timeout)
{
init_timer(&sp->timer);
sp->timer.expires = jiffies + timeout * HZ;
sp->timer.data = (unsigned long) sp;
sp->timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout;
add_timer(&sp->timer);
}
/**************************************************************************
* qla2x00_delete_timer_from_cmd
*
* Description:
* Delete the timer for the specified command.
*
* Input:
* sp - pointer to validate
*
* Returns:
* None.
**************************************************************************/
static inline void
qla2x00_delete_timer_from_cmd(srb_t *sp)
{
if (sp->timer.function != NULL) {
del_timer(&sp->timer);
sp->timer.function = NULL;
sp->timer.data = (unsigned long) NULL;
}
}
static inline uint8_t *host_to_fcp_swap(uint8_t *, uint32_t);
static inline uint8_t *
host_to_fcp_swap(uint8_t *fcp, uint32_t bsize)
......
......@@ -1365,7 +1365,6 @@ qla24xx_process_response_queue(struct scsi_qla_host *ha)
DEBUG3(printk(KERN_INFO
"scsi(%ld): Process error entry.\n", ha->host_no));
//FIXME
qla2x00_error_entry(ha, (sts_entry_t *) pkt);
((response_t *)pkt)->signature = RESPONSE_PROCESSED;
wmb();
......
......@@ -22,33 +22,8 @@
*/
#define DEBUG_QLA2100 0 /* For Debug of qla2x00 */
#define STOP_ON_RESET 0
#define USE_ABORT_TGT 1 /* Use Abort Target mbx cmd */
#define VSA 0 /* Volume Set Addressing */
/* Failover options */
#define MAX_RECOVERYTIME 10 /*
* Max suspend time for a lun recovery
* time
*/
#define MAX_FAILBACKTIME 5 /* Max suspend time before fail back */
#define QLA_CMD_TIMER_DELTA 3
/*
* When a lun is suspended for the "Not Ready" condition then it will suspend
* the lun for increments of 6 sec delays. SUSPEND_COUNT is that count.
*/
#define SUSPEND_COUNT 10 /* 6 secs * 10 retries = 60 secs */
/*
* Defines the time in seconds that the driver extends the command timeout to
* get around the problem where the mid-layer only allows 5 retries for
* commands that return BUS_BUSY
*/
#define EXTEND_CMD_TIMEOUT 60
#define MAX_RETRIES_OF_ISP_ABORT 5
/* Max time to wait for the loop to be in LOOP_READY state */
......
......@@ -542,18 +542,18 @@ qla24xx_write_flash_data(scsi_qla_host_t *ha, uint32_t *dwptr, uint32_t faddr,
conf_addr = flash_conf_to_access_addr(0x03d8);
switch (man_id) {
case 0xbf: // STT flash
case 0xbf: /* STT flash. */
rest_addr = 0x1fff;
sec_mask = 0x3e000;
if (flash_id == 0x80)
conf_addr = flash_conf_to_access_addr(0x0352);
break;
case 0x13: // ST M25P80
case 0x13: /* ST M25P80. */
rest_addr = 0x3fff;
sec_mask = 0x3c000;
break;
default:
// Default to 64 kb sector size
/* Default to 64 kb sector size. */
rest_addr = 0x3fff;
sec_mask = 0x3c000;
break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment