diff options
| author | Dave Airlie <airlied@redhat.com> | 2013-02-08 12:10:18 +1000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2013-02-08 12:10:18 +1000 | 
| commit | 6dc1c49da6dd3bf020a66b2a135b9625ac01c2c7 (patch) | |
| tree | 38a6c5d4896de01449e9d224088ae223161fcd3c /drivers/target/target_core_device.c | |
| parent | cd17ef4114ad5c514b17e6a0bb02a309ab90b692 (diff) | |
| parent | 5845b81bdad374f98f809a658ec747d92c9595c4 (diff) | |
| download | olio-linux-3.10-6dc1c49da6dd3bf020a66b2a135b9625ac01c2c7.tar.xz olio-linux-3.10-6dc1c49da6dd3bf020a66b2a135b9625ac01c2c7.zip  | |
Merge branch 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux into drm-next
This pulls in most of Linus tree up to -rc6, this fixes the worst lockdep
reported issues and re-enables fbcon lockdep.
(not the fbcon maintainer)
* 'fbcon-locking-fixes' of ssh://people.freedesktop.org/~airlied/linux: (529 commits)
  Revert "Revert "console: implement lockdep support for console_lock""
  fbcon: fix locking harder
  fb: Yet another band-aid for fixing lockdep mess
  fb: rework locking to fix lock ordering on takeover
Diffstat (limited to 'drivers/target/target_core_device.c')
| -rw-r--r-- | drivers/target/target_core_device.c | 8 | 
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c index e2695101bb9..f2aa7543d20 100644 --- a/drivers/target/target_core_device.c +++ b/drivers/target/target_core_device.c @@ -941,6 +941,8 @@ int se_dev_set_queue_depth(struct se_device *dev, u32 queue_depth)  int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)  { +	int block_size = dev->dev_attrib.block_size; +  	if (dev->export_count) {  		pr_err("dev[%p]: Unable to change SE Device"  			" fabric_max_sectors while export_count is %d\n", @@ -978,8 +980,12 @@ int se_dev_set_fabric_max_sectors(struct se_device *dev, u32 fabric_max_sectors)  	/*  	 * Align max_sectors down to PAGE_SIZE to follow transport_allocate_data_tasks()  	 */ +	if (!block_size) { +		block_size = 512; +		pr_warn("Defaulting to 512 for zero block_size\n"); +	}  	fabric_max_sectors = se_dev_align_max_sectors(fabric_max_sectors, -						      dev->dev_attrib.block_size); +						      block_size);  	dev->dev_attrib.fabric_max_sectors = fabric_max_sectors;  	pr_debug("dev[%p]: SE Device max_sectors changed to %u\n",  |