9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: okamoto@granite.cias.osakafu-u.ac.jp
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Toshiba Tecra 720 (notebook)
Date: Thu,  4 Jan 2001 16:40:39 +0900	[thread overview]
Message-ID: <20010104074117.11308199E3@mail.cse.psu.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 605 bytes --]

Sorry I made mistake to attach a file. Once again.

I found a patch to this Dynabook notebook's 3mode floppy for linux
of some version (it's not so important because we know what is neccessary
to set it up).  That is from sengoku@sdl.hitachi.co.jp, and is included
(sorry for Japanese). I'll do this from now.

For someone who does not read Japanese, here is my short comment.
His post consists of two part, the former is not so proper, because it
causes serious speed down to linux.  The latter half is the patch for it.
We are Plan 9 users, so we may have some other effects.  :-)

Kenji


[-- Attachment #2: Dyna3mode --]
[-- Type: text/plain, Size: 5288 bytes --]

Newsgroups: fj.os.linux
From: sengoku@sdl.hitachi.co.jp (Hiroaki Sengoku)
Subject: Dynabook 1.44M/1.2M floppy disk drive
Message-ID: <CECMsq.Cqy@sdl99m.sdl.hitachi.co.jp>
Organization: Systems Development Lab., Hitachi Ltd., JAPAN
Distribution: fj
Date: Mon, 4 Oct 1993 10:29:13 JST

仙石@日立です。

  皆さんご存知のように、Dynabook の floppy disk drive は、DOS では 1.2M
<-> 1.44M の自動切替が出来るのに、linux では出来ません。私は普段 1.44M
boot の設定にしているので、 1.2M の disk が読めず不便でした。そこでちょっ
と kernel に patch をあてて読めるようにしました。

# すでに誰かがやっているかな ? 少なくとも linux ML と fj.os.linux では書
# かれていないと思いますが、ちょっと心配。^^;)

  私は mtools で B: を 1.2M drive の設定にして使ってます。なかなか便利。
  もちろん mount -t msdos /dev/fd0h1200 /mnt も使えます。

----- きっちょんな -----8<----- きっちょんな -----
--- kernel/chr_drv/keyboard.c.org	Sun Aug 15 03:52:34 1993
+++ kernel/chr_drv/keyboard.c	Sat Oct  2 18:29:00 1993
@@ -731,3 +731,9 @@
 	mark_bh(KEYBOARD_BH);
 	return kmem_start;
 }
+
+void switch_fd(short x) {
+	kb_wait();
+	outb(0xBB,0x64);
+	send_data(x);
+}
--- kernel/blk_drv/floppy.c.org	Sun Aug 15 20:24:36 1993
+++ kernel/blk_drv/floppy.c	Sat Oct  2 18:48:50 1993
@@ -989,6 +989,8 @@
     }
 }
 
+void switch_fd(short x);
+
 static void redo_fd_request(void)
 {
 	unsigned int block;
@@ -1091,6 +1093,13 @@
 		seek = 1;
 	sector++;
 	del_timer(motor_off_timer + current_drive);
+	/* change floppy mode. by sengoku@sdl.hitachi.co.jp */
+	if( floppy->size % 1200 ) {	/* only for TOSHIBA j-3100 */
+		switch_fd(0x00);	/* 1.44 Mbytes mode */
+	} else {
+		switch_fd(0x10);	/* 1.2  Mbytes mode */
+	}
+	/* end of change */
 	floppy_on(current_drive);
 }
 
----- きっちょんな -----8<----- きっちょんな -----

  なお、drive の mode 切替えの方法は東芝のテクニカルマニュアルに記載され
ていないので、試行錯誤 :-) して見つけました。そのため何か変なことをして
いるかも知れません。その場合は御指摘頂ければ幸いです。
--
				仙石浩明@システム開発研究所.日立製作所
					sengoku@sdl.hitachi.co.jp (105u)
-------------------------------------------------------------------------------
Newsgroups: fj.os.linux
From: sengoku@sdl.hitachi.co.jp (Hiroaki Sengoku)
Subject: Re: Dynabook 1.44M/1.2M floppy disk drive
In-Reply-To: sengoku@sdl.hitachi.co.jp's message of Mon, 4 Oct 1993 01:29:13 GMT
Message-ID: <CHyK7D.3o9@sdl99m.sdl.hitachi.co.jp>
Followup-To: fj.os.linux
Organization: Systems Development Lab., Hitachi Ltd., JAPAN
References: <CECMsq.Cqy@sdl99m.sdl.hitachi.co.jp>
Distribution: fj
Date: Mon, 13 Dec 1993 14:21:12 JST

仙石@日立です。

私:
|   皆さんご存知のように、Dynabook の floppy disk drive は、DOS では 1.2M
| <-> 1.44M の自動切替が出来るのに、linux では出来ません。私は普段 1.44M
| boot の設定にしているので、 1.2M の disk が読めず不便でした。そこでちょっ
| と kernel に patch をあてて読めるようにしました。

  という patch を以前流したのですが、floppy の読み書きが遅くなるという 
(致命的な) 副作用がありました。バグ報告は一件しか来なかったので、みなさ
ん適当に修正されたのだと思いますが、念のため patchlevel 14 に対する 
patch を公開します。

# 誰も使ってなかったりして。

----- きっちょんな -----8<----- きっちょんな -----
--- drivers/char/keyboard.c.org	Tue Nov 23 21:51:04 1993
+++ drivers/char/keyboard.c	Fri Dec 10 23:38:50 1993
@@ -781,3 +781,11 @@
 	mark_bh(KEYBOARD_BH);
 	return kmem_start;
 }
+
+/* change floppy mode. patched by sengoku@sdl.hitachi.co.jp */
+/* NOTICE: This routine is only for TOSHIBA J-3100          */
+void switch_fd(short x) {
+	kb_wait();
+	outb(0xBB,0x64);
+	send_data(x);
+}
--- drivers/block/floppy.c.org	Tue Nov 23 03:47:46 1993
+++ drivers/block/floppy.c	Sat Dec 11 01:16:55 1993
@@ -991,6 +991,23 @@
     }
 }
 
+/* change floppy mode. patched by sengoku@sdl.hitachi.co.jp */
+/* NOTICE: This routine is only for TOSHIBA J-3100          */
+void switch_fd(short x);
+static void change_floppy_mode(void) {
+	static int prev_mode = -1;
+	int mode;
+	mode = floppy->size % 1200;
+	if( mode != prev_mode ) {
+		if( mode ) {
+			switch_fd(0x00);	/* 1.44 Mbytes mode */
+		} else {
+			switch_fd(0x10);	/* 1.2  Mbytes mode */
+		}
+		prev_mode = mode;
+	}
+}
+
 static void redo_fd_request(void)
 {
 	unsigned int block;
@@ -1036,6 +1053,7 @@
 				floppy++;
 		}
 	}
+	change_floppy_mode();	/* added by sengoku@sdl.hitachi.co.jp */
 	if (format_status != FORMAT_BUSY) {
 		if (current_drive != CURRENT_DEV) {
 			current_track = NO_TRACK;
----- きっちょんな -----8<----- きっちょんな -----
--
				仙石浩明@システム開発研究所.日立製作所
					sengoku@sdl.hitachi.co.jp (105u)

             reply	other threads:[~2001-01-04  7:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-04  7:40 okamoto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-01-11 11:19 okamoto
2001-01-09 10:22 okamoto
2001-01-08  7:01 okamoto
2001-01-05  3:06 okamoto
2001-01-05  3:02 okamoto
2001-01-04  7:20 okamoto
2001-01-04  5:47 okamoto
2001-01-04  5:31 okamoto
2000-12-30  5:47 okamoto
2000-12-30  2:50 okamoto
2000-12-29 16:22 Russ Cox
2000-12-29 11:36 okamoto
2000-12-29  9:22 okamoto
2000-12-29  8:40 okamoto
2001-01-02 17:45 ` Deztroyer-a1

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010104074117.11308199E3@mail.cse.psu.edu \
    --to=okamoto@granite.cias.osakafu-u.ac.jp \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).