mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@mail.ru>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Andrew Morton <akpm@osdl.org>, Linus Torvalds <torvalds@osdl.org>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mark Lord <mlord@pobox.com>
Subject: Re: [BK PATCHES] 2.6.x libata fixes (mostly)
Date: Wed, 23 Feb 2005 23:45:23 +0200	[thread overview]
Message-ID: <200502232345.23666.adobriyan@mail.ru> (raw)
In-Reply-To: <421CE018.5030007@pobox.com>

On Wednesday 23 February 2005 21:57, Jeff Garzik wrote:

> This BK push includes additional hardware support, but that's only 
> because it's (a) obviously low impact and (b) it was in the queue.

> --- a/drivers/scsi/ahci.c
> +++ b/drivers/scsi/ahci.c

> +static u8 ahci_check_err(struct ata_port *ap)
> +{
> +	void *mmio = (void *) ap->ioaddr.cmd_addr;

void __iomem *

> +	return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF;

> --- a/drivers/scsi/libata-core.c
> +++ b/drivers/scsi/libata-core.c

> + *	ata_qc_free - free unused ata_queued_cmd
> + *	@qc: Command to complete

"Command to free"?

--- /dev/null
+++ b/drivers/scsi/sata_qstor.c

> +	u8 *prd = pp->pkt + QS_CPB_BYTES;

> +	for (nelem = 0; nelem < qc->n_elem; nelem++,sg++) {
> +		u64 addr;
> +		u32 len;

> +		addr = sg_dma_address(sg);
> +		*(u64 *)prd = cpu_to_le64(addr);

*(__le64 *) prd

> +		prd += sizeof(u64);

> +		len = sg_dma_len(sg);
> +		*(u32 *)prd = cpu_to_le32(len);

*(__le32 *) prd

> +		prd += sizeof(u64);

Should this be "prd += sizeof(u32)"? Looks suspicious.

> +static void qs_qc_prep(struct ata_queued_cmd *qc)
> +{

> +	*(u32 *)(&buf[ 4]) = cpu_to_le32(qc->nsect * ATA_SECT_SIZE);
> +	*(u32 *)(&buf[ 8]) = cpu_to_le32(qc->n_elem);

> +	*(u64 *)(&buf[16]) = cpu_to_le64(addr);

__le* again...

> +static void qs_ata_setup_port(struct ata_ioports *port, unsigned long base)
> +{
> +	port->cmd_addr		=

> +	port->error_addr	=

> +	port->status_addr	=

> +	port->altstatus_addr	=

Oo-oops...

> +static int qs_set_dma_masks(struct pci_dev *pdev, void __iomem *mmio_base)
> +{

> +	if (have_64bit_bus &&
> +	    !pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
> +		rc = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
> +		if (rc) {
> +			rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);

We already have DMA_{32,64}BIT_MASK.

> +	} else {
> +		rc = pci_set_dma_mask(pdev, 0xffffffffULL);

> +		rc = pci_set_consistent_dma_mask(pdev, 0xffffffffULL);

	Alexey

  reply	other threads:[~2005-02-23 20:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-23 19:57 Jeff Garzik
2005-02-23 21:45 ` Alexey Dobriyan [this message]
2005-02-23 21:24   ` Jeff Garzik
2005-02-23 21:28   ` Prakash Punnoor
2005-02-23 22:01     ` Roland Dreier
2005-02-23 22:07       ` Prakash Punnoor
2005-02-23 21:57   ` Alexey Dobriyan
2005-02-23 23:26   ` [PATCH 2.6.11+ sata_qstor] libata: sata_qstor cosmetic fixes Mark Lord
2005-02-23 23:39     ` Jeff Garzik
2005-02-24  5:21     ` Jeff Garzik
2005-02-24 15:15       ` Mark Lord
2005-02-25  5:48         ` Jeff Garzik
2005-02-28 16:22     ` [PATCH 2.6.11-rc5+ sata_qstor] sata_qstor: eh_timeout fix Mark Lord

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=200502232345.23666.adobriyan@mail.ru \
    --to=adobriyan@mail.ru \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlord@pobox.com \
    --cc=torvalds@osdl.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

Powered by JetHome