Deleted Added
full compact
97c97
< __FBSDID("$FreeBSD: head/sys/dev/mpt/mpt_cam.c 168831 2007-04-18 04:58:53Z scottl $");
---
> __FBSDID("$FreeBSD: head/sys/dev/mpt/mpt_cam.c 169293 2007-05-05 20:18:24Z mjacob $");
219a220
> MPT_LOCK(mpt);
228c229,230
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
235c237,238
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
247c250,251
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
251c255,256
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
266c271,272
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
277c283,284
< goto cleanup0;
---
> MPT_UNLOCK(mpt);
> goto cleanup;
288a296,300
> /*
> * The rest of this is CAM foo, for which we need to drop our lock
> */
> MPT_UNLOCK(mpt);
>
292c304
< goto cleanup0;
---
> goto cleanup;
296,300d307
< * The rest of this is CAM foo, for which we need to drop our lock
< */
< MPTLOCK_2_CAMLOCK(mpt);
<
< /*
313,314c320,321
< mpt->sim = cam_sim_alloc(mpt_action, mpt_poll, "mpt", mpt,
< mpt->unit, &Giant, 1, maxq, devq);
---
> mpt->sim =
> mpt_sim_alloc(mpt_action, mpt_poll, "mpt", mpt, 1, maxq, devq);
324a332
> MPT_LOCK(mpt);
327a336
> MPT_UNLOCK(mpt);
334a344
> MPT_UNLOCK(mpt);
336a347
> MPT_UNLOCK(mpt);
343d353
< CAMLOCK_2_MPTLOCK(mpt);
350,351c360,361
< mpt->phydisk_sim = cam_sim_alloc(mpt_action, mpt_poll, "mpt", mpt,
< mpt->unit, &Giant, 1, maxq, devq);
---
> mpt->phydisk_sim =
> mpt_sim_alloc(mpt_action, mpt_poll, "mpt", mpt, 1, maxq, devq);
360a371
> MPT_LOCK(mpt);
363a375
> MPT_UNLOCK(mpt);
371a384
> MPT_UNLOCK(mpt);
374c387
< CAMLOCK_2_MPTLOCK(mpt);
---
> MPT_UNLOCK(mpt);
379,380d391
< CAMLOCK_2_MPTLOCK(mpt);
< cleanup0:
447a459
> MPT_UNLOCK(mpt);
470a483
> MPT_LOCK(mpt);
802a816,820
> int error;
>
> MPT_LOCK(mpt);
>
> error = EIO;
805c823
< return (EIO);
---
> goto out;
808c826
< return (EIO);
---
> goto out;
812c830
< return (EIO);
---
> goto out;
815c833
< return (EIO);
---
> goto out;
819c837
< return (EIO);
---
> goto out;
822c840
< return (EIO);
---
> goto out;
825c843,847
< return (0);
---
> error = 0;
>
> out:
> MPT_UNLOCK(mpt);
> return (error);
852a875
> MPT_LOCK(mpt);
873a897
> MPT_UNLOCK(mpt);
876d899
< MPTLOCK_2_CAMLOCK(mpt);
881d903
< CAMLOCK_2_MPTLOCK(mpt);
885d906
< MPTLOCK_2_CAMLOCK(mpt);
890d910
< CAMLOCK_2_MPTLOCK(mpt);
902d921
< MPT_LOCK(mpt);
904d922
< MPT_UNLOCK(mpt);
1310,1312c1328,1329
< ccb->ccb_h.timeout_ch =
< timeout(mpt_timeout, (caddr_t)ccb,
< (ccb->ccb_h.timeout * hz) / 1000);
---
> mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000,
> mpt_timeout, ccb);
1314c1331
< callout_handle_init(&ccb->ccb_h.timeout_ch);
---
> mpt_req_timeout_init(req);
1712,1714c1729,1730
< ccb->ccb_h.timeout_ch =
< timeout(mpt_timeout, (caddr_t)ccb,
< (ccb->ccb_h.timeout * hz) / 1000);
---
> mpt_req_timeout(req, (ccb->ccb_h.timeout * hz) / 1000,
> mpt_timeout, ccb);
1716c1732
< callout_handle_init(&ccb->ccb_h.timeout_ch);
---
> mpt_req_timeout_init(req);
2284c2300
< untimeout(mpt_timeout, ccb, ccb->ccb_h.timeout_ch);
---
> mpt_req_untimeout(req, mpt_timeout, ccb);
2907d2922
< KASSERT(MPT_OWNED(mpt) == 0, ("mpt owned on entrance to mpt_action"));
2908a2924
> MPT_LOCK_ASSERT(mpt);
3655,3657d3670
< #if __FreeBSD_version >= 500000
< mtx_lock(&Giant);
< #endif
3674,3676d3686
< #if __FreeBSD_version >= 500000
< mtx_unlock(&Giant);
< #endif
4616c4626
< ccb->ccb_h.timeout_ch = timeout(mpt_timeout, ccb, 60 * hz);
---
> mpt_req_timeout(req, 60 * hz, mpt_timeout, ccb);
5031c5041
< untimeout(mpt_timeout, ccb, ccb->ccb_h.timeout_ch);
---
> mpt_req_untimeout(req, mpt_timeout, ccb);
5096,5097c5106
< untimeout(mpt_timeout, ccb,
< ccb->ccb_h.timeout_ch);
---
> mpt_req_untimeout(req, mpt_timeout, ccb);