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: Fri,  5 Jan 2001 12:02:12 +0900	[thread overview]
Message-ID: <20010105030252.59B8C199D7@mail.cse.psu.edu> (raw)

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

Please forget my previous info on changing rotation speed of 3mode floppy.
I tried it, and got meserable result. ☺  It varies model by model.  I attached
more complete info on this.

Kenji


[-- Attachment #2: 3mode.patch.README --]
[-- Type: text/plain, Size: 5888 bytes --]

[お知らせ]
     2000年4月から本ページ群の一部を他ISP のWWWサーバの中に移行させました。
     現在このサーバでの更新は行ってお りません。

  ------------------------------------------------------------------------

Linux で 1232KB フォーマットの 3.5/5.25 インチ 2HD FD を読めるよう にするパ
ッチ

1232KB フォーマット(98 フォーマット, Japanese 2HD format)形式の 3.5/5.25
インチの 2HD フロッピーディスクを Linux で読めるようにします。

   * 1232kb-fdd-20000322.gz (2000/3/22版,Linux-2.2.x, Linux-2.3.x 用)

Human68k fs 用パッチ には上記のパッチが含まれているものもあります。

[注意]このプログラムは無保証です。プログラムの利用によるいかなる損害等 につ
いて,当方は一切関知いたしません。各自の責任で使用して下さい。

  ------------------------------------------------------------------------

準備

  1. Linux 2.2.* に上記のパッチを当てて下さい。以下の項目が config のメ ニュ
     ー中に追加されますので,必要なものを y で選択して下さい。
     a. [Block devices]-[1232KB (1.25MB) format support]
          1232Kbytes (1.25MBytes) フォーマットのフロッピーディスク(3.5イン
          チ,5.25インチ)を読めるようにします。ただし,3.5 インチのフロッピ
          ーディ スクも読みたい場合には何らかの方法で 3mode FDD を使えるよう
          にしなけ ればなりません。
     b. [Block devices]-[3mode fdd support for FMV-BIBLO NUVI23 series]
          Fujitsu FMV-BIBLO NUVI23 で 3モード の 3.5インチFDDを使えるように
          します。
     c. [Block devices]-[3mode fdd support for TOMCAT 3MODE FDD]
          TOMCAT製の 3mode FDD を使えるようにします。
     d. [Block devices]-[3mode fdd support for SMC/SMCS
     FDC37C663,664,665,666,669]
          FDC として SMC/SMCS製の FDC37C663,664,665,666,669 チップが使われ
          ているマシンで 3mode FDD を使えるようにします。
     e. [Block devices]-[3mode fdd support for SMC/SMCS
     FDC37C67x,68x,93x,957,FDC37B80x]
          FDC として SMC/SMCS製の FDC37C67x,68x,69x,957 や FDC37B80x チップ
          が使われているマシンで 3mode FDD を使えるようにします。
     f. [Block devices]-[3mode fdd support for Winbond W83877]
          FDC として Winbond 社の W83877 が使われているマシンで 3mode FDD を
          使えるようにします。
     g. [Block devices]-[3mode fdd support for Winbond W83977]
          FDC として Winbond 社の W83977 が使われているマシンで 3mode FDD を
          使えるようにします。
     [注]
          {\tt [3mode fdd support for ...]} は2つ以上選択しないで下さい。
  2. カーネルやモジュールをコンパイル,インストールして reboot して下さい。

問題点

   * 実は...十分なテストはしていません。テストしていただける方がいらっ しゃ
     れば連絡下さい。
      FMV-BIBLO NUVI23                        テスト済み
      TOMCAT 3MODE FDD                        未テスト
      SMC/SMSC FDC37C663,664,665,666,669      FDC37C669?
      SMC/SMSC FDC37C67x,68x,93x,957,FDC37B80x未テスト
      Winbond W83877                          未テスト
      Winbond W83977                          テスト済み
   * format ができるかどうかは分かりません。

  ------------------------------------------------------------------------

技術的な話

   * 本パッチの詳細や 3mode FDDについ て

  ------------------------------------------------------------------------

参考リンク

FDC(Super-I/O)チップメーカーの技術資料

   * SMSC (Standard Microsystems Corporation) の Datasheet があるページ
   * Winbond 社の Datasheet があるページ
   * ITE 社の Datasheet があるページ

その他の3mode FD 用ツール

   * 3mode FD Drivers for Windows95/98
   * smcdsel (DOS 用 の SMC(SMSC)製 FDC で 3mode FDD を使うためのプログラム)
   * FreeBSD 用 3モード3.5インチFDD対応 パッチ
   * ThinkPad 701 用の Linux 3mode-FDD patch

  ------------------------------------------------------------------------

変更履歴

2000/3/22版
     Winbond W83977 のバグを fix。
1999/12/10版
     Winbond 系の FDC に対するコードを追加した。
1999/12/3版
     Human68k fs から 3mode fdd の部分を独立させた。

  ------------------------------------------------------------------------

TODO

   * パッチの詳細情報を記述する。
   * 対応 FDC を増やす。

  ------------------------------------------------------------------------

謝辞

以下の方からの情報が,本パッチの作成に大変役立ちました。 ありがとうございま
す。

   * おさだ@NBIさん(5.25 inch FDD 関連)
   * 長野@九州大学さん (SMC FDC37C669 関連)
   * 阿部@鳥取大学さん(Winbind W83977 関連)

  ------------------------------------------------------------------------
おかえりはこちら

   * 私のホームのページへ
   * 橋本研究室の人々のページへ
   * 橋本研究室ホームページへ
   * 情報工学科ホームページへ
   * 基礎工学部のページへ
   * 大阪大学ホームページへ

  ------------------------------------------------------------------------
kasukawa@ics.es.osaka-u.ac.jp
kasukawa@ff.iij4u.or.jp
ご意見、ご感想や誤りのご報告にはmailをお使い下さい。

[-- Attachment #3: 1.2to1.4MB --]
[-- Type: text/plain, Size: 7772 bytes --]

diff -u --new-file --recursive linux-2.2.14/drivers/block/Config.in linux-2.2.14-human/drivers/block/Config.in
--- linux-2.2.14/drivers/block/Config.in	Wed Jan  5 03:12:14 2000
+++ linux-2.2.14-human/drivers/block/Config.in	Wed Mar 22 17:16:19 2000
@@ -11,6 +11,18 @@
 if [ "$CONFIG_ATARI" = "y" ]; then
   tristate 'Atari floppy support' CONFIG_ATARI_FLOPPY
 fi
+if [ "$CONFIG_BLK_DEV_FD" != "n" ]; then
+  bool '  1232KB (1.25MB) format support' CONFIG_FD1232
+  if [ "$CONFIG_FD1232" = "y" ]; then
+    comment '    Please select *one* or *none* of the followings'
+    bool '    3mode fdd support for FMV-BIBLO NUVI23 series' CONFIG_FUJITSU_NU623
+    bool '    3mode fdd support for TOMCAT 3MODE FDD' CONFIG_FDD_TOMCAT
+    bool '    3mode fdd support for SMC/SMSC FDC37C663,664,665,666,669' CONFIG_FDC_SMC66X
+    bool '    3mode fdd support for SMSC FDC37C67x,68x,93x,957,FDC37B80x' CONFIG_FDC_SMCNOT66X
+    bool '    3mode fdd support for Winbond W83877' CONFIG_FDC_W83877
+    bool '    3mode fdd support for Winbond W83977' CONFIG_FDC_W83977
+  fi
+fi
 
 tristate 'Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support' CONFIG_BLK_DEV_IDE
 comment 'Please see Documentation/ide.txt for help/info on IDE drives'
diff -u --new-file --recursive linux-2.2.14/drivers/block/floppy.c linux-2.2.14-human/drivers/block/floppy.c
--- linux-2.2.14/drivers/block/floppy.c	Thu Aug 26 09:29:46 1999
+++ linux-2.2.14-human/drivers/block/floppy.c	Wed Mar 22 17:18:11 2000
@@ -364,14 +364,24 @@
 {{1,  300, 16, 16, 8000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  40, 3*HZ, 17, {3,1,2,0,2}, 0,
       0, { 1, 0, 0, 0, 0, 0, 0, 0}, 3*HZ/2, 1 }, "360K PC" }, /*5 1/4 360 KB PC*/
 
+#ifdef CONFIG_FD1232
+{{2,  500, 16, 16, 6000, 4*HZ/10, 3*HZ, 14, SEL_DLY, 6,  83, 3*HZ, 17, {3,1,2,0,2}, 0,
+      0, { 2,31, 5, 6,23,10,20,12}, 3*HZ/2, 2 }, "1.2M" }, /*5 1/4 HD AT*/
+#else
 {{2,  500, 16, 16, 6000, 4*HZ/10, 3*HZ, 14, SEL_DLY, 6,  83, 3*HZ, 17, {3,1,2,0,2}, 0,
       0, { 2, 5, 6,23,10,20,12, 0}, 3*HZ/2, 2 }, "1.2M" }, /*5 1/4 HD AT*/
+#endif
 
 {{3,  250, 16, 16, 3000,    1*HZ, 3*HZ,  0, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
       0, { 4,22,21,30, 3, 0, 0, 0}, 3*HZ/2, 4 }, "720k" }, /*3 1/2 DD*/
 
+#ifdef CONFIG_FD1232
+{{4,  500, 16, 16, 4000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
+      0, { 7,31, 4,25,22,31,21,29}, 3*HZ/2, 7 }, "1.44M" }, /*3 1/2 HD*/
+#else
 {{4,  500, 16, 16, 4000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 20, {3,1,2,0,2}, 0,
       0, { 7, 4,25,22,31,21,29,11}, 3*HZ/2, 7 }, "1.44M" }, /*3 1/2 HD*/
+#endif
 
 {{5, 1000, 15,  8, 3000, 4*HZ/10, 3*HZ, 10, SEL_DLY, 5,  83, 3*HZ, 40, {3,1,2,0,2}, 0,
       0, { 7, 8, 4,25,28,22,31,21}, 3*HZ/2, 8 }, "2.88M AMI BIOS" }, /*3 1/2 ED*/
@@ -438,7 +448,11 @@
 
 	{ 3680,23,2,80,0,0x1C,0x10,0xCF,0x00,"H1840" }, /* 29 1.84MB 3.5"   */
 	{ 1600,10,2,80,0,0x25,0x02,0xDF,0x2E,"D800"  },	/* 30 800KB 3.5"    */
+#ifdef CONFIG_FD1232
+	{ 2464,16,2,77,0,0x35,0x08,0xDF,0x74,"h1232" }, /* 31 1.25MB 3.5/5" */
+#else
 	{ 3200,20,2,80,0,0x1C,0x00,0xCF,0x2C,"H1600" }, /* 31 1.6MB 3.5"    */
+#endif
 };
 
 #define	NUMBER(x)	(sizeof(x) / sizeof(*(x)))
@@ -1900,6 +1914,87 @@
 }
 /*typedef void (*timeout_fn)(unsigned long);*/
 
+#ifdef CONFIG_FD1232
+/* change rpm for 1232KB format disk */
+static void rpm_change(int rpm360)
+{
+	int i, j;
+	cli();
+#ifdef CONFIG_FUJITSU_NU623
+	outb(0x15, 0xfd64);
+	i = inb(0xfd65);
+	if (rpm360) i |= 0x80;
+	else i &= ~0x80;
+	outb(i, 0xfd65);
+#endif /* CONFIG_FUJITSU_NU623 */
+#ifdef CONFIG_TOMCAT_FDD
+	i = FDCS->dor;
+	j = 0x10 << UNIT(current_drive);
+	outb(i & ~j, FD_DOR);
+	outb(i | j, FD_DOR);
+	outb(i & ~j, FD_DOR);
+	outb(i | j, FD_DOR);
+	outb(i & ~j, FD_DOR);
+	outb(i | j, FD_DOR);
+	outb(i & ~j, FD_DOR);
+	outb(i | j, FD_DOR);
+	outb(i & ~j, FD_DOR);
+	outb(i | j, FD_DOR);
+	if (!rpm360) {
+		outb(i & ~j, FD_DOR);
+		outb(i | j, FD_DOR);
+	}
+#endif /* CONFIG_TOMCAT_FDD */
+#ifdef CONFIG_FDC_SMC66X
+	outb(0x55, FDCS->address);
+	outb(0x55, FDCS->address);
+	outb(0x5, FDCS->address);
+	i = inb(FDCS->address + 1);
+	if (rpm360) i |= 0x18;
+	else i &= ~0x18;
+	outb(i, FDCS->address + 1);
+	outb(0xaa, FDCS->address);
+#endif /* CONFIG_FDC_SMC66X */
+#ifdef CONFIG_FDC_SMCNOT66X
+	outb(0x55, FDCS->address);
+	outb(0x7, FDCS->address);
+	outb(0x0, FDCS->address + 1);
+	outb(0xf1, FDCS->address);
+	i = inb(FDCS->address + 1);
+	if (rpm360) i |= 0x0c;
+	else i &= ~0x0c;
+	outb(i, FDCS->address + 1);
+	outb(0xaa, FDCS->address);
+#endif /* CONFIG_FDC_SMCNOT66X */
+#ifdef CONFIG_FDC_W83877
+	outb(0x87, FDCS->address);
+	outb(0x87, FDCS->address);
+	i = inb(FDCS->address + 1);
+	if (rpm360) i |= 0x20;
+	else i &= ~0x20;
+	outb(i, FDCS->address + 1);
+	outb(0x07, FDCS->address);
+	outb(((rpm360)? 0x55:0), FDCS->address + 1);
+	outb(0xaa, FDCS->address);
+#endif /* CONFIG_FDC_W83877 */
+#ifdef CONFIG_FDC_W83977
+	outb(0x87, FDCS->address);
+	outb(0x87, FDCS->address);
+	outb(0x07, FDCS->address);
+	outb(0x00, FDCS->address + 1);
+	outb(0xf0, FDCS->address);
+	i = inb(FDCS->address + 1);
+	if (rpm360) i |= 0x01;
+	else i &= ~0x01;
+	outb(i, FDCS->address + 1);
+	outb(0xf2, FDCS->address);
+	outb(((rpm360)? 0x55:0), FDCS->address + 1);
+	outb(0xaa, FDCS->address);
+#endif /* CONFIG_FDC_W83977 */
+	sti();
+}
+#endif /* CONFIG_FD1232 */
+
 /* start motor, check media-changed condition and write protection */
 static int start_motor(void (*function)(void) )
 {
@@ -1924,6 +2019,13 @@
 	del_timer(motor_off_timer + current_drive);
 	set_dor(fdc, mask, data);
 
+#ifdef CONFIG_FD1232
+	if ((DP->cmos == 4)&&(_floppy == floppy_type + 31)) {
+		rpm_change(1);
+	} else {
+		rpm_change(0);
+	}
+#endif
 	/* wait_for_completion also schedules reset if needed. */
 	return(wait_for_completion(DRS->select_date+DP->select_delay,
 				   (timeout_fn) function));
@@ -2878,13 +2980,6 @@
 		set_floppy(device);
 		raw_cmd = & default_raw_cmd;
 		raw_cmd->flags = 0;
-		if (start_motor(redo_fd_request)) return;
-		disk_change(current_drive);
-		if (test_bit(current_drive, &fake_change) ||
-		   TESTF(FD_DISK_CHANGED)){
-			DPRINT("disk absent or changed during operation\n");
-			REPEAT;
-		}
 		if (!_floppy) { /* Autodetection */
 			if (!probing){
 				DRS->probed_format = 0;
@@ -2898,6 +2993,13 @@
 			_floppy = floppy_type+DP->autodetect[DRS->probed_format];
 		} else
 			probing = 0;
+		if (start_motor(redo_fd_request)) return;
+		disk_change(current_drive);
+		if (test_bit(current_drive, &fake_change) ||
+		   TESTF(FD_DISK_CHANGED)){
+			DPRINT("disk absent or changed during operation\n");
+			REPEAT;
+		}
 		errors = & (CURRENT->errors);
 		tmp = make_raw_rw_request();
 		if (tmp < 2){
diff -u --new-file --recursive linux-2.2.14/drivers/block/mkfd1232dev linux-2.2.14-human/drivers/block/mkfd1232dev
--- linux-2.2.14/drivers/block/mkfd1232dev	Thu Jan  1 09:00:00 1970
+++ linux-2.2.14-human/drivers/block/mkfd1232dev	Wed Jan  5 15:15:36 2000
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+FORMATNO=${1-31}
+MINOR0=`eval echo "\$(($FORMATNO*4))"`
+MINOR1=`eval echo "\$(($FORMATNO*4+1))"`
+MINOR2=`eval echo "\$(($FORMATNO*4+2))"`
+MINOR3=`eval echo "\$(($FORMATNO*4+3))"`
+DEV0=/dev/fd0h1232
+DEV1=/dev/fd1h1232
+DEV2=/dev/fd2h1232
+DEV3=/dev/fd3h1232
+
+if [ -b $DEV0 ]; then
+    rm -f $DEV0
+fi
+if [ -b $DEV1 ]; then
+    rm -f $DEV1
+fi
+if [ -b $DEV2 ]; then
+    rm -f $DEV2
+fi
+if [ -b $DEV3 ]; then
+    rm -f $DEV3
+fi
+mknod $DEV0 b 2 $MINOR0
+mknod $DEV1 b 2 $MINOR1
+mknod $DEV2 b 2 $MINOR2
+mknod $DEV3 b 2 $MINOR3
+chmod 660 $DEV0 $DEV1 $DEV2 $DEV3
+chown root:floppy $DEV0 $DEV1 $DEV2 $DEV3

             reply	other threads:[~2001-01-05  3:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-05  3:02 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-04  7:40 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=20010105030252.59B8C199D7@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).