Commit Graph

765 Commits

Author SHA1 Message Date
sos
ad59528a79 Update the Promise support for combo (SATA+PATA) controllers. 2004-12-24 13:36:04 +00:00
phk
35b3c9fdfb Pass the file->flags down to geom ioctl handlers.
Reject certain ioctls if write permission is not indicated.

Bump geom API version.

Reported by:	Ruben de Groot <mail25@bzerk.org>
2004-12-12 10:09:05 +00:00
sos
c6a934b3e0 Compensate for off by one bugs in disk firmware for 48BIT addressing cutover. 2004-12-09 07:31:06 +00:00
sos
778b1dc628 Update the ICH6 support so all 4 SATA channels can be used.
We still use "normal" mode, AHCI mode is in the works still.

HW donated by:	Sentex
HW donated by:	Yahoo!
2004-12-08 18:00:46 +00:00
sos
0138ea081f Add support for the ITE IT8212F controller.
HW donated by:	Yahoo!
2004-12-08 11:17:38 +00:00
sos
db3855bde9 Reset timeout when we are back from interrupt. 2004-12-08 11:16:33 +00:00
sos
d4647dd77b Add first shot on support for the new Promise SATAII chips.
HW donated by:	pil.dk
2004-12-08 10:02:41 +00:00
sos
5dc3dca989 Correct logical error, result was that retries wasn't always made but
failure reported instead.
2004-12-08 09:19:03 +00:00
sos
ccede841b5 Return ATA register values in the request struct when ATAREQUEST returns. 2004-11-24 10:47:26 +00:00
scottl
db12de4f40 Don't set the BUS_DMA_ALLOCNOW flag for the parent tag or the tags that are
used for static memory allocations.

Discussed with: sos
2004-11-17 11:27:30 +00:00
imp
8c126525fe Tweaks to the resource allocation to allow a few of my obscure
cdrom/ata controller PC Card devices work better.
2004-11-10 00:33:05 +00:00
sos
1837c14755 Do not retry on requests that has lost thier device during reinit.
Should fix hangs on IBM's etc with the fake slave problem.

MFC:
	asap
2004-10-20 10:11:05 +00:00
sos
480318fb03 Idle the channel earlier in reinit().
Cosmetic change to suspend, dont call tsleep an extra time at exit.
2004-10-19 20:13:38 +00:00
sos
214bd9b162 Cosmetics 2004-10-19 20:11:23 +00:00
le
f14caa383f Return the unit number of a channel instead of a hardcoded '1' from
the ATA pccard locking function.  This makes pccard devices like
Compact Flash cards work again.

PR:             kern/72805
Submitted by:   James E. Flemer <jflemer@alum.rpi.edu>
MFC in:         2 days
2004-10-19 10:29:00 +00:00
sos
b9ce738620 Refine locking so it covers the "running" variable as well.
Adjust comments etc to fit the new locking system.
2004-10-13 15:16:35 +00:00
sos
3d81c20638 Dont sleep with lock held. 2004-10-10 13:24:39 +00:00
sos
38ce00cc1c Add support for the ICH6 in legacy mode.
The AHCI part is not supported yet, but is in the works.

5.3 RC1 candidate
2004-10-09 16:27:13 +00:00
sos
058a8fa0b8 Move the PC98 specific geometry "gunk" to geom_pc98.c where it belongs.
This also adds support for bigger disks on the controller I have access to,
and maybe others if I understood the adhoc methods used on those.

Those with more PC98 bigdrive controllers it is hereby invited to add/fix
support for those in geom_pc98.c and not using #ifdef PC98 all over the place.
2004-10-07 17:37:09 +00:00
sos
181b909b2c Add SHARP to the pool of drives that doesn not need byteswapping of
the model etc fields from identify.
2004-10-07 11:43:25 +00:00
sos
96967ead83 Fix the PC98 lockups on boot.
The interchannel locking for PC98 needed to be updated to match the
rest of the locking in ATA.
2004-10-06 19:46:08 +00:00
sos
104924bb06 Always set half'n'half mode on ICH* chips. 2004-10-01 09:06:22 +00:00
sos
a2615e3bda Fix the serverworks modesetting code, of mask offset was wrong. 2004-10-01 09:04:53 +00:00
sos
e7c7f8c03c Resurrect dump that broke with the last update. 2004-09-30 20:54:59 +00:00
sos
2fb6fe6a94 Remove the old ATA_*LOCK_CH macros that used atomic ops and use
mutexes instead.
This closes the last (known) race issues in ATA which should fix
the various hangs etc seen on heavy loaded systems.

Change from using timeout functions to using callout functions in
the timeout code. This together with above closes the race that could
happen if timeout and device interrupt occured simultaniously.

Also fix the possible recursion in ata_reinit() on very dodgy
devices that could take us down in the probe.
2004-09-26 11:48:43 +00:00
sos
63d0be9051 Rearrange the order of I/O's in dma-start/stop, some chipsets are very
picky on the order of this, especially in error situations.
2004-09-26 11:42:42 +00:00
sos
7e6d8f0852 Ignore leading '_' in model name returned by devices.
This make "_NEC" devices appear as "NEC" which is more corrent.
The reason is tha NEC originally screwed up on the byteorder in the
model string, so now that they have realized that they prefixed the '_'
so that not every ATA driver on the planet would call them "EN C" :)
2004-09-16 09:35:01 +00:00
sos
7c3c92e15d Reduce the amount of memory reported to busdma.
This made the requirements for bouncebuffers too big with PAE.
Cleanup the way size defines for transfers are implemented.
2004-09-10 10:31:37 +00:00
sos
d5ca951456 Release the hold on ata_delayed_attach earlier so we can use tsleep
in the boot probe as well.

Suggested by:	gibbs
2004-09-09 13:25:46 +00:00
sos
f4de4acfe4 Introduce ata_udelay() that uses tsleep instead of DELAY if possible.
In places where we have long delays that doesn't depend on too accurate
timing, use ata_udelay() instead of DELAY() so we dont uselessly spin
the CPU if not nessesary;
2004-09-03 12:10:44 +00:00
sos
05ea18e82c Sync promise_mio_command with WIP on the Promise line of SATA controllers. 2004-09-03 08:23:04 +00:00
sos
ee581aec84 Cleanup the defines used for various chipsets.
Add new nVidia controllers.
2004-09-03 07:37:53 +00:00
sos
f91a9a0e8d Cleanup the storing and printing of the device transfermode for SATA. 2004-09-01 12:15:44 +00:00
sos
8740f32a4f remove unused prototype 2004-08-27 22:14:45 +00:00
sos
e873df18d5 Fix the handling of "inflight" requests when doing reinit's.
Add missing untimeout that would get lost in handling of some
error situations, and caused what looked like random timeouts
afterwards when the timeout fired.
2004-08-27 14:48:32 +00:00
sos
f73c7c1c58 Set and reset the right bit for UDMA enable/disable on the ICH* chips. 2004-08-27 12:54:58 +00:00
sos
d8df060fde Rearrange the call to disk_destroy.
Suggested by:	phk
2004-08-27 12:03:18 +00:00
sos
1ec5d22c32 Sii_reset needs to wait up to 1 second to get slow disks with it so
use tsleep instead of DELAY.
2004-08-24 20:11:26 +00:00
sos
aa70a744dd Always pick up giant before returning from an ioctl call. 2004-08-24 15:09:05 +00:00
sos
9410cb311e Properly check malloc returns. 2004-08-24 10:39:00 +00:00
sos
be94cde364 Workaround devices that responds with registers as *both* master & slave,
but fail utterly when we try to talk to the "fake" device.
2004-08-22 15:54:08 +00:00
sos
61ba3ee1cb Correct the args to busdma, mostly cosmetic. 2004-08-20 19:05:22 +00:00
sos
3e33988307 DONT PANIC
Only call dmainit() if there is a valid busmaster resource.
2004-08-20 06:19:25 +00:00
sos
2f36723c3d Improve (hopefully) on the workaround code for devices that doesn't
interrupt when command is done, ie some ATAPI CD drives with no
media loaded.
2004-08-16 09:32:35 +00:00
sos
0c3597671a Fix Promise sx4/sx4000 support that broke on the latest race fixes. 2004-08-16 09:29:46 +00:00
sos
6f119c28ba Allow the use of a supplied function to set the PRD table. This is
needed for new chips that supports 64bit addressing.
2004-08-13 08:14:27 +00:00
sos
a71e43e2c6 Change the order of ata_dmainit/ata_allocate in preparation of
supporting new chipsets where this is needed.
2004-08-12 08:20:36 +00:00
sos
ee3f3a009a Fix bad free() usage.
Submitted by:	Pawel Jakub Dawidek
2004-08-09 14:22:58 +00:00
sos
7d8a7cc8a3 Close a race in ata_reinit(). 2004-08-09 12:02:32 +00:00
jmg
895cafe317 make sure that ioctl's to ata use the proper cmd IOCATA...
Reviewed by:	sos
2004-08-09 06:47:53 +00:00