diff options
author | simokawa <simokawa@FreeBSD.org> | 2004-01-23 17:37:09 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2004-01-23 17:37:09 +0000 |
commit | 21c2acb52a3ed99e0e1412f654ace5729fee155d (patch) | |
tree | 864be2c85d1e5de03808a955e6ce83ba660c14f9 /sys | |
parent | d0bcb20ae1b6ac3b18ba535de9ca5fa099dfc08e (diff) | |
download | FreeBSD-src-21c2acb52a3ed99e0e1412f654ace5729fee155d.zip FreeBSD-src-21c2acb52a3ed99e0e1412f654ace5729fee155d.tar.gz |
* fwohci_pci.c
Improve error message for attach failure.
* sbp_targ.c
- Add speed in struct sbp_targ_login.
- Remove unnecessary htonl().
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/firewire/fwohci_pci.c | 12 | ||||
-rw-r--r-- | sys/dev/firewire/sbp_targ.c | 15 |
2 files changed, 17 insertions, 10 deletions
diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index 891c4b2..6f516ed 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -324,11 +324,17 @@ fwohci_pci_attach(device_t self) err = fwohci_init(sc, self); - if (!err) - err = device_probe_and_attach(sc->fc.bdev); + if (err) { + device_printf(self, "fwohci_init failed with err=%d\n", err); + fwohci_pci_detach(self); + return EIO; + } + + err = device_probe_and_attach(sc->fc.bdev); if (err) { - device_printf(self, "FireWire init failed with err=%d\n", err); + device_printf(self, "probe_and_attach failed with err=%d\n", + err); fwohci_pci_detach(self); return EIO; } diff --git a/sys/dev/firewire/sbp_targ.c b/sys/dev/firewire/sbp_targ.c index 32f11cf..5f7c7be 100644 --- a/sys/dev/firewire/sbp_targ.c +++ b/sys/dev/firewire/sbp_targ.c @@ -105,15 +105,16 @@ struct sbp_targ_login { struct sbp_targ_lstate *lstate; struct fw_device *fwdev; struct sbp_login_res loginres; - u_int32_t flags; u_int16_t fifo_hi; u_int16_t last_hi; u_int32_t fifo_lo; u_int32_t last_lo; STAILQ_HEAD(, orb_info) orbs; - u_int16_t id; STAILQ_ENTRY(sbp_targ_login) link; - int hold_sec; + u_int16_t hold_sec; + u_int16_t id; + u_int8_t flags; + u_int8_t spd; struct callout hold_callout; }; @@ -674,7 +675,7 @@ sbp_targ_cam_done(struct fw_xfer *xfer) if (xfer->resp != 0) { printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp); orbi->status.resp = SBP_TRANS_FAIL; - orbi->status.status = htonl(OBJ_DATA | SBE_TIMEOUT /*XXX*/); + orbi->status.status = OBJ_DATA | SBE_TIMEOUT/*XXX*/; orbi->status.dead = 1; sbp_targ_abort(STAILQ_NEXT(orbi, link)); } @@ -819,7 +820,7 @@ sbp_targ_pt_done(struct fw_xfer *xfer) if (xfer->resp != 0) { printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp); orbi->status.resp = SBP_TRANS_FAIL; - orbi->status.status = htonl(OBJ_PT | SBE_TIMEOUT /*XXX*/); + orbi->status.status = OBJ_PT | SBE_TIMEOUT/*XXX*/; orbi->status.dead = 1; orbi->status.len = 1; sbp_targ_abort(STAILQ_NEXT(orbi, link)); @@ -1102,7 +1103,7 @@ sbp_targ_cmd_handler(struct fw_xfer *xfer) if (xfer->resp != 0) { printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp); orbi->status.resp = SBP_TRANS_FAIL; - orbi->status.status = htonl(OBJ_ORB | SBE_TIMEOUT /*XXX*/); + orbi->status.status = OBJ_ORB | SBE_TIMEOUT/*XXX*/; orbi->status.dead = 1; orbi->status.len = 1; sbp_targ_abort(STAILQ_NEXT(orbi, link)); @@ -1251,7 +1252,7 @@ sbp_targ_mgm_handler(struct fw_xfer *xfer) if (xfer->resp != 0) { printf("%s: xfer->resp = %d\n", __FUNCTION__, xfer->resp); orbi->status.resp = SBP_TRANS_FAIL; - orbi->status.status = htonl(OBJ_ORB | SBE_TIMEOUT /*XXX*/); + orbi->status.status = OBJ_ORB | SBE_TIMEOUT/*XXX*/; orbi->status.dead = 1; orbi->status.len = 1; sbp_targ_abort(STAILQ_NEXT(orbi, link)); |