summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2003-01-31 03:09:13 +0000
committersimokawa <simokawa@FreeBSD.org>2003-01-31 03:09:13 +0000
commit2088790fbcb0482bf386a5aa66ffc231c704b4ab (patch)
treef58efea1d10116fec5e37bfde88afa95038eb465 /sys
parent46abb5f788156fbe8f24fcd57385003d5c305ac2 (diff)
downloadFreeBSD-src-2088790fbcb0482bf386a5aa66ffc231c704b4ab.zip
FreeBSD-src-2088790fbcb0482bf386a5aa66ffc231c704b4ab.tar.gz
SBP related changes.
- Set dual phase retry BUSY_TIMEOUT. - Let users to know serial bus error.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/firewire/firewirereg.h3
-rw-r--r--sys/dev/firewire/sbp.c21
2 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h
index 1a74811..568bff7 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 ba94b39..09fc481 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 */
OpenPOWER on IntegriCloud