#
9a5e3ddb |
| 12-Sep-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
Pass the physical instead of the logical block number in bp->bio_pblkno. Otherwise, all formats not using 512 byte physical sectors got screwed.
|
Revision tags: release/4.6.2_cvs, release/4.6.2, release/4.6.1, release/4.6.0_cvs |
|
#
a2642c4d |
| 14-May-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
After some comments from bde, rewrite the loops to avoid turning the previously used "micro-optimization" (count-down loop) into a pessimization. Now the loops are written in the more natural count-
After some comments from bde, rewrite the loops to avoid turning the previously used "micro-optimization" (count-down loop) into a pessimization. Now the loops are written in the more natural count-up form.
Also, while being there, i made the logic in out_fdc() similar to the logic in in_fdc(). The old implementation was a bit bogus anyway since it first tested the DIO bit and only afterwards the RQM bit. However, according to the description of the i82077, the DIO bit is only guaranteed to be valid once the RQM bit is set. Thus, the old implementatoin would have had the chance to misbehave on a controller that is implemented in accordance with the i82077 description (but is not bug-for-bug compatible).
MFC after: 3 days
show more ...
|
#
8a0ba818 |
| 13-May-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
style(9) changes before further editing that region:
. add unnecessary parenthesis around return values . put body of an "if" statement onto a line of its own
|
#
5613959d |
| 12-May-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
Hide the fd autoselection messages behind the bootverbose case so they stop bothering people on their consoles.
|
#
cb38bb6c |
| 12-May-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
Increase the PIO timeout to approximately the value it used to have before rev 1.229 (~ 100 ms). According to bde, some (old) broken hardware could require it. In order to make timing more accurate
Increase the PIO timeout to approximately the value it used to have before rev 1.229 (~ 100 ms). According to bde, some (old) broken hardware could require it. In order to make timing more accurate than what could be achieved with a loop around DELAY(1), increase loop timing after the initial ~ 1 ms.
Also, move the declaration of FDSTS_TIMEOUT out from fdreg.h into fd.c where it actually belongs to.
MFC after: 2 days
show more ...
|
#
d0900d6b |
| 10-May-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
Change the PIO loops from a hard counter into a loop that calls DELAY() in each cycle, with a tunable max cycle count defined in fdreg.h.
This is said to fix the problem on some Compaq hardware (and
Change the PIO loops from a hard counter into a loop that calls DELAY() in each cycle, with a tunable max cycle count defined in fdreg.h.
This is said to fix the problem on some Compaq hardware (and perhaps on other machines using the Natsemi PC87317 chip) where the fdc(4) driver failed to operate at all.
PR: kern/21397 Submitted by: Jung-uk Kim <jkim@niksun.com> MFC after: 3 days
show more ...
|
#
84954bb8 |
| 02-Apr-2002 |
Joerg Wunsch <joerg@FreeBSD.org> |
When reading a UFS-style label from a floppy, don't attempt to use a "raw partition" of any kind since the floppy driver doesn't support UFS-style partitions at all.
Reported by: "Crist J. Clark" <c
When reading a UFS-style label from a floppy, don't attempt to use a "raw partition" of any kind since the floppy driver doesn't support UFS-style partitions at all.
Reported by: "Crist J. Clark" <crist.clark@attbi.com> Reviewed by: bde MFC after: 3 days
show more ...
|
#
44731cab |
| 01-Apr-2002 |
John Baldwin <jhb@FreeBSD.org> |
Change the suser() API to take advantage of td_ucred as well as do a general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes
Change the suser() API to take advantage of td_ucred as well as do a general cleanup of the API. The entire API now consists of two functions similar to the pre-KSE API. The suser() function takes a thread pointer as its only argument. The td_ucred member of this thread must be valid so the only valid thread pointers are curthread and a few kernel threads such as thread0. The suser_cred() function takes a pointer to a struct ucred as its first argument and an integer flag as its second argument. The flag is currently only used for the PRISON_ROOT flag.
Discussed on: smp@
show more ...
|
#
d306122d |
| 26-Mar-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Push BIO_FORMAT into a local hack inside the floppy drivers where it belongs.
|
#
817988be |
| 22-Feb-2002 |
Poul-Henning Kamp <phk@FreeBSD.org> |
Disksort will not "munge" requests, BIO_ORDERED or not, so remove use of BIO_ORDERED.
|
Revision tags: release/4.5.0_cvs, release/4.4.0_cvs |
|
#
038d1bbd |
| 18-Dec-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Change the test for _MACHINE_ARCH == i386 into #ifdef __i386__ since it otherwise breaks on the Alpha arch. I think this is wrong since i'd actually like to probe for a PC architecture, not for a pa
Change the test for _MACHINE_ARCH == i386 into #ifdef __i386__ since it otherwise breaks on the Alpha arch. I think this is wrong since i'd actually like to probe for a PC architecture, not for a particular CPU type. Anyway, now it's again the way it used to be.
show more ...
|
#
5229d0a1 |
| 16-Dec-2001 |
Yoshihiro Takahashi <nyan@FreeBSD.org> |
Remove PC98 code. This file is not used by PC98.
|
#
1a6bed68 |
| 15-Dec-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Long promised major enhancement set for the floppy disk driver:
. The main device node now supports automatic density selection for commonly used media densities. So you can stuff your 1.44 MB an
Long promised major enhancement set for the floppy disk driver:
. The main device node now supports automatic density selection for commonly used media densities. So you can stuff your 1.44 MB and 720 KB media into your drive and just access /dev/fd0, no questions asked. It's all that easy, isn't it? :)
. Device density handling has been completely overhauled. The old way of hardwired kernel density knowledge is no longer there. Instead, the kernel now implements 16 subdevices per drive. The first subdevice uses automatic density selection, while the remaining 15 devices are freely programmable. They can be assigned an arbitrary name of the form /dev/fd[:digit]+.[:digit:]{1,4}, where the second number is meant to either implement device names that are mnemonic for their raw capacity (as it used to be), or they can alternatively be created as "anonymous" devices like fd0.1 through fd0.15, depending on the taste of the administrator. After creating a subdevice, it is initialized to the maximal native density of the respective drive type, so it needs to be customized for other densities by using fdcontrol(8). Pseudo-partition devices (fd0a through fd0h) are still supported as symlinks.
. The old hack to use flags 0x1 to always assume drive 0 were there is no longer supported; this is now supposed to be done by wiring the devices down from the loader via device flags. On IA32 architectures, the first two drives are looked up in the CMOS configuration records though. On PCMCIA (i. e., the Y-E Data controller of the Toshiba Libretto), a single drive is always assumed.
. Other specialities like disabling the FIFO and not probing the drive at boot-time are selected by per-controller or per-drive flags, too.
. Unit attentions (media has been changed) are supposed to be detected now; density autoselection only occurs after a unit attention. (Can be turned off by a per-drive flag, this will cause each Fdopen() to perform the autoselection.)
. FM floppies can be handled now (on controllers that actually support it -- not all do these days).
. Fdopen() can be told to avoid density selection by setting O_NONBLOCK; this leaves the descriptor in a half-opened state where only a few ioctls are accepted. This is necessary to run fdformat on a device that uses automatic density selection (since you cannot autoselect on an unformatted medium, obviously).
. Just differentiate between a plain old NE765 and the enhanced chips, but don't try more; the existing code was wrong and only misdetected the chips anyway.
BUGS and TODOs:
. All documentation update still needs to be done.
. Formatting not-so-standard format yields unpredictable results; i have yet to figure out why this happens. "Standard" formats like 720 and 1440 KB do work, however.
. rc scripts are needed to setup device nodes with nonstandard densities (like the old /dev/fdN.MMM we used to have).
. Obtaining device flags from the kernel environment doesn't work yet, thus currently only drives that are present in (IA32) CMOS are really detected. Someone who knows the odds and ends about device flags is needed here, i can't figure out what i'm doing wrong.
. 2.88 MB still needs to be done.
show more ...
|
#
b40ce416 |
| 12-Sep-2001 |
Julian Elischer <julian@FreeBSD.org> |
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is fu
KSE Milestone 2 Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process.
Sorry john! (your next MFC will be a doosie!)
Reviewed by: peter@freebsd.org, dillon@freebsd.org
X-MFC after: ha ha ha ha
show more ...
|
#
5f063c7b |
| 30-Aug-2001 |
Mike Smith <msmith@FreeBSD.org> |
Add ACPI attachments.
|
#
3a5c2c86 |
| 14-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Hrmpf. nyan's rev 1.25 commit to fdc.h crossed with my removal of it. Back-integrate his (PC98) changes into fd.c.
|
#
246ed35d |
| 14-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Yet another large non-function change.
. Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer a reason to scatter things across two files.
. Sanitize comments. Convert them int
Yet another large non-function change.
. Integrate fdc.h into fd.c, with the removal of ft(4) there's no longer a reason to scatter things across two files.
. Sanitize comments. Convert them into the style(9)-recommended multi-line form, make them sentences where apprpriate, etc.
. Declare all functions on top, and declare them in the order they appear in the file. This order is totally chaotic, but Bruce convinced me that reordering the file wouldn't make it better either.
. Kill a `possibly uninitialized' warning (only seen with -O2) in fd_read_status().
. Make the comments at return (0|1) statements in fdstate() consistent.
. Nuke a ``keep the compiler happy'' dummy return at the end of fdstate(), gcc is smart enough to detect that it would never be reached anyway.
show more ...
|
#
0e17a5bc |
| 09-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Log when the user is turning debugging on/off. Also sanitize the TRACE* macros a bit so they syntactically behave like single C statements (even inside in `if' statement).
Submitted by: des
|
#
5d54fe91 |
| 09-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Hmpf, remove two variables that got unused by rev 1.214.
|
#
83edbfa5 |
| 09-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Ouch, calculate correctly. With 300 rpm and 25 retries, it's 5 seconds till timeout.
|
#
e3b525a0 |
| 09-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Remove parts of rev 1.211 again: do not delete our children iff they haven't been probed successfully. It's a known bug that ISA hints processing instantiates those devices, and prematurely killing
Remove parts of rev 1.211 again: do not delete our children iff they haven't been probed successfully. It's a known bug that ISA hints processing instantiates those devices, and prematurely killing them has other unwanted side-effects.
show more ...
|
#
3fef646e |
| 09-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
As des' example shows us, DMA overruns could happen in a situation where they will never succeed. Add a stop-gap measure that will at least eventually timeout the operation instead of retrying it in
As des' example shows us, DMA overruns could happen in a situation where they will never succeed. Add a stop-gap measure that will at least eventually timeout the operation instead of retrying it indefinately.
MFC after: 1 month
show more ...
|
#
fb35bd37 |
| 08-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Another large patchset from Bruce.
Despite of a few cosmetic things like adding ``irritating silly parentheses'' around all return values, this mainly improves FDC reset handling by no longer gratui
Another large patchset from Bruce.
Despite of a few cosmetic things like adding ``irritating silly parentheses'' around all return values, this mainly improves FDC reset handling by no longer gratuitously resetting the FDC all the time (which causes it to lose the notion of the current track) but only in case of errors, and it sanitizes the block and offset calculations in fdstrategy() and fdstate(). Some additional cleanup added by me, in particular the large switch in fdstate() now always uses return to break out, and no branch falls off the end of the switch statement anymore. Per Bruce's suggestion, removed M_NOWAIT from the malloc()s to simplify things.
Submitted by: bde (mostly)
show more ...
|
#
60444853 |
| 05-Jul-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
More cleanup when detaching. Clone device entries will now be destroyed properly (otherwise bad things would happen after a clone dev had been created, and the module was kldunloaded). Allocated ch
More cleanup when detaching. Clone device entries will now be destroyed properly (otherwise bad things would happen after a clone dev had been created, and the module was kldunloaded). Allocated children that have not successfully probed are being deleted again (otherwise fd0 and fd1 have always been allocated, even if only fd0 was acutally present, and fd1 even survived kldunloading the module).
Still, kldunloading leaves remnants of the previously existing devices intact. Why doesn't it destroy all the devices? As a consequence, since dev->descr now points into no longer allocated memory, the system panics deep inside printf(9) when running devinfo(1) after kldunloading the module. Ideas sought...
Also, when kldloading the module on a hints-populated isab0, this bus somehow has already created an fdc0 entry (a dummy) so the load attempt fails and will register fdc1 instead. What are those dummy entries for? Loading the module from the bootloader works, and it can be unloaded an re-loaded then later.
show more ...
|
#
f664aeee |
| 29-Jun-2001 |
Joerg Wunsch <joerg@FreeBSD.org> |
Use the new-born BIO_CMD1 instead of fudging a bio_flag value for reading the sector ID.
Based on numerous comments made by Bruce, rewrite a good part of the old fdformat() function, and merge it wi
Use the new-born BIO_CMD1 instead of fudging a bio_flag value for reading the sector ID.
Based on numerous comments made by Bruce, rewrite a good part of the old fdformat() function, and merge it with fdreadid() into a single unified fdmisccmd() function. Various style and a couple of more serious bugs fixed there.
While i was at it, i also fixed the long-standing "TODO: don't allocate buffer on stack." in fdcioctl(), fixed a number of style bugs there, and finally implemented the FD_DEBUG ioctl command that has been advertised in <sys/fdcio.h> (formerly <machine/ioctl_fd.h>) for almost seven years now. ;-)
Submitted by: bde (a lot of fixes for fdformat())
show more ...
|