Skip to contentSkip to conversation

2.5.26 : drivers/scsi/BusLogic.c

DISCUSSION James Bottomley 4 participants 5 messages Jul 18, 2002 – Jul 25, 2002

lore
Share & tools
lore
#0 lore raw
Quoted 9 lines

BusLogic.c:32: #error Please convert me to Documentation/ DMA-mapping.txt BusLogic.c: In function `BusLogic_DetectHostAdapter':
BusLogic.c:2841: warning: long unsigned int format, BusLogic_IO_Address_T arg (arg 2) BusLogic.c: In function BusLogic_QueueCommand': BusLogic.c:3415: structure has no member named address' BusLogic.c: In function `BusLogic_BIOSDiskParameters':
BusLogic.c:4141: warning: implicit declaration of function `scsi_bios_ptable' BusLogic.c:4141: warning: assignment makes pointer from integer without a cast make[2]: *** [BusLogic.o] Error 1

I have a single MCA Buslogic card on my shelf. Assuming it hasn't got bitrot, I may be able to look at this soon.

In the meantime, if you want to try, the trick looks to be to use pci_map_single in BusLogic_CreateInitialCCBs; but then set up a reverse mapping table for them in BusLogic_InitializeCCBs so that Bus_to_Virtual will still work (its only use is to convert bus physical CCB addresses into CPU virtual ones).

Next, in BusLogic_QueueCommand you need to use pci_map_single for non-sg transformations, and pci_map_sg for sg plus in the loop over segments, use the macros

sg_dma_address(&ScatterList[Segment]) in place of ScatterList[Segment].address sg_dma_len(&ScatterList[Segment]) in place ofScatterList[Segment].length

Initially, don't worry about unmapping, but this should get the thing working.

There are probably other places in the driver I've missed (like sense buffers), but that should be the core of the necessary changes.

I'm off on holiday for 10 days, so I'll only be getting email sporadically, if at all.

James

#1 lore raw
Quoted 10 lines · James Bottomley

In the meantime, if you want to try, the trick looks to be to use pci_map_single in BusLogic_CreateInitialCCBs; but then set up a reverse mapping table for them in BusLogic_InitializeCCBs so that Bus_to_Virtual will still work (its only use is to convert bus physical CCB addresses into CPU virtual ones).

Next, in BusLogic_QueueCommand you need to use pci_map_single for non-sg transformations, and pci_map_sg for sg plus in the loop over segments, use the macros

Quoted 7 lines

sg_dma_address(&ScatterList[Segment]) in place of ScatterList[Segment].address sg_dma_len(&ScatterList[Segment]) in place ofScatterList[Segment].length

Initially, don't worry about unmapping, but this should get the thing working.

There are probably other places in the driver I've missed (like sense buffers), but that should be the core of the necessary changes.

There are. I'm currently writing a patch (hopefully a first test version will be out in an hour or so). It's not quite as easy as it looks at first mainly because this driver supports PCI, EISA, VLB, MCA, and ISA cards :-/

Signature · 4 lines
  Doug Ledford <[email protected]>     919-754-3700 x44233
         Red Hat, Inc. 
         1801 Varsity Dr.
         Raleigh, NC 27606
#2 lore raw

Doug> There are. I'm currently writing a patch (hopefully a first Doug> test version will be out in an hour or so). It's not quite as Doug> easy as it looks at first mainly because this driver supports Doug> PCI, EISA, VLB, MCA, and ISA cards :-/

I've got a PCI BusLogic SCSI card at home I've been unable to use for a while on 2.4, so I'm really interested in this patch.

Maybe it's time to break out old the EISA, VLB, MCA and ISA support into their own modules/sections? I think the PCI version will be the most in demand.

Thanks though for your work!

John

#3 lore raw
In reply to Doug Ledford

Doug: Found your patch. I was waiting on the wrong thread. Compiling as we speak, will give it a good thrashing with a kernel build or some such when it's done and will let you know the result.