Commit Graph

25 Commits

Author SHA1 Message Date
thorpej b9ee1b0117 Move the wddone() prototype to wd.c 2003-12-14 05:38:20 +00:00
thorpej 777270ce9b Garbage-collect __ATA_DISK_PRIVATE; it is no longer needed. 2003-12-14 05:37:25 +00:00
thorpej 3dd2f16d75 Move struct ata_device from wdvar.h to atavar.h. 2003-12-14 05:14:39 +00:00
thorpej 09bbcae770 Move struct ata_bustype from wdvar.h to atavar.h. 2003-12-14 05:10:19 +00:00
thorpej be3146e7b3 Move struct ata_bio from wdvar.h to atavar.h. 2003-12-14 05:03:28 +00:00
mycroft 552d27479a Replace home-grown locks with lockmgr(). 2003-11-07 04:10:56 +00:00
wiz c0177219fe Fix some typos. From Tom Cosgrove via jmc@openbsd. 2003-11-02 09:52:33 +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
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
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 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
bouyer cd3578d7ef More copyright fixes, pointed out by Thomas. Thanks ! 2002-04-23 20:41:13 +00:00
christos f9b7ffe292 Add LBA48 support based on patches from Keisuke YOSHIDA. KNF a bit while
I am there.
2002-01-13 17:24:28 +00:00
bouyer bfc80822c7 Update my copyrigth. 2001-12-03 00:20:22 +00:00
bouyer 4ca5497111 Allow wd to attach to something else than wdc/pciide (like USB<->ATA bridges):
- move some functions from ata.c to ata_wdc.c or wdc.c.
- add callbacks to struct ata_bustype so that wd.c doesn't call directly
  functions from the lower level driver.
2001-12-03 00:11:15 +00:00
bouyer 4809ad42cb Clean up attach of wd/atapibus:
kill ata_atapi_attach. Change atapibus to use a struct scsipi_channel instead
of ata_atapi_attach as attach arch. Create a ata_device, compatible with
scsipi_channel, to attach wd.
2001-12-02 22:44:32 +00:00
wiz cc0b68092e Correct various misspellings of 'transfer' and inflected forms. 2001-07-08 18:06:42 +00:00
bouyer 92a5f4d724 Sync my copyrigth notice 2000-05-15 08:32:07 +00:00
bouyer 26f6c9a9cf - DMA code cleanup: pciide_dma_finish() doesn't stop/unload the current DMA op
if an IRQ was not detected, unless the force flag was given. Use this to
  detect if the IRQ was for us (closer to shared IRQ for controllers which
  don't have their own IRQ handler in pciide.c) and to poll for DMA xfer.
  Also makes the timeout recovery code simpler.
- ATAPI cleanup: don't call controller-specific functions from atapiconf.c
  (wdc_*), so that it's possible to attach an atapibus to something else
  than a wdc/pciide (Hi Lennart :).
  Overload struct scsi_adapter with struct atapi_adapter, defined
  as struct scsi_adapter + atapi-specific callbacks. scsipi_link still points
  to an scsi_adapter, atapi code casts it to atapi_adapter if needed.
  Move atapi_softc to atapiconf.h so that it can be used by the underlying
  controller code (e.g. atapi_wdc.c).
  Add an atapi-specific callback *atapi_probedev(), which probe a drive
  in a controller-specific way, allocate the sc_link and fills in the
  ataparams if needed. It then calls atapi_probedev() (from atapiconf.c)
  to do the generic initialisations and attach the device.
- While I'm there merge and centralise the state definitions in atavar.h.
  It should now be possible to use a common ata/atapi routine to set the
  drive's modes (will do later).
2000-04-01 14:32:22 +00:00
enami a2369d8e97 Cancel active transfers on aic/wdc detach.
Also makes LS-120 drive works for me again.
1999-10-20 15:22:24 +00:00
bouyer 1e71e76d6c - clearify the boot messages (features supported vs features used). Thanks to
Havard Eidnes for his complains about this :)
- fix some typo in comments
- hoppefully better detection of drives reporting bogus PIO modes.
1998-11-11 19:38:27 +00:00
bouyer 19fddaeeb5 Merge bouyer-ide 1998-10-12 16:09:10 +00:00