diff options
| author | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-01-31 03:09:13 +0000 |
|---|---|---|
| committer | Hidetoshi Shimokawa <simokawa@FreeBSD.org> | 2003-01-31 03:09:13 +0000 |
| commit | 9bb3ca0305c6de005419d9cc340dfe85ea7092d5 (patch) | |
| tree | f58efea1d10116fec5e37bfde88afa95038eb465 /sys/dev | |
| parent | 56b9200d1f043b7f0ed9bc06e53929adffe1f838 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/firewire/firewirereg.h | 3 | ||||
| -rw-r--r-- | sys/dev/firewire/sbp.c | 21 |
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index 1a7481111d8e..568bff79dd43 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -338,7 +338,8 @@ extern devclass_t firewire_devclass; #define SPLIT_TIMEOUT_HI 0x0018 #define SPLIT_TIMEOUT_LO 0x001c #define CYCLE_TIME 0x0200 -#define BUS_TIME 0x0210 +#define BUS_TIME 0x0204 +#define BUSY_TIMEOUT 0x0210 #define BUS_MGR_ID 0x021c #define BANDWIDTH_AV 0x0220 #define CHANNELS_AV_HI 0x0224 diff --git a/sys/dev/firewire/sbp.c b/sys/dev/firewire/sbp.c index ba94b398b021..09fc48189a6c 100644 --- a/sys/dev/firewire/sbp.c +++ b/sys/dev/firewire/sbp.c @@ -910,8 +910,8 @@ END_DEBUG xfer->act.hand = sbp_busy_timeout_callback; fp = (struct fw_pkt *)xfer->send.buf; fp->mode.wreqq.dest_hi = htons(0xffff); - fp->mode.wreqq.dest_lo = htonl(0xf0000000 | BUS_TIME); - fp->mode.wreqq.data = htonl(0xf); + fp->mode.wreqq.dest_lo = htonl(0xf0000000 | BUSY_TIMEOUT); + fp->mode.wreqq.data = htonl((1 << (13+12)) | 0xf); fw_asyreq(xfer->fc, -1, xfer); } @@ -1313,10 +1313,9 @@ END_DEBUG && sbp_status->dead == 0 && sbp_status->status == 0); -SBP_DEBUG(0) if (!status_valid || debug > 1){ int status; - +SBP_DEBUG(0) sbp_show_sdev_info(sdev, 2); printf("ORB status src:%x resp:%x dead:%x" #if __FreeBSD_version >= 500000 @@ -1327,25 +1326,33 @@ SBP_DEBUG(0) sbp_status->src, sbp_status->resp, sbp_status->dead, sbp_status->len, sbp_status->status, ntohs(sbp_status->orb_hi), ntohl(sbp_status->orb_lo)); +END_DEBUG sbp_show_sdev_info(sdev, 2); status = sbp_status->status; switch(sbp_status->resp) { case 0: if (status > MAX_ORB_STATUS0) printf("%s\n", orb_status0[MAX_ORB_STATUS0]); - else + else if (status > 0) printf("%s\n", orb_status0[status]); + else + printf("\n"); break; case 1: printf("Object: %s, Serial Bus Error: %s\n", orb_status1_object[(status>>6) & 3], orb_status1_serial_bus_error[status & 0xf]); break; + case 2: + printf("Illegal request\n"); + break; + case 3: + printf("Vendor dependent\n"); + break; default: - printf("unknown respose code\n"); + printf("unknown respose code %d\n", sbp_status->resp); } } -END_DEBUG ocb = sbp_dequeue_ocb(sdev, ntohl(sbp_status->orb_lo)); /* we have to reset the fetch agent if it's dead */ |
