Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48091
b: refs/heads/master
c: 4dd3cc5
h: refs/heads/master
i:
  48089: a8bf628
  48087: f1c832c
v: v3
  • Loading branch information
Cornelia Huck authored and Martin Schwidefsky committed Feb 12, 2007
1 parent 1211433 commit 95541fc
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 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: 0ec67667ab414b18a0518d5b11c842fd342e9cb1
refs/heads/master: 4dd3cc5caf41d55cd5e55f32902c8a2ad3296e19
32 changes: 30 additions & 2 deletions trunk/drivers/s390/cio/device_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
#include "chsc.h"
#include "device.h"

int
ccw_device_set_options(struct ccw_device *cdev, unsigned long flags)
int ccw_device_set_options_mask(struct ccw_device *cdev, unsigned long flags)
{
/*
* The flag usage is mutal exclusive ...
Expand All @@ -39,6 +38,33 @@ ccw_device_set_options(struct ccw_device *cdev, unsigned long flags)
return 0;
}

int ccw_device_set_options(struct ccw_device *cdev, unsigned long flags)
{
/*
* The flag usage is mutal exclusive ...
*/
if (((flags & CCWDEV_EARLY_NOTIFICATION) &&
(flags & CCWDEV_REPORT_ALL)) ||
((flags & CCWDEV_EARLY_NOTIFICATION) &&
cdev->private->options.repall) ||
((flags & CCWDEV_REPORT_ALL) &&
cdev->private->options.fast))
return -EINVAL;
cdev->private->options.fast |= (flags & CCWDEV_EARLY_NOTIFICATION) != 0;
cdev->private->options.repall |= (flags & CCWDEV_REPORT_ALL) != 0;
cdev->private->options.pgroup |= (flags & CCWDEV_DO_PATHGROUP) != 0;
cdev->private->options.force |= (flags & CCWDEV_ALLOW_FORCE) != 0;
return 0;
}

void ccw_device_clear_options(struct ccw_device *cdev, unsigned long flags)
{
cdev->private->options.fast &= (flags & CCWDEV_EARLY_NOTIFICATION) == 0;
cdev->private->options.repall &= (flags & CCWDEV_REPORT_ALL) == 0;
cdev->private->options.pgroup &= (flags & CCWDEV_DO_PATHGROUP) == 0;
cdev->private->options.force &= (flags & CCWDEV_ALLOW_FORCE) == 0;
}

int
ccw_device_clear(struct ccw_device *cdev, unsigned long intparm)
{
Expand Down Expand Up @@ -601,7 +627,9 @@ _ccw_device_get_device_number(struct ccw_device *cdev)


MODULE_LICENSE("GPL");
EXPORT_SYMBOL(ccw_device_set_options_mask);
EXPORT_SYMBOL(ccw_device_set_options);
EXPORT_SYMBOL(ccw_device_clear_options);
EXPORT_SYMBOL(ccw_device_clear);
EXPORT_SYMBOL(ccw_device_halt);
EXPORT_SYMBOL(ccw_device_resume);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/s390/cio/qdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -3194,7 +3194,7 @@ qdio_establish(struct qdio_initialize *init_data)

spin_lock_irqsave(get_ccwdev_lock(cdev),saveflags);

ccw_device_set_options(cdev, 0);
ccw_device_set_options_mask(cdev, 0);
result=ccw_device_start_timeout(cdev,&irq_ptr->ccw,
QDIO_DOING_ESTABLISH,0, 0,
QDIO_ESTABLISH_TIMEOUT);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-s390/ccwdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ extern void ccw_driver_unregister (struct ccw_driver *driver);

struct ccw1;

extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long);
extern int ccw_device_set_options(struct ccw_device *, unsigned long);
extern void ccw_device_clear_options(struct ccw_device *, unsigned long);

/* Allow for i/o completion notification after primary interrupt status. */
#define CCWDEV_EARLY_NOTIFICATION 0x0001
Expand Down

0 comments on commit 95541fc

Please sign in to comment.