Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144311508
D42807.id130732.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D42807.id130732.diff
View Options
diff --git a/sys/dev/mpi3mr/mpi3mr_cam.c b/sys/dev/mpi3mr/mpi3mr_cam.c
--- a/sys/dev/mpi3mr/mpi3mr_cam.c
+++ b/sys/dev/mpi3mr/mpi3mr_cam.c
@@ -98,7 +98,6 @@
mpi3mr_register_events(struct mpi3mr_softc *sc);
extern void mpi3mr_add_sg_single(void *paddr, U8 flags, U32 length,
bus_addr_t dma_addr);
-extern void mpi3mr_build_zero_len_sge(void *paddr);
static U32 event_count;
@@ -147,6 +146,9 @@
KASSERT(nsegs <= MPI3MR_SG_DEPTH && nsegs > 0,
("%s: bad SGE count: %d\n", device_get_nameunit(sc->mpi3mr_dev), nsegs));
+ KASSERT(scsiio_req->DataLength != 0,
+ ("%s: Data segments (%d), but DataLength == 0\n",
+ device_get_nameunit(sc->mpi3mr_dev), nsegs));
simple_sgl_flags = MPI3_SGE_FLAGS_ELEMENT_TYPE_SIMPLE |
MPI3_SGE_FLAGS_DLAS_SYSTEM;
@@ -157,13 +159,6 @@
sg_local = (U8 *)&scsiio_req->SGL;
- if (scsiio_req->DataLength == 0) {
- /* XXX we don't ever get here when DataLength == 0, right? cm->data is NULL */
- /* This whole if can likely be removed -- we handle it in mpi3mr_request_map */
- mpi3mr_build_zero_len_sge(sg_local);
- goto enqueue;
- }
-
sges_left = nsegs;
sges_in_segment = (sc->facts.op_req_sz -
@@ -214,7 +209,6 @@
i++;
}
-enqueue:
/*
* Now that we've created the sgls, we send the request to the device.
* Unlike in Linux, dmaload isn't guaranteed to load every time, but
@@ -879,10 +873,10 @@
return;
/*
- * task abort and target reset has failed. So issue Controller reset(soft reset)
+ * task abort and target reset has failed. So issue Controller reset(soft reset)
* through OCR thread context
*/
- trigger_reset_from_watchdog(sc, MPI3MR_TRIGGER_SOFT_RESET, MPI3MR_RESET_FROM_SCSIIO_TIMEOUT);
+ trigger_reset_from_watchdog(sc, MPI3MR_TRIGGER_SOFT_RESET, MPI3MR_RESET_FROM_SCSIIO_TIMEOUT);
return;
}
@@ -976,7 +970,7 @@
}
if (targ->dev_handle == 0x0) {
- mpi3mr_dprint(sc, MPI3MR_ERROR, "%s NULL handle for target 0x%x\n",
+ mpi3mr_dprint(sc, MPI3MR_ERROR, "%s NULL handle for target 0x%x\n",
__func__, csio->ccb_h.target_id);
mpi3mr_set_ccbstatus(ccb, CAM_DEV_NOT_THERE);
xpt_done(ccb);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 7:11 PM (9 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28486974
Default Alt Text
D42807.id130732.diff (2 KB)
Attached To
Mode
D42807: mpi3mr: Replace can't happen DataLength == 0 with an assert
Attached
Detach File
Event Timeline
Log In to Comment