From: "Yaniv Gardi" <ygardi@codeaurora.org>
To: 'Subhash Jadavani' <subhashj@codeaurora.org>,
'Seungwon Jeon' <tgih.jun@samsung.com>
Cc: linux-scsi@vger.kernel.org,
'Vinayak Holikatti' <vinholikatti@gmail.com>,
'Santosh Y' <santoshsy@gmail.com>,
"'James E.J. Bottomley'" <James.Bottomley@HansenPartnership.com>
Subject: RE: [PATCH v3 2/6] scsi: ufs: fix the setting interrupt aggregation counter
Date: Wed, 28 Aug 2013 15:43:44 +0300 [thread overview]
Message-ID: <009901cea3ec$3dc3bb10$b94b3130$@codeaurora.org> (raw)
In-Reply-To: <521C6AEB.3040700@codeaurora.org>
Tested-by: Yaniv Gardi <ygardi@codeaurora.org>
QUALCOMM ISRAEL, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
= > -----Original Message-----
= > From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
= > owner@vger.kernel.org] On Behalf Of Subhash Jadavani
= > Sent: Tuesday, August 27, 2013 12:02 PM
= > To: Seungwon Jeon
= > Cc: linux-scsi@vger.kernel.org; 'Vinayak Holikatti'; 'Santosh Y'; 'James E.J.
= > Bottomley'
= > Subject: Re: [PATCH v3 2/6] scsi: ufs: fix the setting interrupt aggregation
= > counter
= >
= >
= > Looks good to me.
= > Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
= >
= > On 8/26/2013 8:10 PM, Seungwon Jeon wrote:
= > > IACTH(Interrupt aggregation counter threshold) value is allowed up to
= > > 0x1F and current setting value is the maximum.
= > > This value is related with NUTRS(max:0x20) of HCI's capability.
= > > Considering HCI controller doesn't support the maximum, IACTH setting
= > > should be adjusted with possible value.
= > > For that, existing 'ufshcd_config_int_aggr' is split into two part
= > > [reset, configure].
= > >
= > > Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
= > > Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
= > > ---
= > > drivers/scsi/ufs/ufshcd.c | 53 +++++++++++++++++++++------------------
= > -----
= > > drivers/scsi/ufs/ufshci.h | 4 +-
= > > 2 files changed, 27 insertions(+), 30 deletions(-)
= > >
= > > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
= > > index 6ff16c9..c90b88a 100644
= > > --- a/drivers/scsi/ufs/ufshcd.c
= > > +++ b/drivers/scsi/ufs/ufshcd.c
= > > @@ -59,6 +59,9 @@
= > > /* Expose the flag value from utp_upiu_query.value */
= > > #define MASK_QUERY_UPIU_FLAG_LOC 0xFF
= > >
= > > +/* Interrupt aggregation default timeout, unit: 40us */
= > > +#define INT_AGGR_DEF_TO 0x02
= > > +
= > > enum {
= > > UFSHCD_MAX_CHANNEL = 0,
= > > UFSHCD_MAX_ID = 1,
= > > @@ -94,12 +97,6 @@ enum {
= > > UFSHCD_INT_CLEAR,
= > > };
= > >
= > > -/* Interrupt aggregation options */
= > > -enum {
= > > - INT_AGGR_RESET,
= > > - INT_AGGR_CONFIG,
= > > -};
= > > -
= > > #define ufshcd_set_eh_in_progress(h) \
= > > (h->eh_flags |= UFSHCD_EH_IN_PROGRESS)
= > > #define ufshcd_eh_in_progress(h) \
= > > @@ -340,30 +337,30 @@ static inline bool
= > ufshcd_is_exception_event(struct utp_upiu_rsp *ucd_rsp_ptr)
= > > }
= > >
= > > /**
= > > - * ufshcd_config_int_aggr - Configure interrupt aggregation values.
= > > - * Currently there is no use case where we want to configure
= > > - * interrupt aggregation dynamically. So to configure interrupt
= > > - * aggregation, #define
= > INT_AGGR_COUNTER_THRESHOLD_VALUE and
= > > - * INT_AGGR_TIMEOUT_VALUE are used.
= > > + * ufshcd_reset_intr_aggr - Reset interrupt aggregation values.
= > > * @hba: per adapter instance
= > > - * @option: Interrupt aggregation option
= > > */
= > > static inline void
= > > -ufshcd_config_int_aggr(struct ufs_hba *hba, int option)
= > > +ufshcd_reset_intr_aggr(struct ufs_hba *hba)
= > > {
= > > - switch (option) {
= > > - case INT_AGGR_RESET:
= > > - ufshcd_writel(hba, INT_AGGR_ENABLE |
= > > - INT_AGGR_COUNTER_AND_TIMER_RESET,
= > > -
= > REG_UTP_TRANSFER_REQ_INT_AGG_CONTROL);
= > > - break;
= > > - case INT_AGGR_CONFIG:
= > > - ufshcd_writel(hba, INT_AGGR_ENABLE |
= > INT_AGGR_PARAM_WRITE |
= > > - INT_AGGR_COUNTER_THRESHOLD_VALUE |
= > > - INT_AGGR_TIMEOUT_VALUE,
= > > -
= > REG_UTP_TRANSFER_REQ_INT_AGG_CONTROL);
= > > - break;
= > > - }
= > > + ufshcd_writel(hba, INT_AGGR_ENABLE |
= > > + INT_AGGR_COUNTER_AND_TIMER_RESET,
= > > + REG_UTP_TRANSFER_REQ_INT_AGG_CONTROL);
= > > +}
= > > +
= > > +/**
= > > + * ufshcd_config_intr_aggr - Configure interrupt aggregation values.
= > > + * @hba: per adapter instance
= > > + * @cnt: Interrupt aggregation counter threshold
= > > + * @tmout: Interrupt aggregation timeout value */ static inline void
= > > +ufshcd_config_intr_aggr(struct ufs_hba *hba, u8 cnt, u8 tmout) {
= > > + ufshcd_writel(hba, INT_AGGR_ENABLE |
= > INT_AGGR_PARAM_WRITE |
= > > + INT_AGGR_COUNTER_THLD_VAL(cnt) |
= > > + INT_AGGR_TIMEOUT_VAL(tmout),
= > > + REG_UTP_TRANSFER_REQ_INT_AGG_CONTROL);
= > > }
= > >
= > > /**
= > > @@ -1523,7 +1520,7 @@ static int ufshcd_make_hba_operational(struct
= > ufs_hba *hba)
= > > ufshcd_enable_intr(hba, UFSHCD_ENABLE_INTRS);
= > >
= > > /* Configure interrupt aggregation */
= > > - ufshcd_config_int_aggr(hba, INT_AGGR_CONFIG);
= > > + ufshcd_config_intr_aggr(hba, hba->nutrs - 1, INT_AGGR_DEF_TO);
= > >
= > > /* Configure UTRL and UTMRL base address registers */
= > > ufshcd_writel(hba, lower_32_bits(hba->utrdl_dma_addr),
= > > @@ -1971,7 +1968,7 @@ static void ufshcd_transfer_req_compl(struct
= > > ufs_hba *hba)
= > >
= > > /* Reset interrupt aggregation counters */
= > > if (int_aggr_reset)
= > > - ufshcd_config_int_aggr(hba, INT_AGGR_RESET);
= > > + ufshcd_reset_intr_aggr(hba);
= > > }
= > >
= > > /**
= > > diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
= > > index f1e1b74..739ae3a 100644
= > > --- a/drivers/scsi/ufs/ufshci.h
= > > +++ b/drivers/scsi/ufs/ufshci.h
= > > @@ -226,8 +226,8 @@ enum {
= > >
= > > #define MASK_UIC_COMMAND_RESULT 0xFF
= > >
= > > -#define INT_AGGR_COUNTER_THRESHOLD_VALUE (0x1F << 8)
= > > -#define INT_AGGR_TIMEOUT_VALUE (0x02)
= > > +#define INT_AGGR_COUNTER_THLD_VAL(c) (((c) & 0x1F) << 8)
= > > +#define INT_AGGR_TIMEOUT_VAL(t) (((t) & 0xFF) << 0)
= > >
= > > /* Interrupt disable masks */
= > > enum {
= >
= > --
= > To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the
= > body of a message to majordomo@vger.kernel.org More majordomo info
= > at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2013-08-28 12:43 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-20 0:41 [PATCH v2 0/3] ufs: fix bugs in probing and removing driver paths Akinobu Mita
2013-07-20 0:41 ` [PATCH v2 1/3] ufshcd-pci: release ioremapped region during removing driver Akinobu Mita
2013-07-26 13:45 ` [PATCH 1/7] scsi: ufs: amend the ocs handling with fatal error Seungwon Jeon
2013-07-29 6:17 ` Subhash Jadavani
2013-07-29 10:05 ` Seungwon Jeon
2013-07-29 10:27 ` Subhash Jadavani
2013-07-29 10:51 ` Sujit Reddy Thumma
2013-07-30 13:02 ` Seungwon Jeon
2013-08-12 7:17 ` Subhash Jadavani
2013-08-13 11:50 ` Seungwon Jeon
2013-08-13 13:39 ` Subhash Jadavani
2013-07-29 18:03 ` Santosh Y
2013-07-20 0:41 ` [PATCH v2 2/3] ufs: don't disable_irq() if the IRQ can be shared among devices Akinobu Mita
2013-07-26 13:44 ` [PATCH 0/7] scsi: ufs: some fixes and updates Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 0/6] " Seungwon Jeon
2013-08-25 11:23 ` Dolev Raviv
2013-08-26 14:40 ` [PATCH v3 " Seungwon Jeon
2013-08-28 10:46 ` Subhash Jadavani
2013-07-20 0:41 ` [PATCH v2 3/3] ufs: don't stop controller before scsi_remove_host() Akinobu Mita
2013-07-26 13:46 ` [PATCH 2/7] scsi: ufs: find out sense data over scsi status values Seungwon Jeon
2013-07-29 6:35 ` Subhash Jadavani
2013-07-30 13:00 ` Seungwon Jeon
2013-07-29 10:51 ` Sujit Reddy Thumma
2013-07-30 13:03 ` Seungwon Jeon
2013-07-30 3:53 ` Santosh Y
2013-07-30 13:03 ` Seungwon Jeon
2013-07-31 0:15 ` Elliott, Robert (Server Storage)
2013-08-06 12:08 ` Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 1/6] " Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 2/6] scsi: ufs: fix the setting interrupt aggregation counter Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 3/6] scsi: ufs: add dme configuration primitives Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 4/6] scsi: ufs: add unipro attribute IDs Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 5/6] scsi: ufs: add operation for the uic power mode change Seungwon Jeon
2013-08-23 13:00 ` [PATCH v2 6/6] scsi: ufs: configure the attribute for power mode Seungwon Jeon
2013-08-26 14:40 ` [PATCH v3 1/6] scsi: ufs: find out sense data over scsi status values Seungwon Jeon
2013-08-27 8:53 ` Subhash Jadavani
2013-08-28 12:43 ` Yaniv Gardi
2013-08-26 14:40 ` [PATCH v3 2/6] scsi: ufs: fix the setting interrupt aggregation counter Seungwon Jeon
2013-08-27 9:01 ` Subhash Jadavani
2013-08-28 12:43 ` Yaniv Gardi [this message]
2013-08-26 14:40 ` [PATCH v3 3/6] scsi: ufs: add dme configuration primitives Seungwon Jeon
2013-08-27 9:15 ` Subhash Jadavani
2013-08-28 12:44 ` Yaniv Gardi
2013-08-26 14:40 ` [PATCH v3 4/6] scsi: ufs: add unipro attribute IDs Seungwon Jeon
2013-08-27 9:14 ` Subhash Jadavani
2013-08-28 12:46 ` Yaniv Gardi
2013-08-26 14:40 ` [PATCH v3 5/6] scsi: ufs: add operation for the uic power mode change Seungwon Jeon
2013-08-27 9:53 ` Subhash Jadavani
2013-08-27 11:28 ` Seungwon Jeon
2013-08-27 11:47 ` Subhash Jadavani
2013-08-27 11:58 ` Seungwon Jeon
2013-08-28 12:45 ` Yaniv Gardi
2013-08-26 14:41 ` [PATCH v3 6/6] scsi: ufs: configure the attribute for power mode Seungwon Jeon
2013-08-27 10:21 ` Subhash Jadavani
2013-08-27 10:27 ` Subhash Jadavani
2013-09-09 11:51 ` [PATCH] scsi: ufs: export the helper functions for vender probe/remove Seungwon Jeon
2013-07-26 13:46 ` [PATCH 3/7] scsi: ufs: fix the setting interrupt aggregation counter Seungwon Jeon
2013-07-29 7:03 ` Subhash Jadavani
2013-07-30 13:01 ` Seungwon Jeon
2013-07-26 13:47 ` [PATCH 4/7] scsi: ufs: add dme configuration primitives Seungwon Jeon
2013-07-29 9:24 ` Subhash Jadavani
2013-07-30 13:02 ` Seungwon Jeon
2013-08-13 6:56 ` Subhash Jadavani
2013-07-26 13:48 ` [PATCH 5/7] scsi: ufs: add unipro attribute IDs Seungwon Jeon
2013-07-29 9:26 ` Subhash Jadavani
2013-07-26 13:48 ` [PATCH 6/7] scsi: ufs: add operation for the uic power mode change Seungwon Jeon
2013-07-29 9:53 ` Subhash Jadavani
2013-07-30 13:02 ` Seungwon Jeon
2013-07-26 13:49 ` [PATCH 7/7] scsi: ufs: configure the attribute for power mode Seungwon Jeon
2013-07-31 13:28 ` Subhash Jadavani
2013-08-06 12:08 ` Seungwon Jeon
2013-08-13 7:00 ` Subhash Jadavani
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='009901cea3ec$3dc3bb10$b94b3130$@codeaurora.org' \
--to=ygardi@codeaurora.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=santoshsy@gmail.com \
--cc=subhashj@codeaurora.org \
--cc=tgih.jun@samsung.com \
--cc=vinholikatti@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).