Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106111
b: refs/heads/master
c: 39c1ffe
h: refs/heads/master
i:
  106109: dc09ce0
  106107: d5a74b7
  106103: 8ecbb23
  106095: 58318a9
  106079: 20a7612
  106047: 5d4f6e9
  105983: 9be9cc8
v: v3
  • Loading branch information
Brian King authored and Benjamin Herrenschmidt committed Jul 25, 2008
1 parent 1d6ca9b commit 36bd3db
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7912a0ac5907df1f8b214b3ca15ccf96129daae0
refs/heads/master: 39c1ffecc6aabcc8105602a95ce769f27bcf6048
15 changes: 15 additions & 0 deletions trunk/drivers/scsi/ibmvscsi/ibmvfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3819,6 +3819,20 @@ static int ibmvfc_remove(struct vio_dev *vdev)
return 0;
}

/**
* ibmvfc_get_desired_dma - Calculate DMA resources needed by the driver
* @vdev: vio device struct
*
* Return value:
* Number of bytes the driver will need to DMA map at the same time in
* order to perform well.
*/
static unsigned long ibmvfc_get_desired_dma(struct vio_dev *vdev)
{
unsigned long pool_dma = max_requests * sizeof(union ibmvfc_iu);
return pool_dma + ((512 * 1024) * driver_template.cmd_per_lun);
}

static struct vio_device_id ibmvfc_device_table[] __devinitdata = {
{"fcp", "IBM,vfc-client"},
{ "", "" }
Expand All @@ -3829,6 +3843,7 @@ static struct vio_driver ibmvfc_driver = {
.id_table = ibmvfc_device_table,
.probe = ibmvfc_probe,
.remove = ibmvfc_remove,
.get_desired_dma = ibmvfc_get_desired_dma,
.driver = {
.name = IBMVFC_NAME,
.owner = THIS_MODULE,
Expand Down

0 comments on commit 36bd3db

Please sign in to comment.