Commit Graph

102 Commits

Author SHA1 Message Date
Søren Schmidt
1af69d6936 Probe cosmetics. 2000-02-08 18:38:39 +00:00
Søren Schmidt
cc8baa1136 The bde script has a bug, I used a patch from it verbatim, bad idea....
Fixed...
2000-02-08 16:39:11 +00:00
Søren Schmidt
e8359a57de Do refcounting of open devices (more) correctly.
count_dev funtion by phk.
2000-02-07 23:05:40 +00:00
Søren Schmidt
a9ec39136b Dont panic if no sub-driver is found. 2000-02-07 22:57:11 +00:00
Søren Schmidt
77145a3388 Unbreak addump, now dumping works again. 2000-02-07 22:56:32 +00:00
Søren Schmidt
96ebd6d1fc fix support for shared IRQ's.
fix support for multiple HPT & Promise controllers.

support mixed 33/66 devices on the Promise 66 controllers.

fix the refcount stuff in the atapi drivers.

misc cleanups.
2000-02-04 10:20:22 +00:00
Søren Schmidt
4de1cbfab9 cosmetic changes only. 2000-01-29 22:38:36 +00:00
Søren Schmidt
eff43d0e8a cosmetic changes only. 2000-01-29 14:10:59 +00:00
Søren Schmidt
a4fec20898 Get the MEDIA_CHANGED status right here too. 2000-01-28 22:17:29 +00:00
Søren Schmidt
211a760057 Use atapi_test_ready not atapi_wait_ready, I need more sleep :( 2000-01-28 21:30:31 +00:00
Søren Schmidt
78e0324341 Get the MEDIA_CHANGED status right. 2000-01-28 21:03:25 +00:00
Søren Schmidt
0b905b407e Fix the atapi-fd.c (afd device) so that fx MSDOS formatted ZIP
disks can be mounted. Use b_pblkno instead of b_blkno

Found by: phk

Protect (proberly) against setting modes on nonexisting devices.
2000-01-28 20:18:19 +00:00
Søren Schmidt
96478887ff Fix compilation on ISA only setups... 2000-01-28 15:57:13 +00:00
Søren Schmidt
02ce0452e1 Cleanup the ata_dmainit function a bit.
Also allow BIOS setup DMA on unknown controllers.
2000-01-28 13:35:43 +00:00
Søren Schmidt
6a7f51845b Oops, fix compile error due to the new way of storing the transfer mode. 2000-01-28 08:03:21 +00:00
Søren Schmidt
0fd4327bb6 Add sysctl oid hw.atamodes to set the transfermodes online. 2000-01-27 19:00:51 +00:00
Søren Schmidt
0817db9f98 Retry a bit more agressively on the atapi identify.
Try to support older systems reporting irq0 for the first channels.

Support sharing of the std interrupts (says peter :) )

Dont use READ_CD on normal data reads (2048 bytes), too many old drives
doesn't support this command even if the std says "shall" :(, but still
use READ_CD on all other blocksizes.

Add the geometry to the ad probe, its still usefull.
2000-01-25 20:14:51 +00:00
Søren Schmidt
fe08efdcfb General cleanup.
Dont be so verbose in the probe, only ONE line printed now, to get more
info boot verbose. Centralise most printf's in ata-all & ata-dma to use
the ata_printf function, it saves alot of codelines.

Repeat the identify command if drive fails the first.

Protect the timeout functions with splbio.

Dont update the transfer details before we are sure the transfer
succeded, this way they are proberly retried on errors.

Move the handling of next_writeable to userland.

Use the READ_CD command to read CD's. That enables us to read _anything_
via the normal read/write interface. This kindof obsoletes the READAUDIO
ioctl, but we keep that for now.
2000-01-24 20:45:24 +00:00
Søren Schmidt
6e5d660a63 Quantify the calls to ad_attach and atapi_attach so that diskless
or atapiless kernels can be built.
2000-01-19 07:25:46 +00:00
Søren Schmidt
974f34013a Rearrange the probecode, so that 80pin cables can be identified
correctly on both master and slave.
Smash together the ata_params & atapi_params structures as they
are more or less equal anyways.
Get rid of the last SYSINIT's in here.
2000-01-18 21:02:59 +00:00
Søren Schmidt
46a37dbac0 Add support for the Intel 810 chipset (ICH type of chips)
Prober support for the VIA 82C686, I finally got the right datasheet.

Get rid of atapi_wait, merge it into ata_wait.

Avoid a couple of races by using asleep instead of tsleep.

Always use 16bit transfers on ISA systems.

Clear up the atapi_read/write functions.
2000-01-17 02:04:19 +00:00
Søren Schmidt
9687efec89 Grrrr, this time it should be right, I need sleep - badly... 2000-01-07 15:51:45 +00:00
Søren Schmidt
39412a7ece This is not my lucky day :( 2000-01-07 13:15:42 +00:00
Søren Schmidt
af86437301 Guard against transfers of zero length given to *strategy. 2000-01-07 12:01:01 +00:00
Søren Schmidt
e960abaf96 Set PIO mode in all cases. 2000-01-07 08:28:41 +00:00
Søren Schmidt
14c2c6c8b1 New ATAPI burner utility API, replaces the wormio API. 2000-01-06 22:50:02 +00:00
Søren Schmidt
14fc459ef4 Fix link problem on ISA only systems.. 2000-01-03 20:01:18 +00:00
Søren Schmidt
aa966b9a64 Add support for VIA 82C596 controller
Better shared irq handeling for Promise & HPT366 controllers

Setup prober PIO mode timings on Promise & HPT366 controllers

Update Copyright headers to be Y2K compliant :)
2000-01-03 10:26:59 +00:00
Søren Schmidt
3ace5ae2c8 Yet another cleanup of the VIA code, this time it should work
on all combinations (I hope)...

Add DMA support for the AMD 756 chip (K7 chipset) this is actually the
same as the VIA 82C686 chip (the ATA part that is).

Treat the intel MX chipset PIIX as a PIIX4

Allow UDMA on all disks that say they can handle it.

Cleanup probe printf's a bit

Remove alot of the old #ifdef DEBUG crap.
1999-12-21 20:18:56 +00:00
Søren Schmidt
6be090b840 Relax the requirements for doing WDMA2, this should enable DMA
on non ATA[234] compliant disks.

Move all PCI dependent stuff under #ifdef NPCI > 0
1999-12-18 20:06:30 +00:00
Søren Schmidt
7d9451f143 Cleanup the probe messages a bit, show what the device really is, not
just "CDROM". Also cope with devices that doesn't report speed in
the old way, this should be changed into the new GET_PERFORMANCE
cmd instead..
1999-12-16 08:22:16 +00:00
Søren Schmidt
dbdfe960cb Have another go at the VIA support, this time use the PCI ID form the
main component in the southbridge chip to determine which VIA chip
we are dealing with.

Try to enable DMA on generic controllers that say they has the
capability, instead of relying on the BIOS to have set it up.
1999-12-14 10:25:28 +00:00
Søren Schmidt
54ecff8b84 Add DMA support for the SiS 5591 and old PIIX chipsets.
Add a missing DELAY(1) in ata_wait.

Change the info from ad_version, so the ATA version from the disk can
be used to quantify the DAM modes valid for this drive, ie be more
selective with turning DMA on on older disks that should not support it..

Fix the probe for BIOS enabled DMA in the generic case, master/slave
was reversed in the test.

Check the return for ata_command in all cases, and print warnings if
it fails.

Call ata_dmainit with all dmamodes off when falling back to PIO mode,
that should take care of both the Promise & HPT366 controllers not
being able to handle the fallback...

Cleanup the printf's in the drivers, use the prober device name (if
possible) instead of ataN-master/slave.
1999-12-13 10:19:39 +00:00
Søren Schmidt
fed48464cc Change the devstat priorities to the std values now in devicestats.h 1999-12-08 12:08:47 +00:00
Søren Schmidt
cb2a8dffa0 Commit the kernel part of our DVD support. Nothing much to say really,
its just a number of new ioctl's, the rest is done in userland.
1999-12-07 22:25:28 +00:00
Søren Schmidt
bd533091af Try a little harder at the VIA DMA support.
Only use UDMA66 on 82C686 and with prober cable.
1999-12-07 22:07:18 +00:00
Søren Schmidt
7420fbaac2 Fix support for disk with > 64K cyls. 1999-12-07 14:49:00 +00:00
Søren Schmidt
60c94e7628 Better error handeling:
On UDMA CRC errors retry operation as it might be a fluke, if not fall
back to PIO mode on the failing drive. If you get alot of these your
cabeling is most likely not good enough.

On HARD error using DMA, retry once using PIO, if it succeds using PIO
fall back to PIO mode on the failing drive.
1999-11-29 12:24:51 +00:00
Søren Schmidt
ad6eb979ba call ata_reinit in addump trying to make sure the dump will succed,
also check for errors underways, and make it possible to abort the
dump by hitting a key.
1999-11-27 17:06:10 +00:00
Søren Schmidt
7dfec6b427 Oops, committed the wrong file.. 1999-11-26 20:05:11 +00:00
Søren Schmidt
30f5b2a68e Fix atapi_wait_ready, it returned prematurely.
Less verbosity on non-fatal errors.
1999-11-26 19:26:04 +00:00
Søren Schmidt
a150cc4284 Tidy up the VIA support a bit, make it more generic. 1999-11-26 19:24:26 +00:00
Søren Schmidt
3082a6dc59 Add DMA support for the VIA 82C586 & 82C686 chips, also rearrange
to fall back to slower speeds if the faster ones fails to probe.

Log and retry request on UDMA CRC errors.

Fix a couple of warnings.
1999-11-24 21:40:05 +00:00
Søren Schmidt
bb8f8c633e Loose ad_sleep, its of no use anymore. 1999-11-19 08:21:15 +00:00
Søren Schmidt
5c7e184349 Dont listen to disks that say they can only do 0 sector transfers. 1999-11-10 19:37:00 +00:00
Søren Schmidt
6e82e8be6d Make the atapi device return sensible errno's back to userland.
Dont panic if a nonexistant device is opened.
1999-11-10 07:13:51 +00:00
Søren Schmidt
838b8e23b9 Unbreak ATAPI on the Aladdin chipset, only DMA access worked.
Try to use a 32bit mask on the IO addresses, this fixes the alpha
and hopefully doesn't break on any i386 machines.

Try to enable both read & write cache on disks, they should be as
default, but better be sure..
1999-11-08 21:36:00 +00:00
Søren Schmidt
3de25e2f32 Fix IRQ allocation bug on controllers using a shared interrupt.
Fix a bug which could cause panics in ad/atapi-interrupt.

Add support for UDMA66 on Promise Ultra/Fasttrak controllers.

Get rid of ATA_IGNORE_INTR, and introduce ATA_WAIT_INTR instead.

Add a delay in the dump routine in ata-disk.c, some controllers
seem to need this. Also dont use the timeout watchdog when dumping.

Disable DMA on ATAPI devices as default, add option ATA_ENABLE_ATAPI_DMA
for those that has HW that works.

Add support for some not-up-to-spec ATAPI devices that returns data
together with completition status on data moving cmd's.
1999-11-06 16:50:21 +00:00
Poul-Henning Kamp
923502ff91 useracc() the prequel:
Merge the contents (less some trivial bordering the silly comments)
of <vm/vm_prot.h> and <vm/vm_inherit.h> into <vm/vm.h>.  This puts
the #defines for the vm_inherit_t and vm_prot_t types next to their
typedefs.

This paves the road for the commit to follow shortly: change
useracc() to use VM_PROT_{READ|WRITE} rather than B_{READ|WRITE}
as argument.
1999-10-29 18:09:36 +00:00
Andrew Gallatin
ca4e37e1cf Increase the timeout to be 3*hz. This recalibrates the timeout so that
it has the same value on all platforms.  Previously it was just under
3 seconds on x86 (typically hz<=128) and just under 1/3 of a second on
alpha (typically hz>=1024).  This covers up a race between ad_interrupt()
and ad_timeout() which is being looked into.

reviewd by: sos
1999-10-18 17:55:38 +00:00