Søren Schmidt
b913aa0b7f
Dont sleep with lock held.
2004-10-10 13:24:39 +00:00
Søren Schmidt
8353d82bfd
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
Søren Schmidt
6c35773729
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
Søren Schmidt
e59142714c
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
Søren Schmidt
6192895db8
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
Søren Schmidt
844acbc7a3
Always set half'n'half mode on ICH* chips.
2004-10-01 09:06:22 +00:00
Søren Schmidt
49686bbcaf
Fix the serverworks modesetting code, of mask offset was wrong.
2004-10-01 09:04:53 +00:00
Søren Schmidt
8f0fb9584e
Resurrect dump that broke with the last update.
2004-09-30 20:54:59 +00:00
Søren Schmidt
b5dee91f5f
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
Søren Schmidt
c5b2c44ce8
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
Søren Schmidt
a49513587b
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
Søren Schmidt
1d535cd590
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
Søren Schmidt
6c893545ad
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
Søren Schmidt
0f7cfb8473
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
Søren Schmidt
7a6d2ca81b
Sync promise_mio_command with WIP on the Promise line of SATA controllers.
2004-09-03 08:23:04 +00:00
Søren Schmidt
df6a77ddcb
Cleanup the defines used for various chipsets.
...
Add new nVidia controllers.
2004-09-03 07:37:53 +00:00
Søren Schmidt
8ea3547a15
Cleanup the storing and printing of the device transfermode for SATA.
2004-09-01 12:15:44 +00:00
Søren Schmidt
d3ef327c8d
remove unused prototype
2004-08-27 22:14:45 +00:00
Søren Schmidt
dc26948b0c
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
Søren Schmidt
33203bee0c
Set and reset the right bit for UDMA enable/disable on the ICH* chips.
2004-08-27 12:54:58 +00:00
Søren Schmidt
71d7101fac
Rearrange the call to disk_destroy.
...
Suggested by: phk
2004-08-27 12:03:18 +00:00
Søren Schmidt
1c01d05f9c
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
Søren Schmidt
741d64783e
Always pick up giant before returning from an ioctl call.
2004-08-24 15:09:05 +00:00
Søren Schmidt
5a8f8e353e
Properly check malloc returns.
2004-08-24 10:39:00 +00:00
Søren Schmidt
d607fde675
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
Søren Schmidt
001eba0b3c
Correct the args to busdma, mostly cosmetic.
2004-08-20 19:05:22 +00:00
Søren Schmidt
d04d789463
DONT PANIC
...
Only call dmainit() if there is a valid busmaster resource.
2004-08-20 06:19:25 +00:00
Søren Schmidt
5f7a48ef1e
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
Søren Schmidt
fe76f7b6c8
Fix Promise sx4/sx4000 support that broke on the latest race fixes.
2004-08-16 09:29:46 +00:00
Søren Schmidt
8b68793ab3
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
Søren Schmidt
d53fc3e41c
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
Søren Schmidt
ed0c8a7dc7
Fix bad free() usage.
...
Submitted by: Pawel Jakub Dawidek
2004-08-09 14:22:58 +00:00
Søren Schmidt
74f492f9bf
Close a race in ata_reinit().
2004-08-09 12:02:32 +00:00
John-Mark Gurney
3633dce05f
make sure that ioctl's to ata use the proper cmd IOCATA...
...
Reviewed by: sos
2004-08-09 06:47:53 +00:00
Poul-Henning Kamp
5721c9c76a
Tag all geom classes in the tree with a version number.
2004-08-08 07:57:53 +00:00
Søren Schmidt
ba0b5c1c3b
Correct the last commit so it works in error situations as well.
2004-08-07 12:49:28 +00:00
Nate Lawson
c68afc9d21
Fix a panic in ata_generic_transaction(). The DMA pointer of the channel
...
was being unconditionally dereferenced but was NULL for PIO requests.
Check the request flags for a DMA transaction before dereferencing.
Reported by: ceri
Tested by: Radek Kozlowski <radek -at- raadradd.com>
2004-08-06 22:23:53 +00:00
Søren Schmidt
7e6d75884f
Try to narrow down the race window on HW that does not have ways to
...
poll for which channel actually pulled the irq line.
2004-08-05 21:13:41 +00:00
Søren Schmidt
d5a9dcbf23
Add firmware revision to probe printf.
2004-08-05 21:11:33 +00:00
Søren Schmidt
601d3a344e
Change the default to switch on DMA on ATAPI devices if they can
...
do UDMA2 (ATA33) mode and beyond.
2004-08-01 12:31:38 +00:00
Søren Schmidt
eaf8d2de9e
Fix the panic (""memory modified after free") when ata_getparam() fails
...
and retries.
Found by: Nate Lawson
2004-07-31 10:29:29 +00:00
Søren Schmidt
b4d89b2e0f
Fix the reset sequence for sx4/sx4000 type controllers, it could hang the
...
chip in an indefinite state.
2004-07-30 13:33:09 +00:00
Søren Schmidt
a4c3e742b7
Refine the wait for ATAPI_RESET.
...
Properly wait for not busy and introduce a timeout for devices not
setting busy (as they should).
Leave a printf in there that states how long the wait was, as I'd like
to get an idea of the variations here. The time needed seems also to be
affected by whether a medium is present or not.
2004-07-24 19:03:28 +00:00
Søren Schmidt
426fc84503
Dont expect interrupt from ATAPI_RESET, it doesn't deliver one.
2004-07-23 17:01:47 +00:00
Søren Schmidt
4ad91b11e7
Dont set "address setup timing" on newer VIA chips.
...
closes PR: 69180
2004-07-17 14:48:46 +00:00
Søren Schmidt
cc97de873c
Attempt to handle suspend/resume better.
2004-07-12 10:50:50 +00:00
Søren Schmidt
3e3807252b
Remove leftover debug output.
2004-06-30 09:22:47 +00:00
Søren Schmidt
dfc7e0081f
Add support for LSI type software RAID's.
...
Made possible by: John Cagle @ HP
2004-06-25 21:21:59 +00:00
Søren Schmidt
29dc49f725
Use the right ordering of args on mtx_init(). No functional changes
...
since the args in question was all zero's.
Found by: Jimmy Olgeni <olgeni@FreeBSD.org>
2004-06-22 11:18:25 +00:00
Brian Feldman
5fd2bb173d
Call the detach function with g_waitfor_event() so that it can access
...
the GEOM topology.
There are still issues with not detaching from cam correctly such that
upon a device detach there's an invalid pointer dereference from the
later call to cam_rescan().
2004-06-21 20:42:03 +00:00