public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Grant Grundler <grundler@google.com>
Cc: kewei@marvell.com, linux-scsi@vger.kernel.org, jeff@garzik.org
Subject: Re: [PATCH 7/9][RESEND] mvsas: get phy info.
Date: Thu, 27 Mar 2008 10:13:54 -0700	[thread overview]
Message-ID: <1206638034.3662.4.camel@localhost.localdomain> (raw)
In-Reply-To: <da824cf30803271004i64a785afn6c0030984dca96eb@mail.gmail.com>

On Thu, 2008-03-27 at 10:04 -0700, Grant Grundler wrote:
> On Wed, Mar 26, 2008 at 11:55 PM, Ke Wei <kewei@marvell.com> wrote:
> > removed unused code and attached SATA address makes use of port id.
> >  enable HBA interrupt after calling sas_register_ha();
> 
> just one small nit and one question.
> 
> ...
> >  @@ -2837,20 +2812,34 @@ static void mvs_update_phyinfo(struct mvs_info *mvi, int i,
> >                         } else {
> >                                 dev_printk(KERN_DEBUG, &pdev->dev,
> >                                         "No sig fis\n");
> >  +                               phy->phy_type &= ~(PORT_TYPE_SATA);
> 
> shouldn't need '()'s around the constant.
> 
> >  +                               goto out_done;
> >                         }
> >                 }
> >  +               tmp64 = cpu_to_be64(phy->att_dev_sas_addr);
> >  +               memcpy(sas_phy->attached_sas_addr, &tmp64, SAS_ADDR_SIZE);
> 
> Why does this need to be a memcpy and not just a simple store operation?
> Is it misaligned? (even if it is, the kernel will deal with it. It
> just won't be fast.)

Because if you look in include/scsi/libsas.h, you find the definition:

struct asd_sas_phy {
[...]
	u8   attached_sas_addr[SAS_ADDR_SIZE]; /* class:RO, driver: R/W */


We're annoyingly schizophrenic on this ... most of the time we have a
sas_addr defined as u64, but not in a lot of the libsas code.

James



      reply	other threads:[~2008-03-27 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27  6:55 [PATCH 7/9][RESEND] mvsas: get phy info Ke Wei
2008-03-27 17:04 ` Grant Grundler
2008-03-27 17:13   ` James Bottomley [this message]

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=1206638034.3662.4.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=grundler@google.com \
    --cc=jeff@garzik.org \
    --cc=kewei@marvell.com \
    --cc=linux-scsi@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