Hello, On Thu, 3 Jan 2002, Alan Cox wrote: > > This tells the aic7xxx to use DMA safe memory for I/O. > > That seems totally inappropriate. The unchecked dma option is for > ancient ISA DMA controllers that didnt do the 16Mb check. > Maybe this is more appropriate then :) It tells the scsi scanner to always use DMA safe memory when doing its INQUIRY commands... On the O2, kernel is running in cacheable, non-coherent memory. kmalloc, with GFP_DMA flag will return a piece of uncacheable memory which is safe for I/O with devices. regards, Vivien Chappelier
--- linux/drivers/scsi/scsi_scan.c Thu Dec 20 18:31:09 2001 +++ linux.patch/drivers/scsi/scsi_scan.c Fri Jan 4 13:17:31 2002 @@ -283,7 +283,6 @@ unsigned int lun; unsigned int max_dev_lun; unsigned char *scsi_result; - unsigned char scsi_result0[256]; Scsi_Device *SDpnt; Scsi_Device *SDtail; unsigned int sparse_lun; @@ -305,8 +304,7 @@ scsi_initialize_queue(SDpnt, shpnt); SDpnt->request_queue.queuedata = (void *) SDpnt; /* Make sure we have something that is valid for DMA purposes */ - scsi_result = ((!shpnt->unchecked_isa_dma) - ? &scsi_result0[0] : kmalloc(512, GFP_DMA)); + scsi_result = kmalloc(512, GFP_DMA); } if (scsi_result == NULL) { @@ -463,7 +461,7 @@ } /* If we allocated a buffer so we could do DMA, free it now */ - if (scsi_result != &scsi_result0[0] && scsi_result != NULL) { + if (scsi_result != NULL) { kfree(scsi_result); } { Scsi_Device *sdev;