summaryrefslogtreecommitdiffstats
path: root/sys/dev/mps/mpsvar.h
diff options
context:
space:
mode:
authorken <ken@FreeBSD.org>2012-02-09 00:16:12 +0000
committerken <ken@FreeBSD.org>2012-02-09 00:16:12 +0000
commit56527fa077227f78a92c9ebc6f4f35d1bc3e1c21 (patch)
treeacc2ba8ff0a6aa587d87c9c2aa723021f645f776 /sys/dev/mps/mpsvar.h
parentb4a5c1a064c98334f494dc7c37e42d5cff057772 (diff)
downloadFreeBSD-src-56527fa077227f78a92c9ebc6f4f35d1bc3e1c21.zip
FreeBSD-src-56527fa077227f78a92c9ebc6f4f35d1bc3e1c21.tar.gz
Bring in a number of mps(4) driver fixes from LSI:
1. Fixed timeout specification for the msleep in mps_wait_command(). Added 30 second timeout for mps_wait_command() calls in mps_user.c. 2. Make sure we call mps_detach_user() from the kldunload path. 3. Raid Hotplug behavior change. The driver now removes a volume when it goes to a failed state, so we also need to add volume back to the OS when it goes to opitimal/degraded/online from failed/missing. Handle raid volume add and remove from the IR_Volume event. 4. Added some more debugging information. 5. Replace xpt_async(AC_LOST_DEVICE, path, NULL) with mpssas_rescan_target(). This is to work around a panic in CAM that shows up when adding a drive with a rescan and removing another device from the driver thread with an AC_LOST_DEVICE async notification. This problem was encountered in testing with the LSI sas2ircu utility, which was used to create a RAID volume from physical disks. The driver has to create the RAID volume target and remove the physical disk targets, and triggered a panic in the process. The CAM issue needs to be fully diagnosed and fixed, but this works around the issue for now. 6. Fix some memory initialization issues in mps_free_command(). 7. Resolve the "devq freeze forever" issue. This was caused by the internal read capacity command issued in the non-head version of the driver. When the command completed with an error, the driver wasn't unfreezing thd device queue. The version in head uses the CAM infrastructure for getting the read capacity information, and therefore doesn't have the same issue. 8. Bump the version to 13.00.00.00-fbsd. (this is very close to LSI's internal stable driver 13.00.00.00) Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com> MFC after: 3 days
Diffstat (limited to 'sys/dev/mps/mpsvar.h')
-rw-r--r--sys/dev/mps/mpsvar.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/sys/dev/mps/mpsvar.h b/sys/dev/mps/mpsvar.h
index c6f83df..6246c46 100644
--- a/sys/dev/mps/mpsvar.h
+++ b/sys/dev/mps/mpsvar.h
@@ -58,7 +58,7 @@
#ifndef _MPSVAR_H
#define _MPSVAR_H
-#define MPS_DRIVER_VERSION "11.255.03.00-fbsd"
+#define MPS_DRIVER_VERSION "13.00.00.00-fbsd"
#define MPS_DB_MAX_WAIT 2500
@@ -78,6 +78,7 @@
#define MPS_PERIODIC_DELAY 1 /* 1 second heartbeat/watchdog check */
#define MPS_SCSI_RI_INVALID_FRAME (0x00000002)
+#define MPS_STRING_LENGTH 64
/*
* host mapping related macro definitions
@@ -309,7 +310,7 @@ struct mps_softc {
struct callout periodic;
struct mpssas_softc *sassc;
-
+ char tmp_string[MPS_STRING_LENGTH];
TAILQ_HEAD(, mps_command) req_list;
TAILQ_HEAD(, mps_command) high_priority_req_list;
TAILQ_HEAD(, mps_chain) chain_list;
@@ -521,6 +522,12 @@ mps_free_command(struct mps_softc *sc, struct mps_command *cm)
cm->cm_max_segs = 0;
cm->cm_lun = 0;
cm->cm_state = MPS_CM_STATE_FREE;
+ cm->cm_data = NULL;
+ cm->cm_length = 0;
+ cm->cm_out_len = 0;
+ cm->cm_sglsize = 0;
+ cm->cm_sge = NULL;
+
TAILQ_FOREACH_SAFE(chain, &cm->cm_chain_list, chain_link, chain_temp) {
TAILQ_REMOVE(&cm->cm_chain_list, chain, chain_link);
mps_free_chain(sc, chain);
@@ -749,7 +756,9 @@ void mps_mapping_ir_config_change_event(struct mps_softc *sc,
void mpssas_evt_handler(struct mps_softc *sc, uintptr_t data,
MPI2_EVENT_NOTIFICATION_REPLY *event);
void mpssas_prepare_remove(struct mpssas_softc *sassc, uint16_t handle);
+void mpssas_prepare_volume_remove(struct mpssas_softc *sassc, uint16_t handle);
int mpssas_startup(struct mps_softc *sc);
+struct mpssas_target * mpssas_find_target_by_handle(struct mpssas_softc *, int, uint16_t);
SYSCTL_DECL(_hw_mps);
OpenPOWER on IntegriCloud