Pack of CAM improvements
nox at jelal.kn-bremen.de
Sat Jan 23 14:10:48 UTC 2010
In article <4B55D9D4.1000008 at FreeBSD.org> you write:
>I've made a patch, that should solve set of problems of CAM ATA and CAM
>generally. I would like to ask for testing and feedback.
>What patch does:
>- It unifies bus reset/probe sequence. Whenever bus attached at boot or
>later, CAM will automatically reset and scan it. It allows to remove
>duplicate code from many drivers.
>- Any bus, attached before CAM completed it's boot-time initialization,
>will equally join to the process, delaying boot if needed.
>- New kern.cam.boot_delay loader tunable should help controllers that
>are still unable to register their buses in time (such as slow USB/
>PCCard/ CardBus devices).
>- To allow synchronization between different CAM levels, concept of
>requests priorities was extended. Priorities now split between several
>"run levels". Device can be freezed at specified level, allowing higher
>priority requests to pass. For example, no payload requests allowed,
>until PMP driver enable port. ATA XPT negotiate transfer parameters,
>periph driver configure caching and so on.
>- Frozen requests are no more counted by request allocation scheduler.
>It fixes deadlocks, when frozen low priority payload requests occupying
>slots, required by higher levels to manage theit execution.
>- Two last changes were holding proper ATA reinitialization and error
>recovery implementation. Now it is done: SATA controllers and Port
>Multipliers now implement automatic hot-plug and should correctly
>recover from timeouts and bus resets.
>Patch can be found here:
>Feedback as always welcome.
Ok, applied this to stable/8, and the good news is the box still seems to
run (using ahci(4) on an sb700 controller and siis(4) on a SiI3132 pcie
card, altho atm there's only an optical drive on that one.) But what
this still doesn't fix is the broken `test unit ready' command on ada
devices, which also makes things like `cdrecord -scanbus' hang the bus. :(
(A few days ago I also got a hang after wanting to try out xfburn,
I suspect for the same reason...)
Here is my earlier report:
Oh and I also still use this patch to scsi_cd.c to be able to read
discs that fail the `read toc' command, like bluray (data) discs.
PR s here:
RCS file: /home/scvs/src/sys/cam/scsi/scsi_cd.c,v
retrieving revision 188.8.131.52
diff -u -p -u -r184.108.40.206 scsi_cd.c
--- src/sys/cam/scsi/scsi_cd.c 25 Dec 2009 08:06:35 -0000 220.127.116.11
+++ src/sys/cam/scsi/scsi_cd.c 23 Jan 2010 13:29:19 -0000
@@ -2874,11 +2874,17 @@ cdcheckmedia(struct cam_periph *periph)
softc->flags |= CD_FLAG_VALID_TOC;
softc->disk->d_sectorsize = softc->params.blksize;
(off_t)softc->params.blksize * softc->params.disksize;
+ * is here read requests will fail when the toc cant be read although
+ * CD_FLAG_VALID_MEDIA is set.
* We unconditionally (re)set the blocksize each time the
More information about the freebsd-stable