From: Sachin P. Sant <hidden> Date: 2009-02-06 16:59:15
2.6.29-rc3-git9 randconfig build fails with
CALL arch/powerpc/kernel/prom_init_check.sh
CC arch/powerpc/platforms/ps3/setup.o
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h: In function scsi_bidi_cmnd:
include/scsi/scsi_cmnd.h:184: error: implicit declaration of function blk_bidi_rq
include/scsi/scsi_cmnd.h:185: error: dereferencing pointer to incomplete type
include/scsi/scsi_cmnd.h: In function scsi_in:
include/scsi/scsi_cmnd.h:191: error: dereferencing pointer to incomplete type
include/scsi/scsi_cmnd.h: In function scsi_get_lba:
include/scsi/scsi_cmnd.h:273: error: dereferencing pointer to incomplete type
make[2]: *** [arch/powerpc/platforms/ps3/setup.o] Error 1
make[1]: *** [arch/powerpc/platforms/ps3] Error 2
make: *** [arch/powerpc/platforms] Error 2
.config attached here.
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
Change the PS3 platform code to use hard coded numbers for its
LV1 device types.
The PS3 platform code was incorrectly using some scsi block
constants for the device type returned from the LV1 hypervisor.
Fixes build errors like these when CONFIG_BLOCK=n:
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
Signed-off-by: Geoff Levand <redacted>
---
Ben,
Please send upstream for 2.6.29.
-Geoff
arch/powerpc/platforms/ps3/platform.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
From: Sachin P. Sant <hidden> Date: 2009-02-07 17:41:39
Geoff Levand wrote:
Change the PS3 platform code to use hard coded numbers for its
LV1 device types.
The PS3 platform code was incorrectly using some scsi block
constants for the device type returned from the LV1 hypervisor.
Fixes build errors like these when CONFIG_BLOCK=n:
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
Signed-off-by: Geoff Levand <redacted>
---
Thanks Geoff. This fixes the issue.
Tested-by : Sachin Sant [off-list ref]
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------
From: Michael Ellerman <hidden> Date: 2009-02-08 11:29:50
On Fri, 2009-02-06 at 18:42 -0800, Geoff Levand wrote:
quoted hunk
Change the PS3 platform code to use hard coded numbers for its
LV1 device types.
The PS3 platform code was incorrectly using some scsi block
constants for the device type returned from the LV1 hypervisor.
Fixes build errors like these when CONFIG_BLOCK=n:
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
Signed-off-by: Geoff Levand <redacted>
---
Ben,
Please send upstream for 2.6.29.
-Geoff
arch/powerpc/platforms/ps3/platform.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
This looks like you're just papering over the bug, by hardcoding the
same values that are in the scsi header. Or are they really independent,
in which case I'd say the comments are confusing.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
From: Benjamin Herrenschmidt <benh@kernel.crashing.org> Date: 2009-02-09 00:11:42
On Sun, 2009-02-08 at 22:29 +1100, Michael Ellerman wrote:
On Fri, 2009-02-06 at 18:42 -0800, Geoff Levand wrote:
quoted
Change the PS3 platform code to use hard coded numbers for its
LV1 device types.
The PS3 platform code was incorrectly using some scsi block
constants for the device type returned from the LV1 hypervisor.
Fixes build errors like these when CONFIG_BLOCK=n:
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
Adding Jens and James on CC since I think a proper fix lies in blkdev.h
or scsi*.h
So basically, the whole of blkdev.h is inside a big ifdef
CONFIG_BLOCK... which means that scsi_cmnd.h can't build which in turn
makes scsi.h fail.
The PS3 platform code wants to use some of the standard SCSI types from
there though, as they are part of the hypervisor ABI. (And in fact it
can be argued that non-block devices using SCSI do exist, such as
scanners, no ?)
Any reason other than pre-historical to have blkdev.h shielded like
that ?
Cheers,
Ben.
This looks like you're just papering over the bug, by hardcoding the
same values that are in the scsi header. Or are they really independent,
in which case I'd say the comments are confusing.
cheers
From: James Bottomley <James.Bottomley@HansenPartnership.com> Date: 2009-02-09 03:59:52
On Mon, 2009-02-09 at 11:11 +1100, Benjamin Herrenschmidt wrote:
On Sun, 2009-02-08 at 22:29 +1100, Michael Ellerman wrote:
quoted
On Fri, 2009-02-06 at 18:42 -0800, Geoff Levand wrote:
quoted
Change the PS3 platform code to use hard coded numbers for its
LV1 device types.
The PS3 platform code was incorrectly using some scsi block
constants for the device type returned from the LV1 hypervisor.
Fixes build errors like these when CONFIG_BLOCK=n:
In file included from include/scsi/scsi.h:12,
from arch/powerpc/platforms/ps3/platform.h:25,
from arch/powerpc/platforms/ps3/setup.c:36:
include/scsi/scsi_cmnd.h:27:25: warning: "BLK_MAX_CDB" is not defined
include/scsi/scsi_cmnd.h:28:3: error: #error MAX_COMMAND_SIZE can not be bigger than BLK_MAX_CDB
Adding Jens and James on CC since I think a proper fix lies in blkdev.h
or scsi*.h
And cc'd linux-scsi
So basically, the whole of blkdev.h is inside a big ifdef
CONFIG_BLOCK... which means that scsi_cmnd.h can't build which in turn
makes scsi.h fail.
Well, look at it from our point of view; it's impossible to build SCSI
without block, so a little interdependence is easy to get.
The PS3 platform code wants to use some of the standard SCSI types from
there though, as they are part of the hypervisor ABI. (And in fact it
can be argued that non-block devices using SCSI do exist, such as
scanners, no ?)
Any reason other than pre-historical to have blkdev.h shielded like
that ?
Actually, I think the fix lies in scsi.h ... we can make that into a
nicely independent protocol header file. Your current woes come because
it pulls in scsi_cmnd.h ... perhaps just getting rid of this will fix
it.
Can the rest of linux-scsi verify that the fix below doesn't break
something else?
I found one cockup: block/cmd-filter.c is apparently not including
linuc/blkdev.h directly but via scsi/scsi.h ... I fixed this up.
This looks like you're just papering over the bug, by hardcoding the
same values that are in the scsi header. Or are they really independent,
in which case I'd say the comments are confusing.
cheers
On Mon, 2009-02-09 at 11:11 +1100, Benjamin Herrenschmidt wrote:
quoted
The PS3 platform code wants to use some of the standard SCSI types from
there though, as they are part of the hypervisor ABI. (And in fact it
can be argued that non-block devices using SCSI do exist, such as
scanners, no ?)
Any reason other than pre-historical to have blkdev.h shielded like
that ?
Actually, I think the fix lies in scsi.h ... we can make that into a
nicely independent protocol header file. Your current woes come because
it pulls in scsi_cmnd.h ... perhaps just getting rid of this will fix
it.
Can the rest of linux-scsi verify that the fix below doesn't break
something else?
I found one cockup: block/cmd-filter.c is apparently not including
linuc/blkdev.h directly but via scsi/scsi.h ... I fixed this up.
From: Sachin P. Sant <hidden> Date: 2009-02-11 05:28:41
James Bottomley wrote:
Actually, I think the fix lies in scsi.h ... we can make that into a
nicely independent protocol header file. Your current woes come because
it pulls in scsi_cmnd.h ... perhaps just getting rid of this will fix
it.
Can the rest of linux-scsi verify that the fix below doesn't break
something else?
I found one cockup: block/cmd-filter.c is apparently not including
linuc/blkdev.h directly but via scsi/scsi.h ... I fixed this up.
Tested the patch and it fixes the issue.
Thanks
-Sachin
--
---------------------------------
Sachin Sant
IBM Linux Technology Center
India Systems and Technology Labs
Bangalore, India
---------------------------------