Commit Graph

336 Commits

Author SHA1 Message Date
wiz c0177219fe Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:52:33 +00:00
wiz 0aca09fbc0 Fix two typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:49:20 +00:00
bouyer 14cd9d8cff freese->freeze, as pointed out by Frederick Bruck. 2003-10-29 22:05:15 +00:00
mycroft 3fbc866a6e Back out the bogus initializer -- the compiler bug is fixed. 2003-10-29 21:26:43 +00:00
cl b8d68ee313 note 'm68k {u,}int64_t used uninitialized' bug.
add reference to gcc bug report.
mark all (known) occurrences.
2003-10-28 02:01:46 +00:00
fredb fc4e07a00b Appease gcc3 "-Wno-uninitialized". 2003-10-27 23:06:15 +00:00
bouyer 7719e83c8b Following Matt Thomas's request, rename ata attribute to ata_hl, and
wdc_base to ata. We can now have
atabus* at ata?
in kernel config files.
2003-10-08 20:57:59 +00:00
bouyer 99d6009c2a Make the ATA mid-layer appears as atabus, as proposed in
http://mail-index.netbsd.org/tech-kern/2003/09/25/0006.html
This adds a device (atabus) between IDE controllers and wd or atapibus, to
have each ATA channel show up in the device tree. Later there will be atabus
devices in /dev, so that we can do IOCTL on them.
Each atabus has its own kernel thread, to handle operations that needs polling,
e.g. reset and others.

Device probing on each bus it defered to the atabus thread creation.
This allows to do the reset and basic device probes in parallel, which reduce
boot time on systems with several pciide controllers.
2003-10-08 10:58:12 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
grant d2b2b89242 typo in comment 2003-09-29 23:31:04 +00:00
mycroft f9d629fb93 Fix more probe delay and/or failure problems:
1) Don't wait for DRQ on an IDENTIFY command -- if it's not set when we see
   BSY clear, abort the command and ignore the drive.  (Do this by testing
   for DRQ in the read/write cases in __wdccommand_intr().)
2) Don't wait for DRQ to deassert when we finish an IDENTIFY (or any other
   non-block command that reads data) -- we don't do this for block I/O, and
   empirically it doesn't clear on my CF cards at all, causing a pointless 1s
   delay.
3) Add comments to some of the delay()s, and add missing ones in wdcreset()
   and the WDCC_RECAL in the so-called "pre-ATA" probe.
4) Slightly simplify the reset sequence -- we were doing an extra I/O.
5) Modify the register writability test to make sure that registers are not
   overlapped -- this can happen in some weird cases with a missing device 1.
6) Check the error register value after the reset -- if it's not 01h or 81h,
   as appropriate (see ATA spec), punt.
Tested with a number of ATA-only, ATAPI-only, mixed ATA-ATAPI, CF, and IDE
disk configurations.

Also remove the SINGLE_DRIVE nonsense again.
2003-09-23 09:19:22 +00:00
skd f3de6832d9 Additional definitions as per SATA specifications.
Approved by Manuel Bouyer.
2003-09-23 03:55:59 +00:00
mycroft d40837608f 1) Use config_interrupts() to attach IDE and ATAPI drives. This eliminates
most polling.
2) Clean up some goofiness in pciide -- get rid of the whole "candisable" path
   (it's gratuitous) and simplify the code by calling pciide_map_compat_intr(),
   *_set_modes() and wdc_print_modes() from central locations.
3) Add a register writability and register ghost test to eliminate phantom
   drives more quickly.
2003-09-19 21:35:56 +00:00
bouyer feddcdfa5d For LBA drives, compute the number of cylinders from the drive capacity
in the default disklabel and the boot message, instead of using the
value reported by the drive (which is 16383 if the drive is larger than 8G).
Should fix PR 9864
2003-08-03 17:53:04 +00:00
lukem 365cbd9428 add missing __KERNEL_RCSID() 2003-07-14 15:47:00 +00:00
dsl 31722f62d8 KNF and whitespace (and indent a contuation line) 2003-07-11 15:33:13 +00:00
matt 258cc62412 Add LBA48_THRESHOLD #define and set it to the *correct* value. Use it
in place of "0xffffff" (which is one too few 'f').
2003-07-10 23:23:44 +00:00
itojun 7f6ed16ef4 function prototype must not have variable name 2003-07-08 10:06:28 +00:00
fvdl d5aece61d6 Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
2003-06-29 22:28:00 +00:00
bouyer 7a5f4f28d0 Don't use LBA48 if we don't have to (that is, if the request is inside the
first 128GB). Tested by Andreas Johansson.
2003-06-29 19:28:16 +00:00
bouyer b55e87ab48 Remove unused WAITTIME definition. Pointed out by Andreas Johansson. 2003-06-29 17:03:47 +00:00
darrenr 960df3c8d1 Pass lwp pointers throughtout the kernel, as required, so that the lwpid can
be inserted into ktrace records.  The general change has been to replace
"struct proc *" with "struct lwp *" in various function prototypes, pass
the lwp through and use l_proc to get the process pointer when needed.

Bump the kernel rev up to 1.6V
2003-06-28 14:20:43 +00:00
thorpej 47edad1115 Always queue transfers in the ld driver to prevent transient resource
shortages in the back-ends from aborting transfers.

Reviewed by ad@.
2003-06-07 23:37:24 +00:00
thorpej 577fd9d8fa * Use aprint*().
* Add Ultra/133 to wdc_print_modes().
2003-05-17 21:52:03 +00:00
thorpej e43fecb228 Change bounds_check_with_label() to take a pointer to the disk structure,
rather than the label itself.  This paves the way for some future changes.
2003-05-10 23:12:28 +00:00
dsl d91455ce26 Change return type of readdisklabel() to const char *
I hope I've found all the correct places!
2003-05-02 08:45:10 +00:00
nakayama 1e411d7027 Make DMA mode works on Promise Ultra66/100 with 48-bit LBA drives.
Ok'ed by bouyer in tech-kern@netbsd.org.
2003-04-28 05:20:29 +00:00
bouyer a704b24037 Fix typo. 2003-04-27 14:33:20 +00:00
bouyer 07e96ff3d7 Acceptable cache operations are r and rw, not none and w
Properly initialise the timeout value.
2003-04-27 14:27:36 +00:00
bouyer 1e2dac7786 Add support for the getcache/setcache ioctls. 2003-04-26 09:54:15 +00:00
explorer 2248468d68 add my 80 GB SATA drive to the quirk table. 2003-04-18 04:32:19 +00:00
mason d1b448c6e5 From current-users:
On Thu, Apr 17, 2003 at 11:26:26AM -0500, Dave Huang wrote:

> Typo police here :) "whose," not "who's."
2003-04-18 00:35:14 +00:00
darrenr 0b2e3c6317 add missing setting of b_error (thanks Manuel) 2003-04-16 00:07:17 +00:00
nathanw ad743e234b Add a missing paren. 2003-04-15 19:14:58 +00:00
darrenr 8dac8843a5 Implement (and document!) "dkctl <dev> badsector .." to `manage' the bad
sector information in the kernel.  Doing this uncovered some shortcomings
that should have been pretty obvious with the code committed prior, addressing
the major kludge with a new struct - disk_bacsecinfo to be passed into
DIOCBSLIST.
2003-04-15 18:27:26 +00:00
dogcow 277607fced fix typos 2003-04-15 17:42:44 +00:00
darrenr f4965045a0 Automatically build up a list of bad sectors from failed read operations and
prempt read operations on matching regions with a failure rather than waiting
for the device to return a failure.  The I/O operation must have already failed
MAXRETRIES times before being added to the list - this can generally take up
to 12 seconds.
List is made accessible to userspace via DIOCBSLIST and DIOCBSFLUSH.
2003-04-15 14:11:00 +00:00
fvdl 8103646465 Check RAW_PART against the media size instead of the disklabel.
Add the media size in 512-byte sectors to the softc, to avoid
some 64 bit computations. Bump the capacity stored in softcs
for disks to 64 bits.
2003-04-03 22:18:23 +00:00
thorpej 3f2184def7 Work around a buggy PHY in some Seagate S-ATA drives which get confused
by the way some S-ATA controllers packetize data when the sector count of
the transfer mod 15 is 1.
2003-03-21 22:40:56 +00:00
thorpej 3ea6b8be93 Add missing splbio() protecting of bufpool access. Add a clarifying
comment to <sys/buf.h> reminding everyone of the need for splbio().
2003-02-25 21:25:40 +00:00
thorpej eb14e86676 Add a new BUF_INIT() macro which initializes b_dep and b_interlock, and
use it.  This fixes a few places where either b_dep or b_interlock were
not properly initialized.
2003-02-25 20:35:31 +00:00
yamt bcd7beec98 initialize b_interlock properly.
(for ioctl)
2003-02-23 08:50:58 +00:00
pk 338f31f581 Make the buffer cache code MP-safe. 2003-02-05 21:38:38 +00:00
thorpej 2051b2d8e7 Don't set LDF_ENABLED unless the device is really okay. Noted by
Andrew Doran.
2003-01-29 16:50:37 +00:00
bouyer a1f27a3f79 Bump WDCC_IDENTIFY timeout to 3 seconds, as required by some drives.
Reported by Karl Janmar <karlj@mdstud.chalmers.se> on tech-kern.
2003-01-27 21:27:52 +00:00
thorpej 4155034751 G/C something left over from an earlier version of this code. 2003-01-27 20:18:11 +00:00
thorpej 3381232270 Experimental support for RAID volumes configured by ATA "RAID" controllers.
Such RAID controllers are actually just IDE controllers with a BIOS that
can create RAID volumes and write the configuration info to config blocks
on the disks.  The BIOS can do I/O to these volumes, and the OS must
understand the config blocks and implement RAID in software in order to be
able to use these volumes.

Only SPAN (simple concatenation) and RAID0 are supported at this time,
and writing back config blocks is also not supported at this time.  Currently,
only the Promise configuration scheme is supported, although supporting
the Highpoint scheme should not be too difficult.

In any case, this is sufficient to use the Promise RAID0 volume (thus
preserving the win2k AS installation) on this new Intel server I have.

Thanks to Soren Schmidt for doing the work in FreeBSD; it made this
task much easier.  The config block parsing code is adapted from his
work.
2003-01-27 18:21:23 +00:00
bad f4aacfe9fc Being able to make image backups of your whole disk, not to mention not
causing certain ata disks to lock up by reading beyond the last block,
beats catering to broken devices.

bounds_check_with_label() RAW_PART too.
2003-01-23 00:00:32 +00:00
simonb 276fd1665c The Double-Semi-Colon Police. 2003-01-20 05:29:53 +00:00
fvdl 8db111aeb4 Fix error in ODIOCGDINFO handling caused by previous change to it. 2003-01-07 18:35:04 +00:00