From: David Mosberger <davidm@napali.hpl.hp.com>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [patch] couple of megaraid fixes
Date: Wed, 9 Apr 2003 15:58:02 -0700 [thread overview]
Message-ID: <200304092258.h39Mw2Di011866@napali.hpl.hp.com> (raw)
The attached patch has been in my tree for some time. IIRC, Grant
Grundler sent it to me. The old code is clearly broken: it still uses
virt_to_bus() and SCpnt->pid is declared as "unsigned long", so I'm
pretty sure this is an improvement. ;-)
--david
diff -Nru a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c
--- a/drivers/scsi/megaraid.c Wed Apr 9 14:49:48 2003
+++ b/drivers/scsi/megaraid.c Wed Apr 9 14:49:48 2003
@@ -2045,7 +2045,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);
@@ -3351,9 +3351,13 @@
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);
}
next reply other threads:[~2003-04-09 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-09 22:58 David Mosberger [this message]
2003-04-10 6:20 ` Christoph Hellwig
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=200304092258.h39Mw2Di011866@napali.hpl.hp.com \
--to=davidm@napali.hpl.hp.com \
--cc=davidm@hpl.hp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®