Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213077
b: refs/heads/master
c: 576e661
h: refs/heads/master
i:
  213075: 1f8fbba
v: v3
  • Loading branch information
Stephen M. Cameron authored and Jens Axboe committed Sep 10, 2010
1 parent 320e894 commit 5115c6b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 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: 0a25a5aee727c4a56c7d39e0e595947b02ee2696
refs/heads/master: 576e661c658ab7d2a15cc12d5b8a1600db81ec0a
28 changes: 15 additions & 13 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,20 @@ static int cciss_getpciinfo(ctlr_info_t *h, void __user *argp)
return 0;
}

static int cciss_getintinfo(ctlr_info_t *h, void __user *argp)
{
cciss_coalint_struct intinfo;

if (!argp)
return -EINVAL;
intinfo.delay = readl(&h->cfgtable->HostWrite.CoalIntDelay);
intinfo.count = readl(&h->cfgtable->HostWrite.CoalIntCount);
if (copy_to_user
(argp, &intinfo, sizeof(cciss_coalint_struct)))
return -EFAULT;
return 0;
}

static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
Expand All @@ -1260,19 +1274,7 @@ static int cciss_ioctl(struct block_device *bdev, fmode_t mode,
case CCISS_GETPCIINFO:
return cciss_getpciinfo(h, argp);
case CCISS_GETINTINFO:
{
cciss_coalint_struct intinfo;
if (!arg)
return -EINVAL;
intinfo.delay =
readl(&h->cfgtable->HostWrite.CoalIntDelay);
intinfo.count =
readl(&h->cfgtable->HostWrite.CoalIntCount);
if (copy_to_user
(argp, &intinfo, sizeof(cciss_coalint_struct)))
return -EFAULT;
return 0;
}
return cciss_getintinfo(h, argp);
case CCISS_SETINTINFO:
{
cciss_coalint_struct intinfo;
Expand Down

0 comments on commit 5115c6b

Please sign in to comment.