Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110532
b: refs/heads/master
c: c3919af
h: refs/heads/master
v: v3
  • Loading branch information
FUJITA Tomonori authored and Jens Axboe committed Oct 9, 2008
1 parent 1e15903 commit 2c29a18
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 626710c9d665ff381c7ec666b6a023f064ca5fef
refs/heads/master: c3919af2354fff673026dcbeac6f009d2ce5ceee
32 changes: 0 additions & 32 deletions trunk/drivers/scsi/sg.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ static ssize_t sg_new_write(Sg_fd *sfp, struct file *file,
int read_only, Sg_request **o_srp);
static int sg_common_write(Sg_fd * sfp, Sg_request * srp,
unsigned char *cmnd, int timeout, int blocking);
static int sg_write_xfer(Sg_request * srp);
static int sg_read_xfer(Sg_request * srp);
static int sg_read_oxfer(Sg_request * srp, char __user *outp, int num_read_xfer);
static void sg_remove_scat(Sg_scatter_hold * schp);
Expand Down Expand Up @@ -736,11 +735,6 @@ sg_common_write(Sg_fd * sfp, Sg_request * srp,
sg_finish_rem_req(srp);
return k; /* probably out of space --> ENOMEM */
}
if ((k = sg_write_xfer(srp))) {
SCSI_LOG_TIMEOUT(1, printk("sg_common_write: write_xfer, bad address\n"));
sg_finish_rem_req(srp);
return k;
}
if (sdp->detached) {
sg_finish_rem_req(srp);
return -ENODEV;
Expand Down Expand Up @@ -1816,32 +1810,6 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size)
return -ENOMEM;
}

static int
sg_write_xfer(Sg_request * srp)
{
sg_io_hdr_t *hp = &srp->header;
Sg_scatter_hold *schp = &srp->data;
int num_xfer = 0;
int dxfer_dir = hp->dxfer_direction;
int new_interface = ('\0' == hp->interface_id) ? 0 : 1;

if ((SG_DXFER_UNKNOWN == dxfer_dir) || (SG_DXFER_TO_DEV == dxfer_dir) ||
(SG_DXFER_TO_FROM_DEV == dxfer_dir)) {
num_xfer = (int) (new_interface ? hp->dxfer_len : hp->flags);
if (schp->bufflen < num_xfer)
num_xfer = schp->bufflen;
}
if ((num_xfer <= 0) || (schp->dio_in_use) ||
(new_interface
&& ((SG_FLAG_NO_DXFER | SG_FLAG_MMAP_IO) & hp->flags)))
return 0;

SCSI_LOG_TIMEOUT(4, printk("sg_write_xfer: num_xfer=%d, k_use_sg=%d\n",
num_xfer, schp->k_use_sg));

return 0;
}

static void
sg_remove_scat(Sg_scatter_hold * schp)
{
Expand Down

0 comments on commit 2c29a18

Please sign in to comment.