Re: Fw: 2.6.12-mm2: 3ware SATA RAID inaccessible

Jens Axboe
2005-06-28T08:24:00Z

On Sun, Jun 26 2005, James Bottomley wrote:
> +static void tw_unmap_internal(TW_Device_Extension *tw_dev, int request_id)
> +{
> + struct scsi_cmnd *cmd = tw_dev->srb[request_id];
> +
> + if (cmd->use_sg) {
> + struct scatterlist *sg;
> +
> + sg = (struct scatterlist *)cmd->request_buffer;
> + kunmap_atomic(sg->page, KM_USER0);

Woops. You have to pass the mapped buffer back in, kunmap_atomic() takes
the returned buffer from kmap_atomic() not the page mapped. Silly yes,
but that is how it is...

--
Jens Axboe