Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109690660
D19696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19696.diff
View Options
Index: head/sys/dev/smartpqi/smartpqi_cam.c
===================================================================
--- head/sys/dev/smartpqi/smartpqi_cam.c
+++ head/sys/dev/smartpqi/smartpqi_cam.c
@@ -458,6 +458,15 @@
DBG_IO("OUT\n");
}
+static void
+pqi_freeze_ccb(union ccb *ccb)
+{
+ if ((ccb->ccb_h.status & CAM_DEV_QFRZN) == 0) {
+ ccb->ccb_h.status |= CAM_DEV_QFRZN;
+ xpt_freeze_devq(ccb->ccb_h.path, 1);
+ }
+}
+
/*
* Command-mapping helper function - populate this command's s/g table.
*/
@@ -472,9 +481,8 @@
if( error || nseg > softs->pqi_cap.max_sg_elem )
{
- xpt_freeze_simq(softs->os_specific.sim, 1);
- rcb->cm_ccb->ccb_h.status |= (CAM_REQUEUE_REQ|
- CAM_RELEASE_SIMQ);
+ rcb->cm_ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
+ pqi_freeze_ccb(rcb->cm_ccb);
DBG_ERR_BTL(rcb->dvp, "map failed err = %d or nseg(%d) > sgelem(%d)\n",
error, nseg, softs->pqi_cap.max_sg_elem);
pqi_unmap_request(rcb);
@@ -484,9 +492,8 @@
rcb->sgt = os_mem_alloc(softs, nseg * sizeof(rcb_t));
if (rcb->sgt == NULL) {
- xpt_freeze_simq(softs->os_specific.sim, 1);
- rcb->cm_ccb->ccb_h.status |= (CAM_REQUEUE_REQ|
- CAM_RELEASE_SIMQ);
+ rcb->cm_ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
+ pqi_freeze_ccb(rcb->cm_ccb);
DBG_ERR_BTL(rcb->dvp, "os_mem_alloc() failed; nseg = %d\n", nseg);
pqi_unmap_request(rcb);
xpt_done((union ccb *)rcb->cm_ccb);
@@ -514,9 +521,8 @@
if (error) {
rcb->req_pending = false;
- xpt_freeze_simq(softs->os_specific.sim, 1);
- rcb->cm_ccb->ccb_h.status |= (CAM_REQUEUE_REQ
- |CAM_RELEASE_SIMQ);
+ rcb->cm_ccb->ccb_h.status = CAM_RESRC_UNAVAIL;
+ pqi_freeze_ccb(rcb->cm_ccb);
DBG_ERR_BTL(rcb->dvp, "Build IO failed, error = %d\n", error);
pqi_unmap_request(rcb);
xpt_done((union ccb *)rcb->cm_ccb);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 9, 9:45 AM (21 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16550546
Default Alt Text
D19696.diff (1 KB)
Attached To
Mode
D19696: Make smartpqi(4) behave better when running out of memory.
Attached
Detach File
Event Timeline
Log In to Comment