public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai
@ 2009-12-12 13:52 Anatolij Gustschin
  2010-01-13 10:13 ` Anatolij Gustschin
  0 siblings, 1 reply; 4+ messages in thread
From: Anatolij Gustschin @ 2009-12-12 13:52 UTC (permalink / raw)
  To: linux-scsi; +Cc: Anatolij Gustschin, Kashyap Desai, Eric Moore, James Bottomley

Since commit 9d2e9d66a3f032667934144cd61c396ba49f090d
mptsas driver fails to allocate memory for the MPT chain buffers
for second LSI adapter on PPC440SPe Katmai platform:
...
ioc1: LSISAS1068E B3: Capabilities={Initiator}
mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
mptbase: ioc1: ERROR - didn't initialize properly! (-3)
mptsas: probe of 0002:31:00.0 failed with error -3

This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
doesn't differentiate between SAS and FC causing increased allocation
for SAS case, too. Later pci_alloc_consistent() fails to allocate
increased chain buffer pool size for SAS case.

Provide a fix by looking at the bus type and using appropriate
MPT_SAS_CAN_QUEUE value while calculation of the number of chain
buffers.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Kashyap Desai <kashyap.desai@lsi.com>
Cc: Eric Moore <Eric.Moore@lsi.com>
Cc: James Bottomley <James.Bottomley@suse.de>
---
 drivers/message/fusion/mptbase.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 610e914..b6992b7 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -4330,6 +4330,8 @@ initChainBuffers(MPT_ADAPTER *ioc)
 
 	if (ioc->bus_type == SPI)
 		num_chain *= MPT_SCSI_CAN_QUEUE;
+	else if (ioc->bus_type == SAS)
+		num_chain *= MPT_SAS_CAN_QUEUE;
 	else
 		num_chain *= MPT_FC_CAN_QUEUE;
 
-- 
1.6.2.5


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai
  2009-12-12 13:52 [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai Anatolij Gustschin
@ 2010-01-13 10:13 ` Anatolij Gustschin
  2010-01-13 10:26   ` Desai, Kashyap
  0 siblings, 1 reply; 4+ messages in thread
From: Anatolij Gustschin @ 2010-01-13 10:13 UTC (permalink / raw)
  To: linux-scsi; +Cc: Kashyap Desai, Eric Moore, James Bottomley

On Sat, 12 Dec 2009 14:52:21 +0100
Anatolij Gustschin <agust@denx.de> wrote:

> Since commit 9d2e9d66a3f032667934144cd61c396ba49f090d
> mptsas driver fails to allocate memory for the MPT chain buffers
> for second LSI adapter on PPC440SPe Katmai platform:
> ...
> ioc1: LSISAS1068E B3: Capabilities={Initiator}
> mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
> mptbase: ioc1: ERROR - didn't initialize properly! (-3)
> mptsas: probe of 0002:31:00.0 failed with error -3
> 
> This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
> doesn't differentiate between SAS and FC causing increased allocation
> for SAS case, too. Later pci_alloc_consistent() fails to allocate
> increased chain buffer pool size for SAS case.
> 
> Provide a fix by looking at the bus type and using appropriate
> MPT_SAS_CAN_QUEUE value while calculation of the number of chain
> buffers.

Could someone please comment on this patch? Thanks!

Anatolij


^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai
  2010-01-13 10:13 ` Anatolij Gustschin
@ 2010-01-13 10:26   ` Desai, Kashyap
  2010-01-15 13:12     ` Anatolij Gustschin
  0 siblings, 1 reply; 4+ messages in thread
From: Desai, Kashyap @ 2010-01-13 10:26 UTC (permalink / raw)
  To: Anatolij Gustschin, linux-scsi@vger.kernel.org
  Cc: Moore, Eric, James Bottomley

Anatolij,

Patch provided by you is OK to me.
Please consider it as ACKED.

- Kashyap

> -----Original Message-----
> From: Anatolij Gustschin [mailto:agust@denx.de]
> Sent: Wednesday, January 13, 2010 3:43 PM
> To: linux-scsi@vger.kernel.org
> Cc: Desai, Kashyap; Moore, Eric; James Bottomley
> Subject: Re: [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation
> on katmai
> 
> On Sat, 12 Dec 2009 14:52:21 +0100
> Anatolij Gustschin <agust@denx.de> wrote:
> 
> > Since commit 9d2e9d66a3f032667934144cd61c396ba49f090d
> > mptsas driver fails to allocate memory for the MPT chain buffers
> > for second LSI adapter on PPC440SPe Katmai platform:
> > ...
> > ioc1: LSISAS1068E B3: Capabilities={Initiator}
> > mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
> > mptbase: ioc1: ERROR - didn't initialize properly! (-3)
> > mptsas: probe of 0002:31:00.0 failed with error -3
> >
> > This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
> > doesn't differentiate between SAS and FC causing increased allocation
> > for SAS case, too. Later pci_alloc_consistent() fails to allocate
> > increased chain buffer pool size for SAS case.
> >
> > Provide a fix by looking at the bus type and using appropriate
> > MPT_SAS_CAN_QUEUE value while calculation of the number of chain
> > buffers.
> 
> Could someone please comment on this patch? Thanks!
> 
> Anatolij


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai
  2010-01-13 10:26   ` Desai, Kashyap
@ 2010-01-15 13:12     ` Anatolij Gustschin
  0 siblings, 0 replies; 4+ messages in thread
From: Anatolij Gustschin @ 2010-01-15 13:12 UTC (permalink / raw)
  To: Desai, Kashyap, James Bottomley; +Cc: linux-scsi@vger.kernel.org, Moore, Eric

On Wed, 13 Jan 2010 15:56:17 +0530
"Desai, Kashyap" <Kashyap.Desai@lsi.com> wrote:

> Anatolij,
> 
> Patch provided by you is OK to me.
> Please consider it as ACKED.

OK, thanks. James, could you apply this patch then?

Anatolij
 
> > -----Original Message-----
> > From: Anatolij Gustschin [mailto:agust@denx.de]
> > Sent: Wednesday, January 13, 2010 3:43 PM
> > To: linux-scsi@vger.kernel.org
> > Cc: Desai, Kashyap; Moore, Eric; James Bottomley
> > Subject: Re: [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation
> > on katmai
> > 
> > On Sat, 12 Dec 2009 14:52:21 +0100
> > Anatolij Gustschin <agust@denx.de> wrote:
> > 
> > > Since commit 9d2e9d66a3f032667934144cd61c396ba49f090d
> > > mptsas driver fails to allocate memory for the MPT chain buffers
> > > for second LSI adapter on PPC440SPe Katmai platform:
> > > ...
> > > ioc1: LSISAS1068E B3: Capabilities={Initiator}
> > > mptbase: ioc1: ERROR - Unable to allocate Reply, Request, Chain Buffers!
> > > mptbase: ioc1: ERROR - didn't initialize properly! (-3)
> > > mptsas: probe of 0002:31:00.0 failed with error -3
> > >
> > > This commit increased MPT_FC_CAN_QUEUE value but initChainBuffers()
> > > doesn't differentiate between SAS and FC causing increased allocation
> > > for SAS case, too. Later pci_alloc_consistent() fails to allocate
> > > increased chain buffer pool size for SAS case.
> > >
> > > Provide a fix by looking at the bus type and using appropriate
> > > MPT_SAS_CAN_QUEUE value while calculation of the number of chain
> > > buffers.
> > 
> > Could someone please comment on this patch? Thanks!
> > 
> > Anatolij


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-01-15 13:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-12 13:52 [PATCH] [SCSI] mptsas: Fix issue with chain pools allocation on katmai Anatolij Gustschin
2010-01-13 10:13 ` Anatolij Gustschin
2010-01-13 10:26   ` Desai, Kashyap
2010-01-15 13:12     ` Anatolij Gustschin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox