[PATCH v2 74/71] ncr5380: Enable PDMA for NCR53C400A

2015-12-06 Thread Ondrej Zary
Add I/O register mapping for NCR53C400A and enable PDMA mode to improve performance and fix non-working IRQ. Tested with HP C2502 (and user-space enabler). Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 14 +++--- 1 file changed, 11 inse

Re: [PATCH 76/71] ncr5380: Enable PDMA for DTC chips

2015-12-06 Thread Ondrej Zary
On Sunday 06 December 2015 04:40:56 Finn Thain wrote: > > On Fri, 4 Dec 2015, Ondrej Zary wrote: > > > Add I/O register mapping for DTC chips and enable PDMA mode. > > > > These chips have 16-bit wide HOST BUFFER register (counter register at > > offset 0x0d in

[PATCH v2 76/71] ncr5380: Enable PDMA for DTC chips

2015-12-06 Thread Ondrej Zary
. The chip also crashes when we bang the C400 host status register too heavily after PDMA write - a small udelay is needed. Tested on DTCT-436P and verified that it does not break 53C400A. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c

[PATCH v2 73/71] ncr5380: Use runtime register mapping

2015-12-06 Thread Ondrej Zary
Convert compile-time C400_ register mapping to runtime mapping. This removes the weird negative register offsets and allows adding additional mappings. While at it, convert read/write loops into insb/outsb. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR

Re: [PATCH v2 77/71] ncr5380: Fix wait for 53C80 registers registers after PDMA

2015-12-07 Thread Ondrej Zary
On Monday 07 December 2015 04:16:14 Finn Thain wrote: > > On Mon, 7 Dec 2015, Ondrej Zary wrote: > > > The check for 53C80 registers accessibility was commented out because > > it was broken (inverted). Fix and enable it. > > > > Signed-off-by: Ondrej

[PATCH v3 78/71] ncr5380: Add support for HP 53C400A-based cards (C2502)

2015-12-09 Thread Ondrej Zary
. Add new magic numbers for these HP cards and hp_c2502 module parameter to use them, e.g.: modprobe g_NCR5380 ncr_irq=7 ncr_addr=0x280 ncr_53c400a=1 hp_c2502=1 Tested with HP C2502 and DTCT-436P. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c

Re: [PATCH v2 78/71] ncr5380: Add support for HP 53C400A-based cards (C2502)

2015-12-09 Thread Ondrej Zary
On Tuesday 08 December 2015 12:40:18 Finn Thain wrote: > > On Tue, 8 Dec 2015, Ondrej Zary wrote: > > > HP C2502 cards (based on 53C400A chips) use different magic numbers for > > software-based I/O address configuration than other cards. The > > configuration is als

Re: [patch RESEND] atp870u: 64 bit bug in atp885_init()

2015-12-09 Thread Ondrej Zary
hough the code was horrible. I've done some big changes to this driver recently (tested, of course). I can't test this patch as I don't have ATP885 card, only ATP870. -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v2 74/71] ncr5380: Enable PDMA for NCR53C400A

2015-12-09 Thread Ondrej Zary
On Tuesday 08 December 2015 03:05:11 Finn Thain wrote: > > On Sun, 6 Dec 2015, Ondrej Zary wrote: > > > Add I/O register mapping for NCR53C400A and enable PDMA mode to > > improve performance and fix non-working IRQ. > > > > Tested with HP C2502 (and user-sp

[PATCH 73/71] ncr5380: Use runtime register mapping

2015-12-04 Thread Ondrej Zary
Convert compile-time C400_ register mapping to runtime mapping. This removes the weird negative register offsets and allows adding additional mappings. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.h | 13 +- drivers/scsi/g_NCR5380.c

[PATCH 76/71] ncr5380: Enable PDMA for DTC chips

2015-12-04 Thread Ondrej Zary
this patch actually makes it work. The chip also crashes when we bang the C400 host status register too heavily after PDMA write - a small udelay is needed. Tested on DTCT-436P and verified that it does not break 53C400A. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- driver

[PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A

2015-12-04 Thread Ondrej Zary
Add I/O register mapping for NCR53C400A and enable PDMA mode to improve performance and fix non-working IRQ. Tested with HP C2502 (and user-space enabler). Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 10 -- 1 file changed, 8 insertions

[RFC PATCH 78/71] ncr5380: Add support for HP 53C400A-based cards (C2502)

2015-12-05 Thread Ondrej Zary
. Add new magic numbers for these HP cards and hp_53c400a module parameter to use them. Tested with HP C2502 and DTCT-436P. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 69 +++--- drivers/scsi/g_NCR5380.h

[RFC PATCH 76/71] ncr5380: Enable PDMA for DTC chips

2015-12-03 Thread Ondrej Zary
it work. The chip also crashes when we bang the C400 host status register too heavily after PDMA write - a small udelay is needed. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- # hdparm -t --direct /dev/sdb /dev/sdb: Timing O_DIRECT disk reads: 4 MB in 3.78 seconds = 1

[RFC PATCH 77/71] ncr5380: Fix wait for 53C80 registers registers after PDMA

2015-12-03 Thread Ondrej Zary
The check for 53C80 registers accessibility was commented out because it was broken (inverted). Fix and enable it. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 35 +++ 1 file changed, 7 insertions(+), 28 del

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

2015-12-22 Thread Ondrej Zary
0A chip), Canon FG2-5202 (53C400 chip) and DTC-3181L (DTCT-436P chip) ISA cards - everything works fine! Thanks. Tested-by: Ondrej Zary <li...@rainbow-software.org> -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message

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

2015-11-24 Thread Ondrej Zary
On Tuesday 24 November 2015 10:13:17 Finn Thain wrote: > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > On Tuesday 24 November 2015, Finn Thain wrote: > > > > > > On Mon, 23 Nov 2015, Ondrej Zary wrote: > > > > > > > > > > &

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

2015-11-25 Thread Ondrej Zary
On Wednesday 25 November 2015 10:04:10 Ondrej Zary wrote: > I think that PDMA should work with 53C400A too but seems that the driver was > never able to do it. > > Although there is code for port-mapped transfer in NCR5380_pread(), > NCR53C400_register_offset is defined to 0 in

[PATCH 72/71] ncr5380: Fix pseudo-DMA

2015-11-25 Thread Ondrej Zary
Pseudo-DMA (PDMA) has been broken for ages, resulting in hangs on 53C400-based cards. According to 53C400 datasheet, PDMA transfer length must be a multiple of 128. Check if that's true and use PIO if it's not. This makes PDMA work on 53C400 (Canon FG2-5202). Signed-off-by: Ondrej Zary <

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-25 Thread Ondrej Zary
On Wednesday 25 November 2015 04:17:09 Finn Thain wrote: > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > On Wednesday 18 November 2015 09:35:17 Finn Thain wrote: > > > Linux v2.1.105 changed the algorithm for polling for the BSY signal > > > in

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-28 Thread Ondrej Zary
On Thursday 26 November 2015 23:32:46 Finn Thain wrote: > > On Thu, 26 Nov 2015, Ondrej Zary wrote: > > > > > [ 156.014234] 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

[RFC PATCH 75/71] ncr5380: Remove FLAG_DTC3181E

2015-11-29 Thread Ondrej Zary
The FLAG_DTC3181E is used to activate a work-around for arbitration lost condition that these chips see when ICR is written during arbitration. Move the ICR write (to set SEL and BSY) after the arbitration loss check and remove FLAG_DTC3181E. Signed-off-by: Ondrej Zary <li...@rain

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-29 Thread Ondrej Zary
On Sunday 29 November 2015 01:46:03 Finn Thain wrote: > > On Sun, 29 Nov 2015, Ondrej Zary wrote: > > > > [...] I think that this should solve the problem: > > > > Yes, it does! > > > > [ 48.119367] scsi host2: Generic NCR5380/NCR53C400 SCSI, io_por

[RFC PATCH 73/71] ncr5380: Use runtime register mapping

2015-11-29 Thread Ondrej Zary
Convert compile-time C400_ register mapping to runtime mapping. This removes the weird negative register offsets and allows adding additional mappings. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.h | 13 +- drivers/scsi/g_NCR5380.c

[RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A

2015-11-29 Thread Ondrej Zary
Add I/O register mapping for NCR53C400A and enable PDMA mode to improve performance and fix non-working IRQ. Tested with HP C2502 (and user-space enabler). Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 11 ++- 1 file changed, 10 inse

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

2015-11-25 Thread Ondrej Zary
On Wednesday 25 November 2015, Finn Thain wrote: > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > On Tuesday 24 November 2015 10:13:17 Finn Thain wrote: > > > > > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > > > > > On Tuesday 24 Novemb

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

2015-11-24 Thread Ondrej Zary
On Tuesday 24 November 2015 13:03:17 Ondrej Zary wrote: > On Tuesday 24 November 2015, Finn Thain wrote: > > > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > > > On Tuesday 24 November 2015, Finn Thain wrote: > > > > >

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-24 Thread Ondrej Zary
4.6 PQ: 0 ANSI: 2 CCS [ 159.959308] sd 2:0:1:0: Attached scsi generic sg1 type 0 -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [RFC PATCH 74/71] ncr5380: Enable PDMA for NCR53C400A

2015-11-30 Thread Ondrej Zary
On Monday 30 November 2015, Finn Thain wrote: > > On Sun, 29 Nov 2015, Ondrej Zary wrote: > > > Add I/O register mapping for NCR53C400A and enable PDMA mode to > > improve performance and fix non-working IRQ. > > > > Is CONFIG_SCSI_GENERIC_NCR53C400 is stil

Re: [PATCH 22/71] ncr5380: Eliminate selecting state

2015-11-26 Thread Ondrej Zary
On Thursday 26 November 2015 11:23:01 Finn Thain wrote: > > On Wed, 25 Nov 2015, Ondrej Zary wrote: > > > On Wednesday 25 November 2015 04:17:09 Finn Thain wrote: > > > > > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > > > > >

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

2015-11-18 Thread Ondrej Zary
age. > It would be good to see some testing of ISA cards and Sun 3 and Atari > hardware too (I don't have any). I have some NCR5380 ISA cards and can test them. -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to

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

2015-11-18 Thread Ondrej Zary
On Thursday 19 November 2015, Finn Thain wrote: > On Wed, 18 Nov 2015, Ondrej Zary wrote: > > On Wednesday 18 November 2015, Finn Thain wrote: > > > Like my previous work on the NCR5380 drivers, this patch series has > > > bug fixes, code cleanup and modernization

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

2015-11-20 Thread Ondrej Zary
On Friday 20 November 2015, Geert Uytterhoeven wrote: > On Fri, Nov 20, 2015 at 12:40 PM, Ondrej Zary > <li...@rainbow-software.org> wrote: > > Working ISA means more testing possibilities. It's much easier to get an > > ISA card than a Sun or Atari. Also faster CPU

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

2015-11-20 Thread Ondrej Zary
ld be that g_NCR5380.c is not > broken. It could be that the core driver can't handle certain targets. I > think we need to do more testing. Maybe I was just unlucky and tested a drive that never worked with this driver. Working ISA means more testing possibilities. It's much easier to

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

2015-11-20 Thread Ondrej Zary
On Friday 20 November 2015 02:41:19 Finn Thain wrote: > > On Thu, 19 Nov 2015, Ondrej Zary wrote: > > > On Thursday 19 November 2015 03:24:56 Finn Thain wrote: > > > > > On Wed, 18 Nov 2015, Ondrej Zary wrote: > > > > > > > >

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

2015-11-20 Thread Ondrej Zary
> > I have mixed feelings about the ISA drivers. ISA DMA support complicates > things (it was never completed) and DMA seems to be the main obstacle to > merging the two core driver forks. IIRC, my ISA cards can't do DMA either. -- Ondrej Zary -- To unsubscribe from this list

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

2015-11-19 Thread Ondrej Zary
On Thursday 19 November 2015 03:24:56 Finn Thain wrote: > On Wed, 18 Nov 2015, Ondrej Zary wrote: > > On Wednesday 18 November 2015, Finn Thain wrote: > > > Like my previous work on the NCR5380 drivers, this patch series has > > > bug fixes, code cleanup and moderniz

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

2015-11-19 Thread Ondrej Zary
On Friday 20 November 2015, Finn Thain wrote: > > On Thu, 19 Nov 2015, Ondrej Zary wrote: > > > On Thursday 19 November 2015 03:24:56 Finn Thain wrote: > > > > > On Wed, 18 Nov 2015, Ondrej Zary wrote: > > > > > > > > > > > I ha

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

2015-11-21 Thread Ondrej Zary
On Saturday 21 November 2015 02:58:57 Finn Thain wrote: > > Hi Ondrej, > > On Fri, 20 Nov 2015, Ondrej Zary wrote: > > > On Friday 20 November 2015 02:41:19 Finn Thain wrote: > > > > > > > > > My tests involved 3 different scsi targets (two d

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

2015-11-21 Thread Ondrej Zary
On Saturday 21 November 2015 14:01:39 Ondrej Zary wrote: > On Saturday 21 November 2015 02:58:57 Finn Thain wrote: > > > > Hi Ondrej, > > > > On Fri, 20 Nov 2015, Ondrej Zary wrote: > > > > > On Friday 20 November 2015 02:41:19 Finn Thain wrote: >

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

2015-11-23 Thread Ondrej Zary
On Sunday 22 November 2015 00:32:31 Finn Thain wrote: > > 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 > &g

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

2015-11-24 Thread Ondrej Zary
On Tuesday 24 November 2015, Finn Thain wrote: > > On Mon, 23 Nov 2015, Ondrej Zary wrote: > > > > > PDMA seems to be broken in multiple ways. NCR5380_pread cannot process > > less than 128 bytes. In fact, 53C400 datasheet says that it's HW > > limitation: non

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

2015-11-24 Thread Ondrej Zary
On Tuesday 24 November 2015, Finn Thain wrote: > > On Tue, 24 Nov 2015, Ondrej Zary wrote: > > > On Tuesday 24 November 2015, Finn Thain wrote: > > > > > > On Mon, 23 Nov 2015, Ondrej Zary wrote: > > > > > > > > > > &

Re: [PATCH v3 00/23] ncr5380: Eliminate macros, reduce code duplication, fix bugs etc

2016-03-22 Thread Ondrej Zary
don't have such > hardware. Likewise RiscPC ecards and Sun 3. Tested on HP C2502 (53C400A chip), Canon FG2-5202 (53C400 chip) and DTC-3181L (DTCT-436P chip) ISA cards - everything works fine! Thanks. Tested-by: Ondrej Zary <li...@rainbow-software.org> HP C2502: scsi host2: G

Re: g_NCR5380 PDMA, was Re: [PATCH 0/6] ncr5380: Miscellaneous minor patches

2017-02-19 Thread Ondrej Zary
On Sunday 19 February 2017 00:27:55 Finn Thain wrote: > On Sat, 18 Feb 2017, Ondrej Zary wrote: > > On Friday 17 February 2017 23:38:12 Finn Thain wrote: > > > On Thu, 16 Feb 2017, Ondrej Zary wrote: > > > > On Tuesday 31 January

Re: g_NCR5380 PDMA, was Re: [PATCH 0/6] ncr5380: Miscellaneous minor patches

2017-02-16 Thread Ondrej Zary
g" stops after a while. I get gated 53C80 IRQ, BASR=0x10, MODE=0x0e, STATUS=0x7c. When I enable interrupts during PDMA (like the removed UNSAFE macro did), the problems go away. I see an IRQ after each pread call. (had to disable "no 53C80 gated irq after transfer" and "no end dma

Re: g_NCR5380 PDMA, was Re: [PATCH 0/6] ncr5380: Miscellaneous minor patches

2017-02-18 Thread Ondrej Zary
On Friday 17 February 2017 23:38:12 Finn Thain wrote: > On Thu, 16 Feb 2017, Ondrej Zary wrote: > > On Tuesday 31 January 2017 02:31:45 Finn Thain wrote: > > [...] > > > > > Are you trying to figure out which commands are going to disconnect > > > durin

Re: RFC: should we deprecate unmaintained isa-only drivers?

2016-09-11 Thread Ondrej Zary
On Sunday 11 September 2016 19:01:55 Christoph Hellwig wrote: > On Wed, Mar 25, 2015 at 09:52:53PM +0100, Ondrej Zary wrote: > > > - wd7000 > > > - aha1542 > > > - in2000 > > > - NCR53c406 > > > - sym53c416 > > > - u14-34f > > &g

Re: status of NCR5380-based ISA drivers

2016-09-11 Thread Ondrej Zary
y works fine as it did never before. I started a patch to for scsi_module.c removal (and other good things) but haven't had time to finish it. Hopefully, it will be ready soon. -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message

[PATCH 4/3] g_NCR5380: Merge g_NCR5380 and g_NCR5380_mmio

2016-09-25 Thread Ondrej Zary
Merge the PIO and MMIO code (with the help of ioport_map) in g_NCR5380 and delete g_NCR5380_mmio. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/Kconfig | 32 ++--- drivers/scsi/g_NCR5380.c | 257 +++-- driver

[PATCH 2/3] g_NCR5380: Reduce overrides[] from array to struct

2016-09-24 Thread Ondrej Zary
Remove compile-time card type definition GENERIC_NCR5380_OVERRIDE. Then remove all code iterating the overrides[] array and reduce it to struct card. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 351 ++

[PATCH 0/3] g_NCR5380: Modernization

2016-09-24 Thread Ondrej Zary
for g_NCR5380_mmio. Should I try to merge the code so g_NCR5380 will support both PIO and MMIO cards (and g_NCR5380_mmio could be removed)? -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo inf

[PATCH 1/3] g_NCR5380: Remove deprecated __setup

2016-09-24 Thread Ondrej Zary
Remove deprecated __setup for parsing command line parameters. g_NCR5380.* parameters could be used instead. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 135 -- 1 file changed, 135 deletions(-) diff

[PATCH 3/3] g_NCR5380: Stop using scsi_module.c

2016-09-24 Thread Ondrej Zary
Convert g_NCR5380 to use scsi_add_host instead of scsi_module.c Use pnp_driver and isa_driver to manage cards. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 310 +- drivers/scsi/g_NCR5380.h |8 -- 2

Re: [PATCH v2 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger

2016-10-07 Thread Ondrej Zary
er to register polling routines > scsi/ncr5380: Expedite register polling > scsi/ncr5380: Use correct types for DMA routines > scsi/ncr5380: Suppress unhelpful "interrupt without IRQ bit" message Tested on HP C2502 (53C400A chip), Canon FG2-5202 (53C400 chip) and DTC-

Re: [PATCH 00/12] Fixes, cleanup and g_NCR5380_mmio/g_NCR5380 merger

2016-10-05 Thread Ondrej Zary
i.c | 83 +--- > drivers/scsi/sun3_scsi.c | 80 ++-- > 14 files changed, 495 insertions(+), 487 deletions(-) > delete mode 100644 drivers/scsi/g_NCR5380_mmio.c -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 3/3] g_NCR5380: Stop using scsi_module.c

2016-09-27 Thread Ondrej Zary
_CARDS); > #if !defined(SCSI_G_NCR5380_MEM) && defined(CONFIG_PNP) > pnp_ret = pnp_register_driver(_NCR5380_pnp_driver); > return pnp_ret ? isa_ret : 0; > #endif > return isa_ret; > } > > static void __exit generic_NCR5380_exit(void) > { >

[PATCH 1/3] g_NCR5380: Remove deprecated __setup

2016-09-27 Thread Ondrej Zary
Remove deprecated __setup for parsing command line parameters. g_NCR5380.* parameters could be used instead. This might break existing setups with g_NCR5380 built-in (if there are any). But it has to go in order to remove the overrides[] array. Signed-off-by: Ondrej Zary <li...@rain

[PATCH 3/3] g_NCR5380: Stop using scsi_module.c

2016-09-27 Thread Ondrej Zary
Convert g_NCR5380 to use scsi_add_host instead of scsi_module.c Use pnp_driver and isa_driver to manage cards. In order to support multiple cards, new module parameter format is introduced. The old parameters are kept for compatibility. Signed-off-by: Ondrej Zary <li...@rainbow-software.

[PATCH 2/3] g_NCR5380: Reduce overrides[] from array to struct

2016-09-27 Thread Ondrej Zary
Remove compile-time card type definition GENERIC_NCR5380_OVERRIDE. Then remove all code iterating the overrides[] array and reduce it to struct card. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 351 ++

[PATCH v2 0/3] g_NCR5380: Modernization

2016-09-27 Thread Ondrej Zary
/g_NCR5380.txt - kept old-style module parameters for compatibility - added missing NCR5380_exit() call - fixed error propagation from init - simplified driver registration -- Ondrej Zary -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message

[PATCH 2/2] g_NCR5380: Test the IRQ before accepting it

2016-10-30 Thread Ondrej Zary
Trigger an IRQ first with a test IRQ handler to find out if it really works. Disable the IRQ if not. This prevents hang when incorrect IRQ was specified by user. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 31 +--

[PATCH 1/2] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-30 Thread Ondrej Zary
purposes (testing if the IRQ works). Also add missing IRQ reset after probe. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.c | 72 +- drivers/scsi/NCR5380.h |3 +- drivers/scsi/g_NCR5380.c |2 +- 3

[PATCH 1/3] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-30 Thread Ondrej Zary
purposes (testing if the IRQ works). Also add missing IRQ reset after probe. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.c | 72 +- drivers/scsi/NCR5380.h |3 +- drivers/scsi/g_NCR5380.c |2 +- 3

[PATCH 3/3] NCR5380: Check for chip presence in NCR5380_init()

2016-10-30 Thread Ondrej Zary
Read back MODE_REG after writing it in NCR5380_init() to check if the chip is really there. This prevents hang when incorrect I/O address was specified by user. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.c |5 + 1 file changed, 5 insertions(+)

[PATCH 2/3] g_NCR5380: Test the IRQ before accepting it

2016-10-30 Thread Ondrej Zary
Trigger an IRQ first with a test IRQ handler to find out if it really works. Disable the IRQ if not. This prevents hang when incorrect IRQ was specified by user. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 32 ++--

[PATCH 6/6] g_NCR5380: Fix release region in error handling

2016-10-31 Thread Ondrej Zary
When a SW-configurable card is specified but not found, the driver releases wrong region, causing the following message in kernel log: Trying to free nonexistent resource <-000f> Fix it by assigning base earlier. Signed-off-by: Ondrej Zary <li...@rainbow-sof

[PATCH 5/6] g_NCR5380: Autoprobe IRQ by default

2016-10-31 Thread Ondrej Zary
IRQ probing seems to work fine now. Default to autoprobe for IRQ instead of disabling it. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/g_NCR5380.c b/driver

[PATCH 2/6] g_NCR5380: Test the IRQ before accepting it

2016-10-31 Thread Ondrej Zary
Trigger an IRQ first with a test IRQ handler to find out if it really works. Disable the IRQ if not. This prevents hang when incorrect IRQ was specified by user. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c

[PATCH 0/6] (g_)NCR5380: Improve IRQ probing and some fixes

2016-10-31 Thread Ondrej Zary
Hello, this patch series improves IRQ probing and moves it from NCR5380 to g_NCR5380, adds IRQ auto-configuration for HP C2502 and enables all this by default. It also adds IRQ and base address checks to prevent hangs when wrong values are specified by user. There's also a small release region fix

[PATCH 3/6] g_NCR5380: Check for chip presence before calling NCR5380_init()

2016-10-31 Thread Ondrej Zary
Write and read back MODE_REG to check if the chip is really there before doing more initialization. This prevents hang when incorrect I/O address was specified by user (in the most common case where no device is present there so all reads result in 0xff). Signed-off-by: Ondrej Zary <

[PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-10-31 Thread Ondrej Zary
Find free and working IRQ automatically on HP C2502 cards. Also allow IRQ 9 to work (aliases to IRQ 2 on the card). Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/g_NCR5380.c | 29 +++-- 1 file changed, 27 insertions(+), 2 deletions(-)

[PATCH 1/6] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-31 Thread Ondrej Zary
purposes (testing if the IRQ works) and move the code from NCR5380 to g_NCR5380. Also add missing IRQ reset before and after the probe. Signed-off-by: Ondrej Zary <li...@rainbow-software.org> --- drivers/scsi/NCR5380.c | 77 +- drivers/scsi/N

Re: [PATCH 2/6] g_NCR5380: Test the IRQ before accepting it

2016-11-02 Thread Ondrej Zary
On Wednesday 02 November 2016 08:45:26 Finn Thain wrote: > On Mon, 31 Oct 2016, Ondrej Zary wrote: > > Trigger an IRQ first with a test IRQ handler to find out if it really > > works. Disable the IRQ if not. > > > > This prevents hang when incorrect IRQ was specified b

Re: [PATCH 1/3] NCR5380: Use probe_irq_*() for IRQ probing

2016-10-31 Thread Ondrej Zary
On Monday 31 October 2016, Finn Thain wrote: > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > Use standard probe_irq_on() and probe_irq_off() functions instead of own > > implementation. > > Thanks for doing this. > > > This prevents warning messages like this in the

Re: [PATCH 2/3] g_NCR5380: Test the IRQ before accepting it

2016-10-31 Thread Ondrej Zary
On Monday 31 October 2016, Finn Thain wrote: > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > Trigger an IRQ first with a test IRQ handler to find out if it really > > works. Disable the IRQ if not. > > > > This prevents hang when incorrect IRQ was specified by user. &g

Re: [PATCH 3/3] NCR5380: Check for chip presence in NCR5380_init()

2016-10-31 Thread Ondrej Zary
On Monday 31 October 2016, Finn Thain wrote: > On Sun, 30 Oct 2016, Ondrej Zary wrote: > > Read back MODE_REG after writing it in NCR5380_init() to check if the > > chip is really there. > > > > This prevents hang when incorrect I/O address was specified by user. > &g

Re: [PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-11-03 Thread Ondrej Zary
On Thursday 03 November 2016, Finn Thain wrote: > On Wed, 2 Nov 2016, Ondrej Zary wrote: > > > Also, you've ignored the irq module parameters. From the user's point > > > of view, surely the least surprising thing is to attempt to configure > > > the card f

Re: [PATCH 1/6] NCR5380: Use probe_irq_*() for IRQ probing

2016-11-02 Thread Ondrej Zary
On Wednesday 02 November 2016, Finn Thain wrote: > On Mon, 31 Oct 2016, Ondrej Zary wrote: > > Use standard probe_irq_on() and probe_irq_off() functions instead of own > > implementation. This prevents warning messages like this in the kernel > > log: genirq: Flags mismatch

Re: [PATCH 4/6] g_NCR5380: Add IRQ auto-configuration for HP C2502

2016-11-02 Thread Ondrej Zary
On Wednesday 02 November 2016, Finn Thain wrote: > On Mon, 31 Oct 2016, Ondrej Zary wrote: > > Find free and working IRQ automatically on HP C2502 cards. > > Also allow IRQ 9 to work (aliases to IRQ 2 on the card). > > > > Signed-off-by: Ondrej Zary

Re: [PATCH 0/4] g_NCR5380: Bug fix and some enhancements

2016-12-08 Thread Ondrej Zary
On Monday 05 December 2016 07:07:19 Finn Thain wrote: > This patch series is based on the one submitted recently by Ondrej Zary. > > This version has a different irq probing fix for HP C2502 boards and > a more comprehensive patch to change the default irq parameter. > > It needs

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-29 Thread Ondrej Zary
is interrupted. > - Rework residual calculation. > - Add new patch to correct DMA terminology. > > > Finn Thain (2): > g_NCR5380: Cleanup comments and whitespace > g_NCR5380: Use unambiguous terminology for PDMA send and receive > > Ondrej Zary (4): > g_NCR5380:

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-29 Thread Ondrej Zary
is interrupted. > - Rework residual calculation. > - Add new patch to correct DMA terminology. > > > Finn Thain (2): > g_NCR5380: Cleanup comments and whitespace > g_NCR5380: Use unambiguous terminology for PDMA send and receive > > Ondrej Zary (4): > g_NCR5380:

Re: [PATCH v4 0/5] g_NCR5380: PDMA fixes and cleanup

2017-06-28 Thread Ondrej Zary
er any short PDMA transfer. > - Don't fail the transfer if the 53c400 logic got a reset. > > > Finn Thain (1): > g_NCR5380: Cleanup comments and whitespace > > Ondrej Zary (4): > g_NCR5380: Fix PDMA transfer size > g_NCR5380: End PDMA transfer correctly on target

Re: [PATCH v5 0/6] g_NCR5380: PDMA fixes and cleanup

2017-06-30 Thread Ondrej Zary
On Friday 30 June 2017 09:12:37 Finn Thain wrote: > On Thu, 29 Jun 2017, Ondrej Zary wrote: > > The write corruption is still there. I'm afraid it can't be fixed > > without rolling "start" back (or inceasing residual) if an error > > occured, something like t

Re: [PATCH v6 0/6] g_NCR5380: PDMA fixes and cleanup

2017-07-02 Thread Ondrej Zary
On Sunday 02 July 2017 05:11:27 Finn Thain wrote: > On Sat, 1 Jul 2017, Ondrej Zary wrote: > > The write corruption is still present - "start" must be rolled back in > > both IRQ and timeout cases. > > Your original algorithm aborts the transfer for a timeout. Sa

Re: [PATCH v7 0/6] g_NCR5380: PDMA fixes and cleanup

2017-07-04 Thread Ondrej Zary
CR5380: Cleanup comments and whitespace > g_NCR5380: Use unambiguous terminology for PDMA send and receive > > Ondrej Zary (4): > g_NCR5380: Fix PDMA transfer size > g_NCR5380: End PDMA transfer correctly on target disconnection > g_NCR5380: Re-work PDMA loops > g_NCR5380:

Re: [PATCH v6 0/6] g_NCR5380: PDMA fixes and cleanup

2017-07-01 Thread Ondrej Zary
workarounds to final patch. > > > Finn Thain (2): > g_NCR5380: Cleanup comments and whitespace > g_NCR5380: Use unambiguous terminology for PDMA send and receive > > Ondrej Zary (4): > g_NCR5380: Fix PDMA transfer size > g_NCR5380: End PDMA transfer correctly on t

Re: [PATCH v3 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-27 Thread Ondrej Zary
On Tuesday 27 June 2017 03:49:16 Finn Thain wrote: > On Mon, 26 Jun 2017, Ondrej Zary wrote: > > No apparent change in behavior, the first write test resulted in: > > [ 842.830802] sd 2:0:1:0: [sdb] tag#0 53c80 registers not accessible, > > device will be reset [ 842.830

Re: [PATCH 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-22 Thread Ondrej Zary
needs to be fixed. -- Ondrej Zary

Re: [PATCH 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-23 Thread Ondrej Zary
on DTC and non-DTC chips. I get many of these messages with CD-ROM: [ 912.397076] generic_NCR5380_pread: No end dma signal (4096/4096) [ 913.141225] generic_NCR5380_pread: No end dma signal (4096/4096) Maybe just remove this error message as in my original patch? -- Ondrej Zary

Re: [PATCH v3 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-26 Thread Ondrej Zary
t of transfer loops when Gated IRQ gets asserted. > - Make udelay conditional on board type. > - Drop sg_tablesize patch due to performance regression. > > > Finn Thain (1): > g_NCR5380: Cleanup comments and whitespace > > Ondrej Zary (3): > g_NCR5380: Fix PDMA trans

Re: [PATCH v2 0/5] g_NCR5380: PDMA fixes and cleanup

2017-06-25 Thread Ondrej Zary
NCR5380: Limit sg_tablesize to avoid PDMA read overruns on DTC436 > g_NCR5380: Cleanup comments and whitespace > > Ondrej Zary (3): > g_NCR5380: Fix PDMA transfer size > g_NCR5380: End PDMA transfer correctly on target disconnection > g_NCR5380: Re-work P

Re: [PATCH v2 0/5] g_NCR5380: PDMA fixes and cleanup

2017-06-26 Thread Ondrej Zary
On Monday 26 June 2017, Finn Thain wrote: > On Sun, 25 Jun 2017, Ondrej Zary wrote: > > It mostly works, but there are some problems: > > > > It's not reliable - we continue the data transfer after poll_politely2 > > returns zero but we don't know if it returned becau

Re: [PATCH v3 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-27 Thread Ondrej Zary
On Tuesday 27 June 2017 14:42:29 Finn Thain wrote: > On Tue, 27 Jun 2017, Ondrej Zary wrote: > > BTW. I've probably found the DTC write corruption. Added the following > > check (13 is host buffer index register) - > > That register is not mentioned in my 53c400

Re: [PATCH v3 0/4] g_NCR5380: PDMA fixes and cleanup

2017-06-27 Thread Ondrej Zary
On Monday 26 June 2017, Ondrej Zary wrote: > On Monday 26 June 2017 09:30:33 Finn Thain wrote: > > Ondrej, would you please test this new series? > > > > Changed since v1: > > - PDMA transfer residual is calculated earlier. > > - End of DMA flag check is now

Re: [PATCH] aha1542: convert to DMA mapping API

2018-08-09 Thread Ondrej Zary
On Thursday 09 August 2018 07:35:33 Christoph Hellwig wrote: > On Wed, Aug 08, 2018 at 10:30:19PM +0200, Ondrej Zary wrote: > > Then it crashes with null-pointer dereference in aha1542_reset. > > Must be the dma_unmap. Updated patch below: No change in behavior, unfortuna

Re: [PATCH] aha1542: convert to DMA mapping API

2018-08-06 Thread Ondrej Zary
1542_init+0x33/0x1000 [aha1542] [ 159.264103] do_one_initcall+0x60/0x11f [ 159.264103] ? _cond_resched+0x1e/0x22 [ 159.264103] ? slab_pre_alloc_hook+0x25/0x35 [ 159.264103] ? do_init_module+0x17/0x1ad [ 159.264103] ? kmem_cache_alloc+0x79/0x9c [ 159.264103] ? do_init_module+0x17/0x1ad [ 159.264103] do_init_module+0x46/0x1ad [ 159.264103] load_module+0x1708/0x1b23 [ 159.264103] ? kernel_read_file+0x116/0x143 [ 159.264103] sys_finit_module+0x62/0x67 [ 159.264103] do_int80_syscall_32+0x50/0x62 [ 159.264103] entry_INT80_32+0x2a/0x2a [ 159.264103] EIP: 0xb7f66a02 [ 159.264103] EFLAGS: 0292 CPU: 0 [ 159.264103] EAX: ffda EBX: 0003 ECX: 004fa970 EDX: [ 159.264103] ESI: 00563e30 EDI: 00563ef8 EBP: ESP: bf9100d8 [ 159.264103] DS: 007b ES: 007b FS: GS: 0033 SS: 007b [ 159.264103] Code: 40 54 e8 44 ff ff ff c7 43 54 00 00 00 00 5b 5d c3 55 89 e5 56 53 89 c3 83 ec 08 31 c0 c6 45 f3 01 c6 45 f4 08 8b 93 7c 04 00 00 04 02 00 6b d0 0b 8b b3 7c 04 00 00 03 93 88 04 00 00 01 c6 [ 159.264103] EIP: setup_mailboxes+0x1a/0xb5 [aha1542] SS:ESP: 0068:cbf07cf8 [ 159.264103] CR2: [ 159.479491] ---[ end trace 139123655cd08eca ]--- -- Ondrej Zary

Re: [PATCH] aha1542: convert to DMA mapping API

2018-08-07 Thread Ondrej Zary
ery [ 132.830010] scsi host2: Unexpected interrupt [ 132.833680] scsi host2: tarstat=0, hastat=0 idlun=20 ccb#=0 [ 133.083186] scsi host2: Unexpected interrupt [ 133.087100] scsi host2: tarstat=0, hastat=0 idlun=20 ccb#=0 -- Ondrej Zary

Re: [PATCH] aha1542: convert to DMA mapping API

2018-08-08 Thread Ondrej Zary
On Wednesday 08 August 2018 11:14:33 Christoph Hellwig wrote: > On Tue, Aug 07, 2018 at 07:30:17PM +0200, Ondrej Zary wrote: > > On Tuesday 07 August 2018 09:29:59 Christoph Hellwig wrote: > > > Looks like the dma allocation is too late. Updated version below: > > >

<    1   2   3   4   >