Commit Graph

387 Commits

Author SHA1 Message Date
Søren Schmidt
aafa7ea069 Fix the max transfer size for ATAPI devices. The spec says to
transfer at most 65534 bytes, thats 126 times DEV_BSIZE not 252 :(

Pointed out by: Ian Dowse <iedowse@maths.tcd.ie>
2002-07-26 19:13:05 +00:00
Søren Schmidt
ba41a3d37e Fix the transfer size calculation. 2002-07-22 18:37:33 +00:00
Søren Schmidt
5c0d1ab990 Sync with the spl changes in -stable.
Add start of support for DVD+RW.
2002-07-22 18:36:14 +00:00
Søren Schmidt
2dadf47412 Update the tags handling a bit, which makes support for the
older IBM DTTA series of drives possible.
Update error handling a bit now we are here.
2002-07-22 18:35:01 +00:00
Peter Wemm
b5d0be8951 Remove dependency on NPCI. Use 'options ATA_NOPCI' to compile without
pci support.  This really needs to be fixed properly some day, but judging
by the fact that the nopci case hasn't compiled for quite a while, there
does not seem to be much urgency.

Reviewed by:	sos
2002-07-21 21:37:09 +00:00
John Baldwin
c584bd8f63 Add PCI ID for the ICH4 ATA100 controller.
Sponsored by:	The Weather Channel
2002-07-19 22:14:54 +00:00
Søren Schmidt
9153cecd64 Use si_iosize_max to tell the upper layers not to use more
than 32K chunks on ZIP drives instead of deblocking it in
the driver.
2002-06-19 12:41:05 +00:00
Søren Schmidt
098d258d05 Add yet another (older) Promise chip 2002-06-19 12:26:20 +00:00
Søren Schmidt
0b2577457c Fix a '<<' that should have been a '>>' in the 48bit case.
Fortunately we only have had 32bit block counts until recently,
and no 2TB disks :)
2002-06-08 21:33:42 +00:00
Søren Schmidt
d9d34030a4 Use %02d in track numbers, so that 1 is 01, much easier for scripts 2002-05-28 17:39:17 +00:00
Bruce Evans
e788f79698 Fixed printf format errors which apparently crept in while -Wformat was
disabled for gcc-3.
2002-05-25 11:18:03 +00:00
Søren Schmidt
949e9d36aa Dont panic if only one disk on a channel can do tagged queueing.
MFC:	asap
2002-05-23 08:17:16 +00:00
Mike Barcroft
a30d4b3270 Move the new byte order function prototypes from <sys/param.h> to
<sys/endian.h>.  This puts us in line with NetBSD and OpenBSD.
2002-04-26 22:48:23 +00:00
Søren Schmidt
091a610ac9 Fix the breakage of tagged queueing that the busdma integration
introduced. Since its now only possible to have one DMA control
block at a time, we move the setup to dmastart instead.
2002-04-18 19:11:45 +00:00
Søren Schmidt
4ec627a3eb Add support for the nVIDIA nForce ATA controller.
Collapse the VIA/AMD/nVIDIA support code into one, they are
created more or less equal anyway..
2002-04-16 08:30:51 +00:00
Søren Schmidt
6ed14aa161 Add a couble more Promise chip ID's. 2002-04-12 14:10:19 +00:00
Søren Schmidt
5b93eb04a9 Add yet another chip ID for a Promise TX2 chip. 2002-04-11 11:04:23 +00:00
Søren Schmidt
f8b318ce58 Only calculate Promise magic if a device is there for info. 2002-04-11 08:52:32 +00:00
Søren Schmidt
56397b300c Fix the FreeBSD native ATA RAID code a bit. 2002-04-10 11:18:07 +00:00
Søren Schmidt
a12b615d49 Add yet another ATA133 Promise chip. 2002-04-07 07:53:34 +00:00
Søren Schmidt
32dbed0488 Unlock the channel again if an ata_reinit() fails. 2002-04-05 18:37:04 +00:00
Søren Schmidt
268f0ea9a3 Change option ATA_ENABLE_BUSMASTER into ifdef __sparc64__ 2002-04-05 18:05:17 +00:00
Søren Schmidt
ede0f136df Cleanups. 2002-04-05 18:04:05 +00:00
Søren Schmidt
111ab6f7ed Dont allow to detach twice. 2002-04-05 18:02:33 +00:00
Søren Schmidt
22c60e8d8c Add forgotten ATA_UNLOCK_CH when getting status from non-existing
enclosure.
2002-04-05 15:58:45 +00:00
Søren Schmidt
7800211b08 Make the ATA driver compile & work on the sparc64 platform.
Initial work & code by tmm.

Lots of changes and rearrangements by yours truely to make busdma
be a little less a PITA (but I still dont like it).
2002-04-05 13:13:56 +00:00
Søren Schmidt
3eb933c093 Correct the Northbridge test on the new ATA133 VIA's
Misc cosmetics now I'm there.
2002-04-02 16:45:06 +00:00
Søren Schmidt
3348c0092c Add get-status to the ATA RAID subsystem. 2002-04-02 13:48:17 +00:00
Poul-Henning Kamp
408ab1b875 Retire the bogus ioctl DIOCGPART in toto.
Once again we can notice that badly thought out hacks ferment and infect
far more code than initially expected.

Sponsored by:	DARPA and NAI Labs.
2002-04-02 11:52:13 +00:00
John Baldwin
44731cab3b Change the suser() API to take advantage of td_ucred as well as do a
general cleanup of the API.  The entire API now consists of two functions
similar to the pre-KSE API.  The suser() function takes a thread pointer
as its only argument.  The td_ucred member of this thread must be valid
so the only valid thread pointers are curthread and a few kernel threads
such as thread0.  The suser_cred() function takes a pointer to a struct
ucred as its first argument and an integer flag as its second argument.
The flag is currently only used for the PRISON_ROOT flag.

Discussed on:	smp@
2002-04-01 21:31:13 +00:00
Poul-Henning Kamp
81661c94b6 Here follows the new kernel dumping infrastructure.
Caveats:

The new savecore program is not complete in the sense that it emulates
enough of the old savecores features to do the job, but implements none
of the options yet.

I would appreciate if a userland hacker could help me out getting savecore
to do what we want it to do from a users point of view, compression,
email-notification, space reservation etc etc.  (send me email if
you are interested).

Currently, savecore will scan all devices marked as "swap" or "dump" in
/etc/fstab _or_ any devices specified on the command-line.

All architectures but i386 lack an implementation of dumpsys(), but
looking at the i386 version it should be trivial for anybody familiar
with the platform(s) to provide this function.

Documentation is quite sparse at this time, more to come.

Details:

ATA and SCSI drivers should work as the dump formatting code has been
removed.  The IDA, TWE and AAC have not yet been converted.

Dumpon now opens the device and uses ioctl(DIOCGKERNELDUMP) to set
the device as dumpdev.  To implement the "off" argument, /dev/null
is used as the device.

Savecore will fail if handed any options since they are not (yet)
implemented.  All devices marked "dump" or "swap" in /etc/fstab
will be scanned and dumps found will be saved to diskfiles
named from the MD5 hash of the header record.  The header record
is dumped in readable format in the .info file.  The kernel
is not saved.  Only complete dumps will be saved.

All maintainer rights for this code are disclaimed: feel free to
improve and extend.

Sponsored by:   DARPA, NAI Labs
2002-03-31 22:37:00 +00:00
Søren Schmidt
db9df6ae8f ATA100 is allowed on the HPT chips rev >= 3 2002-03-31 13:33:55 +00:00
Søren Schmidt
60378464bb Remove debug output in last commit. 2002-03-30 16:51:47 +00:00
Søren Schmidt
4486f609fc Add support for getting status (fan, temp, 5V and 12V levels) from
Promise Superswap enclosures.

Sponsored by: Advanis
2002-03-30 16:36:41 +00:00
Søren Schmidt
7e2437190c Use the raid lun not the magic when writing Promise config. 2002-03-30 11:15:46 +00:00
Søren Schmidt
5847590d42 Fix a braino, only update LED's when a device is present. 2002-03-28 11:48:36 +00:00
Søren Schmidt
5f3950daa4 OK, the old HighPoint BIOS's are braindead, they have
a really warped way of things. Anyway deal with it,
and luckily the newer HighPoint BIOS's doesn't mind..

No brownies to HighPoint for that...
2002-03-27 22:05:38 +00:00
Søren Schmidt
fe4f5b97e0 Fix support for multi CD changers, it was as broken as my old NEC :)
MFC: ASAP

:
2002-03-27 19:47:52 +00:00
Søren Schmidt
85db7089ec Add support for creating/deleting ATA RAID's.
This completes the ATA RAID support, since all functions to manipulate
the RAID are accessible from FreeBSD, the BIOS on the ATA RAID cards
are only nessesary for booting.

I decided to allow for creation of ATA RAID's on any ATA controller, but
please keep in mind the restrictions on that. Due to the BIOS not
knowing what to do you can only boot from a RAID1 or the first disk
in a SPAN, if its not located on a "real" ATA RAID controller like
the Promise or Highpoint controllers.

Sponsored by: Advanis
2002-03-27 10:58:59 +00:00
Søren Schmidt
d42c4a3ba6 Misc little cleanups. 2002-03-26 09:31:22 +00:00
Søren Schmidt
38009ef247 Add AMD 768 support. 2002-03-24 12:44:23 +00:00
Peter Wemm
bcb6ef7c82 Add some break's after default: in the end of switch statements to
keep gcc-3.1+ happy:
ata-all.c:410: warning: deprecated use of label at end of compound statement
ata-all.c:587: warning: deprecated use of label at end of compound statement
ata-raid.c:99: warning: deprecated use of label at end of compound statement
ata-raid.c:151: warning: deprecated use of label at end of compound statement
2002-03-19 12:14:14 +00:00
Søren Schmidt
a86fb2a588 Cleanup the chipset setup a bit.
Add some (for all I know unneeded) setup code for the rosb4.
2002-03-18 13:56:44 +00:00
Søren Schmidt
2c66127540 Add support for the ServerWorks CSB5 chips 2002-03-18 12:13:13 +00:00
Søren Schmidt
4e887e1915 Add more functionality to the CDIOCREADSUBCHANNEL ioctl.
PR: 26644
2002-03-16 15:56:54 +00:00
Søren Schmidt
698d5a2c84 Fix 64bit arch problems. 2002-03-16 15:55:20 +00:00
Søren Schmidt
e1a86e393c Remove useless splXXX set. 2002-03-16 15:54:41 +00:00
Søren Schmidt
7bdca10c47 Update to the RAID1 rebuild code.
Run rebuild as a background process.

Sponsored by: Advanis
2002-03-15 15:39:54 +00:00
Søren Schmidt
733c2fbdd3 Unbreak the probing of some CDROM drives. 2002-03-14 21:35:55 +00:00
Søren Schmidt
fe86c44885 Add new support for locking an ATA channel and use that throughout
the ATA/ATAPI driver. This solves the concurrency problem with
the new GEOM code, and also cuts a good deal of the patch size
in the upcoming MFC.
2002-03-11 21:04:32 +00:00