Commit Graph

672 Commits

Author SHA1 Message Date
njl
05a1f56fc9 Convert callers to the new bus_alloc_resource_any(9) API.
Submitted by:	Mark Santcroos <marks@ripe.net>
Reviewed by:	imp, dfr, bde
2004-03-17 17:50:55 +00:00
sos
662b843050 Update the SiS support to distinguish older southbridges better. 2004-03-16 16:23:28 +00:00
sos
dc99d6d221 Add support for detaching PCI controllers.
This adds support for cardbus ATA/SATA controllers. I get roughly the
same transfer speeds as on true PCI controllers. Nice to be able to add
a couble of "real" disks to a laptop :)
2004-03-15 12:03:48 +00:00
sos
b841b4a2f1 Add yet another VIA pci id. 2004-03-11 14:08:11 +00:00
sos
c1c4026c1a Only setup sii_reset on sii311[24]. 2004-03-04 16:39:59 +00:00
thomas
b924bcd144 Use auto-sense data provided by the lowlevel ATA code. 2004-03-04 15:37:39 +00:00
sos
6b843cff78 If being verbose in the autosense code, print the original error. 2004-03-02 16:16:54 +00:00
sos
3090a1eb47 Report the original command on failures that causes auto sense.
Keep the ATA_R_QUIET flag if set during autosense.
2004-03-02 14:05:12 +00:00
sos
20140d6615 Fix getting progress data for some device in yet another way.
Take advantage of the new autosense logic.
2004-03-02 14:03:43 +00:00
sos
16b335106f Remember to mtx_destroy mutexes. 2004-03-01 13:17:07 +00:00
sos
3c49599da8 Rearrange sense_key and sense_data to get alignment right.
Submitted by: Marcel
2004-02-29 09:35:29 +00:00
sos
8b2299dc54 Issue a request sense command automagically when ATAPI commands fail
with a valid sense key.
2004-02-28 17:47:27 +00:00
sos
71424aefe1 Add support for the sii3512 SATA chip. 2004-02-25 09:55:49 +00:00
phk
ad925439e0 Device megapatch 4/6:
Introduce d_version field in struct cdevsw, this must always be
initialized to D_VERSION.

Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing
four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
2004-02-21 21:10:55 +00:00
sos
1de14db959 Dont alloc size 0 buffers. 2004-02-21 18:30:03 +00:00
sos
7a8fa65984 Check both PORTEN and MEMEN for enabled HW. 2004-02-21 18:21:13 +00:00
sos
74a845e42e Only register interrupt as seen if it was a real HW interrupt. 2004-02-21 16:55:10 +00:00
phk
49c92e5706 Change the disk(9) API in order to make device removal more robust.
Previously the "struct disk" were owned by the device driver and this
gave us problems when the device disappared and the users of that device
were not immediately disappearing.

Now the struct disk is allocate with a new call, disk_alloc() and owned
by geom_disk and just abandonned by the device driver when disk_create()
is called.

Unfortunately, this results in a ton of "s/\./->/" changes to device
drivers.

Since I'm doing the sweep anyway, a couple of other API improvements
have been carried out at the same time:

The Giant awareness flag has been flipped from DISKFLAG_NOGIANT to
DISKFLAG_NEEDSGIANT

A version number have been added to disk_create() so that we can detect,
report and ignore binary drivers with old ABI in the future.

Manual page update to follow shortly.
2004-02-18 21:36:53 +00:00
sos
8a794db9e9 Dont use the bio_taskqueue if we are in timeout.
Use taskqueue_thread rather than taskqueue_swi (maybe we should have
a taskqueue_ata).
2004-02-17 19:24:11 +00:00
thomas
b1740ac085 (atapi_cb): Reenable automatic retrieve of sense data on error, making
it asynchronous to avoid incorrect use of ata_atapicmd within an
 ATAPI callback.

Tested by:	harti
2004-02-11 10:14:08 +00:00
sos
e954c4b75e Commit simple workarounf for the "LiteOn" hang on boot problem.
This allows the system to boot so I can get the world out of
my mailbox and get some work done to figure out what this mess
is all about.
2004-02-06 11:36:50 +00:00
sos
88dbe90498 Move the enabling of interrupt back to where it was some time ago.
This apparently was what broke the boot with some devices (liteon).
2004-02-02 15:49:01 +00:00
sos
7d8abef95b Fix support for the Promise TX4 on amd64.
Somehow the bridge on there shows up with another PCI id than
it does on x86, no idea why...
2004-02-02 14:05:57 +00:00
sos
d6d611fb17 Be more robust in the probe. We dont want to get into a loop with
reinitting when we try to identify devices. If they dont interrupt
on identify we retry once. If this fails we simply ignore that device.
2004-01-30 19:16:08 +00:00
sos
85f33cbeb4 Cleanups/cosmetics. 2004-01-29 15:03:01 +00:00
sos
e2d757c7c1 Fix for those lost interrupts on probe on lots of controller types.
Note to self, just because an idea is good, it doesn't apply everywhere.
2004-01-28 21:54:40 +00:00
sos
3678d31f17 Use the biotask functionality in GEOM to put finished requests on
instead of taskqueue_swi. This shaves from 1 to 10% of the overhead.

Overhaul the locking once more, there was a few possible races that
are now closed.
2004-01-28 20:38:51 +00:00
sos
928e6e1d2c Fix breakage in PIO multisector support. 2004-01-23 10:38:56 +00:00
sos
dcc245d4e9 Update the support for the VIA 8237 southbridge. 2004-01-20 16:51:02 +00:00
sos
5948092ae2 Fix breakage on timeout/retries. The bug cause a sema to be leaked so
that the calling process would newer wakeup.
2004-01-19 15:20:00 +00:00
ru
d1f9a77c02 Fixed a memory leak. 2004-01-18 17:21:15 +00:00
sos
9d9c0df372 Fix botch in last commit. 2004-01-18 15:58:30 +00:00
sos
523bdbcc21 Add missing free's. 2004-01-18 10:50:40 +00:00
sos
05b82e9162 Add support for the Silicon Image 3114 4 channel SATA controller. 2004-01-17 23:34:13 +00:00
sos
894449cd93 Use UMA instead of plain malloc for getting ATA request storage.
This gives +10% performance on simple tests, so definitly worth it.
A few percent more could be had by not using M_ZERO'd alloc's, but
we then need to clear fields all over the place to be safe, and
that was deemed not worth the trouble (and it makes life dangerous).
2004-01-14 21:26:35 +00:00
sos
3892f4c9cb Fix potential cable detection problem on older CMD chips. 2004-01-14 14:24:36 +00:00
sos
04c923e6c5 Fix ata_getparam to accept the fact that some crappy devices can pose as
both master and slave at the same time confusing the probe code.
2004-01-13 21:35:39 +00:00
sos
58a7725eaf Always return ENOMEM if ata_request_alloc fails so GEOM can dtrt. 2004-01-12 09:33:10 +00:00
sos
815a7852da #include sema.h is now required. 2004-01-12 07:16:07 +00:00
sos
d6c0154728 Overhaul of the timeout/reinit framework. This should clear up most
of the leftovers from the old version that really doesn't work anymore.

Add a reset function for host-end of the ATA channel. This is needed
for the SiI3112 in order to whack it back to reality if a device
locks up the SATA interface (thereby preventing that we can reset the
device). The result is that ATA now recovers from the timeouts that
happens with the SiI3112A and more or less all disks based on old
PATA electronics with a Marvell PATA->SATA converter. This includes
lots of the popular SATA dongles and the WDC Raptor disks..
2004-01-11 22:08:34 +00:00
sos
c87939ff3b Use the saved params for LBA-CHS conversion. Fixes PC98 bug. 2004-01-08 19:17:16 +00:00
sos
cb427b7fa2 Try to simplify the SiS probe. If SiS stays with the current schema for
new nothbridges we should even find the southbridge and be able to
use it (if its one we know that is).
2003-12-25 19:37:11 +00:00
sos
e39859cafe Fix the register timings for AMD/VIA/nVidia chipsets. 2003-12-18 17:36:41 +00:00
sos
8b0e0833ec Add support for the SiS 661 chipset (using SiS 963 south). 2003-12-18 08:07:05 +00:00
sos
55beee1cca Fix compilation on 64bit archs. 2003-12-16 19:41:38 +00:00
sos
a1979e4f7e Print the LBA on failing R/W commands. 2003-12-15 20:43:17 +00:00
sos
fa790cf424 Finetune last commit, we need to take care of empty channels. 2003-12-10 23:06:24 +00:00
sos
e6cf44c49d Add back the national support, this was removed by accident earlier. 2003-12-09 19:13:50 +00:00
sos
8b107990e3 More errata fixing for the SiI3112A disaster chip:
Serialize access to the SATA channels, the chip messes up if
both channels are used at the same time.

The SiI3112 hereby takes the price as the most crappy SATA chip in
existance by a significant amount.

My advise to our userbase is to avoid this chip like the plague...
2003-12-08 09:22:20 +00:00
sos
8a088743db Fix more problems with the Silicon Image 3112A:
Setup decent transfer mode defaults as some BIOS's seem to put in
things that it *knows* doesn't work.
(Note to BIOS writers: stop doing that nonsense, we will get things
working with your crappy HW anyways, and then recommend users to buy
someone else's products that "just works", thankyou.. )

Limit the device transfer mode to ATA100/UDMA5 on generic SATA.
 Since we dont know if the user is using a pure SATA device or an
old PATA drive with a SATA converter dongle, we need to limit the
speed used here to cover up the problems with Marvell ATA-SATA bridges
used in lots of SATA products.

This workaround is enabled for all detectable SATA controllers as they
seem to have semilar problems here. One notable exception is all the
Promise pdc2037x chips which just always work (cudos to Promise!).
2003-12-08 08:27:52 +00:00