Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpt/mpt.c
Show First 20 Lines • Show All 2,685 Lines • ▼ Show 20 Lines | mpt_configure_ioc(struct mpt_softc *mpt, int tn, int needreset) | ||||
} | } | ||||
/* converted to the number of simple sges in chain segments. */ | /* converted to the number of simple sges in chain segments. */ | ||||
mpt->max_seg_cnt *= (MPT_NSGL(mpt) - 1); | mpt->max_seg_cnt *= (MPT_NSGL(mpt) - 1); | ||||
/* | /* | ||||
* Use this as the basis for reporting the maximum I/O size to CAM. | * Use this as the basis for reporting the maximum I/O size to CAM. | ||||
*/ | */ | ||||
mpt->max_cam_seg_cnt = min(mpt->max_seg_cnt, (MAXPHYS / PAGE_SIZE) + 1); | mpt->max_cam_seg_cnt = min(mpt->max_seg_cnt, btoc(maxphys) + 1); | ||||
/* XXX Lame Locking! */ | /* XXX Lame Locking! */ | ||||
MPT_UNLOCK(mpt); | MPT_UNLOCK(mpt); | ||||
error = mpt_dma_buf_alloc(mpt); | error = mpt_dma_buf_alloc(mpt); | ||||
MPT_LOCK(mpt); | MPT_LOCK(mpt); | ||||
if (error != 0) { | if (error != 0) { | ||||
mpt_prt(mpt, "mpt_dma_buf_alloc() failed!\n"); | mpt_prt(mpt, "mpt_dma_buf_alloc() failed!\n"); | ||||
▲ Show 20 Lines • Show All 447 Lines • Show Last 20 Lines |