summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/atapi-tape.c
diff options
context:
space:
mode:
authorsos <sos@FreeBSD.org>1999-03-28 18:57:20 +0000
committersos <sos@FreeBSD.org>1999-03-28 18:57:20 +0000
commitcc8db63d86528268737ccaa24c4b89612ae33c9b (patch)
tree8f31a9803ef06d70c5c94f5fe3eb8ac3ac2ebde5 /sys/dev/ata/atapi-tape.c
parent6fdf96baf623239e4d6fc225a78cfee4c5993016 (diff)
downloadFreeBSD-src-cc8db63d86528268737ccaa24c4b89612ae33c9b.zip
FreeBSD-src-cc8db63d86528268737ccaa24c4b89612ae33c9b.tar.gz
Fourth update to the new ATA/ATAPI driver:
Well, better late than newer, but things has been hectic around here, sorry for the long delay. DMA support has been added to the ATA disk driver. This only works on Intel PIIX3/4, Acer Aladdin and Promise controllers. The promise support works without the BIOS on the board, and timing modes are set to support up to UDMA speed. This solves the problems with having more than one promise controller in the same system. There is support for "generic" DMA, that might work on other controllers, but now you have been warned :) More chipset specific code will come soon, I have to find testers with the approbiate HW, more on that when I have it ready. The system now uses its own major numbers, please run MAKEDEV with the devices you need (ad?, acd?, afd?, ast?). For now the disk driver will also attach to the old wd major so one can at least boot without this step, but be warned, this will eventually go away. The bootblocks will have to be changed before one can boot directly from an "ad" device though. Fixed problems: All known hang problems should be solved The probe code has been sligthly changed, this should solve the reports I have lying around (I hope). Hangs when accessing ata & atapi device on the same channel simultaniously. A real braino in ata_start caused this, fixed. As usual USE AT YOUR OWN RISK!!, this is still pre alpha level code. Especially the DMA support can hose your disk real bad if anything goes wrong, agaiin you have been warned :) But please tell me how it works for you! Enjoy! -Søren
Diffstat (limited to 'sys/dev/ata/atapi-tape.c')
-rw-r--r--sys/dev/ata/atapi-tape.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c
index ba963e8..c4e6d1d 100644
--- a/sys/dev/ata/atapi-tape.c
+++ b/sys/dev/ata/atapi-tape.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: atapi-tape.c,v 1.3 1999/03/05 09:43:30 sos Exp $
+ * $Id: atapi-tape.c,v 1.4 1999/03/07 21:49:14 sos Exp $
*/
#include "ata.h"
@@ -47,6 +47,7 @@
#include <sys/devfsext.h>
#endif
#include <machine/clock.h>
+#include <pci/pcivar.h>
#include <dev/ata/ata-all.h>
#include <dev/ata/atapi-all.h>
#include <dev/ata/atapi-tape.h>
@@ -58,8 +59,8 @@ static d_write_t astwrite;
static d_ioctl_t astioctl;
static d_strategy_t aststrategy;
-#define CDEV_MAJOR 90
-#define BDEV_MAJOR 24
+#define BDEV_MAJOR 33
+#define CDEV_MAJOR 119
static struct cdevsw ast_cdevsw = {
astopen, astclose, astread, astwrite,
@@ -181,7 +182,7 @@ ast_describe(struct ast_softc *stp)
bpack(stp->atp->atapi_parm->revision, revision_buf, sizeof(revision_buf));
printf("ast%d: <%s/%s> tape drive at ata%d as %s\n",
stp->lun, model_buf, revision_buf,
- stp->atp->controller->unit,
+ stp->atp->controller->lun,
(stp->atp->unit == ATA_MASTER) ? "master" : "slave ");
printf("ast%d: ", stp->lun);
switch (stp->header.medium_type) {
OpenPOWER on IntegriCloud