linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Cc: atulm@lsil.com, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix 2.4 megaraid virt_to_bus() usage
Date: Tue, 30 Dec 2003 15:29:30 -0700	[thread overview]
Message-ID: <200312301529.30065.bjorn.helgaas@hp.com> (raw)

This has been in the ia64 patch for ages.  It
	- removes two unused variables,
	- fixes a printk format string, and
	- removes a virt_to_bus() that doesn't work on some
	  ia64 boxes

The virt_to_bus() usage was removed from 2.6 in the
upgrade to version 2.03 of the driver:
    http://linux.bkbits.net:8080/linux-2.5/cset@1.971.136.1?nav=index.html|src/.|src/drivers|src/drivers/scsi|related/drivers/scsi/megaraid.c

Please apply to 2.4.

Bjorn


diff -urN linux-2.4/drivers/scsi/megaraid.c linux-ia64-2.4/drivers/scsi/megaraid.c
--- linux-2.4/drivers/scsi/megaraid.c	2003-12-29 17:05:18.000000000 -0700
+++ linux-ia64-2.4/drivers/scsi/megaraid.c	2003-12-29 17:05:55.000000000 -0700
@@ -2234,9 +2234,6 @@
 
 
 #if DEBUG
-static unsigned int cum_time = 0;
-static unsigned int cum_time_cnt = 0;
-
 static void showMbox (mega_scb * pScb)
 {
 	mega_mailbox *mbox;
@@ -2245,7 +2242,7 @@
 		return;
 
 	mbox = (mega_mailbox *) pScb->mboxData;
-	printk ("%u cmd:%x id:%x #scts:%x lba:%x addr:%x logdrv:%x #sg:%x\n",
+	printk ("%lu cmd:%x id:%x #scts:%x lba:%x addr:%x logdrv:%x #sg:%x\n",
 		pScb->SCpnt->pid,
 		mbox->cmd, mbox->cmdid, mbox->numsectors,
 		mbox->lba, mbox->xferaddr, mbox->logdrv, mbox->numsgelements);
@@ -3569,10 +3566,14 @@
 	mbox[0] = IS_BIOS_ENABLED;
 	mbox[2] = GET_BIOS;
 
-	mboxpnt->xferaddr = virt_to_bus ((void *) megacfg->mega_buffer);
+	mboxpnt->xferaddr = pci_map_single(megacfg->dev,
+				(void *) megacfg->mega_buffer, (2 * 1024L),
+				PCI_DMA_FROMDEVICE);
 
 	ret = megaIssueCmd (megacfg, mbox, NULL, 0);
 
+	pci_unmap_single(megacfg->dev, mboxpnt->xferaddr, 2 * 1024L, PCI_DMA_FROMDEVICE);
+
 	return (*(char *) megacfg->mega_buffer);
 }
 


                 reply	other threads:[~2003-12-30 22:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200312301529.30065.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=atulm@lsil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).