Linux-Block Archive on lore.kernel.org
 help / color / Atom feed
From: Khalid Aziz <khalid@gonehiking.org>
To: Christoph Hellwig <hch@lst.de>, Jens Axboe <axboe@kernel.dk>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Matthew Wilcox <willy@infradead.org>,
	Hannes Reinecke <hare@suse.com>,
	Ondrej Zary <linux@rainbow-software.org>
Cc: linux-block@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 3/8] BusLogic: reject broken old firmware that requires ISA-style bounce buffering
Date: Mon, 29 Mar 2021 14:33:52 -0600
Message-ID: <07b066db-a92f-daf4-a49e-07deac495b65@gonehiking.org> (raw)
In-Reply-To: <20210326055822.1437471-4-hch@lst.de>

On 3/25/21 11:58 PM, Christoph Hellwig wrote:
> Warn on and don't support adapters that have a DMA bug that forces ISA-style
> bounce buffering.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/scsi/BusLogic.c | 21 ++++++---------------
>  drivers/scsi/BusLogic.h |  1 -
>  2 files changed, 6 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c
> index c3ed03c4b3f5cb..c8977e4bdba8c2 100644
> --- a/drivers/scsi/BusLogic.c
> +++ b/drivers/scsi/BusLogic.c
> @@ -1616,14 +1616,12 @@ static bool __init blogic_rdconfig(struct blogic_adapter *adapter)
>  	   hardware bug whereby when the BIOS is enabled, transfers to/from
>  	   the same address range the BIOS occupies modulo 16MB are handled
>  	   incorrectly.  Only properly functioning BT-445S Host Adapters
> -	   have firmware version 3.37, so require that ISA Bounce Buffers
> -	   be used for the buggy BT-445S models if there is more than 16MB
> -	   memory.
> +	   have firmware version 3.37.
>  	 */
> -	if (adapter->bios_addr > 0 && strcmp(adapter->model, "BT-445S") == 0 &&
> -			strcmp(adapter->fw_ver, "3.37") < 0 &&
> -			(void *) high_memory > (void *) MAX_DMA_ADDRESS)
> -		adapter->need_bouncebuf = true;
> +	if (adapter->bios_addr > 0 &&
> +	    strcmp(adapter->model, "BT-445S") == 0 &&
> +	    strcmp(adapter->fw_ver, "3.37") < 0)
> +		return blogic_failure(adapter, "Too old firmware");
>  	/*
>  	   Initialize parameters common to MultiMaster and FlashPoint
>  	   Host Adapters.
> @@ -1646,14 +1644,9 @@ static bool __init blogic_rdconfig(struct blogic_adapter *adapter)
>  		if (adapter->drvr_opts != NULL &&
>  				adapter->drvr_opts->qdepth[tgt_id] > 0)
>  			qdepth = adapter->drvr_opts->qdepth[tgt_id];
> -		else if (adapter->need_bouncebuf)
> -			qdepth = BLOGIC_TAG_DEPTH_BB;
>  		adapter->qdepth[tgt_id] = qdepth;
>  	}
> -	if (adapter->need_bouncebuf)
> -		adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH_BB;
> -	else
> -		adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH;
> +	adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH;
>  	if (adapter->drvr_opts != NULL)
>  		adapter->common_qdepth = adapter->drvr_opts->common_qdepth;
>  	if (adapter->common_qdepth > 0 &&
> @@ -2155,7 +2148,6 @@ static void __init blogic_inithoststruct(struct blogic_adapter *adapter,
>  	host->this_id = adapter->scsi_id;
>  	host->can_queue = adapter->drvr_qdepth;
>  	host->sg_tablesize = adapter->drvr_sglimit;
> -	host->unchecked_isa_dma = adapter->need_bouncebuf;
>  	host->cmd_per_lun = adapter->untag_qdepth;
>  }
>  
> @@ -3705,7 +3697,6 @@ static struct scsi_host_template blogic_template = {
>  #if 0
>  	.eh_abort_handler = blogic_abort,
>  #endif
> -	.unchecked_isa_dma = 1,
>  	.max_sectors = 128,
>  };
>  
> diff --git a/drivers/scsi/BusLogic.h b/drivers/scsi/BusLogic.h
> index 6eaddc009b5c55..858187af8fd1e8 100644
> --- a/drivers/scsi/BusLogic.h
> +++ b/drivers/scsi/BusLogic.h
> @@ -1010,7 +1010,6 @@ struct blogic_adapter {
>  	bool terminfo_valid:1;
>  	bool low_term:1;
>  	bool high_term:1;
> -	bool need_bouncebuf:1;
>  	bool strict_rr:1;
>  	bool scam_enabled:1;
>  	bool scam_lev2:1;
> 
Acked-by: Khalid Aziz <khalid@gonehiking.org>

  parent reply index

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-26  5:58 start removing block bounce buffering support v2 Christoph Hellwig
2021-03-26  5:58 ` [PATCH 1/8] aha1542: use a local bounce buffer Christoph Hellwig
2021-03-29  6:22   ` Hannes Reinecke
2021-03-26  5:58 ` [PATCH 2/8] Buslogic: remove ISA support Christoph Hellwig
2021-03-29  6:22   ` Hannes Reinecke
2021-03-29 20:29   ` Khalid Aziz
2021-03-30 17:03     ` Christoph Hellwig
2021-03-30 17:15       ` Khalid Aziz
2021-03-30 17:31         ` Christoph Hellwig
2021-03-26  5:58 ` [PATCH 3/8] BusLogic: reject broken old firmware that requires ISA-style bounce buffering Christoph Hellwig
2021-03-29  6:23   ` Hannes Reinecke
2021-03-29 20:33   ` Khalid Aziz [this message]
2021-03-26  5:58 ` [PATCH 4/8] advansys: remove ISA support Christoph Hellwig
2021-03-29  6:31   ` Hannes Reinecke
2021-03-30 17:26     ` Christoph Hellwig
2021-03-26  5:58 ` [PATCH 5/8] scsi: remove the unchecked_isa_dma flag Christoph Hellwig
2021-03-29  6:31   ` Hannes Reinecke
2021-03-26  5:58 ` [PATCH 6/8] block: remove BLK_BOUNCE_ISA support Christoph Hellwig
2021-03-29  6:32   ` Hannes Reinecke
2021-03-26  5:58 ` [PATCH 7/8] block: refactor the bounce buffering code Christoph Hellwig
2021-03-29  6:34   ` Hannes Reinecke
2021-03-26  5:58 ` [PATCH 8/8] block: stop calling blk_queue_bounce for passthrough requests Christoph Hellwig
2021-03-29  6:37   ` Hannes Reinecke
2021-03-26 23:15 ` start removing block bounce buffering support v2 Jens Axboe
2021-03-30  3:08   ` Martin K. Petersen
  -- strict thread matches above, loose matches on Subject: below --
2021-03-31  7:29 start removing block bounce buffering support v3 Christoph Hellwig
2021-03-31  7:29 ` [PATCH 3/8] BusLogic: reject broken old firmware that requires ISA-style bounce buffering Christoph Hellwig
2021-03-18  6:39 start removing block bounce buffering support Christoph Hellwig
2021-03-18  6:39 ` [PATCH 3/8] BusLogic: reject broken old firmware that requires ISA-style bounce buffering Christoph Hellwig

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=07b066db-a92f-daf4-a49e-07deac495b65@gonehiking.org \
    --to=khalid@gonehiking.org \
    --cc=axboe@kernel.dk \
    --cc=hare@suse.com \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linux@rainbow-software.org \
    --cc=martin.petersen@oracle.com \
    --cc=willy@infradead.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

Linux-Block Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \
		linux-block@vger.kernel.org
	public-inbox-index linux-block

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git