summaryrefslogtreecommitdiffstats
path: root/sys/dev/twa
diff options
context:
space:
mode:
authorvkashyap <vkashyap@FreeBSD.org>2005-02-10 18:07:33 +0000
committervkashyap <vkashyap@FreeBSD.org>2005-02-10 18:07:33 +0000
commit53986fb12f8c25cc567186f155318de8be9d04b0 (patch)
tree6c7615c8c36f825fa38e0b95dd378ae1b778737d /sys/dev/twa
parent5ac91dfb2b3ecaf85d364f9dd2c55a9685268c07 (diff)
downloadFreeBSD-src-53986fb12f8c25cc567186f155318de8be9d04b0.zip
FreeBSD-src-53986fb12f8c25cc567186f155318de8be9d04b0.tar.gz
1. Revert back to the way the older driver handled XPT_PATH_INQ. This seems to
fix the problem with device discovery seen by some people. 2. Change to make 3ware CLI/3DM work on amd64. 3. Fix a potential problem that could cause the driver to do strlen(NULL) when using older firmware. Reviewed by:scottl
Diffstat (limited to 'sys/dev/twa')
-rw-r--r--sys/dev/twa/twa_cam.c4
-rw-r--r--sys/dev/twa/twa_globals.c6
-rw-r--r--sys/dev/twa/twa_ioctl.h4
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/dev/twa/twa_cam.c b/sys/dev/twa/twa_cam.c
index e793408..d384058 100644
--- a/sys/dev/twa/twa_cam.c
+++ b/sys/dev/twa/twa_cam.c
@@ -409,9 +409,9 @@ twa_action(struct cam_sim *sim, union ccb *ccb)
twa_dbg_dprint(3, sc, "XPT_PATH_INQ request");
path_inq->version_num = 1;
- path_inq->hba_inquiry = PI_WIDE_16;
+ path_inq->hba_inquiry = 0;
path_inq->target_sprt = 0;
- path_inq->hba_misc |= PIM_NOBUSRESET;
+ path_inq->hba_misc = 0;
path_inq->hba_eng_cnt = 0;
path_inq->max_target = TWA_MAX_UNITS;
path_inq->max_lun = 0;
diff --git a/sys/dev/twa/twa_globals.c b/sys/dev/twa/twa_globals.c
index 71a0437..9fb0a44 100644
--- a/sys/dev/twa/twa_globals.c
+++ b/sys/dev/twa/twa_globals.c
@@ -137,7 +137,7 @@ struct twa_message twa_aen_table[] = {
{0x00FD, "Handler lockup"},
{0x00FE, "Retrying PCI transfer"},
{0x00FF, "AEN queue is full"},
- {0xFFFFFFFF, (char *)NULL}
+ {0xFFFFFFFF, ""}
};
/* AEN severity table. */
@@ -147,7 +147,7 @@ char *twa_aen_severity_table[] = {
"WARNING",
"INFO",
"DEBUG",
- (char *)NULL
+ ""
};
/* Error messages. */
@@ -307,7 +307,7 @@ struct twa_message twa_error_table[] = {
{0x0330, "Log updates not allowed"},
{0x0331, "Logs are invalid"},
{0x0332, "Logs not found"},
- {0xFFFFFFFF, (char *)NULL}
+ {0xFFFFFFFF, ""}
};
#ifdef TWA_DEBUG
diff --git a/sys/dev/twa/twa_ioctl.h b/sys/dev/twa/twa_ioctl.h
index 80373fe..20b95bb 100644
--- a/sys/dev/twa/twa_ioctl.h
+++ b/sys/dev/twa/twa_ioctl.h
@@ -89,7 +89,7 @@ struct twa_driver_packet {
struct twa_ioctl_9k {
struct twa_driver_packet twa_drvr_pkt;
void *pdata; /* points to data_buf */
- int8_t padding[484];
+ int8_t padding[488 - sizeof(void *)];
struct twa_command_packet twa_cmd_pkt;
int8_t data_buf[1];
} __attribute__ ((packed));
@@ -106,7 +106,7 @@ struct twa_ioctl_9k {
typedef struct twa_ioctl_no_data_buf {
struct twa_driver_packet twa_drvr_pkt;
void *pdata; /* points to data_buf */
- int8_t padding[484];
+ int8_t padding[488 - sizeof(void *)];
struct twa_command_packet twa_cmd_pkt;
} __attribute__ ((packed)) TWA_IOCTL_NO_DATA_BUF;
#pragma pack()
OpenPOWER on IntegriCloud