Skip to contentSkip to conversation

2.5.44 compilation errors

DISCUSSION [email protected] 3 participants 5 messages Oct 19, 2002 – Oct 20, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

--------------------------------------------------------------------------
drivers/scsi/qla1280.c:5932: unknown field next' specified in initializer drivers/scsi/qla1280.c:5932: warning: missing braces around initializer drivers/scsi/qla1280.c:5932: warning: (near initialization for driver_template.shtp_list')make[2]: *** [drivers/scsi/qla1280.o] Error 1 make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
----------------------------------------------------------------------------

#1 lore raw
Quoted 8 lines · On Sat, Oct 19 2002, [email protected] wrote:

--------------------------------------------------------------------------
drivers/scsi/qla1280.c:5932: unknown field next' specified in initializer drivers/scsi/qla1280.c:5932: warning: missing braces around initializer drivers/scsi/qla1280.c:5932: warning: (near initialization for driver_template.shtp_list')make[2]: *** [drivers/scsi/qla1280.o] Error 1 make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
----------------------------------------------------------------------------

===== drivers/scsi/qla1280.h 1.7 vs edited =====

drivers/scsi/qla1280.h +0 -10
@@ -1324,22 +1324,12 @@
  */
 
 #define QLA1280_LINUX_TEMPLATE {				\
-	next: NULL,						\
-	module: NULL,						\
-	proc_dir: NULL,						\
 	proc_info: qla1280_proc_info,				\
 	name: "Qlogic ISP 1280/12160",				\
 	detect: qla1280_detect,					\
 	release: qla1280_release,				\
 	info: qla1280_info,					\
-	ioctl: NULL,						\
-	command: NULL,						\
 	queuecommand: qla1280_queuecommand,			\
-	eh_strategy_handler: NULL,				\
-	eh_abort_handler: NULL,					\
-	eh_device_reset_handler: NULL,				\
-	eh_bus_reset_handler: NULL,				\
-	eh_host_reset_handler: NULL,				\
 /*	use_new_eh_code: 0, */					\
 	abort: qla1280_abort,					\
 	reset: qla1280_reset,					\
Signature · 1 line
Jens Axboe
#2 lore raw

Re: ini9100u.c fixes ? (Was 2.5.44 compilation errors)

Quoted 39 lines · Jens Axboe
Quoted 8 lines · On Sat, Oct 19 2002, [email protected] wrote:

--------------------------------------------------------------------------
drivers/scsi/qla1280.c:5932: unknown field next' specified in initializer drivers/scsi/qla1280.c:5932: warning: missing braces around initializer drivers/scsi/qla1280.c:5932: warning: (near initialization for driver_template.shtp_list')make[2]: *** [drivers/scsi/qla1280.o] Error 1 make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2
----------------------------------------------------------------------------

===== drivers/scsi/qla1280.h 1.7 vs edited =====

drivers/scsi/qla1280.h +0 -10
@@ -1324,22 +1324,12 @@
  */
 
 #define QLA1280_LINUX_TEMPLATE {				\
-	next: NULL,						\
-	module: NULL,						\
-	proc_dir: NULL,						\
 	proc_info: qla1280_proc_info,				\
 	name: "Qlogic ISP 1280/12160",				\
 	detect: qla1280_detect,					\
 	release: qla1280_release,				\
 	info: qla1280_info,					\
-	ioctl: NULL,						\
-	command: NULL,						\
 	queuecommand: qla1280_queuecommand,			\
-	eh_strategy_handler: NULL,				\
-	eh_abort_handler: NULL,					\
-	eh_device_reset_handler: NULL,				\
-	eh_bus_reset_handler: NULL,				\
-	eh_host_reset_handler: NULL,				\
 /*	use_new_eh_code: 0, */					\
 	abort: qla1280_abort,					\
 	reset: qla1280_reset,					\
Signature · 1 line
-- 

The same problem exist with ini9100u.c, solution is:

[dzimi@cyborg scsi]$ diff -urN ini9100u.h.orig ini9100u.h

ini9100u.h Sun Oct 20 11:08:56 2002 renamed from ini9100u.h.orig Sun Oct 20 11:08:38 2002 +0 -0
@@ -89,9 +89,6 @@
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 

1.03g"

 #define INI9100U       { \
-       next:           NULL,                                           \
-       module:         NULL,                                           \
-       proc_name:      "INI9100U", \
        proc_info:      NULL,                           \
        name:           i91u_REVID, \
        detect:         i91u_detect, \

but this is one of them.
Compilation problem still exist, because driver should be rewrite (using new DMA-mapping API).
I've prepared patch, witch build and possible work, but initio.o didn't see my partition table. Where is the bug ?
Correct me if I wrong.

Krzysiek Taraszka ([email protected])

AD.

Here My patch for ini9100u.c :

[dzimi@cyborg scsi]$ diff -urN ini9100u.c.orig ini9100u.c

ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +2 -4
@@ -108,8 +108,6 @@
 
 #define CVT_LINUX_VERSION(V,P,S)        (V * 65536 + P * 256 + S)
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif
@@ -491,8 +489,8 @@
        if (SCpnt->use_sg) {
                pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
                if (SCpnt->use_sg == 1) {       /* If only one entry in the list *//*      treat it as regular I/O */
-                       pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                       TotalLen = pSrbSG->length;
+                       pSCB->SCB_BufPtr = (U32) sg_dma_address(pSrbSG);
+                       TotalLen = sg_dma_len(pSrbSG);
                        pSCB->SCB_SGLen = 0;
                } else {        /* Assign SG physical address   */
                        pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr;
@@ -500,8 +498,9 @@
                        for (i = 0, TotalLen = 0, pSG = 

&pSCB->SCB_SGList[0]; /* 1.01g */

                             i < SCpnt->use_sg;
                             i++, pSG++, pSrbSG++) {
-                               pSG->SG_Ptr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                               TotalLen += pSG->SG_Len = pSrbSG->length;
+                               pSG->SG_Ptr = (U32) sg_dma_address(pSrbSG);
+                               pSG->SG_Len = (U32) sg_dma_len(pSrbSG);
+                               TotalLen += (U32) sg_dma_len(pSrbSG);
                        }
                        pSCB->SCB_SGLen = i;
                }
ini9100u.c renamed from ini9100u.c.orig +5 -6
@@ -108,8 +108,6 @@
 
 #define CVT_LINUX_VERSION(V,P,S)        (V * 65536 + P * 256 + S)
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif
@@ -491,8 +489,8 @@
 	if (SCpnt->use_sg) {
 		pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
 		if (SCpnt->use_sg == 1) {	/* If only one entry in the list *//*      treat it as regular I/O */
-			pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address);
-			TotalLen = pSrbSG->length;
+			pSCB->SCB_BufPtr = (U32) sg_dma_address(pSrbSG);
+			TotalLen = sg_dma_len(pSrbSG);
 			pSCB->SCB_SGLen = 0;
 		} else {	/* Assign SG physical address   */
 			pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr;
@@ -500,8 +498,9 @@
 			for (i = 0, TotalLen = 0, pSG = &pSCB->SCB_SGList[0];	/* 1.01g */
 			     i < SCpnt->use_sg;
 			     i++, pSG++, pSrbSG++) {
-				pSG->SG_Ptr = (U32) VIRT_TO_BUS(pSrbSG->address);
-				TotalLen += pSG->SG_Len = pSrbSG->length;
+				pSG->SG_Ptr = (U32) sg_dma_address(pSrbSG);
+				pSG->SG_Len = (U32) sg_dma_len(pSrbSG);
+				TotalLen += (U32) sg_dma_len(pSrbSG);
 			}
 			pSCB->SCB_SGLen = i;
 		}
ini9100u.h renamed from ini9100u.h.orig +0 -3
@@ -89,9 +89,6 @@
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g"
 
 #define INI9100U	{ \
-	next:		NULL,						\
-	module:		NULL,						\
-	proc_name:	"INI9100U", \
 	proc_info:	NULL,				\
 	name:		i91u_REVID, \
 	detect:		i91u_detect, \
#3 lore raw

Re: ini9100u.c fixes ? (Was 2.5.44 compilation errors)

Quoted 10 lines · Krzysiek Taraszka

The same problem exist with ini9100u.c, solution is:

[dzimi@cyborg scsi]$ diff -urN ini9100u.h.orig ini9100u.h

ini9100u.h Sun Oct 20 11:08:56 2002 renamed from ini9100u.h.orig Sun Oct 20 11:08:38 2002 +0 -0
@@ -89,9 +89,6 @@
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 

1.03g"

#define INI9100U { \

ini9100u.h Sun Oct 20 11:08:56 2002

Quoted 6 lines
ini9100u.h Sun Oct 20 11:08:56 2002 renamed from ini9100u.h.orig Sun Oct 20 11:08:38 2002 +0 -3
-       next:           NULL,                                           \
-       module:         NULL,                                           \
-       proc_name:      "INI9100U", \
        proc_info:      NULL,                           \
        name:           i91u_REVID, \
        detect:         i91u_detect, \

Please just kill any NULL assignments, they are not needed.

Quoted 17 lines

but this is one of them.
Compilation problem still exist, because driver should be rewrite (using new DMA-mapping API).
I've prepared patch, witch build and possible work, but initio.o didn't see my partition table. Where is the bug ?
Correct me if I wrong.

Krzysiek Taraszka ([email protected])

AD.

Here My patch for ini9100u.c :

[dzimi@cyborg scsi]$ diff -urN ini9100u.c.orig ini9100u.c

ini9100u.c Sun Oct 20 11:18:33 2002 line 111

Quoted 4 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +0 -1
@@ -108,8 +108,6 @@
 
 #define CVT_LINUX_VERSION(V,P,S)        (V * 65536 + P * 256 + S)
 
-#error Please convert me to Documentation/DMA-mapping.txt

First step, read this document!

Quoted 4 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +0 -0
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif

ini9100u.c Sun Oct 20 11:18:33 2002 line 496

Quoted 10 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +2 -2
@@ -491,8 +489,8 @@
        if (SCpnt->use_sg) {
                pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
                if (SCpnt->use_sg == 1) {       /* If only one entry in the list *//*      treat it as regular I/O */
-                       pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                       TotalLen = pSrbSG->length;
+                       pSCB->SCB_BufPtr = (U32) sg_dma_address(pSrbSG);
+                       TotalLen = sg_dma_len(pSrbSG);
                        pSCB->SCB_SGLen = 0;
                } else {        /* Assign SG physical address   */
                        pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr;

You didn't read the document :). You are not mapping the scatterlist for dma before using sg_dma_address() on the element. So pSCB->SCB_BufPtr is now 0.

ini9100u.c Sun Oct 20 11:18:33 2002

Quoted 10 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +0 -0
@@ -500,8 +498,9 @@
                        for (i = 0, TotalLen = 0, pSG = 

&pSCB->SCB_SGList[0]; /* 1.01g */

                             i < SCpnt->use_sg;
                             i++, pSG++, pSrbSG++) {
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +3 -2
-                               pSG->SG_Ptr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                               TotalLen += pSG->SG_Len = pSrbSG->length;
+                               pSG->SG_Ptr = (U32) sg_dma_address(pSrbSG);
+                               pSG->SG_Len = (U32) sg_dma_len(pSrbSG);
+                               TotalLen += (U32) sg_dma_len(pSrbSG);

Ditto

Signature · 1 line
Jens Axboe
#4 lore raw

Re: ini9100u.c fixes ? (Was 2.5.44 compilation errors)

Quoted 54 lines · Jens Axboe
Quoted 10 lines · Krzysiek Taraszka

The same problem exist with ini9100u.c, solution is:

[dzimi@cyborg scsi]$ diff -urN ini9100u.h.orig ini9100u.h

ini9100u.h Sun Oct 20 11:08:56 2002 renamed from ini9100u.h.orig Sun Oct 20 11:08:38 2002 +0 -0
@@ -89,9 +89,6 @@
 #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 

1.03g"

#define INI9100U { \

ini9100u.h Sun Oct 20 11:08:56 2002

Quoted 6 lines
ini9100u.h Sun Oct 20 11:08:56 2002 renamed from ini9100u.h.orig Sun Oct 20 11:08:38 2002 +0 -3
-       next:           NULL,                                           \
-       module:         NULL,                                           \
-       proc_name:      "INI9100U", \
        proc_info:      NULL,                           \
        name:           i91u_REVID, \
        detect:         i91u_detect, \

Please just kill any NULL assignments, they are not needed.

Quoted 17 lines

but this is one of them.
Compilation problem still exist, because driver should be rewrite (using new DMA-mapping API).
I've prepared patch, witch build and possible work, but initio.o didn't see my partition table. Where is the bug ?
Correct me if I wrong.

Krzysiek Taraszka ([email protected])

AD.

Here My patch for ini9100u.c :

[dzimi@cyborg scsi]$ diff -urN ini9100u.c.orig ini9100u.c

ini9100u.c Sun Oct 20 11:18:33 2002 line 111

Quoted 4 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +0 -1
@@ -108,8 +108,6 @@
 
 #define CVT_LINUX_VERSION(V,P,S)        (V * 65536 + P * 256 + S)
 
-#error Please convert me to Documentation/DMA-mapping.txt

First step, read this document!

Quoted 10 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +1 -2
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif
@@ -491,8 +489,8 @@
        if (SCpnt->use_sg) {
                pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
                if (SCpnt->use_sg == 1) {       /* If only one entry in the list *//*      treat it as regular I/O */
-                       pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                       TotalLen = pSrbSG->length;
+                       pSCB->SCB_BufPtr = (U32) sg_dma_address(pSrbSG);
Quoted 8 lines

ini9100u.c Sun Oct 20 11:18:33 2002 line 496

Quoted 4 lines
ini9100u.c Sun Oct 20 11:18:33 2002 renamed from ini9100u.c.orig Sun Oct 20 11:15:39 2002 +1 -0
+                       TotalLen = sg_dma_len(pSrbSG);
                        pSCB->SCB_SGLen = 0;
                } else {        /* Assign SG physical address   */
                        pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr;

You didn't read the document :). You are not mapping the scatterlist for dma before using sg_dma_address() on the element. So pSCB->SCB_BufPtr is now 0.

well, i read but this is my first contact with 2.5 tree, I need to read more documents and other scsi drivers! Now i know why doesn't work. :) Thanks a lot.

Krzysiek Taraszka ([email protected])