From: James Bottomley <James.Bottomley@steeleye.com>
To: Dave Boutcher <sleddog@us.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>,
SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] ibmvscsi driver - fourth version
Date: 11 Mar 2004 12:43:57 -0500 [thread overview]
Message-ID: <1079027038.2820.57.camel@mulgrave> (raw)
In-Reply-To: <opr3xta6gbl6e53g@us.ibm.com>
+static int map_sg_data(struct scsi_cmnd *cmd,
+ struct SRP_CMD *srp_cmd, struct device *dev)
+{
[...]
+ data->virtual_address = sg[0].dma_address;
+ data->length = sg[0].dma_length;
This is wrong, you must use the data accessors sg_dma_addres() and
sg_dma_len().
+static int map_single_data(struct scsi_cmnd *cmd,
+ struct SRP_CMD *srp_cmd, struct device *dev)
+{
[...]
+ data->virtual_address =
+ (u64) (unsigned long)dma_map_single(dev, cmd->request_buffer,
+ cmd->request_bufflen,
+ DMA_BIDIRECTIONAL);
+ if (data->virtual_address == 0xFFFFFFFF) {
+ printk(KERN_ERR
+ "ibmvscsi: Unable to map request_buffer for command!\n");
dma_map_single() has no error return currently, what is this trying to
do?
+
+ /* Block requests until we get the SRP login back */
+ scsi_block_requests(host);
+
+ if (!scsi_add_host(hostdata->host, hostdata->dev)) {
+
+ scsi_scan_host(host);
+ return hostdata;
+ }
Er, have you actually tried this ... the block requests will block all
requests including the attempt to scan. I assume the unblock is coming
from the schedule_work, but you're still hanging the rest of the system
waiting for this on a bootup.
+static int ibmvscsi_send_srp_event(struct srp_event_struct *evt_struct,
+ struct ibmvscsi_host_data *hostdata)
+{
[...]
+ if (ibmvscsi_send_crq(hostdata, crq_as_u64[0], crq_as_u64[1]) != 0) {
+ list_del(&evt_struct->list);
+
+ cmnd = evt_struct->cmnd;
+ printk(KERN_ERR "ibmvscsi: failed to send event struct\n");
+ unmap_cmd_data(&evt_struct->evt->srp.cmd, hostdata->dev);
+ ibmvscsi_free_event_struct(&hostdata->pool, evt_struct);
+ cmnd->result = DID_ERROR << 16;
+ evt_struct->cmnd_done(cmnd);
+ }
This is still in the queuecommand path. Are you sure you want to end
the command with DID_ERROR here, which will decrement the retry count in
error handling rather than returning SCSI_MQUEUE_DEVICE_BUSY?
There seem to be other places in the driver where the return status of
ibmvscsi_send_crq isn't being checked, should it be?
James
next prev parent reply other threads:[~2004-03-11 17:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-24 5:34 [PATCH] ibmvscsi driver - third version Dave Boutcher
2004-02-25 13:45 ` Christoph Hellwig
2004-02-25 17:53 ` [PATCH] ibmvscsi driver - fourth version Dave Boutcher
2004-03-11 17:43 ` James Bottomley [this message]
2004-03-11 21:25 ` Dave Boutcher
2004-03-11 22:07 ` James Bottomley
2004-03-12 15:59 ` [PATCH] ibmvscsi driver - fifth version Dave Boutcher
2004-03-31 21:26 ` [PATCH] ibmvscsi driver - sixth version Dave Boutcher
2004-03-31 21:58 ` James Bottomley
2004-03-31 22:37 ` Dave Boutcher
2004-03-31 22:02 ` Jeff Garzik
2004-03-31 23:12 ` Dave Boutcher
2004-03-31 23:39 ` James Bottomley
2004-03-31 23:51 ` Dave Boutcher
2004-04-01 0:10 ` Jeff Garzik
2004-04-01 6:17 ` [PATCH] qla2xxx: sleep while IRQ disabled fix in eh_abort Andrew Vasquez
2004-04-01 15:04 ` James Bottomley
2004-04-01 0:16 ` [PATCH] ibmvscsi driver - sixth version Jeff Garzik
2004-04-01 6:03 ` Andrew Vasquez
2004-04-01 7:13 ` Jeff Garzik
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=1079027038.2820.57.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sleddog@us.ibm.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