Søren Schmidt
f27b8b8ad4
Up timeout to 10s (from 5) in r/w commands.
2003-10-12 12:35:44 +00:00
Søren Schmidt
61dbcc0d05
Use isprint instead of isalpha in determining valid ident string.
2003-10-12 11:10:41 +00:00
Søren Schmidt
82681884cf
Restore transfermode on devices after reinit.
2003-10-10 11:03:27 +00:00
Søren Schmidt
6235c1f6ae
Dont store ata_params for devices that return a bogus ident string.
2003-10-10 11:00:06 +00:00
Søren Schmidt
fa9dc8d090
Fix the bug that prevented DMA from working on old Acer chips.
...
Found by: Andrew Gallatin <gallatin@cs.duke.edu>
Pointy hat to: sos
2003-10-09 14:33:06 +00:00
Søren Schmidt
ebac4a7b77
Give more correct params to busdma_*
2003-10-07 13:48:55 +00:00
Søren Schmidt
b0f747d57e
Improve timeout handling and reporting.
2003-10-07 13:47:40 +00:00
Søren Schmidt
f313fea97d
Properly get out of transaction() if setting up the transfer fails.
2003-10-07 13:45:56 +00:00
Søren Schmidt
e203a01fad
In case we loose a device during reset in reinit() finish off
...
the request with error instead of loosing it.
2003-10-07 13:44:15 +00:00
Warner Losh
d25d7d01be
Include pccard/pccard_cis.h here too
2003-10-07 04:26:14 +00:00
Søren Schmidt
6d92de35c9
Fix the problem with accessing certain FLASH devices. The problem
...
was that accessing the status reg could occour too fast, confusing
the logic in the flash part. Could not have been located without:
HW donated by: Jonas Bülow <jonas@servicefactory.se>
2003-10-01 09:58:19 +00:00
Poul-Henning Kamp
70cd771337
The present defaults for the open and close for device drivers which
...
provide no methods does not make any sense, and is not used by any
driver.
It is a pretty hard to come up with even a theoretical concept of
a device driver which would always fail open and close with ENODEV.
Change the defaults to be nullopen() and nullclose() which simply
does nothing.
Remove explicit initializations to these from the drivers which
already used them.
2003-09-27 12:01:01 +00:00
Thomas Quinot
3fbbaabe4a
Enable DMA for ATAPI/CAM input/output operations.
...
Reviewed by: scottl
2003-09-24 18:40:10 +00:00
Thomas Moestl
a65aa77700
Fix inverted BURN_BRIDGES and GONE_IN_5 #ifdefs.
2003-09-22 17:58:40 +00:00
Poul-Henning Kamp
fb4d4b60b3
Make the clone handler BURN_BRIDGES but the actual 'a' and 'c' partition
...
check GONE_IN_5: We need the clone handler for root filesystem case.
Once under GEOM, we can remove the clone handler as GEOM provides one.
2003-09-21 18:57:12 +00:00
Thomas Quinot
505d8ea4f1
(atapi_cb): Reorganize error handling circuitry.
...
Fix to the messages output under CAM_DEBUG_CCB: the summary sense
information (error bits and sense key) is in the error field, not
in the result field, of struct ata_request. No other functional change.
2003-09-21 16:49:53 +00:00
Thomas Quinot
1a2ede86a0
(atapi_cb): Disable autosense for now as it causes a missed ATA interrupt.
...
Minor reformatting.
2003-09-21 08:53:05 +00:00
Søren Schmidt
bcf5e4d6b1
Dont reject a master device if it said slave failed.
2003-09-20 08:38:33 +00:00
Thomas Quinot
6ff17a79aa
(atapi_action): avoid memory leak in a marginal invalid ccb case.
...
(free_hcb): defend against calling TAILQ_REMOVE on an hcb that was
not inserted on pending_hcbs.
2003-09-19 16:25:44 +00:00
Søren Schmidt
4cb5b1f936
Always check the sensekey field on ATAPI returns
...
Add INQUIRY to cmd2str.
2003-09-19 12:46:12 +00:00
Søren Schmidt
015aa7376b
Cosmetics
2003-09-18 16:44:54 +00:00
Søren Schmidt
228800a5a7
Be a bit more restrictive in the probe so we dont hang around
...
on empty channels in most cases.
2003-09-18 16:43:08 +00:00
Søren Schmidt
52725a453f
Properly handle error code returns from the lower levels ATAPI code.
2003-09-18 09:22:14 +00:00
Søren Schmidt
855deec44c
When ignoring interrupts (due to no running request set) then try
...
to grap the channel so we can read status (and clear an evt pending
interrupt).
2003-09-16 15:21:37 +00:00
Søren Schmidt
853c84ddf6
Rearrange the probe a bit first try ATAPI signatures then ATA.
2003-09-16 15:16:36 +00:00
Søren Schmidt
77de5988d6
Properly cast longs to off_t so we dont loose precision.
2003-09-16 14:41:44 +00:00
Poul-Henning Kamp
0c7721e8f9
Disable the use of cloning use in floppy and CD drivers.
...
This commit puts the relevant code snippets under #ifdef GONE_IN_5
(rather than #ifndef BURN_BRIDGES) thereby disabling the code now.
The code wil be entirely removed before 5.2 unless we find reasons
why this would be a bad idea.
Approach suggested by: imp
2003-09-11 19:27:24 +00:00
Thomas Quinot
cc9ed6619f
(atapi_action, case XPT_PATH_INQ): Handle properly the case of
...
CAM_TARGET_WILDCARD (target_id_t is an unsigned integer type).
Fixes boot-time crash on Alpha.
Reviewed by: roberto
Approved by: re (murray)
MFC after: 1 week
2003-09-11 17:34:47 +00:00
Søren Schmidt
fe78f9d47c
Add support of the DIOCGSECTORSIZE & DIOCGMEDIASIZE ioctl's
...
so that newfs works on dvd-rw/dvd-ram again..
2003-09-11 15:59:16 +00:00
Søren Schmidt
2194b6a479
Try a bit harder to probe disks that doesn't quite set BUSY right.
2003-09-10 09:57:16 +00:00
Søren Schmidt
a127b17621
Add another ID for the SiI3112a SATA chip as used on the Adaptec 1210SA.
...
RAID support is still in the works, so for now just normal ATA ops.
Sponsored by: Matt Douhan(www.fruitsalad.org)
2003-09-08 13:55:05 +00:00
Søren Schmidt
df63f1d988
Limit the size of the rebuild requests to be within safety.
2003-09-08 13:36:26 +00:00
Søren Schmidt
4514dcad32
#ifdef out the vague ATA disk detection code causing fake ATA disks
...
to be found on some systems.
Hopefully this doesn't loose any real ATA disks...
2003-09-08 08:36:46 +00:00
Søren Schmidt
08c26854a3
Handle shared channels better.
...
Try to avoid the spurios interrupts better.
2003-09-08 08:32:25 +00:00
Søren Schmidt
9855ae3844
Update the PIO mode gathering code.
...
Reported by: bde
2003-09-08 08:30:43 +00:00
Poul-Henning Kamp
bc7c831fc7
Forgotten in previous commit to atapi-cd.c: Add #ifndef BURN_BRIDGES
...
around cloning routines.
2003-09-05 11:08:55 +00:00
Poul-Henning Kamp
7837155fa2
Put the device cloning functions for disk-drivers under #ifndef BURN_BRIDGES.
...
For the floppy driver, use fdcontrol to manipulate density selection.
For the CD drivers, the 'a' and 'c' suffix is without actual effect and
any applications insisting on it can be satisfied with a symlink:
ln -s /dev/cd0 /dev/cd0a
Ongoing discussion may result in these pieces of code being removed before
the 5-stable branch as opposed to after.
2003-09-05 10:40:16 +00:00
David E. O'Brien
debffe8383
Support the nForce3 chip found on Opteron motherboards:
...
atapci0: <nVidia nForce3 UDMA133 controller>
Approved by: sos
2003-09-02 21:02:46 +00:00
Søren Schmidt
b57e5e1898
cosmetics
2003-09-02 15:53:01 +00:00
Søren Schmidt
dce3b7cc71
Adjust the max transfer size used.
2003-09-02 13:26:02 +00:00
Søren Schmidt
7c78880561
Rearrange the probe code yet again.
2003-09-01 11:13:21 +00:00
Søren Schmidt
d7e9ef77f8
Be more carefull on nulling the ATAPI magic for fake slave.
...
Skip polling devices that keeps returning 0xff early (ie no HW there).
2003-08-28 09:15:05 +00:00
Søren Schmidt
07844fe49c
Make sure to call start when retrying.
2003-08-28 08:22:53 +00:00
Thomas Quinot
c8fb1af26c
Add missing braces. Fixes boot-time kernel panic with ATAng and ATAPI/CAM.
...
Reviewed by: roberto
2003-08-28 03:56:04 +00:00
Søren Schmidt
61f07fc6ca
Return the translated result code from ATA/ATAPI commands.
2003-08-27 15:27:56 +00:00
Søren Schmidt
1d68703f6a
Hopefully Fix problem with probing some ATAPI devices, while still
...
trying to avoid the "fake slave" problem.
2003-08-27 11:21:30 +00:00
Søren Schmidt
3a83be8e3b
Try to get rid of the fake slave problem.
2003-08-25 13:06:13 +00:00
Søren Schmidt
6419d0b0e4
Cleanup the dma int/alloc/free code.
2003-08-25 11:13:04 +00:00
Søren Schmidt
9f06a4277f
Unify prototypes.
...
Cosmetics.
2003-08-25 09:01:49 +00:00
Søren Schmidt
ea01d56917
Only call FLUSH_CACHE on devices that say they can.
...
This will get rid of the warnings issued at shutdown (that seems to
worry alot of users), but will also no flush cache on lots of
devices that can, but doesn't set the right support bits...
2003-08-25 07:59:50 +00:00