FreeBSD Bugzilla – Attachment 7382 Details for
Bug 16049
Connor Drive fails cache sync
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
scsi_da.c.cache_sync.stable.20000120
scsi_da.c.cache_sync.stable.20000120 (text/plain; charset=us-ascii), 4.38 KB, created by
ken
on 2000-01-21 04:51:08 UTC
(
hide
)
Description:
scsi_da.c.cache_sync.stable.20000120
Filename:
MIME Type:
Creator:
ken
Created:
2000-01-21 04:51:08 UTC
Size:
4.38 KB
patch
obsolete
>==== //depot/FreeBSD-ken-stable/src/sys/cam/scsi/scsi_da.c#1 - /a/ken/perforce/FreeBSD-ken-stable/src/sys/cam/scsi/scsi_da.c ==== >*** /tmp/tmp.4027.0 Thu Jan 20 21:47:33 2000 >--- /a/ken/perforce/FreeBSD-ken-stable/src/sys/cam/scsi/scsi_da.c Thu Jan 20 21:46:25 2000 >*************** >*** 263,268 **** >--- 263,269 ---- > > static SLIST_HEAD(,da_softc) softc_list; > static struct extend_array *daperiphs; >+ static union ccb *da_shutdown_ccb; > > static int > daopen(dev_t dev, int flags, int fmt, struct proc *p) >*************** >*** 808,814 **** > printf("da: Failed to alloc extend array!\n"); > return; > } >! > /* > * Install a global async callback. This callback will > * receive async callbacks like "new device found". >--- 809,826 ---- > printf("da: Failed to alloc extend array!\n"); > return; > } >! >! da_shutdown_ccb = malloc(sizeof(union ccb), M_DEVBUF, M_NOWAIT); >! if (da_shutdown_ccb == NULL) { >! /* >! * XXX KDM should we worry about a memory leak from >! * daperiphs here? >! */ >! printf("da: Failed to alloc shutdown CCB!\n"); >! return; >! } else >! bzero(da_shutdown_ccb, sizeof(union ccb)); >! > /* > * Install a global async callback. This callback will > * receive async callbacks like "new device found". >*************** >*** 1578,1586 **** > > for (periph = TAILQ_FIRST(&dadriver.units); periph != NULL; > periph = TAILQ_NEXT(periph, unit_links)) { >! union ccb ccb; > softc = (struct da_softc *)periph->softc; > > /* > * We only sync the cache if the drive is still open, and > * if the drive is capable of it.. >--- 1590,1600 ---- > > for (periph = TAILQ_FIRST(&dadriver.units); periph != NULL; > periph = TAILQ_NEXT(periph, unit_links)) { >! union ccb *ccb; > softc = (struct da_softc *)periph->softc; > >+ ccb = da_shutdown_ccb; >+ > /* > * We only sync the cache if the drive is still open, and > * if the drive is capable of it.. >*************** >*** 1589,1598 **** > || (softc->quirks & DA_Q_NO_SYNC_CACHE)) > continue; > >! xpt_setup_ccb(&ccb.ccb_h, periph->path, /*priority*/1); > >! ccb.ccb_h.ccb_state = DA_CCB_DUMP; >! scsi_synchronize_cache(&ccb.csio, > /*retries*/1, > /*cbfcnp*/dadone, > MSG_SIMPLE_Q_TAG, >--- 1603,1612 ---- > || (softc->quirks & DA_Q_NO_SYNC_CACHE)) > continue; > >! xpt_setup_ccb(&ccb->ccb_h, periph->path, /*priority*/1); > >! ccb->ccb_h.ccb_state = DA_CCB_DUMP; >! scsi_synchronize_cache(&ccb->csio, > /*retries*/1, > /*cbfcnp*/dadone, > MSG_SIMPLE_Q_TAG, >*************** >*** 1601,1630 **** > SSD_FULL_SIZE, > 5 * 60 * 1000); > >! xpt_polled_action(&ccb); > >! if ((ccb.ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { >! if (((ccb.ccb_h.status & CAM_STATUS_MASK) == > CAM_SCSI_STATUS_ERROR) >! && (ccb.csio.scsi_status == SCSI_STATUS_CHECK_COND)){ > int error_code, sense_key, asc, ascq; > >! scsi_extract_sense(&ccb.csio.sense_data, > &error_code, &sense_key, > &asc, &ascq); > > if (sense_key != SSD_KEY_ILLEGAL_REQUEST) >! scsi_sense_print(&ccb.csio); > } else { > xpt_print_path(periph->path); > printf("Synchronize cache failed, status " > "== 0x%x, scsi status == 0x%x\n", >! ccb.ccb_h.status, ccb.csio.scsi_status); > } > } > >! if ((ccb.ccb_h.status & CAM_DEV_QFRZN) != 0) >! cam_release_devq(ccb.ccb_h.path, > /*relsim_flags*/0, > /*reduction*/0, > /*timeout*/0, >--- 1615,1645 ---- > SSD_FULL_SIZE, > 5 * 60 * 1000); > >! xpt_polled_action(ccb); > >! if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { >! if (((ccb->ccb_h.status & CAM_STATUS_MASK) == > CAM_SCSI_STATUS_ERROR) >! && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND)){ > int error_code, sense_key, asc, ascq; > >! scsi_extract_sense(&ccb->csio.sense_data, > &error_code, &sense_key, > &asc, &ascq); > > if (sense_key != SSD_KEY_ILLEGAL_REQUEST) >! scsi_sense_print(&ccb->csio); > } else { > xpt_print_path(periph->path); > printf("Synchronize cache failed, status " > "== 0x%x, scsi status == 0x%x\n", >! ccb->ccb_h.status, >! ccb->csio.scsi_status); > } > } > >! if ((ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) >! cam_release_devq(ccb->ccb_h.path, > /*relsim_flags*/0, > /*reduction*/0, > /*timeout*/0,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 16049
:
7381
| 7382