2.5.14 error: ini9100u.c
Just a bug report of compilation which perdure since several 2.5 release concerning the driver of initio scsi card and which prevents me from testing any 2.5.x :(
Please CC: back to me, as I'm not subscribed.
Any help welcome, even bearers of bad news :)
gcc -D__KERNEL__ -I/usr/src/linux-2.5.14/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.5.14/include/linux/modversions.h -DKBUILD_BASENAME=ini9100u -c -o ini9100u.o ini9100u.c ini9100u.c:111:2: #error Please convert me to Documentation/DMA-mapping.txtini9100u.c: In function `i91uBuildSCB':
ini9100u.c:494: structure has no member named address' ini9100u.c:503: structure has no member named address' make[2]: *** [ini9100u.o] Erreur 1
make[2]: Quitte le répertoire `/usr/src/linux-2.5.14/drivers/scsi' make[1]: *** [_modsubdir_scsi] Erreur 2
make[1]: Quitte le répertoire `/usr/src/linux-2.5.14/drivers'
make: *** [_mod_drivers] Erreur 2
Quoted 4 lines · angus
Just a bug report of compilation which perdure since several 2.5 release concerning the driver of initio scsi card and which prevents me from testing any 2.5.x :(
Angus,
The following patch makes that driver compile ok. Can you report back whether it works or not (as I don't have that adapter to test).
Doug Gilbert
drivers/scsi/ini9100u.h2514hak renamed from drivers/scsi/ini9100u.h +4 -3
@@ -82,8 +82,11 @@ extern int i91u_release(struct Scsi_Host *); extern int i91u_command(Scsi_Cmnd *); extern int i91u_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *)); +#if 0 extern int i91u_abort(Scsi_Cmnd *); extern int i91u_reset(Scsi_Cmnd *, unsigned int); +#endif +static int i91u_eh_bus_reset(Scsi_Cmnd * SCpnt); extern int i91u_biosparam(Scsi_Disk *, kdev_t, int *); /*for linux v2.0 */ #define i91u_REVID "Initio INI-9X00U/UW SCSI device driver; Revision: 1.03g"
@@ -102,10 +105,8 @@ eh_strategy_handler: NULL, \ eh_abort_handler: NULL, \ eh_device_reset_handler: NULL, \ - eh_bus_reset_handler: NULL, \ + eh_bus_reset_handler: i91u_eh_bus_reset, \ eh_host_reset_handler: NULL, \ - abort: i91u_abort, \ - reset: i91u_reset, \ slave_attach: NULL, \ bios_param: i91u_biosparam, \ can_queue: 1, \
drivers/scsi/ini9100u.c2514hak renamed from drivers/scsi/ini9100u.c +18 -3
@@ -108,7 +108,7 @@ #define CVT_LINUX_VERSION(V,P,S) (V * 65536 + P * 256 + S) -#error Please convert me to Documentation/DMA-mapping.txt +/* #error Please convert me to Documentation/DMA-mapping.txt */ #ifndef LINUX_VERSION_CODE #include <linux/version.h>
@@ -491,7 +491,9 @@ 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); + pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS( + (unsigned char *)page_address(pSrbSG->page) + + pSrbSG->offset); TotalLen = pSrbSG->length; pSCB->SCB_SGLen = 0; } else { /* Assign SG physical address */
@@ -500,7 +502,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); + pSG->SG_Ptr = (U32) VIRT_TO_BUS( + (unsigned char *)page_address(pSrbSG->page) + + pSrbSG->offset); TotalLen += pSG->SG_Len = pSrbSG->length; } pSCB->SCB_SGLen = i;
@@ -552,6 +556,7 @@ return -1; } +#if 0 /* * Abort a queued command * (commands that are on the bus can't be aborted easily)
@@ -579,6 +584,16 @@ else return tul_device_reset(pHCB, (ULONG) SCpnt, SCpnt->target, reset_flags); } +#endif + +static int i91u_eh_bus_reset(Scsi_Cmnd * SCpnt) +{ + HCS *pHCB; + + pHCB = (HCS *) SCpnt->host->base; + tul_reset_scsi_bus(pHCB); + return SUCCESS; +} /* * Return the "logical geometry"
Hello Douglas,
Yes, it's worked!
I hope that it could be integrate in the next 2.5 release.
Thank you still.
Quoted 6 lines · Douglas Gilbert
Angus,
The following patch makes that driver compile ok. Can you report back whether it works or not (as I don't have that adapter to test).Doug Gilbert
drivers/scsi/ini9100u.c2514hak line 111
Quoted 2 lines · Douglas Gilbert
drivers/scsi/ini9100u.c2514hak renamed from drivers/scsi/ini9100u.c +1
-1-#error Please convert me to Documentation/DMA-mapping.txt +/* #error Please convert me to Documentation/DMA-mapping.txt */
Please read the document the comment points to, *then* rewrite the patch.
-ben
Quoted 7 lines · Benjamin LaHaise
drivers/scsi/ini9100u.c2514hak line 111
Quoted 2 lines · Douglas Gilbert
drivers/scsi/ini9100u.c2514hak renamed from drivers/scsi/ini9100u.c +1
-1-#error Please convert me to Documentation/DMA-mapping.txt +/* #error Please convert me to Documentation/DMA-mapping.txt */Please read the document the comment points to, *then* rewrite the patch.
Ben,
Be my guest.
Doug Gilbert
drivers/scsi/ini9100u.c2514hak line 111
Quoted 2 lines · Douglas Gilbert
drivers/scsi/ini9100u.c2514hak renamed from drivers/scsi/ini9100u.c +1
-1-#error Please convert me to Documentation/DMA-mapping.txt +/* #error Please convert me to Documentation/DMA-mapping.txt */
Please read the document the comment points to, *then* rewrite the patch.
-ben