Re: [hatari-devel] Hatari SCSI support

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 4/17/19 9:35 PM, Eero Tamminen wrote:
 > On 17/04/2019 01.10, Eero Tamminen wrote:
 >> Hatari SCSI support isn't good enough for Linux, see:
>
On 4/17/19 11:16 AM, Thomas Huth wrote:
Well, you listed SCSI in TT mode there.

Here's the Linux v5.0 boot output for SCSI with Falcon emulation.
---------------------------------------------------------
....
ide-gd driver 1.18
scsi host0: Atari native SCSI, irq 15, io_port 0x0, base 0x0, can_queue 1, cmd_per_lun 2, sg_tablesize 0, this_id 7, flags { }
blk_queue_max_segments: set to minimum 1
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x24, ctrl=0x0)
scsi 0:0:0:0: Direct-Access     Hatari   EmulatedHarddisk 0180 PQ: 0 ANSI: 1
blk_queue_max_segments: set to minimum 1
HDC: INQUIRY (SCSI, t=0, lun=1, opc=0x12, cnt=0x24, ctrl=0x0)
blk_queue_max_segments: set to minimum 1
....
HDC: TEST UNIT READY (SCSI, t=0, lun=0, opc=0x0, cnt=0x0, ctrl=0x0).
HDC: READ CAPACITY (SCSI, t=0, lun=0, opc=0x25, cnt=0x0, ctrl=0x0)
sd 0:0:0:0: [sda] 8192 512-byte logical blocks: (4.19 MB/4.00 MiB)
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 00 0e 00 08
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
sd 0:0:0:0: [sda] Cache data unavailable
sd 0:0:0:0: [sda] Assuming drive cache: write through
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
HDC: TEST UNIT READY (SCSI, t=0, lun=0, opc=0x0, cnt=0x0, ctrl=0x0).
HDC: READ CAPACITY (SCSI, t=0, lun=0, opc=0x25, cnt=0x0, ctrl=0x0)
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x8, ctrl=0x0) with LBA 0x0 -> OK (0)
HDC: TEST UNIT READY (SCSI, t=0, lun=0, opc=0x0, cnt=0x0, ctrl=0x0).
HDC: TEST UNIT READY (SCSI, t=0, lun=0, opc=0x0, cnt=0x0, ctrl=0x0).
HDC: READ CAPACITY (SCSI, t=0, lun=0, opc=0x25, cnt=0x0, ctrl=0x0)
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
HDC: INQUIRY (SCSI, t=0, lun=0, opc=0x12, cnt=0x40, ctrl=0x0)
sd 0:0:0:0: [sda] Attached SCSI disk
HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x2 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x4 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x28 -> OK (0)
VFS: Mounted root (ext2 filesystem) readonly on device 8:0.
HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x128 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x56 -> OK (0)
devtmpfs: mounted
Freeing unused kernel memory: 112K
This architecture does not have kernel memory protection.
Run /init as init process
HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x3a -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0xd02 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x2a -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x144 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x2, ctrl=0x0) with LBA 0x2c -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x8, ctrl=0x0) with LBA 0x146 -> OK (0) HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x8, ctrl=0x0) with LBA 0x14e -> OK (0)
Data read fault at 0xe47c0004 in Super Data (pc=0x11af46)
BAD KERNEL BUSERR
Oops: 00000000
PC: [<0011af46>] deadline_remove_request+0x14/0xae
....
Call Trace: [<0011aecc>] deadline_next_request+0x0/0x66
 [<0011b4f8>] dd_dispatch_request+0x10a/0x1a8
 [<001125bc>] blk_mq_do_dispatch_sched+0x58/0xdc
 [<00035986>] process_one_work+0x0/0x268
....
Disabling lock debugging due to kernel taint
HDC: READ SECTOR (SCSI, t=0, lun=0, opc=0x28, cnt=0x8, ctrl=0x0) with LBA 0x156 -> OK (0)
---------------------------------------------------------


All warnings are for the same command.  According to
hdc.c::HDC_Cmd_RequestSense(), Hatari warning comes
because "cnt" is > 22.

Thomas?


I think I already said it a
couple of times, but in case you missed it so far: We're still lacking
emulation of the second MFP in TT mode. It does not make sense to test
SCSI with Linux in TT mode without the second MFP.

It likely does not make too much sense to test Linux in TT mode
currently at all as long as we do not have the second MFP there yet.

After Nicolas' 2nd TT MFP, implementation, I get now with TT + SCSI:
---------------------------------------------------------
Core driver edition 01.06 : TT driver edition 00.03
Write will use    4 fragments of   32768 bytes as default
NET: Registered protocol family 17
rtc-generic rtc-generic: setting system clock to 2019-05-13T00:04:53 UTC (1557705893)
HDC: TEST UNIT READY (SCSI, t=0, lun=0, opc=0x0, cnt=0x0, ctrl=0x0).
HDC: READ CAPACITY (SCSI, t=0, lun=0, opc=0x25, cnt=0x0, ctrl=0x0)
sd 0:0:0:0: [sda] 8192 512-byte logical blocks: (4.19 MB/4.00 MiB)
HDC: MODE SENSE (SCSI, t=0, lun=0, opc=0x1a, cnt=0x4, ctrl=0x0).
HDC: REQUEST SENSE (SCSI, t=0, lun=0, opc=0x3, cnt=0x60, ctrl=0x0).
WARN : HDC: *** Strange REQUEST SENSE ***!
sd 0:0:0:0: Device offlined - not ready after error recovery
---------------------------------------------------------

Because of the above Linux warning, I assume opcode 0x3 in above means:
#define HD_REQSENS_WRITEERR 0x03              /* Write fault */


	- Eero



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/