Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1274770

Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers

From Finn Thain <fthain@telegraphics.com.au>
Newsgroups linux.kernel
Subject Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers
Date 2015-11-22 00:40 +0100
Message-ID <qxpV8-3RO-15@gated-at.bofh.it> (permalink)
References <qw6Bc-vx-5@gated-at.bofh.it> <qwYBz-2q0-5@gated-at.bofh.it> <qx5MJ-7gC-3@gated-at.bofh.it> <qxg5r-5GU-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Sat, 21 Nov 2015, Ondrej Zary wrote:

> On Saturday 21 November 2015 02:58:57 Finn Thain wrote:
> 
> > 
> > I gather that your setup here is a QUANTUM LP240S target with Domex 
> > 3181 (DTC-436) card and g_NCR5380 module. I've been testing a similar 
> > setup: QUANTUM LPS540S target with a Domex 3191D (DTC-536) card and 
> > dmx3191d module. In both setups PIO is used exclusively, no IRQ is 
> > used, and FLAG_DTC3181E is set. I didn't see any issues in my tests, 
> > so your results are surprising.
> 
> I agree that the results are surprising. Even tried 2.4 kernels (Debian 
> 3.1) and even 2.2 (Debian 3.0) and nothing worked. HW is fine - the 
> drive is accessible in Windows 98 (with Domex driver installed).

That's good to know (and very thorough).

> 
> Now testing the Canon FG2-5202 controller - a simple 8-bit ISA card with 
> only two chips: NCR 53C400 and 74LS245. It's memory mapped, IRQ 
> hardwired to 7.
> 
> # modprobe g_NCR5380_mmio ncr_irq=255 ncr_addr=0xd8000 ncr_53c400=1
> 
> [ 1245.919223] scsi2 : interrupts not enabled. for better interactive performance,
> [ 1245.919326] scsi2 : please jumper the board for a free IRQ.
> [ 1245.919389] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0, n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize 128, this_id 7, flags { NCR53C400 }, USLEEP_POLL 3, USLEEP_WAITLONG 1250, options { AUTOPROBE_IRQ PSEUDO_DMA NCR53C400 }
> [ 1246.376738] scsi 2:0:1:0: Direct-Access     QUANTUM  LP240S GM240S01X 4.6  PQ: 0 ANSI: 2 CCS
> [ 1248.202198] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [ 1248.420856] 53C400r: no 53C80 gated irq after transfer
> [ 1248.420948] 53C400r: no end dma signal
> [ 1248.422459] sd 2:0:1:0: [sdb] Sector size 0 reported, assuming 512.
> 
> Seems that the PSEUDO_DMA is broken.

That's been my experience with mac_scsi also (going back 10 years). I'm 
told that it used to work in v2.2. PIO was always usable though hopelessly 
slow.

I haven't yet done any work on the PDMA problem with mac_scsi because 
crashing bugs and the forked core driver seemed to be the more pressing 
problems. And resolving the fork has implications for all of the DMA 
variations anyway.

> After adding FLAG_NO_PSEUDO_DMA:
> 
> # modprobe g_NCR5380_mmio ncr_irq=255 ncr_addr=0xd8000 ncr_53c400=1
> 
> [   67.974362] scsi2 : interrupts not enabled. for better interactive performance,
> [   67.974463] scsi2 : please jumper the board for a free IRQ.
> [   67.974526] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0, n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize 128, this_id 7, flags { NCR53C400 NO_PSEUDO_DMA }, USLEEP_POLL 3, USLEEP_WAITLONG 1250, options { AUTOPROBE_IRQ PSEUDO_DMA NCR53C400 }
> [   68.432728] scsi 2:0:1:0: Direct-Access     QUANTUM  LP240S GM240S01X 4.6  PQ: 0 ANSI: 2 CCS
> [   70.258258] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [   70.277265] sd 2:0:1:0: [sdb] 479350 512-byte logical blocks: (245 MB/234 MiB)
> [   70.482252] sd 2:0:1:0: [sdb] Write Protect is off
> [   70.482335] sd 2:0:1:0: [sdb] Mode Sense: 8b 00 00 08
> [   70.889646] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [   73.159513]  sdb: sdb1
> [   74.617099] sd 2:0:1:0: [sdb] Attached SCSI disk
> 
> Yeah, first success! I can even mount the filesystem, although it takes ages
> (a minute) and these messages:
> [  160.872074] sd 2:0:1:0: [sdb] aborting command
> [  161.816083] sd 2:0:1:0: [sdb] aborting command
> 
> # hdparm -t --direct /dev/sdb
> 
> /dev/sdb:
> [  244.840075] sd 2:0:1:0: [sdb] aborting command
> [  248.824078] sd 2:0:1:0: [sdb] aborting command
> [  293.864069] sd 2:0:1:0: [sdb] aborting command
> [  297.824075] sd 2:0:1:0: [sdb] aborting command
> [  319.765020] blk_update_request: critical target error, dev sdb, sector 0
> [  319.972994] blk_update_request: critical target error, dev sdb, sector 0
>  Timing O_DIRECT disk reads:   2 MB in 105.26 seconds =  19.46 kB/sec
> 
> 
> 
> With your patches (and adding FLAG_NO_PSEUDO_DMA), modprobe is slower but
> mount faster (4 seconds) and then works better:
> 
> # modprobe g_NCR5380_mmio ncr_irq=255 ncr_addr=0xd8000 ncr_53c400=1
> 
> [  130.126185] scsi2 : interrupts not enabled. for better interactive performance,
> [  130.126284] scsi2 : please jumper the board for a free IRQ.
> [  130.126347] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0, n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize 128, this_id 7, flags { NO_PSEUDO_DMA }, options { AUTOPROBE_IRQ PSEUDO_DMA }
> [  145.221755] scsi 2:0:1:0: Direct-Access     QUANTUM  LP240S GM240S01X 4.6  PQ: 0 ANSI: 2 CCS
> [  220.629912] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [  220.651400] sd 2:0:1:0: [sdb] 479350 512-byte logical blocks: (245 MB/234 MiB)
> [  220.654061] sd 2:0:1:0: [sdb] Write Protect is off
> [  220.659344] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [  220.732415]  sdb: sdb1
> [  220.749760] sd 2:0:1:0: [sdb] Attached SCSI disk
> 
> # hdparm -t --direct /dev/sdb
> 
> /dev/sdb:
>  Timing O_DIRECT disk reads:   2 MB in 18.25 seconds = 112.20 kB/sec
> 
> 
> 
> IRQ seems to work too, although driver always shows "irq 0":

Your right, there's a superficial bug there that affects the banner in the 
log. But it doesn't affect behaviour (the IRQ should still work). It isn't 
a new bug.

> 
> # modprobe g_NCR5380_mmio ncr_irq=7 ncr_addr=0xd8000 ncr_53c400=1
> 
> [  117.263062] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_port 0x0, n_io_port 0, base 0xd8000, irq 0, can_queue 16, cmd_per_lun 2, sg_tablesize 128, this_id 7, flags { NO_PSEUDO_DMA }, options { AUTOPROBE_IRQ PSEUDO_DMA }
> [  132.357474] scsi 2:0:1:0: Direct-Access     QUANTUM  LP240S GM240S01X 4.6  PQ: 0 ANSI: 2 CCS
> [  207.765080] sd 2:0:1:0: Attached scsi generic sg1 type 0
> [  207.783415] sd 2:0:1:0: [sdb] 479350 512-byte logical blocks: (245 MB/234 MiB)
> [  207.786167] sd 2:0:1:0: [sdb] Write Protect is off
> [  207.790260] sd 2:0:1:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
> [  207.859669]  sdb: sdb1
> [  207.876556] sd 2:0:1:0: [sdb] Attached SCSI disk
> 
> # hdparm -t --direct /dev/sdb
> 
> /dev/sdb:
>  Timing O_DIRECT disk reads:   2 MB in 18.30 seconds = 111.94 kB/sec
> 
> # mount /dev/sdb1 /mnt
> # umount /mnt
> # head /proc/interrupts
>            CPU0
>   0:      44793    XT-PIC  timer
>   1:          9    XT-PIC  i8042
>   2:          0    XT-PIC  cascade
>   7:         86    XT-PIC  NCR5380
>   8:          1    XT-PIC  rtc0
>   9:          0    XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
>  10:       1179    XT-PIC  eth0
>  12:        136    XT-PIC  i8042
>  14:       3411    XT-PIC  pata_via
> 

Nice! Thanks for your perseverance. It is gratifying to see it working.

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-18 10:20 +0100
  [PATCH 04/71] ncr5380: Remove more pointless macros Finn Thain <fthain@telegraphics.com.au> - 2015-11-18 10:30 +0100
  Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-18 12:40 +0100
    Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-19 03:30 +0100
      Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Michael Schmitz <schmitzmic@gmail.com> - 2015-11-19 04:00 +0100
      Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-19 08:50 +0100
      Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 00:00 +0100
        Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-20 02:50 +0100
          Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-20 08:30 +0100
            Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Christoph Hellwig <hch@infradead.org> - 2015-11-20 08:40 +0100
              Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-20 09:20 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 10:20 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Christoph Hellwig <hch@infradead.org> - 2015-11-20 11:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-20 12:00 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Christoph Hellwig <hch@infradead.org> - 2015-11-20 12:50 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 12:50 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Geert Uytterhoeven <geert@linux-m68k.org> - 2015-11-20 13:30 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 13:50 +0100
          Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 08:40 +0100
          Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-20 19:30 +0100
            Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-21 03:10 +0100
              Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-21 14:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-22 00:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-22 00:40 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-24 00:00 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-24 02:30 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-24 09:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-24 10:20 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-24 13:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-24 19:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-24 22:50 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-25 03:20 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-25 10:10 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380  drivers Finn Thain <fthain@telegraphics.com.au> - 2015-11-25 13:00 +0100
                Re: [PATCH 00/71] More fixes, cleanup and modernization for NCR5380 drivers Ondrej Zary <linux@rainbow-software.org> - 2015-11-26 00:10 +0100
  [PATCH 72/71] ncr5380: Fix pseudo-DMA Ondrej Zary <linux@rainbow-software.org> - 2015-11-25 22:40 +0100
  [RFC PATCH 73/71] ncr5380: Use runtime register mapping Ondrej Zary <linux@rainbow-software.org> - 2015-11-29 10:50 +0100
    Re: [RFC PATCH 73/71] ncr5380: Use runtime register mapping Finn Thain <fthain@telegraphics.com.au> - 2015-11-30 13:00 +0100
  [RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A Ondrej Zary <linux@rainbow-software.org> - 2015-11-29 10:50 +0100
    Re: [RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A Finn Thain <fthain@telegraphics.com.au> - 2015-11-30 13:00 +0100
    Re: [RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A Finn Thain <fthain@telegraphics.com.au> - 2015-11-30 13:10 +0100
      Re: [RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A Ondrej Zary <linux@rainbow-software.org> - 2015-11-30 14:50 +0100
  [RFC PATCH 75/71] ncr5380: Remove FLAG_DTC3181E Ondrej Zary <linux@rainbow-software.org> - 2015-11-29 11:10 +0100
    Re: [RFC PATCH 75/71] ncr5380: Remove FLAG_DTC3181E Finn Thain <fthain@telegraphics.com.au> - 2015-11-30 06:00 +0100

csiph-web