how to use SCSI floppy drive (TEAC FD-235HS-715 (FC-1)) ?

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Wed, 25 Aug 1999 09:52:55 +0200


I'm not subscribed to linux-scsi, so please send replies to me as Cc:
thanks.

I'd like to use a TEAC FD-235HS-715 3.5" SCSI floppy drive (FC-1 controller PCB)
but don't have success so far using Linux 2.2.10.
without floppy disk inserted, the drive gets detected:

kernel: Vendor: TEAC Model: FC-1 HF 07 Rev: RV B
kernel: Type: Direct-Access ANSI SCSI revision: 01 CCS
kernel: Detected scsi removable disk sdc at scsi1, channel 0, id 1, lun 0

kernel: sdc : READ CAPACITY failed.
kernel: sdc : status = 1, message = 00, host = 0, driver = 08
kernel: sdc : extended sense code = 2
kernel: sdc : block size assumed to be 512 bytes, disk size 1GB.
kernel: sdc: Write Protect is on
kernel: sdc:scsidisk I/O error: dev 08:20, sector 0
kernel: unable to read partition table

but as soon as I insert a disk and try to read from it:

Aug 6 14:04:35 turtle kernel: VFS: Disk change detected on device sd(8,32)
Aug 6 14:04:35 turtle kernel: SCSI device sdc: hdwr sector= 256 bytes. Sectors= 5120 [1 MB] [0.0 GB]
Aug 6 14:04:35 turtle kernel: sdc: Write Protect is off
Aug 6 14:05:08 turtle kernel: sdc:aha1542.c: Trying device reset for target 1
Aug 6 14:05:28 turtle kernel: Sent BUS RESET to scsi host 1
Aug 6 14:05:38 turtle kernel: scsidisk I/O error: dev 08:20, sector 0
Aug 6 14:05:38 turtle kernel: unable to read partition table

and device /dev/sdc can't be accessed anymore (ENXIO, Device not configured).

I noticed the `hdwr sector= 256 bytes. Sectors= 5120 [1 MB]' output
which doesn't make sense for 1.44" HDD disks, so looked at www.teac.com
how to switch to 512 byte sectors.

I only could find file doc2001.PDF which suggests to use the following MODE_SELECT

unsigned char buffer[10*1024];
unsigned char teac1440[] = {
0x15, 0x10, 0x00, 0x00, 0x2c, 0x00,
0x00, 0x28, 0x00, 0x08,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
0x05, 0x1e, 0x01, 0xf4, 0x02, 0x12, 0x02, 0x00,
0x00, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 0x1e,
0x00, 0x00, 0x96, 0x05, 0x46, 0x60, 0x01, 0x00,
0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00,
};

memset(buffer, 0, sizeof(buffer));
*( (int *) buffer) = 0; /* length of input data */
*( ((int *) buffer) + 1 ) = 1024; /* length of output buffer */

cmd = (char *) ( ((int *) buffer) + 2 );

memcpy(cmd, teac1440, sizeof(teac1440));

status = ioctl(fno, SCSI_IOCTL_SEND_COMMAND, buffer);
if (status) {
perror("ioctl(SCSI_IOCTL_SEND_COMMAND)");
exit(1);
}

to switch to 2MB IBM-compatible media, but this doesn't make any difference.
I still get `hdwr sector= 256 bytes. Sectors= 5120 [1 MB]' when trying to read:(

any idea or hint how to get this beast working, or how to figure out
if the drive is broken ?

thanks,

Harald

-- 
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/