Date: Thu, 27 Nov 1997 20:25:53 +0100 From: J Wunsch <j@uriah.heep.sax.de> To: freebsd-scsi@FreeBSD.ORG Subject: Re: hack for slow starting CD drives Message-ID: <19971127202553.62430@uriah.heep.sax.de> In-Reply-To: <199711262332.AAA00406@yedi.iaf.nl>; from Wilko Bulte on Thu, Nov 27, 1997 at 12:32:19AM %2B0100 References: <Pine.BSF.3.95.971126134434.3379E-100000@current1.whistle.com> <199711262332.AAA00406@yedi.iaf.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
As Wilko Bulte wrote: > The patch below seems to be working OK without bombing the drive with > TUR commands. Would it be unreasonable to put something like this into > the -current source? Probably not. > + int start_unit_retry_counter = 0; Well, i think just `i' would have it done as well. :-) The purpose is quite clear since it's only used within three lines of code. > + * Attempts to e.g. mount during this period resulted in device not > + * configured / ENXIO. [wilko] ^^^^^^^^ That's what CVS commit logs are for, not the comments in the source. You couldn't read our sources anymore otherwise... > + tsleep((void *)&start_unit_retry_counter,PRIBIO,"cdspup",2*hz); "cdrdy" ...looks like a more descriptive name where you aren't required to go and UTSL in order to know what it's sleeping for. Also, like in normal typing, one space is required after each comma. Sleeping on the counter itself is a bad idea, there could be multiple outstanding cd_open()s by the same time. (Sure, it's a stack variable, but that's not too obvious if you depend on _this_.) > + /* It really should be ready by now > + * If not, it's time to give up > + */ Stylistic nit: /* * Multi-line comments should look like * this one. Also, it's not forbidden to * make them whole sentences. */ Sorry for the paranoia. ;-) -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971127202553.62430>