From: Jiri Slaby <jirislaby@kernel.org>
To: Christoph Hellwig <hch@lst.de>, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tty/synclink: remove leftover bits of non-PCI card support
Date: Tue, 28 Jul 2020 08:05:36 +0200 [thread overview]
Message-ID: <8a015ca4-e837-8fa5-684c-46fca8104ea5@kernel.org> (raw)
In-Reply-To: <20200727130501.31005-1-hch@lst.de>
On 27. 07. 20, 15:05, Christoph Hellwig wrote:
> Since commit 1355cba9c3ba ("tty/synclink: remove ISA support"), the
> synlink driver only supports PCI card. Remove any leftover dead code
> to support other cards.
So now you can remove also the defines and bus_type completely:
$ git grep -E 'MGSL_BUS_TYPE_(E?ISA|PCI)'
drivers/tty/synclink_gt.c: info->bus_type = MGSL_BUS_TYPE_PCI;
drivers/tty/synclinkmp.c: info->bus_type = MGSL_BUS_TYPE_PCI;
include/uapi/linux/synclink.h:#define MGSL_BUS_TYPE_ISA 1
include/uapi/linux/synclink.h:#define MGSL_BUS_TYPE_EISA 2
include/uapi/linux/synclink.h:#define MGSL_BUS_TYPE_PCI 5
$ git grep -w bus_type drivers/tty/synclink*
drivers/tty/synclink_gt.c: unsigned int bus_type;
drivers/tty/synclink_gt.c: info->bus_type = MGSL_BUS_TYPE_PCI;
drivers/tty/synclinkmp.c: unsigned int bus_type;
/* expansion bus type (ISA,EISA,PCI) */
drivers/tty/synclinkmp.c: info->bus_type = MGSL_BUS_TYPE_PCI;
> --- a/drivers/tty/synclink.c
> +++ b/drivers/tty/synclink.c
...
> @@ -4040,58 +3977,40 @@ static int mgsl_claim_resources(struct mgsl_struct *info)
...
> - } else {
> - /* claim DMA channel */
> + if ( !mgsl_memory_test(info) ) {
> + printk( "%s(%d):Failed shared memory test %s MemAddr=%08X\n",
> + __FILE__,__LINE__,info->device_name, info->phys_memory_base );
> + goto errout;
> + }
>
> - if (request_dma(info->dma_level,info->device_name) < 0){
> - printk( "%s(%d):Can't request DMA channel on device %s DMA=%d\n",
> - __FILE__,__LINE__,info->device_name, info->dma_level );
> - goto errout;
> - }
> - info->dma_requested = true;
> -
> - /* ISA adapter uses bus master DMA */
> - set_dma_mode(info->dma_level,DMA_MODE_CASCADE);
> - enable_dma(info->dma_level);
> + info->lcr_base = ioremap(info->phys_lcr_base, PAGE_SIZE);
> + if (!info->lcr_base) {
> + printk( "%s(%d):Can't map LCR memory on device %s MemAddr=%08X\n",
> + __FILE__,__LINE__,info->device_name, info->phys_lcr_base );
> + goto errout;
> }
> -
> + info->lcr_base += info->lcr_offset;
> +
Could you fix up the whitespace git show warns about (git show outputs
red background, if you use colors). Like this one? It looks like you
added one more \t on an empty line here.
> if ( mgsl_allocate_dma_buffers(info) < 0 ) {
> printk( "%s(%d):Can't allocate DMA buffers on device %s DMA=%d\n",
> __FILE__,__LINE__,info->device_name, info->dma_level );
> @@ -4200,16 +4119,10 @@ static void mgsl_add_device( struct mgsl_struct *info )
> else if ( info->max_frame_size > 65535 )
> info->max_frame_size = 65535;
>
> - if ( info->bus_type == MGSL_BUS_TYPE_PCI ) {
> - printk( "SyncLink PCI v%d %s: IO=%04X IRQ=%d Mem=%08X,%08X MaxFrameSize=%u\n",
> - info->hw_version + 1, info->device_name, info->io_base, info->irq_level,
> - info->phys_memory_base, info->phys_lcr_base,
> - info->max_frame_size );
> - } else {
> - printk( "SyncLink ISA %s: IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n",
> - info->device_name, info->io_base, info->irq_level, info->dma_level,
> - info->max_frame_size );
> - }
> + printk( "SyncLink PCI v%d %s: IO=%04X IRQ=%d Mem=%08X,%08X MaxFrameSize=%u\n",
> + info->hw_version + 1, info->device_name, info->io_base, info->irq_level,
> + info->phys_memory_base, info->phys_lcr_base,
> + info->max_frame_size );
Or here, there is \t, 4 spaces and \t again.
thanks,
--
js
next prev parent reply other threads:[~2020-07-28 6:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 13:05 [PATCH] tty/synclink: remove leftover bits of non-PCI card support Christoph Hellwig
2020-07-28 6:05 ` Jiri Slaby [this message]
2020-07-28 6:09 ` Jiri Slaby
2020-07-28 6:20 ` Christoph Hellwig
2020-07-28 6:40 ` Jiri Slaby
2020-07-28 7:12 ` Greg KH
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=8a015ca4-e837-8fa5-684c-46fca8104ea5@kernel.org \
--to=jirislaby@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
/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